Add AccessedVariable struct and logic#238
Merged
spencer-lunarg merged 2 commits intoKhronosGroup:mainfrom Dec 18, 2023
Merged
Conversation
spencer-lunarg
commented
Nov 22, 2023
| } break; | ||
| case SpvOpCopyMemory: | ||
| case SpvOpCopyMemorySized: { | ||
| CHECKED_READU32(p_parser, p_node->word_offset + 2, p_func->accessed_ptrs[p_func->accessed_ptr_count]); |
Contributor
Author
There was a problem hiding this comment.
added a test for OpCopyMemory.. we were off by 1 as the Target and Source operand are 1 and 2
spencer-lunarg
commented
Nov 22, 2023
| SpvReflectDescriptorBinding* p_binding = &p_module->descriptor_bindings[i]; | ||
| for (uint32_t j = 0; j < used_acessed_count; j++) { | ||
| if (used_accesses[j].variable_ptr == p_binding->spirv_id) { | ||
| p_binding->accessed = 1; |
Contributor
Author
There was a problem hiding this comment.
the goal here is we can find all the accesses pointing to this descriptor binding variable
chaoticbob
approved these changes
Dec 16, 2023
Contributor
chaoticbob
left a comment
There was a problem hiding this comment.
Looks good overall. Just some nits with formatting and var names. Not crucial but would be cool to have those changes before merge.
|
|
||
| static SpvReflectResult IntersectSortedUint32(const uint32_t* p_arr0, size_t arr0_size, const uint32_t* p_arr1, size_t arr1_size, | ||
| uint32_t** pp_res, size_t* res_size) { | ||
| static SpvReflectResult IntersectSortedAccessedVariable(const SpvReflectPrvAccessedVariable* p_arr0, size_t arr0_size, |
Contributor
There was a problem hiding this comment.
This should be one param per line.
Contributor
Author
There was a problem hiding this comment.
we would need to set BinPackParameters in the .clang-format file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
for both #224 and #226 there is a need to get the underlying mapping between an access (ex
OpLoad) and theOpVariableit touchedCurrently we just tracked the
uint32_tin order to sett theaccessedbooleanThis creates the ground work the for
SpvReflectPrvAccessedVariableto store this logic