aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel/intel_context.c
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2011-05-23 13:47:27 -0700
committerChad Versace <[email protected]>2011-05-25 07:41:31 -0700
commitb5c847c7ca06823af3b72324056a2e478caca70b (patch)
treeb166146d2e3e1bad0569e57867210b2f2bccebcb /src/mesa/drivers/dri/intel/intel_context.c
parent4e0654ec2924c941fe03f57665fbf44e1b600db8 (diff)
intel: Change supported texture formats for separate stencil
When hardware supports separate stencil, enable support for separate depth/stencil texture formats in the table intel_context.ctx.TextureFormatsSupported. If the hardware must use separate stencil, then disable support for combined depth/stencil formats. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_context.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 91cf5dbf44b..2ea52c26106 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -758,7 +758,12 @@ intelInitContext(struct intel_context *intel,
ctx->TextureFormatSupported[MESA_FORMAT_AL88] = GL_TRUE;
if (intel->gen >= 4)
ctx->TextureFormatSupported[MESA_FORMAT_AL1616] = GL_TRUE;
- ctx->TextureFormatSupported[MESA_FORMAT_S8_Z24] = GL_TRUE;
+
+ /* Depth and stencil */
+ ctx->TextureFormatSupported[MESA_FORMAT_S8_Z24] = !intel->must_use_separate_stencil;
+ ctx->TextureFormatSupported[MESA_FORMAT_X8_Z24] = intel->has_separate_stencil;
+ 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