summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_blorp.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/gen6_depth_state.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.cpp b/src/mesa/drivers/dri/i965/gen6_blorp.cpp
index f75624cb0c3..0b1d0977ccd 100644
--- a/src/mesa/drivers/dri/i965/gen6_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen6_blorp.cpp
@@ -781,6 +781,7 @@ gen6_blorp_emit_depth_stencil_config(struct brw_context *brw,
uint32_t draw_y = params->depth.y_offset;
uint32_t tile_mask_x, tile_mask_y;
uint32_t surftype;
+ unsigned int depth = MAX2(params->depth.mt->logical_depth0, 1);
GLenum gl_target = params->depth.mt->target;
switch (gl_target) {
@@ -792,6 +793,7 @@ gen6_blorp_emit_depth_stencil_config(struct brw_context *brw,
* equivalent.
*/
surftype = BRW_SURFACE_2D;
+ depth *= 6;
break;
default:
surftype = translate_tex_target(gl_target);
diff --git a/src/mesa/drivers/dri/i965/gen6_depth_state.c b/src/mesa/drivers/dri/i965/gen6_depth_state.c
index 90b718c9452..8ee969fc1b6 100644
--- a/src/mesa/drivers/dri/i965/gen6_depth_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_depth_state.c
@@ -47,6 +47,7 @@ gen6_emit_depth_stencil_hiz(struct brw_context *brw,
struct gl_context *ctx = &brw->ctx;
struct gl_framebuffer *fb = ctx->DrawBuffer;
uint32_t surftype;
+ unsigned int depth = 1;
GLenum gl_target = GL_TEXTURE_2D;
const struct intel_renderbuffer *irb = NULL;
const struct gl_renderbuffer *rb = NULL;
@@ -75,6 +76,7 @@ gen6_emit_depth_stencil_hiz(struct brw_context *brw,
rb = (struct gl_renderbuffer*) irb;
if (rb) {
+ depth = MAX2(rb->Depth, 1);
if (rb->TexImage)
gl_target = rb->TexImage->TexObject->Target;
}
@@ -88,6 +90,7 @@ gen6_emit_depth_stencil_hiz(struct brw_context *brw,
* equivalent.
*/
surftype = BRW_SURFACE_2D;
+ depth *= 6;
break;
default:
surftype = translate_tex_target(gl_target);