-
Couldn't load subscription status.
- Fork 165
Add Access Flags for DescriptorBinding #224
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
base: main
Are you sure you want to change the base?
Add Access Flags for DescriptorBinding #224
Conversation
0a9a11a to
62309a3
Compare
| block: *bv2 # | ||
| array: { dims_count: 0, dims: [] } | ||
| accessed: 1 | ||
| access_flags: 0x00000000 # NONE |
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.
last thing left in PR is figure out why this is not consistent with accessed
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.
this is
%13 = OpAccessChain %_ptr_StorageBuffer__struct_3 %2
%14 = OpArrayLength %uint %13 1
OpReturn
OpFunctionEn
and from looking at spec, this is not considered a read, just an access
| block: *bv7 # "" | ||
| array: { dims_count: 0, dims: [] } | ||
| accessed: 1 | ||
| access_flags: 0x00000000 # NONE |
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.
seems
OpStore -> OpAccessChain -> OpAccessChain -> OpVariable
is a valid thing... need to fix
| SPV_REFLECT_ACCESS_READ = 0x00000001, | ||
| SPV_REFLECT_ACCESS_WRITE = 0x00000002, | ||
| // Atomic will always also be marked as READ and WRITE | ||
| SPV_REFLECT_ACCESS_ATOMIC = 0x00000004, |
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.
Is there ever a case where ATOMIC is used or checked by itself it it always inlcudes READ and WRITE? Wondering if there's a different way to express this.
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.
so I had it before as separate... #222 (comment) convinced me otherwise
closes #222
The logic uses the same pattern as we do to detect
accessedboolean but expands the logic to look up one more instruction to see what type it wasExample: if we have the instructions
OpImageRead -> OpLoad -> OpVariable, before we just tracked theOpLoadtouched theOpVariableand marked asaccessednow we track this
OpLoadas aSpvReflectPrvAccessedVariableand we know both theOpVariableit points to, but now also track the Result ID so theOpImageReadcan find thisOpLoadI wrote the code to be consistent with the current code, which I think could be cleaned up to be easier to read/maintain, but would like to do that as a separate PR