st/mesa: if Z32 is unsupported, prefer Z24 to Z16
authorMarek Olšák <maraeo@gmail.com>
Tue, 21 Dec 2010 04:50:58 +0000 (05:50 +0100)
committerMarek Olšák <maraeo@gmail.com>
Thu, 23 Dec 2010 15:54:58 +0000 (16:54 +0100)
src/mesa/state_tracker/st_format.c

index a79d4c0c4e94f6962f6c21c735e4513ee7eb526a..ea8f6c5a28a67b40a6351a8f7b96b53fcc997027 100644 (file)
@@ -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);