aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen7_misc_state.c
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2013-07-09 15:19:55 -0700
committerJordan Justen <[email protected]>2013-08-04 11:52:37 -0700
commit08ef1dde1b7129463e8b603fd35df86646995232 (patch)
tree67c200263cc195823daf8cea66caedc34af29c79 /src/mesa/drivers/dri/i965/gen7_misc_state.c
parentbc1acaa4269f027b1b64a640f93df7a5c408cc17 (diff)
gen7 depth surface: calculate LOD being rendered to
This will be used in 3DSTATE_DEPTH_BUFFER in a later patch. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen7_misc_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/gen7_misc_state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_misc_state.c b/src/mesa/drivers/dri/i965/gen7_misc_state.c
index f0f8b5dcc67..acbf79d1c3a 100644
--- a/src/mesa/drivers/dri/i965/gen7_misc_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_misc_state.c
@@ -46,6 +46,7 @@ gen7_emit_depth_stencil_hiz(struct brw_context *brw,
uint32_t surftype;
unsigned int depth = 1;
GLenum gl_target = GL_TEXTURE_2D;
+ unsigned int lod;
const struct intel_renderbuffer *irb = NULL;
const struct gl_renderbuffer *rb = NULL;
@@ -78,6 +79,8 @@ gen7_emit_depth_stencil_hiz(struct brw_context *brw,
break;
}
+ lod = irb ? irb->mt_level - irb->mt->first_level : 0;
+
/* _NEW_DEPTH, _NEW_STENCIL, _NEW_BUFFERS */
BEGIN_BATCH(7);
OUT_BATCH(GEN7_3DSTATE_DEPTH_BUFFER << 16 | (7 - 2));