summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2014-08-15 10:22:20 -0700
committerKenneth Graunke <[email protected]>2014-10-15 17:05:16 -0700
commitcf94dfdb96287d1aa45851ba24762859f65a94ed (patch)
tree58bcec266c27e300f288bce650f95df7a4550365 /src
parent7c8f0b7cd9a9a0484496c873390ed7c3c28d5a08 (diff)
i965/fs: fix integer textures with swizzles
This happened to work before, but it would convert the output to a float and then back to an integer which seems bad. Signed-off-by: Connor Abbott <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_visitor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 2251bae55d0..c16de4ddd14 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -2147,6 +2147,7 @@ fs_visitor::swizzle_result(ir_texture *ir, fs_reg orig_val, uint32_t sampler)
assert(ir->sampler->type->sampler_shadow);
} else if (tex->swizzles[sampler] != SWIZZLE_NOOP) {
fs_reg swizzled_result = fs_reg(this, glsl_type::vec4_type);
+ swizzled_result.type = orig_val.type;
for (int i = 0; i < 4; i++) {
int swiz = GET_SWZ(tex->swizzles[sampler], i);