[Mesa-dev] [v4 01/11] i965/blorp: Set full resolve for lossless compressed

Ben Widawsky ben at bwidawsk.net
Thu May 5 17:36:07 UTC 2016


On Thu, Apr 21, 2016 at 02:58:56PM +0300, Topi Pohjolainen wrote:
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>  src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
> index 41ff2a5..b1da935 100644
> --- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
> @@ -217,7 +217,10 @@ brw_blorp_rt_resolve_params::brw_blorp_rt_resolve_params(
>  
>     brw_get_resolve_rect(brw, mt, &x0, &y0, &x1, &y1);
>  
> -   fast_clear_op = GEN7_PS_RENDER_TARGET_RESOLVE_ENABLE;
> +   if (intel_miptree_is_lossless_compressed(brw, mt))
> +      fast_clear_op = GEN9_PS_RENDER_TARGET_RESOLVE_FULL;
> +   else
> +      fast_clear_op = 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

Reviewed-by: Ben Widawsky <ben at bwidawsk.net>



After rebasing this it becomes params.fast_clear_op and I would be in favor of:

diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h b/src/mesa/drivers/dri/i965/brw_blorp.h
index c5c2c4e..d61e9d5 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 6c48dfc..9b6c95b 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
@@ -411,9 +411,9 @@ brw_blorp_resolve_color(struct brw_context *brw, struct intel_mipmap_tree *mt)
                         &params.x1, &params.y1);
 
    if (intel_miptree_is_lossless_compressed(brw, mt))
-      params.fast_clear_op = GEN9_PS_RENDER_TARGET_RESOLVE_FULL;
+      params.resolve_type = GEN9_PS_RENDER_TARGET_RESOLVE_FULL;
    else
-      params.fast_clear_op = GEN7_PS_RENDER_TARGET_RESOLVE_ENABLE;
+      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



More information about the mesa-dev mailing list