projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0df85c
)
nir/validate: Validate that only float ALU outputs are saturated
author
Jason Ekstrand
<jason.ekstrand@intel.com>
Tue, 3 Feb 2015 20:42:07 +0000
(12:42 -0800)
committer
Jason Ekstrand
<jason.ekstrand@intel.com>
Tue, 3 Feb 2015 20:46:55 +0000
(12:46 -0800)
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/glsl/nir/nir_validate.c
patch
|
blob
|
history
diff --git
a/src/glsl/nir/nir_validate.c
b/src/glsl/nir/nir_validate.c
index 7c801b2744026ca6efd9976f6a78d3ba72ff2905..89dfdf88045a20acc537490cbc505d4dff484380 100644
(file)
--- 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);
}