nv50/nvc0: add support for R4A4_UNORM and A4R4_UNORM formats
authorMarcin Slusarz <marcin.slusarz@gmail.com>
Tue, 13 Sep 2011 13:14:19 +0000 (15:14 +0200)
committerMarcin Slusarz <marcin.slusarz@gmail.com>
Tue, 13 Sep 2011 13:28:00 +0000 (15:28 +0200)
R4A4 is needed by OSD in mplayer's xvmc output

src/gallium/drivers/nv50/nv50_formats.c
src/gallium/drivers/nvc0/nvc0_formats.c

index 34502d0a39744db82b41eadcbbf17e4ec33be2a0..4e0e581326094a1038315735a6a541bb8090ac2f 100644 (file)
@@ -575,6 +575,14 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
     B_(C3, C2, C1, C0, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 0),
     SAMPLER_VIEW },
 
+   [PIPE_FORMAT_R4A4_UNORM] = { 0,
+    B_(C0, ZERO, ZERO, C1, UNORM, UNORM, UNORM, UNORM, 4_4, 0),
+    SAMPLER_VIEW },
+
+   [PIPE_FORMAT_A4R4_UNORM] = { 0,
+    B_(C1, ZERO, ZERO, C0, UNORM, UNORM, UNORM, UNORM, 4_4, 0),
+    SAMPLER_VIEW },
+
    /* FIXED FORMATS - hw doesn't support these, convert on vbo push for now */
 
    [PIPE_FORMAT_R32G32B32A32_FIXED] = { 0,
index 8dd4419436deac6076b4d245357929241bc0324c..87d7fd8808305526daf90582ed6b800b373a9689 100644 (file)
@@ -576,6 +576,14 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
     B_(C3, C2, C1, C0, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 0),
     SAMPLER_VIEW },
 
+   [PIPE_FORMAT_R4A4_UNORM] = { 0,
+    B_(C0, ZERO, ZERO, C1, UNORM, UNORM, UNORM, UNORM, 4_4, 0),
+    SAMPLER_VIEW },
+
+   [PIPE_FORMAT_A4R4_UNORM] = { 0,
+    B_(C1, ZERO, ZERO, C0, UNORM, UNORM, UNORM, UNORM, 4_4, 0),
+    SAMPLER_VIEW },
+
    /* FIXED FORMATS - hw doesn't support these, convert on vbo push for now */
 
    [PIPE_FORMAT_R32G32B32A32_FIXED] = { 0,