summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2013-05-05 14:13:39 +0800
committerChia-I Wu <[email protected]>2013-05-05 14:36:39 +0800
commit008346273c2cbc386f52efacac3d3228e566e8ac (patch)
tree96e996b6851e741e86cdd3302e7e3c8cb36be3f2 /src
parentb42fe195a2578473c433695fe417253e8786c4c6 (diff)
ilo: correctly set return types of sampler messages
Correctly set the types of the temporaries. We do not want type conversions when moving the results to the final destinations.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/ilo/shader/ilo_shader_fs.c2
-rw-r--r--src/gallium/drivers/ilo/shader/ilo_shader_vs.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/shader/ilo_shader_fs.c b/src/gallium/drivers/ilo/shader/ilo_shader_fs.c
index 7a2724ca95c..68a4fffa096 100644
--- a/src/gallium/drivers/ilo/shader/ilo_shader_fs.c
+++ b/src/gallium/drivers/ilo/shader/ilo_shader_fs.c
@@ -982,6 +982,8 @@ fs_lower_opcode_tgsi_sampling(struct fs_compile_context *fcc,
/* write to temps first */
tc_alloc_tmp4(tc, tmp);
+ for (i = 0; i < 4; i++)
+ tmp[i].type = inst->dst.type;
tdst_transpose(inst->dst, dst);
inst->dst = tmp[0];
diff --git a/src/gallium/drivers/ilo/shader/ilo_shader_vs.c b/src/gallium/drivers/ilo/shader/ilo_shader_vs.c
index 4b1ba02687c..f8c8d6e34fe 100644
--- a/src/gallium/drivers/ilo/shader/ilo_shader_vs.c
+++ b/src/gallium/drivers/ilo/shader/ilo_shader_vs.c
@@ -554,6 +554,7 @@ vs_lower_opcode_tgsi_sampling(struct vs_compile_context *vcc,
/* write to a temp first */
tmp = tc_alloc_tmp(tc);
+ tmp.type = inst->dst.type;
dst = inst->dst;
inst->dst = tmp;