Add Access Flags for DescriptorBinding#224
Add Access Flags for DescriptorBinding#224spencer-lunarg wants to merge 1 commit intoKhronosGroup:mainfrom
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.
last thing left in PR is figure out why this is not consistent with accessed
There was a problem hiding this comment.
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.
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.
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.
so I had it before as separate... #222 (comment) convinced me otherwise
|
Will this ever get merged? It'd be very useful. |
s-perron
left a comment
There was a problem hiding this comment.
None of the reviews work on this project anymore. I'll approve since all of the issues raised earlier were reasonable style issue.
@spencer-lunarg You will need to rebase before you can merge.
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