summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2012-01-19 13:08:48 -0800
committerChad Versace <[email protected]>2012-01-20 10:37:19 -0800
commitba5252e590782a77b8a46d9c0ec4691cf8da6298 (patch)
treee6f94bed11042fceef21cea3053cd5980c57e8d2 /src/mesa/drivers
parentf74d8aacbf2f6d140381e272d17c31162a3481b3 (diff)
intel/gen6: Some framebuffers having separate depthstencil should be unsupported
When the framebuffer has separate depth and stencil buffers, and HiZ is not enabled on the depth buffer, mark the framebuffer as unsupported. This happens when trying to create a framebuffer with Z16/S8 because we haven't enabled HiZ on Z16 yet. Fixes gles2conform test stencil8. Note: This is a candiate for the 8.0 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44948 Reviewed-and-tested-by: Ian Romanick <[email protected]> Reviewed--by: Eric Anholt <[email protected]> Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index c37075c6be9..45a682727e4 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -804,6 +804,15 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
if (stencil_mt->format != MESA_FORMAT_S8)
fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
+ if (intel->gen < 7 && depth_mt->hiz_mt == NULL) {
+ /* Before Gen7, separate depth and stencil buffers can be used
+ * only if HiZ is enabled. From the Sandybridge PRM, Volume 2,
+ * Part 1, Bit 3DSTATE_DEPTH_BUFFER.SeparateStencilBufferEnable:
+ * [DevSNB]: This field must be set to the same value (enabled
+ * or disabled) as Hierarchical Depth Buffer Enable.
+ */
+ fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED;
+ }
}
}