Skip to content

Comments

Fix assert for structs with no decorations#58

Merged
chaoticbob merged 1 commit intoKhronosGroup:masterfrom
sean-purcell:fix-member-count-assert
Jul 26, 2018
Merged

Fix assert for structs with no decorations#58
chaoticbob merged 1 commit intoKhronosGroup:masterfrom
sean-purcell:fix-member-count-assert

Conversation

@sean-purcell
Copy link
Contributor

Previously, if a shader didn't decorate all the members (or
specifically, the last member) with any decorations/names,
an assert would trigger in ParseTypes because the OpTypeStruct's
member_count would be 0. This fixes that by hardcoding member count for
Struct types to word_count - 2 (based on the binary encoding of
OpTypeStruct).

Previously, if a shader didn't decorate all the members (or
specifically, the last member) with any decorations/names,
an assert would trigger in ParseTypes because the OpTypeStruct's
member_count would be 0.  This fixes that by hardcoding member count for
Struct types to word_count - 2 (based on the binary encoding of
OpTypeStruct).
sean-purcell added a commit to sean-purcell/gapid that referenced this pull request Jul 18, 2018
SPIRV-Reflect offers tools to analyze the interface exposed by a spirv
module.  It's used here to parse the descriptor sets that a given entry
point of a module uses.  NOTE: Upstream is currently
iburinoc/SPIRV-Reflect, this should be switched to
chaoticbob/SPIRV-Reflect once KhronosGroup/SPIRV-Reflect#56 and
KhronosGroup/SPIRV-Reflect#58 are merged.
@chaoticbob chaoticbob merged commit b0a8639 into KhronosGroup:master Jul 26, 2018
@sean-purcell sean-purcell deleted the fix-member-count-assert branch July 27, 2018 13:59
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