aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_validate.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2014-12-15 17:32:56 -0800
committerJason Ekstrand <[email protected]>2015-01-15 07:20:22 -0800
commit2c7da78805175f36879111306ac37c12d33bf65b (patch)
tree5fbfa3578dae242c5fa29cf46c647af351fda881 /src/glsl/nir/nir_validate.c
parent675ffdef3010400567a5f6f790f1f7bd2fede717 (diff)
nir: Make load_const SSA-only
As it was, we weren't ever using load_const in a non-SSA way. This allows us to substantially simplify the load_const instruction. If we ever need a non-SSA constant load, we can do a load_const and an imov. Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir_validate.c')
-rw-r--r--src/glsl/nir/nir_validate.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/glsl/nir/nir_validate.c b/src/glsl/nir/nir_validate.c
index f0eb87fd393..240da02a715 100644
--- a/src/glsl/nir/nir_validate.c
+++ b/src/glsl/nir/nir_validate.c
@@ -411,13 +411,7 @@ validate_call_instr(nir_call_instr *instr, validate_state *state)
static void
validate_load_const_instr(nir_load_const_instr *instr, validate_state *state)
{
- validate_dest(&instr->dest, state);
-
- if (instr->array_elems != 0) {
- assert(!instr->dest.is_ssa);
- assert(instr->dest.reg.base_offset + instr->array_elems <=
- instr->dest.reg.reg->num_array_elems);
- }
+ validate_ssa_def(&instr->def, state);
}
static void