summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/d3d12
diff options
context:
space:
mode:
authorJesse Natalie <jenatali@microsoft.com>2020-12-10 10:50:54 -0800
committerMarge Bot <eric+marge@anholt.net>2020-12-14 23:31:37 +0000
commit9ac8f8f490d0ee08ac9ca6f1c6963043c2991443 (patch)
tree95f06202f72427c6fcd9b0760f1273ce33fc4774 /src/gallium/winsys/d3d12
parent23488c35152c58a3f15bde6ade658959de94ff9a (diff)
gallium: Add optional pipe_context to flush_frontbuffer
It's hooked up in all the pipe wrapper drivers, and all the frontends except a couple places in glx/xlib. This enables a more efficient path for drivers which use swrast's Present, but hardware rendering (e.g. d3d12, zink). Reviewed-by: Dave Airlie <airlied@redhat.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8045>
Diffstat (limited to 'src/gallium/winsys/d3d12')
-rw-r--r--src/gallium/winsys/d3d12/wgl/d3d12_wgl_public.h2
-rw-r--r--src/gallium/winsys/d3d12/wgl/d3d12_wgl_winsys.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/winsys/d3d12/wgl/d3d12_wgl_public.h b/src/gallium/winsys/d3d12/wgl/d3d12_wgl_public.h
index aa0191274ea..ac5f2c75476 100644
--- a/src/gallium/winsys/d3d12/wgl/d3d12_wgl_public.h
+++ b/src/gallium/winsys/d3d12/wgl/d3d12_wgl_public.h
@@ -32,6 +32,7 @@ extern "C" {
struct pipe_resource;
struct pipe_screen;
+struct pipe_context;
struct stw_winsys;
struct pipe_screen *
@@ -40,6 +41,7 @@ d3d12_wgl_create_screen(struct sw_winsys *winsys,
void
d3d12_wgl_present(struct pipe_screen *screen,
+ struct pipe_context *context,
struct pipe_resource *res,
HDC hDC);
diff --git a/src/gallium/winsys/d3d12/wgl/d3d12_wgl_winsys.c b/src/gallium/winsys/d3d12/wgl/d3d12_wgl_winsys.c
index cf098daa738..7a193cdef68 100644
--- a/src/gallium/winsys/d3d12/wgl/d3d12_wgl_winsys.c
+++ b/src/gallium/winsys/d3d12/wgl/d3d12_wgl_winsys.c
@@ -43,10 +43,11 @@ d3d12_wgl_create_screen(struct sw_winsys *winsys, HDC hDC)
void
d3d12_wgl_present(struct pipe_screen *screen,
+ struct pipe_context *ctx,
struct pipe_resource *res,
HDC hDC)
{
- screen->flush_frontbuffer(screen, res, 0, 0, hDC, NULL);
+ screen->flush_frontbuffer(screen, ctx, res, 0, 0, hDC, NULL);
}
unsigned