d3d12: Flush and wait in flush_frontbuffer

If we have a context, make sure any work on it's done before
reading from the render target. There may even be pending
MSAA resolves that haven't been submitted yet.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
This commit is contained in:
Jesse Natalie
2020-12-15 09:57:43 -08:00
committed by Marge Bot
parent 0507da62c4
commit 2d78e28ba7

View File

@@ -625,6 +625,9 @@ d3d12_flush_frontbuffer(struct pipe_screen * pscreen,
if (!winsys)
return;
if (pctx)
d3d12_flush_cmdlist_and_wait(d3d12_context(pctx));
assert(res->dt);
void *map = winsys->displaytarget_map(winsys, res->dt, 0);