aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen8_depth_state.c
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2017-05-26 11:36:38 +0300
committerTopi Pohjolainen <[email protected]>2017-07-20 11:32:21 +0300
commitf69a2ffe4440779cea76220df9ac2e37c2c74a70 (patch)
tree3125c36f90298151ad31554ce7f45a046d74c437 /src/mesa/drivers/dri/i965/gen8_depth_state.c
parentc84cb81771ac72880d0d40529e3952b361b3a4c1 (diff)
i965/miptree: Represent w-tiled stencil surfaces with isl
Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen8_depth_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/gen8_depth_state.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/gen8_depth_state.c b/src/mesa/drivers/dri/i965/gen8_depth_state.c
index ff4194146d3..c934d0d21a1 100644
--- a/src/mesa/drivers/dri/i965/gen8_depth_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_depth_state.c
@@ -115,7 +115,7 @@ emit_depth_packets(struct brw_context *brw,
(stencil_mt->surf.row_pitch - 1));
OUT_RELOC64(stencil_mt->bo,
I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, 0);
- OUT_BATCH(stencil_mt ? stencil_mt->qpitch >> 2 : 0);
+ OUT_BATCH(stencil_mt->surf.array_pitch_el_rows >> 2);
ADVANCE_BATCH();
}
@@ -175,7 +175,8 @@ gen8_emit_depth_stencil_hiz(struct brw_context *brw,
break;
case GL_TEXTURE_3D:
assert(mt);
- depth = MAX2(mt->logical_depth0, 1);
+ depth = mt->surf.size > 0 ? mt->surf.logical_level0_px.depth :
+ MAX2(mt->logical_depth0, 1);
surftype = translate_tex_target(gl_target);
break;
case GL_TEXTURE_1D_ARRAY:
@@ -198,7 +199,10 @@ gen8_emit_depth_stencil_hiz(struct brw_context *brw,
lod = irb ? irb->mt_level - irb->mt->first_level : 0;
- if (mt) {
+ if (mt && mt->surf.size > 0) {
+ width = mt->surf.logical_level0_px.width;
+ height = mt->surf.logical_level0_px.height;
+ } else if (mt) {
width = mt->logical_width0;
height = mt->logical_height0;
}