Skip to content

Fix special case with vector swizzle#5281

Merged
s-perron merged 1 commit intomicrosoft:mainfrom
s-perron:i5275
Jun 13, 2023
Merged

Fix special case with vector swizzle#5281
s-perron merged 1 commit intomicrosoft:mainfrom
s-perron:i5275

Conversation

@s-perron
Copy link
Copy Markdown
Collaborator

When handling the swizzles in the SPIR-V backen, there is a special case when
the final result returns the original vector. It tries to avoid adding the
vector shuffle instruction in spir-v. However, that path calls doExpr instead
of loadIfGLValue like the other path. This can sometimes cause a load to be
omitted.

This is changed so that loadIfGLValue is called for both cases.

Fixes #5275

When handling the swizzles in the SPIR-V backen, there is a special case when
the final result returns the original vector. It tries to avoid adding the
vector shuffle instruction in spir-v. However, that path calls `doExpr` instead
of `loadIfGLValue` like the other path. This can sometimes cause a load to be
omitted.

This is changed so that `loadIfGLValue` is called for both cases.

Fixes microsoft#5275
@s-perron s-perron requested a review from Keenuts June 12, 2023 17:05
@AppVeyorBot
Copy link
Copy Markdown

@s-perron s-perron requested a review from dnovillo June 13, 2023 14:42
@s-perron s-perron enabled auto-merge (squash) June 13, 2023 14:43
@s-perron s-perron merged commit 43482b7 into microsoft:main Jun 13, 2023
@s-perron s-perron deleted the i5275 branch June 13, 2023 14:54
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 compilation failure with swizzle.

4 participants