aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarol Herbst <[email protected]>2019-01-18 14:13:25 +0100
committerKarol Herbst <[email protected]>2019-01-21 00:16:50 +0100
commit987744be9850bfe3a7c3c9556ae5d48ee5c34352 (patch)
tree8548f0347fb1e67c266f7c1156f5cb98ffb73d8b
parent8002eaab6c1152afb3f415d6fc35e74a853c4cbf (diff)
glsl/lower_output_reads: set invariant and precise flags on temporaries
fixes a couple of deqp tests (on nvc0 and potential other drivers): dEQP-GLES3.functional.shaders.invariance.highp.common_subexpression_1 dEQP-GLES3.functional.shaders.invariance.highp.common_subexpression_2 dEQP-GLES3.functional.shaders.invariance.highp.common_subexpression_3 dEQP-GLES3.functional.shaders.invariance.mediump.common_subexpression_1 dEQP-GLES3.functional.shaders.invariance.mediump.common_subexpression_2 dEQP-GLES3.functional.shaders.invariance.mediump.common_subexpression_3 dEQP-GLES3.functional.shaders.invariance.lowp.common_subexpression_1 dEQP-GLES3.functional.shaders.invariance.lowp.common_subexpression_2 dEQP-GLES3.functional.shaders.invariance.lowp.common_subexpression_3 CC: <[email protected]> Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
-rw-r--r--src/compiler/glsl/lower_output_reads.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/glsl/lower_output_reads.cpp b/src/compiler/glsl/lower_output_reads.cpp
index bd3accb3dda..4f90c7385ad 100644
--- a/src/compiler/glsl/lower_output_reads.cpp
+++ b/src/compiler/glsl/lower_output_reads.cpp
@@ -101,6 +101,10 @@ output_read_remover::visit(ir_dereference_variable *ir)
void *var_ctx = ralloc_parent(ir->var);
temp = new(var_ctx) ir_variable(ir->var->type, ir->var->name,
ir_var_temporary);
+ /* copy flags which affect arithematical precision */
+ temp->data.invariant = ir->var->data.invariant;
+ temp->data.precise = ir->var->data.precise;
+ temp->data.precision = ir->var->data.precision;
_mesa_hash_table_insert(replacements, ir->var, temp);
ir->var->insert_after(temp);
}