summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-06-26 19:39:24 -0700
committerCorbin Simpson <[email protected]>2009-06-26 21:25:40 -0700
commit7a3224c334a9a159f16e37672e4d8d833bc9bb52 (patch)
treeab76f707a8108c67140581a471f0c0ee53808cc6 /src
parent9e7d195fdc739847a3cc1b9a375a6ea2ce460ef8 (diff)
r300g: Definitively forbid unusable Z buffer/stencil formats.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r300/r300_screen.c13
1 files changed, 12 insertions, 1 deletions
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;
}