[Mesa-dev] [PATCH 1/2] st/glsl_to_tgsi: fix block copies of arrays of doubles
Nicolai Hähnle
nhaehnle at gmail.com
Mon Oct 17 17:25:58 UTC 2016
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
Set the type of the left-hand side to the same as the right-hand side,
so that when the base type is double, the writemask of the MOV instruction
is properly fixed up.
---
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index f49a873..1662f7f 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -2903,20 +2903,21 @@ glsl_to_tgsi_visitor::emit_block_mov(ir_assignment *ir, const struct glsl_type *
type->vector_elements, 1);
for (int i = 0; i < type->matrix_columns; i++) {
emit_block_mov(ir, vec_type, l, r, cond, cond_swap);
}
return;
}
assert(type->is_scalar() || type->is_vector());
+ l->type = type->base_type;
r->type = type->base_type;
if (cond) {
st_src_reg l_src = st_src_reg(*l);
l_src.swizzle = swizzle_for_size(type->vector_elements);
if (native_integers) {
emit_asm(ir, TGSI_OPCODE_UCMP, *l, *cond,
cond_swap ? l_src : *r,
cond_swap ? *r : l_src);
} else {
--
2.7.4
More information about the mesa-dev
mailing list