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

Fix array copy propagation #4890

Merged

Conversation

cassiebeckley
Copy link
Contributor

The Array copy propagation was interpreting OpEntryPoint as a store, and therefore not propagating arrays passed into the shader.

Fixes microsoft/DirectXShaderCompiler#4444

@CLAassistant
Copy link

CLAassistant commented Aug 11, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@s-perron s-perron left a comment

Choose a reason for hiding this comment

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

Good find. I think the only issue has to do with a detail of the spec you are probably not aware of. The reason this fail is because there was a change and DXC had to start putting more thing on the OpEntryPoint, and that case was not handled. See https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpEntryPoint.

Just make sure the test says it is spv1.4.

test/opt/copy_prop_array_test.cpp Show resolved Hide resolved
test/opt/copy_prop_array_test.cpp Show resolved Hide resolved
@cassiebeckley cassiebeckley merged commit 3a8a961 into KhronosGroup:master Aug 11, 2022
@cassiebeckley cassiebeckley deleted the fix-array-copy-propagation branch August 11, 2022 16:59
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] Invalid SPIR-V generated where OpStore is being used to store to an object with OpTypeImage.
3 participants