summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2015-02-03 10:10:59 -0800
committerJason Ekstrand <jason.ekstrand@intel.com>2015-02-03 12:52:42 -0800
commit572d1f6e41907096f21743181fd96eda82f51a79 (patch)
tree5e4db08110f4d4a3390178469d6dc682abcd7b99 /src/glsl
parent5420774510b565e65d6b2d6c50e76d9ea288348b (diff)
downloadexternal_mesa3d-572d1f6e41907096f21743181fd96eda82f51a79.zip
external_mesa3d-572d1f6e41907096f21743181fd96eda82f51a79.tar.gz
external_mesa3d-572d1f6e41907096f21743181fd96eda82f51a79.tar.bz2
nir/validate: Ensure that phi sources are SSA-only
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/nir/nir_validate.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/glsl/nir/nir_validate.c b/src/glsl/nir/nir_validate.c
index 89dfdf8..a34a017 100644
--- a/src/glsl/nir/nir_validate.c
+++ b/src/glsl/nir/nir_validate.c
@@ -496,16 +496,9 @@ validate_phi_src(nir_phi_instr *instr, nir_block *pred, validate_state *state)
exec_list_validate(&instr->srcs);
nir_foreach_phi_src(instr, src) {
if (src->pred == pred) {
- unsigned num_components;
- if (src->src.is_ssa)
- num_components = src->src.ssa->num_components;
- else {
- if (src->src.reg.reg->is_packed)
- num_components = 4; /* can't check anything */
- else
- num_components = src->src.reg.reg->num_components;
- }
- assert(num_components == instr->dest.ssa.num_components);
+ assert(src->src.is_ssa);
+ assert(src->src.ssa->num_components ==
+ instr->dest.ssa.num_components);
validate_src(&src->src, state);
return;