Skip to content
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

Remove implicit call to GetId in ConvertToSampledImagePass. #5692

Merged

Conversation

s-perron
Copy link
Collaborator

We replace getting the id of a poitner type with a specific funciton
call to FindPointerToType. Also, FindPointerToType is updated to not
indirectly call GetId. This leads to a linear search for an existing
type in all cases, but it is necessary.

Note that this function could have a similar problem. There could be two
pointer types with the same pointee and storage class, and the first one
will be returned. I have checked the ~20 uses, and they are all used in
situations where the id is used to create something new, and it does not
have to match an existing type. These will not cause problems.

Part of #5691

We replace getting the id of a poitner type with a specific funciton
call to FindPointerToType. Also, FindPointerToType is updated to not
indirectly call GetId. This leads to a linear search for an existing
type in all cases, but it is necessary.

Note that this function could have a similar problem. There could be two
pointer types with the same pointee and storage class, and the first one
will be returned. I have checked the ~20 uses, and they are all used in
situations where the id is used to create something new, and it does not
have to match an existing type. These will not cause problems.

Part of KhronosGroup#5691
@s-perron s-perron force-pushed the convert_sampled_image_type_mgr branch from 63162b3 to b4143d3 Compare May 30, 2024 19:34
@s-perron s-perron requested a review from Keenuts May 30, 2024 20:38
@s-perron s-perron enabled auto-merge (squash) May 30, 2024 20:38
@s-perron s-perron merged commit 95681dc into KhronosGroup:main Jun 3, 2024
24 checks passed
@s-perron s-perron deleted the convert_sampled_image_type_mgr branch September 16, 2024 13:11
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