Module: Mesa Branch: master Commit: f626d99edf17a1d3203b257f6fe6993229ea6866 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f626d99edf17a1d3203b257f6fe6993229ea6866
Author: Marcin Slusarz <marcin.slus...@gmail.com> Date: Tue Sep 13 15:14:19 2011 +0200 nv50/nvc0: add support for R4A4_UNORM and A4R4_UNORM formats R4A4 is needed by OSD in mplayer's xvmc output --- src/gallium/drivers/nv50/nv50_formats.c | 8 ++++++++ src/gallium/drivers/nvc0/nvc0_formats.c | 8 ++++++++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/src/gallium/drivers/nv50/nv50_formats.c b/src/gallium/drivers/nv50/nv50_formats.c index 34502d0..4e0e581 100644 --- a/src/gallium/drivers/nv50/nv50_formats.c +++ b/src/gallium/drivers/nv50/nv50_formats.c @@ -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, diff --git a/src/gallium/drivers/nvc0/nvc0_formats.c b/src/gallium/drivers/nvc0/nvc0_formats.c index 8dd4419..87d7fd8 100644 --- a/src/gallium/drivers/nvc0/nvc0_formats.c +++ b/src/gallium/drivers/nvc0/nvc0_formats.c @@ -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, _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit