freedreno/a4xx: add formats for ARB_texture_buffer_object_rgb32 support
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 22 Nov 2015 01:33:23 +0000 (20:33 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 23 Nov 2015 16:17:15 +0000 (11:17 -0500)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/freedreno/a4xx/a4xx.xml.h
src/gallium/drivers/freedreno/a4xx/fd4_format.c
src/gallium/drivers/freedreno/a4xx/fd4_screen.c

index e465334868d3aceb818193fbac8380413c2e3c18..a450379e98d70985a4684adde30b8d098050c6e2 100644 (file)
@@ -204,6 +204,9 @@ enum a4xx_tex_fmt {
        TFMT4_32_FLOAT = 43,
        TFMT4_32_32_FLOAT = 56,
        TFMT4_32_32_32_32_FLOAT = 63,
+       TFMT4_32_32_32_FLOAT = 59,
+       TFMT4_32_32_32_UINT = 60,
+       TFMT4_32_32_32_SINT = 61,
        TFMT4_9_9_9_E5_FLOAT = 32,
        TFMT4_11_11_10_FLOAT = 37,
        TFMT4_DXT1 = 86,
index ace5b3f30b012154ab73afaaff2231b1f9a65618..c240745cec14472f860d8f0f9ce74eb47f3531ee 100644 (file)
@@ -250,11 +250,11 @@ static struct fd4_format formats[PIPE_FORMAT_COUNT] = {
        _T(L32A32_SINT,    32_32_SINT,  NONE,        WZYX),
 
        /* 96-bit */
-       V_(R32G32B32_UINT,    32_32_32_UINT,  NONE, WZYX),
-       V_(R32G32B32_SINT,    32_32_32_SINT,  NONE, WZYX),
+       VT(R32G32B32_UINT,    32_32_32_UINT,  NONE, WZYX),
+       VT(R32G32B32_SINT,    32_32_32_SINT,  NONE, WZYX),
        V_(R32G32B32_USCALED, 32_32_32_UINT,  NONE, WZYX),
        V_(R32G32B32_SSCALED, 32_32_32_SINT,  NONE, WZYX),
-       V_(R32G32B32_FLOAT,   32_32_32_FLOAT, NONE, WZYX),
+       VT(R32G32B32_FLOAT,   32_32_32_FLOAT, NONE, WZYX),
        V_(R32G32B32_FIXED,   32_32_32_FIXED, NONE, WZYX),
 
        /* 128-bit */
@@ -384,6 +384,7 @@ fd4_pipe2fetchsize(enum pipe_format format)
        case 16:  return TFETCH4_2_BYTE;
        case 32:  return TFETCH4_4_BYTE;
        case 64:  return TFETCH4_8_BYTE;
+       case 96:  return TFETCH4_1_BYTE; /* Does this matter? */
        case 128: return TFETCH4_16_BYTE;
        default:
                debug_printf("Unknown block size for format %s: %d\n",
index d8ea414f30003ab487a0e1b2c7611c8cfa160ef6..b2a69cca56c5dfdb57c6e2c678fe11dff71d6339 100644 (file)
@@ -57,6 +57,8 @@ fd4_screen_is_format_supported(struct pipe_screen *pscreen,
        }
 
        if ((usage & PIPE_BIND_SAMPLER_VIEW) &&
+                       (target == PIPE_BUFFER ||
+                        util_format_get_blocksize(format) != 12) &&
                        (fd4_pipe2tex(format) != ~0)) {
                retval |= PIPE_BIND_SAMPLER_VIEW;
        }