vc4: Fix texture type masking.
authorEric Anholt <eric@anholt.net>
Tue, 13 Jan 2015 03:43:16 +0000 (16:43 +1300)
committerEric Anholt <eric@anholt.net>
Thu, 15 Jan 2015 09:19:25 +0000 (22:19 +1300)
Everything from ETC1 to RGBA64 was getting its top bit dropped, but we
didn't use any of those formats.

src/gallium/drivers/vc4/vc4_program.c

index 0fa43e2c9fae2a4d682ac84b34dc17a6752e1606..9f1f01836fd0b573ff2298634e269a9116f15070 100644 (file)
@@ -2570,7 +2570,7 @@ write_texture_p0(struct vc4_context *vc4,
                                texture->u.tex.first_level, VC4_TEX_P0_MIPLVLS) |
                  VC4_SET_FIELD(texture->target == PIPE_TEXTURE_CUBE,
                                VC4_TEX_P0_CMMODE) |
-                 VC4_SET_FIELD(rsc->vc4_format & 7, VC4_TEX_P0_TYPE));
+                 VC4_SET_FIELD(rsc->vc4_format & 15, VC4_TEX_P0_TYPE));
 }
 
 static void