From a8544267fd7936885db3b192c85c1b1f488039a4 Mon Sep 17 00:00:00 2001 From: Topi Pohjolainen Date: Fri, 6 May 2016 10:35:17 +0300 Subject: i965/gen8: Expose auxiliary mode resolver Also use the opportunity to drop the unused surface type argument. Signed-off-by: Topi Pohjolainen Reviewed-by: Ben Widawsky --- src/mesa/drivers/dri/i965/brw_state.h | 2 ++ src/mesa/drivers/dri/i965/gen8_surface_state.c | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index e89b388a3c1..5c971d13865 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -336,6 +336,8 @@ uint32_t *gen8_allocate_surface_state(struct brw_context *brw, void gen8_emit_fast_clear_color(const struct brw_context *brw, const struct intel_mipmap_tree *mt, uint32_t *surf); +uint32_t gen8_get_aux_mode(const struct brw_context *brw, + const struct intel_mipmap_tree *mt); /* brw_sampler_state.c */ void brw_emit_sampler_state(struct brw_context *brw, diff --git a/src/mesa/drivers/dri/i965/gen8_surface_state.c b/src/mesa/drivers/dri/i965/gen8_surface_state.c index 5161d2b34a8..4f9a6e96fe9 100644 --- a/src/mesa/drivers/dri/i965/gen8_surface_state.c +++ b/src/mesa/drivers/dri/i965/gen8_surface_state.c @@ -198,10 +198,9 @@ gen8_emit_fast_clear_color(const struct brw_context *brw, surf[7] |= mt->fast_clear_color_value; } -static uint32_t +uint32_t gen8_get_aux_mode(const struct brw_context *brw, - const struct intel_mipmap_tree *mt, - uint32_t surf_type) + const struct intel_mipmap_tree *mt) { if (mt->mcs_mt == NULL) return GEN8_SURFACE_AUX_MODE_NONE; @@ -237,7 +236,7 @@ gen8_emit_texture_surface_state(struct brw_context *brw, unsigned tiling_mode, pitch; const unsigned tr_mode = surface_tiling_resource_mode(mt->tr_mode); const uint32_t surf_type = translate_tex_target(target); - uint32_t aux_mode = gen8_get_aux_mode(brw, mt, surf_type); + uint32_t aux_mode = gen8_get_aux_mode(brw, mt); if (mt->format == MESA_FORMAT_S_UINT8) { tiling_mode = GEN8_SURFACE_TILING_W; @@ -484,7 +483,7 @@ gen8_update_renderbuffer_surface(struct brw_context *brw, } struct intel_mipmap_tree *aux_mt = mt->mcs_mt; - const uint32_t aux_mode = gen8_get_aux_mode(brw, mt, surf_type); + const uint32_t aux_mode = gen8_get_aux_mode(brw, mt); uint32_t *surf = gen8_allocate_surface_state(brw, &offset, surf_index); -- cgit v1.2.3