Mesa (main): gallium: Rename macros HAVE_PIPE_LOADER*

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 29 13:45:14 UTC 2022


Module: Mesa
Branch: main
Commit: 48e72da0dd9c0ece20bac036813836d50ef8b1c2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=48e72da0dd9c0ece20bac036813836d50ef8b1c2

Author: Yonggang Luo <luoyonggang at gmail.com>
Date:   Thu Jul 28 20:55:20 2022 +0800

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 at gmail.com>
Reviewed-by: Eric Engestrom <eric at igalia.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17784>

---

 meson.build                                        |  4 ++--
 src/gallium/auxiliary/pipe-loader/pipe_loader.h    |  2 +-
 src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c | 24 +++++++++++-----------
 src/gallium/frontends/dri/dri2.c                   |  2 +-
 src/gallium/frontends/dri/drisw.c                  |  2 +-
 src/gallium/frontends/lavapipe/lvp_device.c        |  4 ++--
 src/gallium/targets/pipe-loader/pipe_swrast.c      |  4 ++--
 7 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/meson.build b/meson.build
index ae596676b84..6be3105cc3b 100644
--- a/meson.build
+++ b/meson.build
@@ -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)
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.h b/src/gallium/auxiliary/pipe-loader/pipe_loader.h
index 03aa18d09eb..fdecf773320 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader.h
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.h
@@ -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.
  *
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
index c042b92ccb1..2cf5c04614d 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
@@ -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,
diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c
index c65ab39ccc3..25fadd1a90c 100644
--- a/src/gallium/frontends/dri/dri2.c
+++ b/src/gallium/frontends/dri/dri2.c
@@ -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);
diff --git a/src/gallium/frontends/dri/drisw.c b/src/gallium/frontends/dri/drisw.c
index 6817a99aea5..1a3166452a5 100644
--- a/src/gallium/frontends/dri/drisw.c
+++ b/src/gallium/frontends/dri/drisw.c
@@ -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
diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c
index 723160188dd..1abbe385599 100644
--- a/src/gallium/frontends/lavapipe/lvp_device.c
+++ b/src/gallium/frontends/lavapipe/lvp_device.c
@@ -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);
diff --git a/src/gallium/targets/pipe-loader/pipe_swrast.c b/src/gallium/targets/pipe-loader/pipe_swrast.c
index 1dc47352b8e..bb353b1913a 100644
--- a/src/gallium/targets/pipe-loader/pipe_swrast.c
+++ b/src/gallium/targets/pipe-loader/pipe_swrast.c
@@ -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,



More information about the mesa-commit mailing list