i965/blorp: Set full resolve for lossless compressed
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Sun, 17 Apr 2016 15:33:55 +0000 (18:33 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Thu, 12 May 2016 16:49:22 +0000 (19:49 +0300)
v2 (Ben): Introduce union for fast clear and resolve ops

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
src/mesa/drivers/dri/i965/brw_blorp.h
src/mesa/drivers/dri/i965/brw_blorp_clear.cpp

index c5c2c4e328dc0731614bde4761ab36a162118468..d61e9d5a0f385cb83402a3a73af6f7d0f3f650b5 100644 (file)
@@ -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;
index 2cde347728cfdd30100d05064f74e3cd41ea551c..d6c846a57ce1870fbb95a4083585e8509682a474 100644 (file)
@@ -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