naga icon indicating copy to clipboard operation
naga copied to clipboard

glsl-in: Fix position propagation in lowering

Open JCapucho opened this issue 2 years ago • 0 comments

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 avatar Oct 08 '22 14:10 JCapucho