[Mesa-dev] [PATCH 2/4] st/mesa: add GL_DEPTH_COMPONENT32 fallback formats

Marek Olšák maraeo at gmail.com
Sat May 28 07:57:28 PDT 2011


This makes D32 work again on chipsets which can't do it.
---
 src/mesa/state_tracker/st_format.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index de30b4f..4360ed7 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -747,7 +747,10 @@ static struct format_mapping format_map[] = {
    },
    {
       { GL_DEPTH_COMPONENT32, 0 },
-      { PIPE_FORMAT_Z32_UNORM, 0 }
+      { PIPE_FORMAT_Z32_UNORM,
+        PIPE_FORMAT_Z24X8_UNORM, PIPE_FORMAT_X8Z24_UNORM,
+        PIPE_FORMAT_Z16_UNORM,
+        PIPE_FORMAT_Z24_UNORM_S8_USCALED, PIPE_FORMAT_S8_USCALED_Z24_UNORM, 0 }
    },
    {
       { GL_DEPTH_COMPONENT, 0 },
-- 
1.7.4.1



More information about the mesa-dev mailing list