projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f24ec99
)
glsl: yet another swizzled expression fix
author
Brian Paul
<brianp@vmware.com>
Tue, 24 Feb 2009 00:43:43 +0000
(17:43 -0700)
committer
Brian Paul
<brianp@vmware.com>
Tue, 24 Feb 2009 00:43:43 +0000
(17:43 -0700)
This fixes swizzled conditional expressions such "(b ? p : q).x"
src/mesa/shader/slang/slang_emit.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/slang/slang_emit.c
b/src/mesa/shader/slang/slang_emit.c
index adb3bde9c4b2b7fe76d9f0d9ace83fdfb337676d..6a47585c7a1a2ccc09a1362b510922f6799d80aa 100644
(file)
--- a/
src/mesa/shader/slang/slang_emit.c
+++ b/
src/mesa/shader/slang/slang_emit.c
@@
-1857,8
+1857,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;