Skip to content
This repository was archived by the owner on Jun 12, 2024. It is now read-only.

Add member reflection info to push constants#16

Open
paulgessinger wants to merge 1 commit into
septag:masterfrom
paulgessinger:pc_members
Open

Add member reflection info to push constants#16
paulgessinger wants to merge 1 commit into
septag:masterfrom
paulgessinger:pc_members

Conversation

@paulgessinger

@paulgessinger paulgessinger commented Nov 22, 2020

Copy link
Copy Markdown
Contributor

Push constant blocks currently do not get member information in the reflection output:

layout(push_constant) uniform matrices {
    mat4 u_model;
    mat4 u_modelViewProj;
} mat;

results in

"push_cbs": [
  {
    "id": 19,
    "name": "mat"
  }
]

With this PR, it gets the same member information as uniform buffers:

"push_cbs": [
  {
    "id": 19,
    "name": "mat",
    "members": [
      {
        "name": "u_model",
        "type": "mat4",
        "offset": 0,
        "size": 64
      },
      {
        "name": "u_modelViewProj",
        "type": "mat4",
        "offset": 64,
        "size": 64
      }
    ]
  }
]

Currently this only applies to json, I wasn't sure push constant info is even written to the binary output, and didn't want to modify it.

Anyway, I'm pretty new to this stuff, so let me know if my assumptions here are wrong, and this is not actually information that should be in the reflection info.

halx99 added a commit to axmolengine/axslcc-legacy that referenced this pull request Jul 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant