aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a3xx/fd3_format.c
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-11-28 17:29:09 -0500
committerIlia Mirkin <[email protected]>2014-11-29 12:15:43 -0500
commit20fbf99595fc87efb4a7ecfd4c1bd9bed08208a5 (patch)
treeba51dfd5bef83d0516fcde1cccfde2a5c80d9451 /src/gallium/drivers/freedreno/a3xx/fd3_format.c
parent3338bfcf498aa93a256aaadaee25951d4864f78f (diff)
freedreno/a3xx: rename vertex/texture format enums to be more consistent
Switch both of them from independently inconsistent conventions to having UINT/SINT/UNORM/SNORM/FLOAT/FIXED suffixes. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a3xx/fd3_format.c')
-rw-r--r--src/gallium/drivers/freedreno/a3xx/fd3_format.c126
1 files changed, 63 insertions, 63 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_format.c b/src/gallium/drivers/freedreno/a3xx/fd3_format.c
index a70acebd626..41e48d0af7c 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_format.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_format.c
@@ -38,209 +38,209 @@ fd3_pipe2vtx(enum pipe_format format)
switch (format) {
/* 8-bit buffers. */
case PIPE_FORMAT_R8_UNORM:
- return VFMT_NORM_UBYTE_8;
+ return VFMT_8_UNORM;
case PIPE_FORMAT_R8_SNORM:
- return VFMT_NORM_BYTE_8;
+ return VFMT_8_SNORM;
case PIPE_FORMAT_R8_UINT:
case PIPE_FORMAT_R8_USCALED:
- return VFMT_UBYTE_8;
+ return VFMT_8_UINT;
case PIPE_FORMAT_R8_SINT:
case PIPE_FORMAT_R8_SSCALED:
- return VFMT_BYTE_8;
+ return VFMT_8_SINT;
/* 16-bit buffers. */
case PIPE_FORMAT_R16_UNORM:
case PIPE_FORMAT_Z16_UNORM:
- return VFMT_NORM_USHORT_16;
+ return VFMT_16_UNORM;
case PIPE_FORMAT_R16_SNORM:
- return VFMT_NORM_SHORT_16;
+ return VFMT_16_SNORM;
case PIPE_FORMAT_R16_UINT:
case PIPE_FORMAT_R16_USCALED:
- return VFMT_USHORT_16;
+ return VFMT_16_UINT;
case PIPE_FORMAT_R16_SINT:
case PIPE_FORMAT_R16_SSCALED:
- return VFMT_SHORT_16;
+ return VFMT_16_SINT;
case PIPE_FORMAT_R16_FLOAT:
- return VFMT_FLOAT_16;
+ return VFMT_16_FLOAT;
case PIPE_FORMAT_R8G8_UNORM:
- return VFMT_NORM_UBYTE_8_8;
+ return VFMT_8_8_UNORM;
case PIPE_FORMAT_R8G8_SNORM:
- return VFMT_NORM_BYTE_8_8;
+ return VFMT_8_8_SNORM;
case PIPE_FORMAT_R8G8_UINT:
case PIPE_FORMAT_R8G8_USCALED:
- return VFMT_UBYTE_8_8;
+ return VFMT_8_8_UINT;
case PIPE_FORMAT_R8G8_SINT:
case PIPE_FORMAT_R8G8_SSCALED:
- return VFMT_BYTE_8_8;
+ return VFMT_8_8_SINT;
/* 24-bit buffers. */
case PIPE_FORMAT_R8G8B8_UNORM:
- return VFMT_NORM_UBYTE_8_8_8;
+ return VFMT_8_8_8_UNORM;
case PIPE_FORMAT_R8G8B8_SNORM:
- return VFMT_NORM_BYTE_8_8_8;
+ return VFMT_8_8_8_SNORM;
case PIPE_FORMAT_R8G8B8_UINT:
case PIPE_FORMAT_R8G8B8_USCALED:
- return VFMT_UBYTE_8_8_8;
+ return VFMT_8_8_8_UINT;
case PIPE_FORMAT_R8G8B8_SINT:
case PIPE_FORMAT_R8G8B8_SSCALED:
- return VFMT_BYTE_8_8_8;
+ return VFMT_8_8_8_SINT;
/* 32-bit buffers. */
case PIPE_FORMAT_A8B8G8R8_UNORM:
case PIPE_FORMAT_A8R8G8B8_UNORM:
case PIPE_FORMAT_B8G8R8A8_UNORM:
case PIPE_FORMAT_R8G8B8A8_UNORM:
- return VFMT_NORM_UBYTE_8_8_8_8;
+ return VFMT_8_8_8_8_UNORM;
case PIPE_FORMAT_R8G8B8A8_SNORM:
- return VFMT_NORM_BYTE_8_8_8_8;
+ return VFMT_8_8_8_8_SNORM;
case PIPE_FORMAT_R8G8B8A8_UINT:
case PIPE_FORMAT_R8G8B8A8_USCALED:
- return VFMT_UBYTE_8_8_8_8;
+ return VFMT_8_8_8_8_UINT;
case PIPE_FORMAT_R8G8B8A8_SINT:
case PIPE_FORMAT_R8G8B8A8_SSCALED:
- return VFMT_BYTE_8_8_8_8;
+ return VFMT_8_8_8_8_SINT;
case PIPE_FORMAT_R16G16_SSCALED:
case PIPE_FORMAT_R16G16_SINT:
- return VFMT_SHORT_16_16;
+ return VFMT_16_16_SINT;
case PIPE_FORMAT_R16G16_FLOAT:
- return VFMT_FLOAT_16_16;
+ return VFMT_16_16_FLOAT;
case PIPE_FORMAT_R16G16_UINT:
case PIPE_FORMAT_R16G16_USCALED:
- return VFMT_USHORT_16_16;
+ return VFMT_16_16_UINT;
case PIPE_FORMAT_R16G16_UNORM:
- return VFMT_NORM_USHORT_16_16;
+ return VFMT_16_16_UNORM;
case PIPE_FORMAT_R16G16_SNORM:
- return VFMT_NORM_SHORT_16_16;
+ return VFMT_16_16_SNORM;
case PIPE_FORMAT_R32_UINT:
case PIPE_FORMAT_R32_USCALED:
- return VFMT_UINT_32;
+ return VFMT_32_UINT;
case PIPE_FORMAT_R32_SINT:
case PIPE_FORMAT_R32_SSCALED:
- return VFMT_INT_32;
+ return VFMT_32_SINT;
case PIPE_FORMAT_R10G10B10A2_UNORM:
- return VFMT_NORM_UINT_10_10_10_2;
+ return VFMT_10_10_10_2_UNORM;
case PIPE_FORMAT_R10G10B10A2_SNORM:
- return VFMT_NORM_INT_10_10_10_2;
+ return VFMT_10_10_10_2_SNORM;
case PIPE_FORMAT_R10G10B10A2_UINT:
case PIPE_FORMAT_R10G10B10A2_USCALED:
- return VFMT_UINT_10_10_10_2;
+ return VFMT_10_10_10_2_UINT;
case PIPE_FORMAT_R10G10B10A2_SSCALED:
- return VFMT_INT_10_10_10_2;
+ return VFMT_10_10_10_2_SINT;
/* 48-bit buffers. */
case PIPE_FORMAT_R16G16B16_FLOAT:
- return VFMT_FLOAT_16_16_16;
+ return VFMT_16_16_16_FLOAT;
case PIPE_FORMAT_R16G16B16_SINT:
case PIPE_FORMAT_R16G16B16_SSCALED:
- return VFMT_SHORT_16_16_16;
+ return VFMT_16_16_16_SINT;
case PIPE_FORMAT_R16G16B16_UINT:
case PIPE_FORMAT_R16G16B16_USCALED:
- return VFMT_USHORT_16_16_16;
+ return VFMT_16_16_16_UINT;
case PIPE_FORMAT_R16G16B16_SNORM:
- return VFMT_NORM_SHORT_16_16_16;
+ return VFMT_16_16_16_SNORM;
case PIPE_FORMAT_R16G16B16_UNORM:
- return VFMT_NORM_USHORT_16_16_16;
+ return VFMT_16_16_16_UNORM;
case PIPE_FORMAT_R32_FLOAT:
case PIPE_FORMAT_Z32_FLOAT:
- return VFMT_FLOAT_32;
+ return VFMT_32_FLOAT;
case PIPE_FORMAT_R32_FIXED:
- return VFMT_FIXED_32;
+ return VFMT_32_FIXED;
/* 64-bit buffers. */
case PIPE_FORMAT_R16G16B16A16_UNORM:
- return VFMT_NORM_USHORT_16_16_16_16;
+ return VFMT_16_16_16_16_UNORM;
case PIPE_FORMAT_R16G16B16A16_SNORM:
- return VFMT_NORM_SHORT_16_16_16_16;
+ return VFMT_16_16_16_16_SNORM;
case PIPE_FORMAT_R16G16B16A16_UINT:
case PIPE_FORMAT_R16G16B16A16_USCALED:
- return VFMT_USHORT_16_16_16_16;
+ return VFMT_16_16_16_16_UINT;
case PIPE_FORMAT_R16G16B16A16_SINT:
case PIPE_FORMAT_R16G16B16A16_SSCALED:
- return VFMT_SHORT_16_16_16_16;
+ return VFMT_16_16_16_16_SINT;
case PIPE_FORMAT_R32G32_FLOAT:
- return VFMT_FLOAT_32_32;
+ return VFMT_32_32_FLOAT;
case PIPE_FORMAT_R32G32_FIXED:
- return VFMT_FIXED_32_32;
+ return VFMT_32_32_FIXED;
case PIPE_FORMAT_R16G16B16A16_FLOAT:
- return VFMT_FLOAT_16_16_16_16;
+ return VFMT_16_16_16_16_FLOAT;
case PIPE_FORMAT_R32G32_UINT:
case PIPE_FORMAT_R32G32_USCALED:
- return VFMT_UINT_32_32;
+ return VFMT_32_32_UINT;
case PIPE_FORMAT_R32G32_SINT:
case PIPE_FORMAT_R32G32_SSCALED:
- return VFMT_INT_32_32;
+ return VFMT_32_32_SINT;
/* 96-bit buffers. */
case PIPE_FORMAT_R32G32B32_FLOAT:
- return VFMT_FLOAT_32_32_32;
+ return VFMT_32_32_32_FLOAT;
case PIPE_FORMAT_R32G32B32_FIXED:
- return VFMT_FIXED_32_32_32;
+ return VFMT_32_32_32_FIXED;
case PIPE_FORMAT_R32G32B32_UINT:
case PIPE_FORMAT_R32G32B32_USCALED:
- return VFMT_UINT_32_32_32;
+ return VFMT_32_32_32_UINT;
case PIPE_FORMAT_R32G32B32_SINT:
case PIPE_FORMAT_R32G32B32_SSCALED:
- return VFMT_INT_32_32_32;
+ return VFMT_32_32_32_SINT;
/* 128-bit buffers. */
case PIPE_FORMAT_R32G32B32A32_FLOAT:
- return VFMT_FLOAT_32_32_32_32;
+ return VFMT_32_32_32_32_FLOAT;
case PIPE_FORMAT_R32G32B32A32_FIXED:
- return VFMT_FIXED_32_32_32_32;
+ return VFMT_32_32_32_32_FIXED;
case PIPE_FORMAT_R32G32B32A32_UINT:
case PIPE_FORMAT_R32G32B32A32_USCALED:
- return VFMT_UINT_32_32_32_32;
+ return VFMT_32_32_32_32_UINT;
case PIPE_FORMAT_R32G32B32A32_SINT:
case PIPE_FORMAT_R32G32B32A32_SSCALED:
- return VFMT_INT_32_32_32_32;
+ return VFMT_32_32_32_32_SINT;
/* TODO normalized 32bit int formats do not appear to be supported
* natively.. will require either shader variant or VFD_DECODE
@@ -262,10 +262,10 @@ fd3_pipe2tex(enum pipe_format format)
case PIPE_FORMAT_L8_UNORM:
case PIPE_FORMAT_A8_UNORM:
case PIPE_FORMAT_I8_UNORM:
- return TFMT_NORM_UINT_8;
+ return TFMT_8_UNORM;
case PIPE_FORMAT_R8G8_UNORM:
- return TFMT_NORM_UINT_8_8;
+ return TFMT_8_8_UNORM;
case PIPE_FORMAT_B8G8R8A8_UNORM:
case PIPE_FORMAT_B8G8R8X8_UNORM:
@@ -275,22 +275,22 @@ fd3_pipe2tex(enum pipe_format format)
case PIPE_FORMAT_B8G8R8X8_SRGB:
case PIPE_FORMAT_R8G8B8A8_SRGB:
case PIPE_FORMAT_R8G8B8X8_SRGB:
- return TFMT_NORM_UINT_8_8_8_8;
+ return TFMT_8_8_8_8_UNORM;
case PIPE_FORMAT_Z24X8_UNORM:
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
- return TFMT_NORM_UINT_X8Z24;
+ return TFMT_X8Z24_UNORM;
case PIPE_FORMAT_Z16_UNORM:
- return TFMT_NORM_USHORT_Z16;
+ return TFMT_Z16_UNORM;
case PIPE_FORMAT_R16G16B16A16_FLOAT:
case PIPE_FORMAT_R16G16B16X16_FLOAT:
- return TFMT_FLOAT_16_16_16_16;
+ return TFMT_16_16_16_16_FLOAT;
case PIPE_FORMAT_R32G32B32A32_FLOAT:
case PIPE_FORMAT_R32G32B32X32_FLOAT:
- return TFMT_FLOAT_32_32_32_32;
+ return TFMT_32_32_32_32_FLOAT;
// TODO add more..