From 3e4b43d11d5303a84aba79874664cd6514831bb2 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 17 Aug 2016 06:55:59 -0700 Subject: [PATCH] i965/blorp/genX: Pull emit_3dstate_multisample into a helper Signed-off-by: Jason Ekstrand Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/genX_blorp_exec.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/genX_blorp_exec.c b/src/mesa/drivers/dri/i965/genX_blorp_exec.c index 739f6c24e8a..ea4c07681bc 100644 --- a/src/mesa/drivers/dri/i965/genX_blorp_exec.c +++ b/src/mesa/drivers/dri/i965/genX_blorp_exec.c @@ -99,6 +99,16 @@ blorp_alloc_vertex_buffer(struct blorp_context *blorp, uint32_t size, return data; } +static void +blorp_emit_3dstate_multisample(struct brw_context *brw, unsigned samples) +{ +#if GEN_GEN >= 8 + gen8_emit_3dstate_multisample(brw, samples); +#else + gen6_emit_3dstate_multisample(brw, samples); +#endif +} + #define __gen_address_type struct blorp_address #define __gen_user_data struct brw_context @@ -1114,11 +1124,7 @@ genX(blorp_exec)(struct brw_context *brw, if (params->src.bo) blorp_emit_sampler_state(brw, params); -#if GEN_GEN >= 8 - gen8_emit_3dstate_multisample(brw, params->dst.surf.samples); -#else - gen6_emit_3dstate_multisample(brw, params->dst.surf.samples); -#endif + blorp_emit_3dstate_multisample(brw, params->dst.surf.samples); blorp_emit(brw, GENX(3DSTATE_SAMPLE_MASK), mask) { mask.SampleMask = (1 << params->dst.surf.samples) - 1; -- 2.30.2