aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_validate.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-05-06 11:17:40 -0500
committerJason Ekstrand <[email protected]>2019-05-24 08:38:11 -0500
commitcd73b6174b093b75f581c3310bf784bed7c74c1f (patch)
treebe7b403c22f06f203f8caa23a1cd5d1b553bcea6 /src/compiler/nir/nir_validate.c
parent2a39788d03789af643a957da8b8ebd2d5f0218aa (diff)
nir/lower_to_source_mods: Stop turning add, sat, and neg into mov
Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_validate.c')
-rw-r--r--src/compiler/nir/nir_validate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c
index b087b0da12d..30c4a9f5c62 100644
--- a/src/compiler/nir/nir_validate.c
+++ b/src/compiler/nir/nir_validate.c
@@ -217,6 +217,9 @@ validate_alu_src(nir_alu_instr *instr, unsigned index, validate_state *state)
{
nir_alu_src *src = &instr->src[index];
+ if (instr->op == nir_op_fmov || instr->op == nir_op_imov)
+ assert(!src->abs && !src->negate);
+
unsigned num_components = nir_src_num_components(src->src);
for (unsigned i = 0; i < NIR_MAX_VEC_COMPONENTS; i++) {
validate_assert(state, src->swizzle[i] < NIR_MAX_VEC_COMPONENTS);
@@ -319,6 +322,9 @@ validate_alu_dest(nir_alu_instr *instr, validate_state *state)
{
nir_alu_dest *dest = &instr->dest;
+ if (instr->op == nir_op_fmov || instr->op == nir_op_imov)
+ assert(!dest->saturate);
+
unsigned dest_size = nir_dest_num_components(dest->dest);
/*
* validate that the instruction doesn't write to components not in the