i965/fp: Set coord_components correctly for cube textures.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 4 Apr 2015 01:30:57 +0000 (18:30 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 6 Apr 2015 20:49:01 +0000 (13:49 -0700)
I've no idea why this was 4.  It certainly seems wrong.

Prevents assertion failures in fp-incomplete-tex with some upcoming
patches of mine.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_fs_fp.cpp

index c4064da88a0e94771f5f4b44f8d1705079500751..21d677a45a1375f7c3094168ead9e4e2855b5de5 100644 (file)
@@ -448,7 +448,7 @@ fs_visitor::emit_fragment_program_code()
             break;
 
          case TEXTURE_CUBE_INDEX: {
-            coord_components = 4;
+            coord_components = 3;
 
             fs_reg temp = vgrf(glsl_type::float_type);
             fs_reg cubecoord = vgrf(glsl_type::vec3_type);