libgl-gdi: add zink support

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>

Closes #3802

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7643>
This commit is contained in:
Michel Zou
2020-11-16 20:07:06 +01:00
committed by Marge Bot
parent eebcd6a502
commit fdfe4a4d30
2 changed files with 22 additions and 1 deletions

View File

@@ -60,6 +60,10 @@
#include "d3d12/d3d12_public.h"
#endif
#ifdef GALLIUM_ZINK
#include "zink/zink_public.h"
#endif
#ifdef GALLIUM_LLVMPIPE
static boolean use_llvmpipe = FALSE;
#endif
@@ -69,6 +73,9 @@ static boolean use_swr = FALSE;
#ifdef GALLIUM_D3D12
static boolean use_d3d12 = FALSE;
#endif
#ifdef GALLIUM_ZINK
static boolean use_zink = FALSE;
#endif
static struct pipe_screen *
gdi_screen_create(void)
@@ -114,6 +121,13 @@ gdi_screen_create(void)
if (screen)
use_d3d12 = TRUE;
}
#endif
#ifdef GALLIUM_ZINK
if (strcmp(driver, "zink") == 0) {
screen = zink_create_screen( winsys );
if (screen)
use_zink = TRUE;
}
#endif
(void) driver;
@@ -174,6 +188,13 @@ gdi_present(struct pipe_screen *screen,
}
#endif
#ifdef GALLIUM_ZINK
if (use_zink) {
screen->flush_frontbuffer(screen, res, 0, 0, hDC, NULL);
return;
}
#endif
#ifdef GALLIUM_SOFTPIPE
winsys = softpipe_screen(screen)->winsys,
dt = softpipe_resource(res)->dt,

View File

@@ -39,7 +39,7 @@ libopengl32 = shared_library(
],
dependencies : [
dep_ws2_32, idep_nir, idep_mesautil, driver_swrast, driver_swr,
driver_d3d12
driver_d3d12, driver_zink
],
name_prefix : '', # otherwise mingw will create libopengl32.dll
install : true,