Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print Spec Constant value in type array by default #241

Merged

Conversation

spencer-lunarg
Copy link
Contributor

Instead of printing a mysterious 0xFFFFFFFF, print the default spec constant value and make use of the spec_constant_op_ids field

so something like

layout(constant_id = 3) const int SIZE = 2;
layout(set = 0, binding = 0, std430) buffer SSBO {
    float val[SIZE];
} ssbo;

now shows

// SpvReflectArrayTraits
dims_count = 0
- dims = [0xFFFFFFFF]
- spec_constant_op_ids = [constant_id]
+ dims = [2]
+ spec_constant_op_ids = [3]

(cc @muraj @zbendefy it would be awesome to get feedback if this helps solve your problems or not)

@spencer-lunarg spencer-lunarg merged commit 4fd8c09 into KhronosGroup:main Jan 11, 2024
5 checks passed
@spencer-lunarg spencer-lunarg deleted the spencer-spec-constant1 branch January 11, 2024 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants