-
Notifications
You must be signed in to change notification settings - Fork 148
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
Handle multiple PhysicalStorageBuffer in same struct #232
Handle multiple PhysicalStorageBuffer in same struct #232
Conversation
spirv_reflect.c
Outdated
@@ -2448,6 +2477,18 @@ static SpvReflectResult ParseDescriptorBlockVariable( | |||
} | |||
} | |||
if (!found_recursion) { | |||
uint32_t struct_id = FindType(p_module, p_member_type->id) | |||
->struct_type_description->id; | |||
p_parser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chaoticbob I'm going to just make a PR to run clang-format with more than 80 lines as this starts to just become unnecessarily hard to read
tests/glsl/buffer_handle_1.spv.yaml
Outdated
@@ -320,398 +320,3 @@ all_type_descriptions: | |||
members: | |||
- *td13 | |||
- *td16 | |||
- &td18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looked, these were duplicates (these tests do recursion looping) so this is actually good it was removed
Sure, I'll give it a try tonight, thank you very much for such a fast response! |
Yup, this change is working for me, thanks again! |
I tested this change, it does seem to not assert anymore, but I'm not getting any information about which members of a buffer_reference are statically referenced, I just see this in the output: `Push constant blocks: 1
My understanding from @greg-lunarg is that it should be reporting which members are statically referenced. The shader in #231 demonstrates this problem. You can now reflect the buffer_reference, but shouldn't it show that only |
Hi @spencer-lunarg - I am trying to look at this change some more. When I run your change on tests\glsl\buffer_pointer.spv I see:
In @greg-lunarg original PR (https://github.com/KhronosGroup/SPIRV-Reflect/pull/180/files) both in the spirv-reflect output and yaml it would report on the referenced variables g0/g1/g2, i.e.:
I am trying also to use the API and I am not seeing how I can reflect out which members pointed to by the buffer_ref's in the push_constant are active. So it seems this change isn't fully working? |
@danginsburg looking into fixing the print-out logic now
|
c063574
to
6ad570f
Compare
Is this ready for me to test again or are you still working on the PR? |
ready to be tested, now convinced I fixed the issues, added another test as well |
6ad570f
to
3fd2f44
Compare
From my testing so far, this PR now does seem to correctly fill in the |
712509e
to
c1cc754
Compare
4f4a25c
to
6663324
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one nit
6663324
to
c74e851
Compare
closes #230
closes #231
@muraj and @danginsburg if you want to make sure this works for both your use cases that would be helpful