mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-21 07:40:38 +02:00
libgl-gdi: support building without softpipe
While we do need *some* fallback-driver, there's no good reason to *always* require that to be Softpipe. LLVMpipe for instance does the job just fine. This makes the minimal build a bit smaller on Windows. Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7506>
This commit is contained in:
parent
d7f7d890f1
commit
2acdcf0b31
2 changed files with 12 additions and 5 deletions
|
|
@ -29,6 +29,7 @@ sources = ['libgl_gdi.c']
|
|||
drivers = []
|
||||
|
||||
if True:
|
||||
env.Append(CPPDEFINES = ['GALLIUM_SOFTPIPE'])
|
||||
drivers += [softpipe]
|
||||
|
||||
if env['llvm']:
|
||||
|
|
|
|||
|
|
@ -41,9 +41,11 @@
|
|||
#include "stw_device.h"
|
||||
#include "gdi/gdi_sw_winsys.h"
|
||||
|
||||
#ifdef GALLIUM_SOFTPIPE
|
||||
#include "softpipe/sp_texture.h"
|
||||
#include "softpipe/sp_screen.h"
|
||||
#include "softpipe/sp_public.h"
|
||||
#endif
|
||||
|
||||
#ifdef GALLIUM_LLVMPIPE
|
||||
#include "llvmpipe/lp_texture.h"
|
||||
|
|
@ -78,8 +80,10 @@ gdi_screen_create(void)
|
|||
default_driver = "llvmpipe";
|
||||
#elif GALLIUM_SWR
|
||||
default_driver = "swr";
|
||||
#else
|
||||
#elif defined(GALLIUM_SOFTPIPE)
|
||||
default_driver = "softpipe";
|
||||
#else
|
||||
#error "no suitable default-driver"
|
||||
#endif
|
||||
|
||||
driver = debug_get_option("GALLIUM_DRIVER", default_driver);
|
||||
|
|
@ -100,11 +104,11 @@ gdi_screen_create(void)
|
|||
#endif
|
||||
(void) driver;
|
||||
|
||||
if (screen == NULL) {
|
||||
#ifdef GALLIUM_SOFTPIPE
|
||||
if (screen == NULL)
|
||||
screen = softpipe_create_screen( winsys );
|
||||
}
|
||||
|
||||
if(!screen)
|
||||
#endif
|
||||
if (!screen)
|
||||
goto no_screen;
|
||||
|
||||
return screen;
|
||||
|
|
@ -150,9 +154,11 @@ gdi_present(struct pipe_screen *screen,
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef GALLIUM_SOFTPIPE
|
||||
winsys = softpipe_screen(screen)->winsys,
|
||||
dt = softpipe_resource(res)->dt,
|
||||
gdi_sw_display(winsys, dt, hDC);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue