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

glsl-in: Fix position propagation in lowering #2079

Merged
merged 1 commit into from
Dec 2, 2022

Conversation

JCapucho
Copy link
Collaborator

@JCapucho JCapucho commented Oct 8, 2022

When lowering Select expressions the position could be wrongfully updated from AccessBase { constant_index: false } to AccessBase { constant_index: true } this caused dynamic indexing in an array behind a structure to fail if it was stored in a constant.

Furthermore the position could also be updated from Rhs to AccessBase, this could cause issues because AccessBase doesn't load variables (which Rhs does), so accessing a member from a structure behind a pointer would return the wrong result.

When lowering `Select` expressions the position could be wrongfully
updated from `AccessBase { constant_index: false }` to
`AccessBase { constant_index: true }` this caused dynamic indexing
in an array behind a structure to fail if it was stored in a constant.

Furthermore the position could also be updated from `Rhs` to
`AccessBase`, this could cause issues because `AccessBase` doesn't
load variables (which `Rhs` does), so accessing a member from a
structure behind a pointer would return the wrong result.
@JCapucho JCapucho linked an issue Oct 21, 2022 that may be closed by this pull request
Copy link
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

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

Looks good!

@teoxoy teoxoy merged commit d1c2953 into gfx-rs:master Dec 2, 2022
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.

[glsl-in] swizzle on matrix rows
2 participants