summaryrefslogtreecommitdiff
path: root/src/gallium/targets/libgl-gdi
diff options
context:
space:
mode:
authorLouis-Francis Ratté-Boulianne <lfrb@collabora.com>2020-04-24 16:09:07 -0400
committerErik Faye-Lund <erik.faye-lund@collabora.com>2020-11-18 11:15:51 +0100
commitbb9cc7ede4daf1d74b2e8140008e2f1fe03b96bd (patch)
tree9be757e9938c126cbf6dcb624a4aca9f22ef7026 /src/gallium/targets/libgl-gdi
parent3b034e97716f0862151e5a52610edfef46ad0b16 (diff)
d3d12: Add D3D12 WGL winsys
Add a winsys for code paths common to the libgl-gdi and libgl-d3d12 targets when using the D3D12 gallium driver. Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>
Diffstat (limited to 'src/gallium/targets/libgl-gdi')
-rw-r--r--src/gallium/targets/libgl-gdi/libgl_gdi.c11
-rw-r--r--src/gallium/targets/libgl-gdi/meson.build4
2 files changed, 5 insertions, 10 deletions
diff --git a/src/gallium/targets/libgl-gdi/libgl_gdi.c b/src/gallium/targets/libgl-gdi/libgl_gdi.c
index b34181dce2f..a806e64aef4 100644
--- a/src/gallium/targets/libgl-gdi/libgl_gdi.c
+++ b/src/gallium/targets/libgl-gdi/libgl_gdi.c
@@ -57,7 +57,7 @@
#include "swr/swr_public.h"
#endif
#ifdef GALLIUM_D3D12
-#include "d3d12/d3d12_public.h"
+#include "d3d12/wgl/d3d12_wgl_public.h"
#endif
#ifdef GALLIUM_ZINK
@@ -117,12 +117,7 @@ gdi_screen_create(HDC hDC)
#endif
#ifdef GALLIUM_D3D12
if (strcmp(driver, "d3d12") == 0) {
- LUID* adapter_luid = NULL, local_luid;
- if (stw_dev && stw_dev->callbacks.pfnGetAdapterLuid) {
- stw_dev->callbacks.pfnGetAdapterLuid(hDC, &local_luid);
- adapter_luid = &local_luid;
- }
- screen = d3d12_create_screen( winsys, adapter_luid );
+ screen = d3d12_wgl_create_screen( winsys, hDC );
if (screen)
use_d3d12 = TRUE;
}
@@ -188,7 +183,7 @@ gdi_present(struct pipe_screen *screen,
#ifdef GALLIUM_D3D12
if (use_d3d12) {
- screen->flush_frontbuffer(screen, res, 0, 0, hDC, NULL);
+ d3d12_wgl_present(screen, res, hDC);
return;
}
#endif
diff --git a/src/gallium/targets/libgl-gdi/meson.build b/src/gallium/targets/libgl-gdi/meson.build
index 87ee9f17c69..7ed09f543da 100644
--- a/src/gallium/targets/libgl-gdi/meson.build
+++ b/src/gallium/targets/libgl-gdi/meson.build
@@ -31,7 +31,7 @@ libopengl32 = shared_library(
['libgl_gdi.c'],
vs_module_defs : ogldef,
include_directories : [
- inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_wgl, inc_gallium_winsys_sw, inc_gallium_drivers,
+ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_wgl, inc_gallium_winsys, inc_gallium_winsys_sw, inc_gallium_drivers,
],
link_whole : [libwgl],
link_with : [
@@ -39,7 +39,7 @@ libopengl32 = shared_library(
],
dependencies : [
dep_ws2_32, idep_nir, idep_mesautil, driver_swrast, driver_swr,
- driver_d3d12, driver_zink
+ driver_d3d12, driver_zink, winsys_d3d12_wgl
],
name_prefix : '', # otherwise mingw will create libopengl32.dll
install : true,