Skip to content

Flatten JSON Object Field in DX12 Methods #1347

Open
@andrew-lunarg

Description

@andrew-lunarg

I'd suggest changing this before people write any scripts against the structure we inherited from the DX12 toASCII format. It's obviously slightly arbitrary / a matter of opinion as to which is better.

Current* Format:

{
  "index": 3945,
  "method": {
    "name": "RSSetViewports",
    "thread": 1,
    "object": {
      "type": "ID3D12GraphicsCommandList",
      "handle": 25
    },
    "args": {
      "NumViewports": 1,
      "pViewports": [
        {
          "TopLeftX": 0.0,
          "TopLeftY": 0.0,
          "Width": 1280.0,
          "Height": 720.0,
          "MinDepth": 0.0,
          "MaxDepth": 1.0
        }
      ]
    }
  }
}

Suggested format which saves storage and places the name of the function next to the name of the object type for easier human scanning / grokking:

{
  "index": 3945,
  "method": {
    "handle": 25,
    "type": "ID3D12GraphicsCommandList",
    "name": "RSSetViewports",
    "thread": 1,
    "args": {
      "NumViewports": 1,
      "pViewports": [
        {
          "TopLeftX": 0.0,
          "TopLeftY": 0.0,
          "Width": 1280.0,
          "Height": 720.0,
          "MinDepth": 0.0,
          "MaxDepth": 1.0
        }
      ]
    }
  }
}

* Current when this lands: https://github.com/andrew-lunarg/gfxreconstruct/tree/andy-enhance-better-d3d12-convert

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3convertIssue with convert execution or outputd3d12Issue with D3D 12 support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions