gallium: Rename macros HAVE_PIPE_LOADER*
Rename macro HAVE_PIPE_LOADER_DRI to HAVE_DRI Rename macro HAVE_PIPE_LOADER_KMS to HAVE_DRISW_KMS Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17784>
This commit is contained in:
parent
98fa0c3351
commit
48e72da0dd
|
@ -1690,10 +1690,10 @@ if dep_libdrm.found()
|
|||
endif
|
||||
|
||||
if with_dri
|
||||
pre_args += '-DHAVE_PIPE_LOADER_DRI'
|
||||
pre_args += '-DHAVE_DRI'
|
||||
endif
|
||||
if with_gallium_drisw_kms
|
||||
pre_args += '-DHAVE_PIPE_LOADER_KMS'
|
||||
pre_args += '-DHAVE_DRISW_KMS'
|
||||
endif
|
||||
|
||||
dep_libudev = dependency('libudev', required : false)
|
||||
|
|
|
@ -157,7 +157,7 @@ bool
|
|||
pipe_loader_vk_probe_dri(struct pipe_loader_device **devs,
|
||||
const struct drisw_loader_funcs *drisw_lf);
|
||||
|
||||
#ifdef HAVE_PIPE_LOADER_KMS
|
||||
#ifdef HAVE_DRISW_KMS
|
||||
/**
|
||||
* Initialize a kms backed sw device given an fd.
|
||||
*
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*
|
||||
**************************************************************************/
|
||||
|
||||
#ifdef HAVE_PIPE_LOADER_KMS
|
||||
#ifdef HAVE_DRISW_KMS
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
|
@ -58,7 +58,7 @@ struct pipe_loader_sw_device {
|
|||
#define pipe_loader_sw_device(dev) ((struct pipe_loader_sw_device *)dev)
|
||||
|
||||
static const struct pipe_loader_ops pipe_loader_sw_ops;
|
||||
#if defined(HAVE_PIPE_LOADER_DRI) && defined(HAVE_ZINK)
|
||||
#if defined(HAVE_DRI) && defined(HAVE_ZINK)
|
||||
static const struct pipe_loader_ops pipe_loader_vk_ops;
|
||||
#endif
|
||||
|
||||
|
@ -66,13 +66,13 @@ static const struct pipe_loader_ops pipe_loader_vk_ops;
|
|||
static const struct sw_driver_descriptor driver_descriptors = {
|
||||
.create_screen = sw_screen_create_vk,
|
||||
.winsys = {
|
||||
#ifdef HAVE_PIPE_LOADER_DRI
|
||||
#ifdef HAVE_DRI
|
||||
{
|
||||
.name = "dri",
|
||||
.create_winsys = dri_create_sw_winsys,
|
||||
},
|
||||
#endif
|
||||
#ifdef HAVE_PIPE_LOADER_KMS
|
||||
#ifdef HAVE_DRISW_KMS
|
||||
{
|
||||
.name = "kms_dri",
|
||||
.create_winsys = kms_dri_create_winsys,
|
||||
|
@ -93,7 +93,7 @@ static const struct sw_driver_descriptor driver_descriptors = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(GALLIUM_STATIC_TARGETS) && defined(HAVE_ZINK) && defined(HAVE_PIPE_LOADER_DRI)
|
||||
#if defined(GALLIUM_STATIC_TARGETS) && defined(HAVE_ZINK) && defined(HAVE_DRI)
|
||||
static const struct sw_driver_descriptor kopper_driver_descriptors = {
|
||||
.create_screen = sw_screen_create_zink,
|
||||
.winsys = {
|
||||
|
@ -101,7 +101,7 @@ static const struct sw_driver_descriptor kopper_driver_descriptors = {
|
|||
.name = "dri",
|
||||
.create_winsys = dri_create_sw_winsys,
|
||||
},
|
||||
#ifdef HAVE_PIPE_LOADER_KMS
|
||||
#ifdef HAVE_DRISW_KMS
|
||||
{
|
||||
.name = "kms_dri",
|
||||
.create_winsys = kms_dri_create_winsys,
|
||||
|
@ -156,7 +156,7 @@ pipe_loader_sw_probe_init_common(struct pipe_loader_sw_device *sdev)
|
|||
return true;
|
||||
}
|
||||
|
||||
#if defined(HAVE_PIPE_LOADER_DRI) && defined(HAVE_ZINK)
|
||||
#if defined(HAVE_DRI) && defined(HAVE_ZINK)
|
||||
static bool
|
||||
pipe_loader_vk_probe_init_common(struct pipe_loader_sw_device *sdev)
|
||||
{
|
||||
|
@ -201,7 +201,7 @@ pipe_loader_sw_probe_teardown_common(struct pipe_loader_sw_device *sdev)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_PIPE_LOADER_DRI
|
||||
#ifdef HAVE_DRI
|
||||
bool
|
||||
pipe_loader_sw_probe_dri(struct pipe_loader_device **devs, const struct drisw_loader_funcs *drisw_lf)
|
||||
{
|
||||
|
@ -264,7 +264,7 @@ fail:
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PIPE_LOADER_KMS
|
||||
#ifdef HAVE_DRISW_KMS
|
||||
bool
|
||||
pipe_loader_sw_probe_kms(struct pipe_loader_device **devs, int fd)
|
||||
{
|
||||
|
@ -387,7 +387,7 @@ pipe_loader_sw_release(struct pipe_loader_device **dev)
|
|||
util_dl_close(sdev->lib);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PIPE_LOADER_KMS
|
||||
#ifdef HAVE_DRISW_KMS
|
||||
if (sdev->fd != -1)
|
||||
close(sdev->fd);
|
||||
#endif
|
||||
|
@ -402,7 +402,7 @@ pipe_loader_sw_get_driconf(struct pipe_loader_device *dev, unsigned *count)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#if defined(HAVE_PIPE_LOADER_DRI) && defined(HAVE_ZINK)
|
||||
#if defined(HAVE_DRI) && defined(HAVE_ZINK)
|
||||
static const driOptionDescription zink_driconf[] = {
|
||||
#include "zink/driinfo_zink.h"
|
||||
};
|
||||
|
@ -435,7 +435,7 @@ static const struct pipe_loader_ops pipe_loader_sw_ops = {
|
|||
.release = pipe_loader_sw_release
|
||||
};
|
||||
|
||||
#if defined(HAVE_PIPE_LOADER_DRI) && defined(HAVE_ZINK)
|
||||
#if defined(HAVE_DRI) && defined(HAVE_ZINK)
|
||||
static const struct pipe_loader_ops pipe_loader_vk_ops = {
|
||||
.create_screen = pipe_loader_sw_create_screen,
|
||||
.get_driconf = pipe_loader_vk_get_driconf,
|
||||
|
|
|
@ -2528,7 +2528,7 @@ dri_swrast_kms_init_screen(__DRIscreen * sPriv)
|
|||
|
||||
sPriv->driverPrivate = (void *)screen;
|
||||
|
||||
#ifdef HAVE_PIPE_LOADER_KMS
|
||||
#ifdef HAVE_DRISW_KMS
|
||||
if (pipe_loader_sw_probe_kms(&screen->dev, screen->fd)) {
|
||||
pscreen = pipe_loader_create_screen(screen->dev);
|
||||
dri_init_options(screen);
|
||||
|
|
|
@ -538,7 +538,7 @@ drisw_init_screen(__DRIscreen * sPriv)
|
|||
}
|
||||
|
||||
bool success = false;
|
||||
#ifdef HAVE_PIPE_LOADER_KMS
|
||||
#ifdef HAVE_DRISW_KMS
|
||||
if (screen->fd != -1)
|
||||
success = pipe_loader_sw_probe_kms(&screen->dev, screen->fd);
|
||||
#endif
|
||||
|
|
|
@ -454,7 +454,7 @@ VKAPI_ATTR void VKAPI_CALL lvp_DestroyInstance(
|
|||
vk_free(&instance->vk.alloc, instance);
|
||||
}
|
||||
|
||||
#if defined(HAVE_PIPE_LOADER_DRI)
|
||||
#if defined(HAVE_DRI)
|
||||
static void lvp_get_image(struct dri_drawable *dri_drawable,
|
||||
int x, int y, unsigned width, unsigned height, unsigned stride,
|
||||
void *data)
|
||||
|
@ -495,7 +495,7 @@ lvp_enumerate_physical_devices(struct lvp_instance *instance)
|
|||
|
||||
assert(instance->num_devices == 1);
|
||||
|
||||
#if defined(HAVE_PIPE_LOADER_DRI)
|
||||
#if defined(HAVE_DRI)
|
||||
pipe_loader_sw_probe_dri(&instance->devs, &lvp_sw_lf);
|
||||
#else
|
||||
pipe_loader_sw_probe_null(&instance->devs);
|
||||
|
|
|
@ -26,13 +26,13 @@ PUBLIC
|
|||
const struct sw_driver_descriptor swrast_driver_descriptor = {
|
||||
.create_screen = swrast_create_screen,
|
||||
.winsys = {
|
||||
#ifdef HAVE_PIPE_LOADER_DRI
|
||||
#ifdef HAVE_DRI
|
||||
{
|
||||
.name = "dri",
|
||||
.create_winsys = dri_create_sw_winsys,
|
||||
},
|
||||
#endif
|
||||
#ifdef HAVE_PIPE_LOADER_KMS
|
||||
#ifdef HAVE_DRISW_KMS
|
||||
{
|
||||
.name = "kms_dri",
|
||||
.create_winsys = kms_dri_create_winsys,
|
||||
|
|
Loading…
Reference in New Issue