summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2011-08-18 00:18:15 -0700
committerKenneth Graunke <[email protected]>2011-08-23 11:18:08 -0700
commitb6bdcf2a908889532ef6d5eb643791176dffcb9d (patch)
treedd8edd2ab8c977e747937afd2f8b0cf9bd8234da
parent2054652796d78996b1f9308ab1a75361d71e864e (diff)
i965/fs: Rudimentary support for non-floating point texture results.
Not all texturing operations return floating point data. For example, the resinfo message (textureSize or TXS) returns integer data. In the future, we'll also add integer texture support. ir_texture's type field contains this information; use its base type to appropriately type the destination register. We want to keep it as a four component vector, however, since SIMD8 samplers always have a response length of 4. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_visitor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 764351a34f9..792799d9063 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -1075,7 +1075,7 @@ fs_visitor::visit(ir_texture *ir)
/* Writemasking doesn't eliminate channels on SIMD8 texture
* samples, so don't worry about them.
*/
- fs_reg dst = fs_reg(this, glsl_type::vec4_type);
+ fs_reg dst = fs_reg(this, glsl_type::get_instance(ir->type->base_type, 4, 1));
if (intel->gen >= 7) {
inst = emit_texture_gen7(ir, dst, coordinate, sampler);