intel: Abort when DRI2 separate stencil handshake fails
authorChad Versace <chad@chad-versace.us>
Thu, 18 Aug 2011 00:35:07 +0000 (17:35 -0700)
committerChad Versace <chad@chad-versace.us>
Mon, 22 Aug 2011 14:27:05 +0000 (07:27 -0700)
When intel_context requires separate stencil but the DRI2 separate stencil
handshake fails, then abort and emit an error instructing the user to
upgrade the DDX to 2.16.0.

CC: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad@chad-versace.us>
src/mesa/drivers/dri/intel/intel_context.c

index fe8be082dfc97f8629d227bffe1ec49ba89eaebf..14342ef6246464a02a07dfa626f3a59e0dace61c 100644 (file)
@@ -1454,6 +1454,13 @@ intel_verify_dri2_has_hiz(struct intel_context *intel,
          * a combined depth/stencil buffer. Discard the hiz buffer too.
          */
         intel->intelScreen->dri2_has_hiz = INTEL_DRI2_HAS_HIZ_FALSE;
+        if (intel->must_use_separate_stencil) {
+           _mesa_problem(&intel->ctx,
+                         "intel_context requires separate stencil, but the "
+                         "DRIscreen does not support it. You may need to "
+                         "upgrade the Intel X driver to 2.16.0");
+           abort();
+        }
 
         /* 1. Discard depth and stencil renderbuffers. */
         _mesa_remove_renderbuffer(fb, BUFFER_DEPTH);