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
|
endif
|
||||||
|
|
||||||
if with_dri
|
if with_dri
|
||||||
pre_args += '-DHAVE_PIPE_LOADER_DRI'
|
pre_args += '-DHAVE_DRI'
|
||||||
endif
|
endif
|
||||||
if with_gallium_drisw_kms
|
if with_gallium_drisw_kms
|
||||||
pre_args += '-DHAVE_PIPE_LOADER_KMS'
|
pre_args += '-DHAVE_DRISW_KMS'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
dep_libudev = dependency('libudev', required : false)
|
dep_libudev = dependency('libudev', required : false)
|
||||||
|
|
|
@ -157,7 +157,7 @@ bool
|
||||||
pipe_loader_vk_probe_dri(struct pipe_loader_device **devs,
|
pipe_loader_vk_probe_dri(struct pipe_loader_device **devs,
|
||||||
const struct drisw_loader_funcs *drisw_lf);
|
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.
|
* 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>
|
#include <fcntl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ struct pipe_loader_sw_device {
|
||||||
#define pipe_loader_sw_device(dev) ((struct pipe_loader_sw_device *)dev)
|
#define pipe_loader_sw_device(dev) ((struct pipe_loader_sw_device *)dev)
|
||||||
|
|
||||||
static const struct pipe_loader_ops pipe_loader_sw_ops;
|
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;
|
static const struct pipe_loader_ops pipe_loader_vk_ops;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -66,13 +66,13 @@ static const struct pipe_loader_ops pipe_loader_vk_ops;
|
||||||
static const struct sw_driver_descriptor driver_descriptors = {
|
static const struct sw_driver_descriptor driver_descriptors = {
|
||||||
.create_screen = sw_screen_create_vk,
|
.create_screen = sw_screen_create_vk,
|
||||||
.winsys = {
|
.winsys = {
|
||||||
#ifdef HAVE_PIPE_LOADER_DRI
|
#ifdef HAVE_DRI
|
||||||
{
|
{
|
||||||
.name = "dri",
|
.name = "dri",
|
||||||
.create_winsys = dri_create_sw_winsys,
|
.create_winsys = dri_create_sw_winsys,
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_PIPE_LOADER_KMS
|
#ifdef HAVE_DRISW_KMS
|
||||||
{
|
{
|
||||||
.name = "kms_dri",
|
.name = "kms_dri",
|
||||||
.create_winsys = kms_dri_create_winsys,
|
.create_winsys = kms_dri_create_winsys,
|
||||||
|
@ -93,7 +93,7 @@ static const struct sw_driver_descriptor driver_descriptors = {
|
||||||
};
|
};
|
||||||
#endif
|
#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 = {
|
static const struct sw_driver_descriptor kopper_driver_descriptors = {
|
||||||
.create_screen = sw_screen_create_zink,
|
.create_screen = sw_screen_create_zink,
|
||||||
.winsys = {
|
.winsys = {
|
||||||
|
@ -101,7 +101,7 @@ static const struct sw_driver_descriptor kopper_driver_descriptors = {
|
||||||
.name = "dri",
|
.name = "dri",
|
||||||
.create_winsys = dri_create_sw_winsys,
|
.create_winsys = dri_create_sw_winsys,
|
||||||
},
|
},
|
||||||
#ifdef HAVE_PIPE_LOADER_KMS
|
#ifdef HAVE_DRISW_KMS
|
||||||
{
|
{
|
||||||
.name = "kms_dri",
|
.name = "kms_dri",
|
||||||
.create_winsys = kms_dri_create_winsys,
|
.create_winsys = kms_dri_create_winsys,
|
||||||
|
@ -156,7 +156,7 @@ pipe_loader_sw_probe_init_common(struct pipe_loader_sw_device *sdev)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_PIPE_LOADER_DRI) && defined(HAVE_ZINK)
|
#if defined(HAVE_DRI) && defined(HAVE_ZINK)
|
||||||
static bool
|
static bool
|
||||||
pipe_loader_vk_probe_init_common(struct pipe_loader_sw_device *sdev)
|
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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_PIPE_LOADER_DRI
|
#ifdef HAVE_DRI
|
||||||
bool
|
bool
|
||||||
pipe_loader_sw_probe_dri(struct pipe_loader_device **devs, const struct drisw_loader_funcs *drisw_lf)
|
pipe_loader_sw_probe_dri(struct pipe_loader_device **devs, const struct drisw_loader_funcs *drisw_lf)
|
||||||
{
|
{
|
||||||
|
@ -264,7 +264,7 @@ fail:
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_PIPE_LOADER_KMS
|
#ifdef HAVE_DRISW_KMS
|
||||||
bool
|
bool
|
||||||
pipe_loader_sw_probe_kms(struct pipe_loader_device **devs, int fd)
|
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);
|
util_dl_close(sdev->lib);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_PIPE_LOADER_KMS
|
#ifdef HAVE_DRISW_KMS
|
||||||
if (sdev->fd != -1)
|
if (sdev->fd != -1)
|
||||||
close(sdev->fd);
|
close(sdev->fd);
|
||||||
#endif
|
#endif
|
||||||
|
@ -402,7 +402,7 @@ pipe_loader_sw_get_driconf(struct pipe_loader_device *dev, unsigned *count)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_PIPE_LOADER_DRI) && defined(HAVE_ZINK)
|
#if defined(HAVE_DRI) && defined(HAVE_ZINK)
|
||||||
static const driOptionDescription zink_driconf[] = {
|
static const driOptionDescription zink_driconf[] = {
|
||||||
#include "zink/driinfo_zink.h"
|
#include "zink/driinfo_zink.h"
|
||||||
};
|
};
|
||||||
|
@ -435,7 +435,7 @@ static const struct pipe_loader_ops pipe_loader_sw_ops = {
|
||||||
.release = pipe_loader_sw_release
|
.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 = {
|
static const struct pipe_loader_ops pipe_loader_vk_ops = {
|
||||||
.create_screen = pipe_loader_sw_create_screen,
|
.create_screen = pipe_loader_sw_create_screen,
|
||||||
.get_driconf = pipe_loader_vk_get_driconf,
|
.get_driconf = pipe_loader_vk_get_driconf,
|
||||||
|
|
|
@ -2528,7 +2528,7 @@ dri_swrast_kms_init_screen(__DRIscreen * sPriv)
|
||||||
|
|
||||||
sPriv->driverPrivate = (void *)screen;
|
sPriv->driverPrivate = (void *)screen;
|
||||||
|
|
||||||
#ifdef HAVE_PIPE_LOADER_KMS
|
#ifdef HAVE_DRISW_KMS
|
||||||
if (pipe_loader_sw_probe_kms(&screen->dev, screen->fd)) {
|
if (pipe_loader_sw_probe_kms(&screen->dev, screen->fd)) {
|
||||||
pscreen = pipe_loader_create_screen(screen->dev);
|
pscreen = pipe_loader_create_screen(screen->dev);
|
||||||
dri_init_options(screen);
|
dri_init_options(screen);
|
||||||
|
|
|
@ -538,7 +538,7 @@ drisw_init_screen(__DRIscreen * sPriv)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool success = false;
|
bool success = false;
|
||||||
#ifdef HAVE_PIPE_LOADER_KMS
|
#ifdef HAVE_DRISW_KMS
|
||||||
if (screen->fd != -1)
|
if (screen->fd != -1)
|
||||||
success = pipe_loader_sw_probe_kms(&screen->dev, screen->fd);
|
success = pipe_loader_sw_probe_kms(&screen->dev, screen->fd);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -454,7 +454,7 @@ VKAPI_ATTR void VKAPI_CALL lvp_DestroyInstance(
|
||||||
vk_free(&instance->vk.alloc, instance);
|
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,
|
static void lvp_get_image(struct dri_drawable *dri_drawable,
|
||||||
int x, int y, unsigned width, unsigned height, unsigned stride,
|
int x, int y, unsigned width, unsigned height, unsigned stride,
|
||||||
void *data)
|
void *data)
|
||||||
|
@ -495,7 +495,7 @@ lvp_enumerate_physical_devices(struct lvp_instance *instance)
|
||||||
|
|
||||||
assert(instance->num_devices == 1);
|
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);
|
pipe_loader_sw_probe_dri(&instance->devs, &lvp_sw_lf);
|
||||||
#else
|
#else
|
||||||
pipe_loader_sw_probe_null(&instance->devs);
|
pipe_loader_sw_probe_null(&instance->devs);
|
||||||
|
|
|
@ -26,13 +26,13 @@ PUBLIC
|
||||||
const struct sw_driver_descriptor swrast_driver_descriptor = {
|
const struct sw_driver_descriptor swrast_driver_descriptor = {
|
||||||
.create_screen = swrast_create_screen,
|
.create_screen = swrast_create_screen,
|
||||||
.winsys = {
|
.winsys = {
|
||||||
#ifdef HAVE_PIPE_LOADER_DRI
|
#ifdef HAVE_DRI
|
||||||
{
|
{
|
||||||
.name = "dri",
|
.name = "dri",
|
||||||
.create_winsys = dri_create_sw_winsys,
|
.create_winsys = dri_create_sw_winsys,
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_PIPE_LOADER_KMS
|
#ifdef HAVE_DRISW_KMS
|
||||||
{
|
{
|
||||||
.name = "kms_dri",
|
.name = "kms_dri",
|
||||||
.create_winsys = kms_dri_create_winsys,
|
.create_winsys = kms_dri_create_winsys,
|
||||||
|
|
Loading…
Reference in New Issue