Mesa (master): gallium/gdi: use GALLIUM_FOO rather than HAVE_FOO

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Sep 16 18:26:00 UTC 2019


Module: Mesa
Branch: master
Commit: 9c57b54994c9eb5ce09ec23dc8433ac4f4359fcd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9c57b54994c9eb5ce09ec23dc8433ac4f4359fcd

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Wed Aug  7 13:42:36 2019 +0200

gallium/gdi: use GALLIUM_FOO rather than HAVE_FOO

This matches what other targets do, and makes it easier to port to
meson.

Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>

---

 src/gallium/targets/libgl-gdi/SConscript  |  4 ++--
 src/gallium/targets/libgl-gdi/libgl_gdi.c | 16 ++++++++--------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/gallium/targets/libgl-gdi/SConscript b/src/gallium/targets/libgl-gdi/SConscript
index 94feca24ef3..0e853bcdfdd 100644
--- a/src/gallium/targets/libgl-gdi/SConscript
+++ b/src/gallium/targets/libgl-gdi/SConscript
@@ -32,11 +32,11 @@ if True:
     drivers += [softpipe]
 
 if env['llvm']:
-    env.Append(CPPDEFINES = 'HAVE_LLVMPIPE')
+    env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
     drivers += [llvmpipe]
 
     if env['swr']:
-        env.Append(CPPDEFINES = 'HAVE_SWR')
+        env.Append(CPPDEFINES = 'GALLIUM_SWR')
         drivers += [swr]
 
 if env['gcc'] and env['machine'] != 'x86_64':
diff --git a/src/gallium/targets/libgl-gdi/libgl_gdi.c b/src/gallium/targets/libgl-gdi/libgl_gdi.c
index 12576db52c2..40e77354e9a 100644
--- a/src/gallium/targets/libgl-gdi/libgl_gdi.c
+++ b/src/gallium/targets/libgl-gdi/libgl_gdi.c
@@ -45,13 +45,13 @@
 #include "softpipe/sp_screen.h"
 #include "softpipe/sp_public.h"
 
-#ifdef HAVE_LLVMPIPE
+#ifdef GALLIUM_LLVMPIPE
 #include "llvmpipe/lp_texture.h"
 #include "llvmpipe/lp_screen.h"
 #include "llvmpipe/lp_public.h"
 #endif
 
-#ifdef HAVE_SWR
+#ifdef GALLIUM_SWR
 #include "swr/swr_public.h"
 #endif
 
@@ -70,9 +70,9 @@ gdi_screen_create(void)
    if(!winsys)
       goto no_winsys;
 
-#ifdef HAVE_LLVMPIPE
+#ifdef GALLIUM_LLVMPIPE
    default_driver = "llvmpipe";
-#elif HAVE_SWR
+#elif GALLIUM_SWR
    default_driver = "swr";
 #else
    default_driver = "softpipe";
@@ -80,14 +80,14 @@ gdi_screen_create(void)
 
    driver = debug_get_option("GALLIUM_DRIVER", default_driver);
 
-#ifdef HAVE_LLVMPIPE
+#ifdef GALLIUM_LLVMPIPE
    if (strcmp(driver, "llvmpipe") == 0) {
       screen = llvmpipe_create_screen( winsys );
       if (screen)
          use_llvmpipe = TRUE;
    }
 #endif
-#ifdef HAVE_SWR
+#ifdef GALLIUM_SWR
    if (strcmp(driver, "swr") == 0) {
       screen = swr_create_screen( winsys );
       if (screen)
@@ -130,7 +130,7 @@ gdi_present(struct pipe_screen *screen,
    struct sw_winsys *winsys = NULL;
    struct sw_displaytarget *dt = NULL;
 
-#ifdef HAVE_LLVMPIPE
+#ifdef GALLIUM_LLVMPIPE
    if (use_llvmpipe) {
       winsys = llvmpipe_screen(screen)->winsys;
       dt = llvmpipe_resource(res)->dt;
@@ -139,7 +139,7 @@ gdi_present(struct pipe_screen *screen,
    }
 #endif
 
-#ifdef HAVE_SWR
+#ifdef GALLIUM_SWR
    if (use_swr) {
       swr_gdi_swap(screen, res, hDC);
       return;




More information about the mesa-commit mailing list