freedreno/a4xx: support 16384 texels in buffer texture
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 21 Nov 2015 15:28:45 +0000 (10:28 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 23 Nov 2015 16:17:14 +0000 (11:17 -0500)
Looks like the width field's bitmask was off-by-one.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/freedreno/a4xx/a4xx.xml.h
src/gallium/drivers/freedreno/freedreno_screen.c

index df59438f106ce112bd9dec331251f122a99066b1..5a5323042d6b062c91d0701c07de4e3d5a55b3be 100644 (file)
@@ -2864,7 +2864,7 @@ static inline uint32_t A4XX_TEX_CONST_1_HEIGHT(uint32_t val)
 {
        return ((val) << A4XX_TEX_CONST_1_HEIGHT__SHIFT) & A4XX_TEX_CONST_1_HEIGHT__MASK;
 }
-#define A4XX_TEX_CONST_1_WIDTH__MASK                           0x1fff8000
+#define A4XX_TEX_CONST_1_WIDTH__MASK                           0x3fff8000
 #define A4XX_TEX_CONST_1_WIDTH__SHIFT                          15
 static inline uint32_t A4XX_TEX_CONST_1_WIDTH(uint32_t val)
 {
index 0c494d4f4c8d4f406b1ad696055ac5ea030a6605..9e51c4e3c4b09ac64bf9c374704bac6cc72b123f 100644 (file)
@@ -187,12 +187,11 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
                if (is_a4xx(screen)) return 32;
                return 0;
        case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE:
-               /* I think 32k on a4xx.. and we could possibly emulate more
-                * by pretending 2d/rect textures and splitting high bits
-                * of index into 2nd dimension..
+               /* We could possibly emulate more by pretending 2d/rect textures and
+                * splitting high bits of index into 2nd dimension..
                 */
                if (is_a3xx(screen)) return 8192;
-               if (is_a4xx(screen)) return 16383;
+               if (is_a4xx(screen)) return 16384;
                return 0;
 
        case PIPE_CAP_TEXTURE_FLOAT_LINEAR: