swr: invalidate attachment on transition change
[mesa.git] / src / gallium / drivers / swr / swr_state.cpp
index 12da99fc48065d08a17f52d626aef590d9649ed9..f65e6427534052f02ca9f9122e1491481de80e02 100644 (file)
@@ -935,6 +935,11 @@ swr_change_rt(struct swr_context *ctx,
        * INVALID so they are reloaded from surface. */
       swr_store_render_target(&ctx->pipe, attachment, SWR_TILE_INVALID);
       need_fence = true;
+   } else {
+      /* if no previous attachment, invalidate tiles that may be marked
+       * RESOLVED because of an old attachment */
+      swr_invalidate_render_target(&ctx->pipe, attachment, sf->width, sf->height);
+      /* no need to set fence here */
    }
 
    /* Make new attachment */