summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-05-24 08:59:09 -0600
committerBrian Paul <[email protected]>2011-05-24 09:00:17 -0600
commitcd5417aac72ae1de85dd6bca3d53d2e2f2d7e546 (patch)
treee7138dae075f891f3b3b6e9a113c8b03806cac0d /src/mesa
parentd57e95f22af1a1b2d9013db7a15524717bd29579 (diff)
st/mesa: prefer formats without stencil for DEPTH_COMPONENT
for fast Z clears to be used more often. Original patch by Marek Olšák. Rebased to table-driven st_choose_format() by Brian Paul.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_format.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 6ebe721bfd6..de30b4fc610 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -741,8 +741,9 @@ static struct format_mapping format_map[] = {
},
{
{ GL_DEPTH_COMPONENT24, 0 },
- { PIPE_FORMAT_Z24_UNORM_S8_USCALED,
- PIPE_FORMAT_S8_USCALED_Z24_UNORM, PIPE_FORMAT_Z32_UNORM, 0 }
+ { PIPE_FORMAT_Z24X8_UNORM, PIPE_FORMAT_X8Z24_UNORM,
+ PIPE_FORMAT_Z24_UNORM_S8_USCALED, PIPE_FORMAT_S8_USCALED_Z24_UNORM,
+ PIPE_FORMAT_Z32_UNORM, 0 }
},
{
{ GL_DEPTH_COMPONENT32, 0 },
@@ -750,8 +751,9 @@ static struct format_mapping format_map[] = {
},
{
{ GL_DEPTH_COMPONENT, 0 },
- { PIPE_FORMAT_Z32_UNORM, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
- PIPE_FORMAT_S8_USCALED_Z24_UNORM, PIPE_FORMAT_Z16_UNORM, 0 }
+ { PIPE_FORMAT_Z24X8_UNORM, PIPE_FORMAT_X8Z24_UNORM,
+ PIPE_FORMAT_Z32_UNORM, PIPE_FORMAT_Z16_UNORM,
+ PIPE_FORMAT_Z24_UNORM_S8_USCALED, PIPE_FORMAT_S8_USCALED_Z24_UNORM, 0 }
},
/* stencil formats */