freedreno/a3xx: add float 16 and 32bit formats
authorRob Clark <robclark@freedesktop.org>
Sun, 23 Feb 2014 19:29:59 +0000 (14:29 -0500)
committerRob Clark <robclark@freedesktop.org>
Sun, 23 Feb 2014 19:58:23 +0000 (14:58 -0500)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a3xx/fd3_util.c

index 07f23fd4e4a857309af64f896a2be9202bb7cc97..baafc7831dcfe049f5b9b93f75475f1b856887ee 100644 (file)
@@ -183,6 +183,10 @@ fd3_pipe2vtx(enum pipe_format format)
        case PIPE_FORMAT_R32G32_FIXED:
                return VFMT_FIXED_32_32;
 
+       case PIPE_FORMAT_R16G16B16A16_FLOAT:
+       case PIPE_FORMAT_R16G16B16X16_FLOAT:
+               return VFMT_FLOAT_16_16_16_16;
+
 /* TODO probably need gles3 blob drivers to find the 32bit int formats:
        case PIPE_FORMAT_R32G32_SINT:
        case PIPE_FORMAT_R32G32_UINT:
@@ -199,6 +203,7 @@ fd3_pipe2vtx(enum pipe_format format)
 
        /* 128-bit buffers. */
        case PIPE_FORMAT_R32G32B32A32_FLOAT:
+       case PIPE_FORMAT_R32G32B32X32_FLOAT:
                return VFMT_FLOAT_32_32_32_32;
 
        case PIPE_FORMAT_R32G32B32A32_FIXED:
@@ -229,6 +234,7 @@ fd3_pipe2tex(enum pipe_format format)
        case PIPE_FORMAT_B8G8R8A8_UNORM:
        case PIPE_FORMAT_B8G8R8X8_UNORM:
        case PIPE_FORMAT_R8G8B8A8_UNORM:
+       case PIPE_FORMAT_R8G8B8X8_UNORM:
                return TFMT_NORM_UINT_8_8_8_8;
 
        case PIPE_FORMAT_Z24X8_UNORM:
@@ -240,6 +246,14 @@ fd3_pipe2tex(enum pipe_format format)
        case PIPE_FORMAT_Z16_UNORM:
                return TFMT_NORM_UINT_8_8;
 
+       case PIPE_FORMAT_R16G16B16A16_FLOAT:
+       case PIPE_FORMAT_R16G16B16X16_FLOAT:
+               return TFMT_FLOAT_16_16_16_16;
+
+       case PIPE_FORMAT_R32G32B32A32_FLOAT:
+       case PIPE_FORMAT_R32G32B32X32_FLOAT:
+               return TFMT_FLOAT_32_32_32_32;
+
        // TODO add more..
 
        default:
@@ -295,6 +309,14 @@ fd3_pipe2color(enum pipe_format format)
        case PIPE_FORMAT_A8_UNORM:
                return RB_A8_UNORM;
 
+       case PIPE_FORMAT_R16G16B16A16_FLOAT:
+       case PIPE_FORMAT_R16G16B16X16_FLOAT:
+               return RB_R16G16B16A16_FLOAT;
+
+       case PIPE_FORMAT_R32G32B32A32_FLOAT:
+       case PIPE_FORMAT_R32G32B32X32_FLOAT:
+               return RB_R32G32B32A32_FLOAT;
+
        // TODO add more..
 
        default: