From: Kenneth Graunke Date: Thu, 4 Jul 2013 19:45:39 +0000 (-0700) Subject: i965: Move intel_context::has_hiz to brw_context. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3b80b147f6ae054a76b1322487b9e465aeecd11a;p=mesa.git i965: Move intel_context::has_hiz to brw_context. Signed-off-by: Kenneth Graunke Acked-by: Chris Forbes Acked-by: Paul Berry Acked-by: Anuj Phogat --- diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 9c242a0d0f2..52583ce3d4a 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -876,6 +876,7 @@ struct brw_context uint32_t max_gtt_map_object_size; bool emit_state_always; + bool has_hiz; bool has_swizzling; bool has_surface_tile_offset; bool has_compr4; diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c index a1215eedf92..660c3644964 100644 --- a/src/mesa/drivers/dri/i965/brw_surface_formats.c +++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c @@ -735,8 +735,7 @@ translate_tex_format(struct brw_context *brw, bool brw_is_hiz_depth_format(struct brw_context *brw, gl_format format) { - struct intel_context *intel = &brw->intel; - if (!intel->has_hiz) + if (!brw->has_hiz) return false; switch (format) { diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index fee68b60c9b..47e613ac166 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -497,7 +497,7 @@ intelInitContext(struct brw_context *brw, intel->has_separate_stencil = brw->intelScreen->hw_has_separate_stencil; intel->must_use_separate_stencil = brw->intelScreen->hw_must_use_separate_stencil; - intel->has_hiz = intel->gen >= 6; + brw->has_hiz = intel->gen >= 6; intel->has_llc = brw->intelScreen->hw_has_llc; brw->has_swizzling = brw->intelScreen->hw_has_swizzling; @@ -576,7 +576,7 @@ intelInitContext(struct brw_context *brw, intel_fbo_init(brw); if (!driQueryOptionb(&brw->optionCache, "hiz")) { - intel->has_hiz = false; + brw->has_hiz = false; /* On gen6, you can only do separate stencil with HIZ. */ if (intel->gen == 6) intel->has_separate_stencil = false; diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i965/intel_context.h index 3ca78c989f3..ef26c3e74bb 100644 --- a/src/mesa/drivers/dri/i965/intel_context.h +++ b/src/mesa/drivers/dri/i965/intel_context.h @@ -123,7 +123,6 @@ struct intel_context bool is_g4x; bool has_separate_stencil; bool must_use_separate_stencil; - bool has_hiz; bool has_llc; };