mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-22 20:40:39 +01:00
glsl: yet another swizzled expression fix
This fixes swizzled conditional expressions such "(b ? p : q).x"
(cherry picked from master, commit 00f0b05d5f)
This commit is contained in:
parent
9d5aa36239
commit
d5c06bb812
1 changed files with 5 additions and 2 deletions
|
|
@ -1838,8 +1838,11 @@ emit_swizzle(slang_emit_info *emitInfo, slang_ir_node *n)
|
|||
|
||||
inst = emit(emitInfo, n->Children[0]);
|
||||
|
||||
assert(n->Children[0]->Store == n->Store->Parent);
|
||||
assert(n->Store->Parent);
|
||||
if (!n->Store->Parent) {
|
||||
/* this covers a case such as "(b ? p : q).x" */
|
||||
n->Store->Parent = n->Children[0]->Store;
|
||||
assert(n->Store->Parent);
|
||||
}
|
||||
|
||||
{
|
||||
const GLuint swizzle = n->Store->Swizzle;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue