r300g: implement D24X8 texture sampling for r3xx-r4xx
authorMarek Olšák <maraeo@gmail.com>
Sun, 25 Jul 2010 21:40:51 +0000 (23:40 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sun, 25 Jul 2010 21:40:51 +0000 (23:40 +0200)
commit6f2936c654c68388b9c43a189a1b8c06f3a9d241
treef9bb4191f6b07f59b604e5067005b22e41756fa5
parent451a0ddb190e5185372fed9ec57d24a822442ecc
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.
src/gallium/drivers/r300/r300_screen.c
src/gallium/drivers/r300/r300_state.c
src/gallium/drivers/r300/r300_state_derived.c
src/gallium/drivers/r300/r300_texture.c
src/gallium/drivers/r300/r300_texture.h