diff options
author | Jason Ekstrand <[email protected]> | 2015-02-03 12:42:07 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-02-03 12:46:55 -0800 |
commit | 5420774510b565e65d6b2d6c50e76d9ea288348b (patch) | |
tree | 88ec4da0650982c4f500c3713fd0397d0cd8d192 /src/glsl | |
parent | c0df85cca4da06e3d27bfdee3d3d6bd84d432d2a (diff) |
nir/validate: Validate that only float ALU outputs are saturated
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/nir/nir_validate.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/nir/nir_validate.c b/src/glsl/nir/nir_validate.c index 7c801b27440..89dfdf88045 100644 --- a/src/glsl/nir/nir_validate.c +++ b/src/glsl/nir/nir_validate.c @@ -239,6 +239,14 @@ validate_alu_dest(nir_alu_dest *dest, validate_state *state) * register/SSA value */ assert(is_packed || !(dest->write_mask & ~((1 << dest_size) - 1))); + + /* validate that saturate is only ever used on instructions with + * destinations of type float + */ + nir_alu_instr *alu = nir_instr_as_alu(state->instr); + assert(nir_op_infos[alu->op].output_type == nir_type_float || + !dest->saturate); + validate_dest(&dest->dest, state); } |