aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2009-12-13 02:19:18 +0100
committerCorbin Simpson <[email protected]>2009-12-15 19:04:45 -0800
commitc5e0b0bc37315cd29a84e71854dca951149b8bc8 (patch)
treeeb562ad4811a12bad7f651c451c5f0c96f65561a /src/gallium
parent38a97148bf5df3c32087a5fdd799912d0275267d (diff)
r300g: add Z24X8 to the list of unsupported sampler formats on R3xx-R4xx
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r300/r300_screen.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index c0d9797020d..feb571a23dd 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -220,12 +220,18 @@ static boolean check_tex_format(enum pipe_format format, uint32_t usage,
/* Z buffer or texture */
case PIPE_FORMAT_Z16_UNORM:
+ retval = usage &
+ (PIPE_TEXTURE_USAGE_DEPTH_STENCIL |
+ PIPE_TEXTURE_USAGE_SAMPLER);
+ break;
+
+ /* 24bit Z buffer can only be used as a texture on R500. */
case PIPE_FORMAT_Z24X8_UNORM:
/* Z buffer with stencil or texture */
case PIPE_FORMAT_Z24S8_UNORM:
retval = usage &
(PIPE_TEXTURE_USAGE_DEPTH_STENCIL |
- PIPE_TEXTURE_USAGE_SAMPLER);
+ (is_r500 ? PIPE_TEXTURE_USAGE_SAMPLER : 0));
break;
/* Definitely unsupported formats. */