Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

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 requested a review from jimblandy October 8, 2022 14:16
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[glsl-in] swizzle on matrix rows
2 participants