From: Corbin Simpson Date: Sat, 27 Jun 2009 02:39:24 +0000 (-0700) Subject: r300g: Definitively forbid unusable Z buffer/stencil formats. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7a3224c334a9a159f16e37672e4d8d833bc9bb52;p=mesa.git r300g: Definitively forbid unusable Z buffer/stencil formats. --- diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 26da3899101..711c22577c9 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -185,6 +185,7 @@ static float r300_get_paramf(struct pipe_screen* pscreen, int param) static boolean check_tex_2d_format(enum pipe_format format, boolean is_r500) { switch (format) { + /* Supported formats. */ /* Colorbuffer */ case PIPE_FORMAT_A4R4G4B4_UNORM: case PIPE_FORMAT_R5G6B5_UNORM: @@ -198,6 +199,15 @@ static boolean check_tex_2d_format(enum pipe_format format, boolean is_r500) case PIPE_FORMAT_Z24S8_UNORM: return TRUE; + /* Definitely unsupported formats. */ + /* Non-usable Z buffer/stencil formats. */ + case PIPE_FORMAT_Z24X8_UNORM: + case PIPE_FORMAT_S8Z24_UNORM: + case PIPE_FORMAT_X8Z24_UNORM: + debug_printf("r300: Note: Got unsupported format: %s in %s\n", + pf_name(format), __FUNCTION__); + return FALSE; + /* XXX These don't even exist case PIPE_FORMAT_A32R32G32B32: case PIPE_FORMAT_A16R16G16B16: */ @@ -219,7 +229,8 @@ static boolean check_tex_2d_format(enum pipe_format format, boolean is_r500) return FALSE; */ default: - debug_printf("r300: Warning: Got unsupported format: %s in %s\n", + /* Unknown format... */ + debug_printf("r300: Warning: Got unknown format: %s in %s\n", pf_name(format), __FUNCTION__); break; }