[Mesa-dev] [PATCH 4/4] intel: Support native Z16 depth textures (including as renderbuffer) on i965.

Eric Anholt eric at anholt.net
Fri Nov 11 10:57:08 PST 2011


This is required for GL 3.0.  The old comment about Z24 is dropped,
since we support X8_Z24 now.
---
 src/mesa/drivers/dri/intel/intel_context.c |   13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index d00d5d4..4ee7e35 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -648,21 +648,12 @@ intelInitContext(struct intel_context *intel,
    }
 
    /* Depth and stencil */
+   if (intel->gen >= 4)
+      ctx->TextureFormatSupported[MESA_FORMAT_Z16] = true;
    ctx->TextureFormatSupported[MESA_FORMAT_S8_Z24] = true;
    ctx->TextureFormatSupported[MESA_FORMAT_X8_Z24] = true;
    ctx->TextureFormatSupported[MESA_FORMAT_S8] = intel->has_separate_stencil;
 
-   /*
-    * This was disabled in initial FBO enabling to avoid combinations
-    * of depth+stencil that wouldn't work together.  We since decided
-    * that it was OK, since it's up to the app to come up with the
-    * combo that actually works, so this can probably be re-enabled.
-    */
-   /*
-   ctx->TextureFormatSupported[MESA_FORMAT_Z16] = true;
-   ctx->TextureFormatSupported[MESA_FORMAT_Z24] = true;
-   */
-
    /* ctx->Extensions.MESA_ycbcr_texture */
    ctx->TextureFormatSupported[MESA_FORMAT_YCBCR] = true;
    ctx->TextureFormatSupported[MESA_FORMAT_YCBCR_REV] = true;
-- 
1.7.7



More information about the mesa-dev mailing list