Module: Mesa Branch: master Commit: cf94dfdb96287d1aa45851ba24762859f65a94ed URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf94dfdb96287d1aa45851ba24762859f65a94ed
Author: Connor Abbott <connor.abb...@intel.com> Date: Fri Aug 15 10:22:20 2014 -0700 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 <connor.abb...@intel.com> Reviewed-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Chris Forbes <chr...@ijw.co.nz> --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 2251bae..c16de4d 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); _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit