[Mesa-dev] [PATCH 19/40] i965/blorp: Add support for setting fast clear operation
Topi Pohjolainen
topi.pohjolainen at intel.com
Sat Apr 16 13:42:47 UTC 2016
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/brw_blorp.cpp | 1 +
src/mesa/drivers/dri/i965/brw_blorp.h | 1 +
src/mesa/drivers/dri/i965/gen7_blorp.cpp | 2 ++
src/mesa/drivers/dri/i965/gen8_blorp.cpp | 1 +
4 files changed, 5 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.cpp b/src/mesa/drivers/dri/i965/brw_blorp.cpp
index 8c69f6f..1829623 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp.cpp
@@ -164,6 +164,7 @@ brw_blorp_params::brw_blorp_params(unsigned num_varyings,
y1(0),
depth_format(0),
hiz_op(GEN6_HIZ_OP_NONE),
+ fast_clear_op(0),
use_wm_prog(false),
num_varyings(num_varyings),
num_draw_buffers(num_draw_buffers),
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h b/src/mesa/drivers/dri/i965/brw_blorp.h
index a1aaa20..a291aff 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.h
+++ b/src/mesa/drivers/dri/i965/brw_blorp.h
@@ -241,6 +241,7 @@ public:
brw_blorp_surface_info src;
brw_blorp_surface_info dst;
enum gen6_hiz_op hiz_op;
+ unsigned fast_clear_op;
bool use_wm_prog;
brw_blorp_wm_push_constants wm_push_consts;
const unsigned num_varyings;
diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.cpp b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
index 4825cad..b01f3b7 100644
--- a/src/mesa/drivers/dri/i965/gen7_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
@@ -532,6 +532,8 @@ gen7_blorp_emit_ps_config(struct brw_context *brw,
dw5 |= prog_data->first_curbe_grf << GEN7_PS_DISPATCH_START_GRF_SHIFT_0;
}
+ dw4 |= params->fast_clear_op;
+
BEGIN_BATCH(8);
OUT_BATCH(_3DSTATE_PS << 16 | (8 - 2));
OUT_BATCH(params->use_wm_prog ? prog_offset : 0);
diff --git a/src/mesa/drivers/dri/i965/gen8_blorp.cpp b/src/mesa/drivers/dri/i965/gen8_blorp.cpp
index af95d66..1dea5bc 100644
--- a/src/mesa/drivers/dri/i965/gen8_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen8_blorp.cpp
@@ -386,6 +386,7 @@ gen8_blorp_emit_ps_config(struct brw_context *brw,
dw6 |= (64 - 2) << HSW_PS_MAX_THREADS_SHIFT;
dw6 |= GEN7_PS_POSOFFSET_NONE;
+ dw6 |= params->fast_clear_op;
BEGIN_BATCH(12);
OUT_BATCH(_3DSTATE_PS << 16 | (12 - 2));
--
2.5.5
More information about the mesa-dev
mailing list