projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c81ec84
)
vc4: Fix assertion fails from trying to cast non-ALU instrs to ALU.
author
Eric Anholt
<eric@anholt.net>
Thu, 6 Oct 2016 23:46:35 +0000
(16:46 -0700)
committer
Eric Anholt
<eric@anholt.net>
Fri, 7 Oct 2016 01:09:24 +0000
(18:09 -0700)
Fixes 100 piglit tests since the assertions were added to nir.h. What's
amazing is that these tests used to pass, even when casting garbage.
src/gallium/drivers/vc4/vc4_program.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/vc4/vc4_program.c
b/src/gallium/drivers/vc4/vc4_program.c
index 84add5253ff780099d117e64ec1dae65a27006b0..a91e6200e8a7225d7ad29cfbdc170772c4e7736f 100644
(file)
--- a/
src/gallium/drivers/vc4/vc4_program.c
+++ b/
src/gallium/drivers/vc4/vc4_program.c
@@
-918,6
+918,8
@@
static struct qreg ntq_emit_bcsel(struct vc4_compile *c, nir_alu_instr *instr,
{
if (!instr->src[0].src.is_ssa)
goto out;
+ if (instr->src[0].src.ssa->parent_instr->type != nir_instr_type_alu)
+ goto out;
nir_alu_instr *compare =
nir_instr_as_alu(instr->src[0].src.ssa->parent_instr);
if (!compare)