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 VulkanMemoryModelDeviceScope to trim #5544

Merged
merged 3 commits into from
Jan 25, 2024

Conversation

sudonatalie
Copy link
Collaborator

Add the VulkanMemoryModelDeviceScope capability to the capability trimming pass. According the the spec, "If the Vulkan memory model is declared and any instruction uses Device scope, the VulkanMemoryModelDeviceScope capability must be declared." Since this case, based on the type of an operand, is not covered by the JSON grammar, it is added explicitly.

Add the VulkanMemoryModelDeviceScope capability to the capability
trimming pass. According the the spec, "If the Vulkan memory model is
declared and any instruction uses Device scope, the
VulkanMemoryModelDeviceScope capability must be declared." Since this
case, based on the type of an operand, is not covered by the JSON
grammar, it is added explicitly.
Copy link
Contributor

@Keenuts Keenuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some nits, otherwise LGTM

source/opt/ir_context.h Outdated Show resolved Hide resolved
test/opt/trim_capabilities_pass_test.cpp Show resolved Hide resolved
test/opt/trim_capabilities_pass_test.cpp Show resolved Hide resolved
sudonatalie and others added 2 commits January 25, 2024 13:08
Co-authored-by: Nathan Gauër <github@keenuts.net>
@sudonatalie sudonatalie enabled auto-merge (squash) January 25, 2024 18:27
Copy link
Contributor

@Keenuts Keenuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sudonatalie sudonatalie merged commit 0045b01 into KhronosGroup:main Jan 25, 2024
23 of 24 checks passed
@sudonatalie sudonatalie deleted the vulkan-device-scope-cap branch January 25, 2024 19:24
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