summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2016-05-06 10:35:17 +0300
committerTopi Pohjolainen <[email protected]>2016-05-12 19:49:22 +0300
commita8544267fd7936885db3b192c85c1b1f488039a4 (patch)
treebd949e79a7f8773bc65dca2d44fe3456420d1695 /src/mesa/drivers/dri
parent94926492d807b68187e34c670965986b1c88e0ac (diff)
i965/gen8: Expose auxiliary mode resolver
Also use the opportunity to drop the unused surface type argument. Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_state.h2
-rw-r--r--src/mesa/drivers/dri/i965/gen8_surface_state.c9
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);