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

Topi Pohjolainen topi.pohjolainen at intel.com
Thu Feb 11 18:34:06 UTC 2016


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);
 
-- 
2.5.0



More information about the mesa-dev mailing list