summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_screen.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-07-25 23:40:51 +0200
committerMarek Olšák <maraeo@gmail.com>2010-07-25 23:40:51 +0200
commit6f2936c654c68388b9c43a189a1b8c06f3a9d241 (patch)
treef9bb4191f6b07f59b604e5067005b22e41756fa5 /src/gallium/drivers/r300/r300_screen.c
parent451a0ddb190e5185372fed9ec57d24a822442ecc (diff)
r300g: implement D24X8 texture sampling for r3xx-r4xx
Because the hw can't sample it, I reinterpret the format as G16R16 and sample the G component. This gives 16 bits of precision, which should be enough for depth texturing (surprisingly, the sampled values are exactly the same as in D16 textures). This also enables EXT_packed_depth_stencil on those old chipsets, finally.
Diffstat (limited to 'src/gallium/drivers/r300/r300_screen.c')
-rw-r--r--src/gallium/drivers/r300/r300_screen.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 5a11b98eb6..676430f5fe 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -257,8 +257,6 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
uint32_t retval = 0;
boolean is_r500 = r300_screen(screen)->caps.is_r500;
boolean is_r400 = r300_screen(screen)->caps.is_r400;
- boolean is_z24 = format == PIPE_FORMAT_X8Z24_UNORM ||
- format == PIPE_FORMAT_S8_USCALED_Z24_UNORM;
boolean is_color2101010 = format == PIPE_FORMAT_R10G10B10A2_UNORM ||
format == PIPE_FORMAT_R10G10B10X2_SNORM ||
format == PIPE_FORMAT_B10G10R10A2_UNORM ||
@@ -293,8 +291,6 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
/* Check sampler format support. */
if ((usage & PIPE_BIND_SAMPLER_VIEW) &&
- /* Z24 cannot be sampled from on non-r5xx. */
- (is_r500 || !is_z24) &&
/* ATI1N is r5xx-only. */
(is_r500 || !is_ati1n) &&
/* ATI2N is supported on r4xx-r5xx. */