summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc5
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2017-10-13 13:11:15 -0700
committerEric Anholt <[email protected]>2017-11-19 10:12:30 -0800
commit514db90448ece28f6acaffea6358c715c47b359a (patch)
tree07c58fde34d54aeb90445f6b8ec6bf7f89c5e960 /src/gallium/drivers/vc5
parent65ae4527d928d12dff349680e35469f9503c7f08 (diff)
broadcom/vc5: Fix up integer texture handling.
The original spec I had didn't expose integer textures and suggested that you use unfiltered floats. Now there are proper formats for them. Fixes 16- and 32-bit texwrap integer tests in piglit, and dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.rgb10_a2ui.
Diffstat (limited to 'src/gallium/drivers/vc5')
-rw-r--r--src/gallium/drivers/vc5/vc5_formats.c55
1 files changed, 28 insertions, 27 deletions
diff --git a/src/gallium/drivers/vc5/vc5_formats.c b/src/gallium/drivers/vc5/vc5_formats.c
index 92b88ef0e00..0c6b6fa3157 100644
--- a/src/gallium/drivers/vc5/vc5_formats.c
+++ b/src/gallium/drivers/vc5/vc5_formats.c
@@ -107,6 +107,7 @@ static const struct vc5_format vc5_format_table[] = {
FORMAT(R8G8B8A8_SNORM, NO, RGBA8_SNORM, SWIZ_XYZW, 16, 0),
FORMAT(R8G8B8X8_SNORM, NO, RGBA8_SNORM, SWIZ_XYZ1, 16, 0),
FORMAT(R10G10B10A2_UNORM, RGB10_A2, RGB10_A2, SWIZ_XYZW, 16, 0),
+ FORMAT(B10G10R10A2_UINT, RGB10_A2UI, RGB10_A2UI, SWIZ_ZYXW, 16, 0),
FORMAT(B4G4R4A4_UNORM, ABGR4444, RGBA4, SWIZ_YZWX, 16, 0),
FORMAT(B4G4R4X4_UNORM, ABGR4444, RGBA4, SWIZ_YZW1, 16, 0),
@@ -150,33 +151,33 @@ static const struct vc5_format vc5_format_table[] = {
FORMAT(I8_UNORM, NO, R8, SWIZ_XXXX, 16, 0),
FORMAT(L8A8_UNORM, NO, RG8, SWIZ_XXXY, 16, 0),
- FORMAT(R8_SINT, R8I, S8, SWIZ_X001, 16, 0),
- FORMAT(R8_UINT, R8UI, S8, SWIZ_X001, 16, 0),
- FORMAT(R8G8_SINT, RG8I, S16, SWIZ_XY01, 16, 0),
- FORMAT(R8G8_UINT, RG8UI, S16, SWIZ_XY01, 16, 0),
- FORMAT(R8G8B8A8_SINT, RGBA8I, R32F, SWIZ_XYZW, 16, 0),
- FORMAT(R8G8B8A8_UINT, RGBA8UI, R32F, SWIZ_XYZW, 16, 0),
-
- FORMAT(R16_SINT, R16I, S16, SWIZ_X001, 16, 0),
- FORMAT(R16_UINT, R16UI, S16, SWIZ_X001, 16, 0),
- FORMAT(R16G16_SINT, RG16I, R32F, SWIZ_XY01, 16, 0),
- FORMAT(R16G16_UINT, RG16UI, R32F, SWIZ_XY01, 16, 0),
- FORMAT(R16G16B16A16_SINT, RGBA16I, RG32F, SWIZ_XYZW, 16, 0),
- FORMAT(R16G16B16A16_UINT, RGBA16UI, RG32F, SWIZ_XYZW, 16, 0),
-
- FORMAT(R32_SINT, R32I, R32F, SWIZ_X001, 16, 0),
- FORMAT(R32_UINT, R32UI, R32F, SWIZ_X001, 16, 0),
- FORMAT(R32G32_SINT, RG32I, RG32F, SWIZ_XY01, 16, 0),
- FORMAT(R32G32_UINT, RG32UI, RG32F, SWIZ_XY01, 16, 0),
- FORMAT(R32G32B32A32_SINT, RGBA32I, RGBA32F, SWIZ_XYZW, 16, 0),
- FORMAT(R32G32B32A32_UINT, RGBA32UI, RGBA32F, SWIZ_XYZW, 16, 0),
-
- FORMAT(A8_SINT, R8I, S8, SWIZ_000X, 16, 0),
- FORMAT(A8_UINT, R8UI, S8, SWIZ_000X, 16, 0),
- FORMAT(A16_SINT, R16I, S16, SWIZ_000X, 16, 0),
- FORMAT(A16_UINT, R16UI, S16, SWIZ_000X, 16, 0),
- FORMAT(A32_SINT, R32I, R32F, SWIZ_000X, 16, 0),
- FORMAT(A32_UINT, R32UI, R32F, SWIZ_000X, 16, 0),
+ FORMAT(R8_SINT, R8I, R8I, SWIZ_X001, 16, 0),
+ FORMAT(R8_UINT, R8UI, R8UI, SWIZ_X001, 16, 0),
+ FORMAT(R8G8_SINT, RG8I, RG8I, SWIZ_XY01, 16, 0),
+ FORMAT(R8G8_UINT, RG8UI, RG8UI, SWIZ_XY01, 16, 0),
+ FORMAT(R8G8B8A8_SINT, RGBA8I, RGBA8I, SWIZ_XYZW, 16, 0),
+ FORMAT(R8G8B8A8_UINT, RGBA8UI, RGBA8UI, SWIZ_XYZW, 16, 0),
+
+ FORMAT(R16_SINT, R16I, R16I, SWIZ_X001, 16, 0),
+ FORMAT(R16_UINT, R16UI, R16UI, SWIZ_X001, 16, 0),
+ FORMAT(R16G16_SINT, RG16I, R16I, SWIZ_XY01, 16, 0),
+ FORMAT(R16G16_UINT, RG16UI, R16UI, SWIZ_XY01, 16, 0),
+ FORMAT(R16G16B16A16_SINT, RGBA16I, RGBA16I, SWIZ_XYZW, 16, 0),
+ FORMAT(R16G16B16A16_UINT, RGBA16UI, RGBA16UI, SWIZ_XYZW, 16, 0),
+
+ FORMAT(R32_SINT, R32I, R32I, SWIZ_X001, 32, 1),
+ FORMAT(R32_UINT, R32UI, R32UI, SWIZ_X001, 32, 1),
+ FORMAT(R32G32_SINT, RG32I, RG32I, SWIZ_XY01, 32, 2),
+ FORMAT(R32G32_UINT, RG32UI, RG32UI, SWIZ_XY01, 32, 2),
+ FORMAT(R32G32B32A32_SINT, RGBA32I, RGBA32I, SWIZ_XYZW, 32, 4),
+ FORMAT(R32G32B32A32_UINT, RGBA32UI, RGBA32UI, SWIZ_XYZW, 32, 4),
+
+ FORMAT(A8_SINT, R8I, R8I, SWIZ_000X, 16, 0),
+ FORMAT(A8_UINT, R8UI, R8UI, SWIZ_000X, 16, 0),
+ FORMAT(A16_SINT, R16I, R16I, SWIZ_000X, 16, 0),
+ FORMAT(A16_UINT, R16UI, R16UI, SWIZ_000X, 16, 0),
+ FORMAT(A32_SINT, R32I, R32I, SWIZ_000X, 32, 1),
+ FORMAT(A32_UINT, R32UI, R32UI, SWIZ_000X, 32, 1),
FORMAT(R11G11B10_FLOAT, R11F_G11F_B10F, R11F_G11F_B10F, SWIZ_XYZW, 16, 0),
FORMAT(R9G9B9E5_FLOAT, NO, RGB9_E5, SWIZ_XYZW, 16, 0),