summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-08-17 06:55:59 -0700
committerJason Ekstrand <[email protected]>2016-08-29 12:17:34 -0700
commit3e4b43d11d5303a84aba79874664cd6514831bb2 (patch)
tree72d2bd39e15b787c1a1309a6cc9d4b62eb9a5970 /src
parentbecd434d14d7227575482803c27516818f55b61e (diff)
i965/blorp/genX: Pull emit_3dstate_multisample into a helper
Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/genX_blorp_exec.c16
1 files 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;