Mesa (master): st/mesa: if Z32 is unsupported, prefer Z24 to Z16

Marek Olšák mareko at kemper.freedesktop.org
Thu Dec 23 07:58:44 PST 2010


Module: Mesa
Branch: master
Commit: 0a7b60f7ed3167acce72b3c367181dcae81f92c1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0a7b60f7ed3167acce72b3c367181dcae81f92c1

Author: Marek Olšák <maraeo at gmail.com>
Date:   Tue Dec 21 05:50:58 2010 +0100

st/mesa: if Z32 is unsupported, prefer Z24 to Z16

---

 src/mesa/state_tracker/st_format.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index a79d4c0..ea8f6c5 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -680,10 +680,10 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
    case GL_DEPTH_COMPONENT:
       {
          static const enum pipe_format formats[] = {
-            PIPE_FORMAT_Z16_UNORM,
             PIPE_FORMAT_Z32_UNORM,
             PIPE_FORMAT_Z24_UNORM_S8_USCALED,
-            PIPE_FORMAT_S8_USCALED_Z24_UNORM
+            PIPE_FORMAT_S8_USCALED_Z24_UNORM,
+            PIPE_FORMAT_Z16_UNORM
          };
          return find_supported_format(screen, formats, Elements(formats),
                                       target, sample_count, bindings, geom_flags);



More information about the mesa-commit mailing list