summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_screen.c
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-06-27 10:57:03 -0700
committerCorbin Simpson <[email protected]>2009-06-27 12:07:59 -0700
commitf150e05afcbce73ff8422ffef2ce02536f691f2c (patch)
treedaef75b5de51560b4c3db1d40033af18f7332300 /src/gallium/drivers/r300/r300_screen.c
parent1ac72aedb24c56c7158f770f4297516b3bf1899d (diff)
r300g: Fix EXT_packed_depth_stencil functionality.
Allow Z24S8 to be a true texture.
Diffstat (limited to 'src/gallium/drivers/r300/r300_screen.c')
-rw-r--r--src/gallium/drivers/r300/r300_screen.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 6817d7163d6..42a7009481a 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -214,10 +214,14 @@ static boolean check_tex_2d_format(enum pipe_format format, uint32_t usage,
/* Z buffer */
case PIPE_FORMAT_Z16_UNORM:
- /* Z buffer with stencil */
- case PIPE_FORMAT_Z24S8_UNORM:
return usage & PIPE_TEXTURE_USAGE_DEPTH_STENCIL;
+ /* Z buffer with stencil or texture */
+ case PIPE_FORMAT_Z24S8_UNORM:
+ return usage &
+ (PIPE_TEXTURE_USAGE_DEPTH_STENCIL |
+ PIPE_TEXTURE_USAGE_SAMPLER);
+
/* Definitely unsupported formats. */
/* Non-usable Z buffer/stencil formats. */
case PIPE_FORMAT_Z24X8_UNORM: