[Mesa-dev] [PATCH 16/16] i965/blorp: Move multisample setup for parameter type to handle
Topi Pohjolainen
topi.pohjolainen at intel.com
Thu Apr 23 11:00:41 PDT 2015
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/brw_blorp.h | 2 ++
src/mesa/drivers/dri/i965/gen6_blorp.cpp | 14 ++++++++++----
src/mesa/drivers/dri/i965/gen7_blorp.cpp | 5 +----
3 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h b/src/mesa/drivers/dri/i965/brw_blorp.h
index c005bdf..2abe654 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.h
+++ b/src/mesa/drivers/dri/i965/brw_blorp.h
@@ -225,6 +225,8 @@ public:
virtual void gen6_emit_sampler_state(struct brw_context *brw) const;
+ virtual void gen6_emit_multisample_state(struct brw_context *brw) const;
+
virtual void gen7_emit_ps_config(struct brw_context *brw) const;
virtual void gen6_emit_vertices(struct brw_context *brw) const;
diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.cpp b/src/mesa/drivers/dri/i965/gen6_blorp.cpp
index 3b18001..77de474 100644
--- a/src/mesa/drivers/dri/i965/gen6_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen6_blorp.cpp
@@ -1021,6 +1021,15 @@ brw_blorp_params::gen6_emit_sampler_state(struct brw_context *brw) const
}
void
+brw_blorp_params::gen6_emit_multisample_state(struct brw_context *brw) const
+{
+ gen6_emit_3dstate_multisample(brw, dst.num_samples);
+ gen6_emit_3dstate_sample_mask(brw,
+ dst.num_samples > 1 ?
+ (1 << dst.num_samples) - 1 : 1);
+}
+
+void
brw_blorp_blit_params::gen6_emit_wm_constants(struct brw_context *brw)
{
wm_push_const_offset = gen6_blorp_emit_wm_constants(brw, this);
@@ -1092,10 +1101,7 @@ gen6_blorp_exec(struct brw_context *brw,
/* Emit workaround flushes when we switch from drawing to blorping. */
intel_emit_post_sync_nonzero_flush(brw);
- gen6_emit_3dstate_multisample(brw, params->dst.num_samples);
- gen6_emit_3dstate_sample_mask(brw,
- params->dst.num_samples > 1 ?
- (1 << params->dst.num_samples) - 1 : 1);
+ params->gen6_emit_multisample_state(brw);
gen6_blorp_emit_state_base_address(brw, params);
params->gen6_emit_vertices(brw);
gen6_blorp_emit_urb_config(brw, params);
diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.cpp b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
index feb31d5..f430fa0 100644
--- a/src/mesa/drivers/dri/i965/gen7_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
@@ -818,10 +818,7 @@ gen7_blorp_exec(struct brw_context *brw,
uint32_t cc_state_offset = 0;
uint32_t depthstencil_offset;
- gen6_emit_3dstate_multisample(brw, params->dst.num_samples);
- gen6_emit_3dstate_sample_mask(brw,
- params->dst.num_samples > 1 ?
- (1 << params->dst.num_samples) - 1 : 1);
+ params->gen6_emit_multisample_state(brw);
gen6_blorp_emit_state_base_address(brw, params);
params->gen6_emit_vertices(brw);
gen7_blorp_emit_urb_config(brw);
--
1.9.3
More information about the mesa-dev
mailing list