summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/iris')
-rw-r--r--src/gallium/drivers/iris/iris_resolve.c5
-rw-r--r--src/gallium/drivers/iris/iris_state.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/iris/iris_resolve.c b/src/gallium/drivers/iris/iris_resolve.c
index 6989f89aa21..7262c252afc 100644
--- a/src/gallium/drivers/iris/iris_resolve.c
+++ b/src/gallium/drivers/iris/iris_resolve.c
@@ -176,6 +176,11 @@ iris_predraw_resolve_framebuffer(struct iris_context *ice,
if (z_res) {
iris_resource_prepare_depth(ice, batch, z_res, zs_surf->u.tex.level,
zs_surf->u.tex.first_layer, num_layers);
+ iris_cache_flush_for_depth(batch, z_res->bo);
+ }
+
+ if (s_res) {
+ iris_cache_flush_for_depth(batch, s_res->bo);
}
}
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index d00186d6657..a686188f701 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -4069,8 +4069,6 @@ iris_restore_render_saved_bos(struct iris_context *ice,
iris_get_depth_stencil_resources(cso_fb->zsbuf->texture,
&zres, &sres);
if (zres) {
- iris_cache_flush_for_depth(batch, zres->bo);
-
iris_use_pinned_bo(batch, zres->bo,
ice->state.depth_writes_enabled);
if (zres->aux.bo) {
@@ -4080,8 +4078,6 @@ iris_restore_render_saved_bos(struct iris_context *ice,
}
if (sres) {
- iris_cache_flush_for_depth(batch, sres->bo);
-
iris_use_pinned_bo(batch, sres->bo,
ice->state.stencil_writes_enabled);
}