summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJonathan Marek <[email protected]>2019-01-21 11:02:11 -0500
committerRob Clark <[email protected]>2019-01-29 20:22:32 +0000
commite685566612b8d983f0cebbabca75849e3f7ebdc8 (patch)
tree4776a95702dc9335024f8056fb3f1bbb638392df /src/gallium
parent820dfcea431e4f96f25e6b340edd9cd1e449158b (diff)
st/dri: invalidate_resource depth/stencil before flush_resource
This allows freedreno to be aware of the depth invalidate when flushing batches on flush_resource. AFAIK, the only other driver which might care about this change is vc4, where I think it should help by allowing the depth invalidate to work with GALLIUM_HUD. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/dri/dri_drawable.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c
index e5a7537e473..92047584224 100644
--- a/src/gallium/state_trackers/dri/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/dri_drawable.c
@@ -524,13 +524,6 @@ dri_flush(__DRIcontext *cPriv,
dri_postprocessing(ctx, drawable, ST_ATTACHMENT_BACK_LEFT);
- if (ctx->hud) {
- hud_run(ctx->hud, ctx->st->cso_context,
- drawable->textures[ST_ATTACHMENT_BACK_LEFT]);
- }
-
- pipe->flush_resource(pipe, drawable->textures[ST_ATTACHMENT_BACK_LEFT]);
-
if (pipe->invalidate_resource &&
(flags & __DRI2_FLUSH_INVALIDATE_ANCILLARY)) {
if (drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL])
@@ -538,6 +531,13 @@ dri_flush(__DRIcontext *cPriv,
if (drawable->msaa_textures[ST_ATTACHMENT_DEPTH_STENCIL])
pipe->invalidate_resource(pipe, drawable->msaa_textures[ST_ATTACHMENT_DEPTH_STENCIL]);
}
+
+ if (ctx->hud) {
+ hud_run(ctx->hud, ctx->st->cso_context,
+ drawable->textures[ST_ATTACHMENT_BACK_LEFT]);
+ }
+
+ pipe->flush_resource(pipe, drawable->textures[ST_ATTACHMENT_BACK_LEFT]);
}
flush_flags = 0;