summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2017-05-01 11:25:06 -0700
committerEric Anholt <eric@anholt.net>2017-10-10 09:31:29 -0700
commitcbb532429b68ce0e401413bdcc75a2f122786302 (patch)
tree8fe3de44fd6d3e65875a7d5b3f812a84981c1da0 /src
parentef874ee450b18e6d6189731f3160c56474bacbf5 (diff)
vc4: Add support for 5551 textures.
This keeps us from promoting them up to 8888, at the cost of not being color-renderable.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/vc4/vc4_formats.c5
-rw-r--r--src/gallium/drivers/vc4/vc4_uniforms.c1
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/vc4/vc4_formats.c b/src/gallium/drivers/vc4/vc4_formats.c
index 42cdad115b2..6d4a6249fbf 100644
--- a/src/gallium/drivers/vc4/vc4_formats.c
+++ b/src/gallium/drivers/vc4/vc4_formats.c
@@ -94,9 +94,8 @@ static const struct vc4_format vc4_format_table[] = {
FORMAT(B4G4R4A4_UNORM, NO, RGBA4444, SWIZ(Y, Z, W, X)),
FORMAT(B4G4R4X4_UNORM, NO, RGBA4444, SWIZ(Y, Z, W, 1)),
- /* It looks like 5551 in the hardware is the other way around from
- * gallium.
- */
+ FORMAT(A1B5G5R5_UNORM, NO, RGBA5551, SWIZ(X, Y, Z, W)),
+ FORMAT(X1B5G5R5_UNORM, NO, RGBA5551, SWIZ(X, Y, Z, 1)),
FORMAT(A8_UNORM, NO, ALPHA, SWIZ(0, 0, 0, W)),
FORMAT(L8_UNORM, NO, ALPHA, SWIZ(W, W, W, 1)),
diff --git a/src/gallium/drivers/vc4/vc4_uniforms.c b/src/gallium/drivers/vc4/vc4_uniforms.c
index b8169347fed..12e6504bba0 100644
--- a/src/gallium/drivers/vc4/vc4_uniforms.c
+++ b/src/gallium/drivers/vc4/vc4_uniforms.c
@@ -149,6 +149,7 @@ write_texture_border_color(struct vc4_job *job,
PIPE_FORMAT_R8G8B8A8_UNORM, &uc);
break;
case VC4_TEXTURE_TYPE_RGBA4444:
+ case VC4_TEXTURE_TYPE_RGBA5551:
util_pack_color(storage_color,
PIPE_FORMAT_A8B8G8R8_UNORM, &uc);
break;