[Mesa-dev] [v2 13/19] i965: Set buffer cleared after actually clearing it

Ben Widawsky ben at bwidawsk.net
Mon Feb 15 20:42:21 UTC 2016


On Thu, Feb 11, 2016 at 08:34:06PM +0200, Topi Pohjolainen wrote:
> Subsequent patch will modify the surface state to set state to
> unresolved whenever the surface is used as render target. Color
> resolve itself will use the same surface setup path and marking
> the buffer as cleared after the draw call ensures that the state
> correct after the resolve
> 
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>  src/mesa/drivers/dri/i965/brw_meta_fast_clear.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
> index e92ae6c..6af6985 100644
> --- a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
> +++ b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
> @@ -878,11 +878,12 @@ brw_meta_resolve_color(struct brw_context *brw,
>     else
>        set_fast_clear_op(brw, GEN7_PS_RENDER_TARGET_RESOLVE_ENABLE);
>  
> -   mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_RESOLVED;
>     get_resolve_rect(brw, mt, &rect);
>  
>     brw_draw_rectlist(brw, &rect, 1);
>  
> +   mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_RESOLVED;
> +
>     set_fast_clear_op(brw, 0);
>     use_rectlist(brw, false);
>  

This seems correct, as it accurately reflects the state. Given my understanding
of meta though, I'm very uncomfortable though that this doesn't actually change
more than it seems. Furthermore, if the existing ordering is important, it seems
a comment is sorely lacking.

Kristian you wrote this originally, would you mind looking at this one? With
Kristian's ack, this is;
Reviewed-by: Ben Widawsky <benjamin.widawsky at intel.com>


-- 
Ben Widawsky, Intel Open Source Technology Center


More information about the mesa-dev mailing list