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

[spirv] Support flattening descriptor array accessed by var index #4042

Merged
merged 1 commit into from
Oct 28, 2021

Conversation

jaebaek
Copy link
Collaborator

@jaebaek jaebaek commented Oct 27, 2021

The existing DXC cannot a flatten descriptor array when an instruction
accesses it using a variable index, because spirv-opt
--descriptor-scalar-replacement pass did not support it. spirv-opt
recently added --replace-desc-array-access-using-var-index that replaces
accesses to descriptor arrays using variable indices with accesses to
constant elements using switch statements. This commit uses the newly
added pass to support flattening all descriptor arrays.

The existing DXC cannot a flatten descriptor array when an instruction
accesses it using a variable index, because spirv-opt
--descriptor-scalar-replacement pass did not support it. spirv-opt
recently added --replace-desc-array-access-using-var-index that replaces
accesses to descriptor arrays using variable indices with accesses to
constant elements using switch statements. This commit uses the newly
added pass to support flattening all descriptor arrays.
@jaebaek jaebaek added the spirv Work related to SPIR-V label Oct 27, 2021
@jaebaek jaebaek self-assigned this Oct 27, 2021
@AppVeyorBot
Copy link

@jaebaek jaebaek merged commit e343bec into microsoft:master Oct 28, 2021
@jaebaek jaebaek deleted the flatten_desc_array branch October 28, 2021 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spirv Work related to SPIR-V
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants