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

opt: add StorageImageReadWithoutFormat to cap trim #5475

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

Keenuts
Copy link
Contributor

@Keenuts Keenuts commented Nov 13, 2023

The StorageImageReadWithoutFormat capability is only required when an image type with the format set to Unknown is used with some specific OpImageRead or OpImageSparseRead instructions.

This patch adds the required code to the capability trimming pass to remove the StorageImageReadWithoutFormat capability when not required.

This would fix microsoft/DirectXShaderCompiler#5906 once merged in DXC.

The StorageImageReadWithoutFormat capability is only required when
an image type with the format set to Unknown is used with some specific
OpImageRead or OpImageSparseRead instructions.

This patch adds the required code to the capability trimming pass to
remove the StorageImageReadWithoutFormat capability when not required.

Signed-off-by: Nathan Gauër <[email protected]>
@s-perron s-perron merged commit c91e9d0 into KhronosGroup:main Nov 14, 2023
4 checks passed
@Keenuts Keenuts deleted the trim-read-without-format branch November 14, 2023 14:34
sajjadmirzanv pushed a commit to sajjadmirzanv/SPIRV-Tools that referenced this pull request Nov 15, 2023
The StorageImageReadWithoutFormat capability is only required when
an image type with the format set to Unknown is used with some specific
OpImageRead or OpImageSparseRead instructions.

This patch adds the required code to the capability trimming pass to
remove the StorageImageReadWithoutFormat capability when not required.

Signed-off-by: Nathan Gauër <[email protected]>
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.

[SPIR-V] StorageImageReadWithoutFormat capability is emitted when seemingly not needed
3 participants