summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2016-04-17 18:33:55 +0300
committerTopi Pohjolainen <[email protected]>2016-05-12 19:49:22 +0300
commitba9f954e603a1976125e9fdccc35e32ac947c8fd (patch)
tree706fad2a73439cf9fc89c91846aaf4282955d865
parent58e7392e12726c2590ae677efe1b10743f938edd (diff)
i965/blorp: Set full resolve for lossless compressed
v2 (Ben): Introduce union for fast clear and resolve ops Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp.h5
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp_clear.cpp5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h b/src/mesa/drivers/dri/i965/brw_blorp.h
index c5c2c4e328d..d61e9d5a0f3 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.h
+++ b/src/mesa/drivers/dri/i965/brw_blorp.h
@@ -225,7 +225,10 @@ struct brw_blorp_params
struct brw_blorp_surface_info src;
struct brw_blorp_surface_info dst;
enum gen6_hiz_op hiz_op;
- unsigned fast_clear_op;
+ union {
+ unsigned fast_clear_op;
+ unsigned resolve_type;
+ };
bool color_write_disable[4];
struct brw_blorp_wm_push_constants wm_push_consts;
unsigned num_varyings;
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
index 2cde347728c..d6c846a57ce 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
@@ -412,7 +412,10 @@ brw_blorp_resolve_color(struct brw_context *brw, struct intel_mipmap_tree *mt)
brw_get_resolve_rect(brw, mt, &params.x0, &params.y0,
&params.x1, &params.y1);
- params.fast_clear_op = GEN7_PS_RENDER_TARGET_RESOLVE_ENABLE;
+ if (intel_miptree_is_lossless_compressed(brw, mt))
+ params.resolve_type = GEN9_PS_RENDER_TARGET_RESOLVE_FULL;
+ else
+ params.resolve_type = GEN7_PS_RENDER_TARGET_RESOLVE_ENABLE;
/* Note: there is no need to initialize push constants because it doesn't
* matter what data gets dispatched to the render target. However, we must