Mesa (main): dri: Remove what's left of utils.[ch]

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue May 10 21:56:02 UTC 2022


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

Author: Adam Jackson <ajax at redhat.com>
Date:   Fri May  6 15:31:26 2022 -0400

dri: Remove what's left of utils.[ch]

Which is just moving the struct definition for __DRIconfigRec into
dri_util.h.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16377>

---

 src/gallium/frontends/dri/dri_context.c        |  2 --
 src/gallium/frontends/dri/dri_query_renderer.c |  1 -
 src/gallium/frontends/dri/dri_screen.c         |  2 --
 src/gallium/frontends/dri/dri_util.c           |  1 -
 src/gallium/frontends/dri/dri_util.h           |  8 +++--
 src/gallium/frontends/dri/kopper.c             |  1 -
 src/gallium/frontends/dri/meson.build          |  2 --
 src/gallium/frontends/dri/utils.c              | 42 --------------------------
 src/gallium/frontends/dri/utils.h              | 40 ------------------------
 9 files changed, 5 insertions(+), 94 deletions(-)

diff --git a/src/gallium/frontends/dri/dri_context.c b/src/gallium/frontends/dri/dri_context.c
index f6f2a984ac8..c32e795f681 100644
--- a/src/gallium/frontends/dri/dri_context.c
+++ b/src/gallium/frontends/dri/dri_context.c
@@ -29,8 +29,6 @@
  * Author: Jakob Bornecrantz <wallbraker at gmail.com>
  */
 
-#include "utils.h"
-
 #include "dri_screen.h"
 #include "dri_drawable.h"
 #include "dri_context.h"
diff --git a/src/gallium/frontends/dri/dri_query_renderer.c b/src/gallium/frontends/dri/dri_query_renderer.c
index 3290c855f9e..11790fd0f45 100644
--- a/src/gallium/frontends/dri/dri_query_renderer.c
+++ b/src/gallium/frontends/dri/dri_query_renderer.c
@@ -3,7 +3,6 @@
 #include "util/u_inlines.h"
 #include "frontend/drm_driver.h"
 
-#include "utils.h"
 #include "dri_screen.h"
 #include "dri_query_renderer.h"
 #include "pipe-loader/pipe_loader.h"
diff --git a/src/gallium/frontends/dri/dri_screen.c b/src/gallium/frontends/dri/dri_screen.c
index 5eab2ad01fc..d6d5ca2442c 100644
--- a/src/gallium/frontends/dri/dri_screen.c
+++ b/src/gallium/frontends/dri/dri_screen.c
@@ -29,8 +29,6 @@
  * Author: Jakob Bornecrantz <wallbraker at gmail.com>
  */
 
-#include "utils.h"
-
 #include "dri_screen.h"
 #include "dri_context.h"
 #include "dri_helpers.h"
diff --git a/src/gallium/frontends/dri/dri_util.c b/src/gallium/frontends/dri/dri_util.c
index 0a60e9cc8d8..7d2665a2171 100644
--- a/src/gallium/frontends/dri/dri_util.c
+++ b/src/gallium/frontends/dri/dri_util.c
@@ -43,7 +43,6 @@
 #include "dri_util.h"
 #include "dri_context.h"
 #include "dri_screen.h"
-#include "utils.h"
 #include "util/u_endian.h"
 #include "util/driconf.h"
 #include "main/framebuffer.h"
diff --git a/src/gallium/frontends/dri/dri_util.h b/src/gallium/frontends/dri/dri_util.h
index 1a6e22c50dc..9f9d28bbb13 100644
--- a/src/gallium/frontends/dri/dri_util.h
+++ b/src/gallium/frontends/dri/dri_util.h
@@ -56,13 +56,15 @@
 #include <GL/gl.h>
 #include <GL/internal/dri_interface.h>
 #include "kopper_interface.h"
-#include "main/menums.h"
 #include "main/formats.h"
+#include "main/glconfig.h"
+#include "main/menums.h"
 #include "util/xmlconfig.h"
 #include <stdbool.h>
 
-struct gl_config;
-struct gl_context;
+struct __DRIconfigRec {
+    struct gl_config modes;
+};
 
 /**
  * Extensions.
diff --git a/src/gallium/frontends/dri/kopper.c b/src/gallium/frontends/dri/kopper.c
index ef6e2585fa6..08721398adf 100644
--- a/src/gallium/frontends/dri/kopper.c
+++ b/src/gallium/frontends/dri/kopper.c
@@ -36,7 +36,6 @@
 #include "driver_trace/tr_screen.h"
 
 #include "dri_screen.h"
-#include "utils.h"
 #include "dri_context.h"
 #include "dri_drawable.h"
 #include "dri_helpers.h"
diff --git a/src/gallium/frontends/dri/meson.build b/src/gallium/frontends/dri/meson.build
index cb4f434c775..dd9b5cb5611 100644
--- a/src/gallium/frontends/dri/meson.build
+++ b/src/gallium/frontends/dri/meson.build
@@ -33,8 +33,6 @@ files_libdri = files(
   'dri_screen.h',
   'dri_util.c',
   'dri_util.h',
-  'utils.c',
-  'utils.h',
 )
 
 if with_dri
diff --git a/src/gallium/frontends/dri/utils.c b/src/gallium/frontends/dri/utils.c
deleted file mode 100644
index 6fa407907ad..00000000000
--- a/src/gallium/frontends/dri/utils.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2002, 2004
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file utils.c
- * Utility functions for DRI drivers.
- *
- * \author Ian Romanick <idr at us.ibm.com>
- */
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdbool.h>
-#include <stdint.h>
-#include "main/cpuinfo.h"
-#include "main/extensions.h"
-#include "utils.h"
-#include "dri_util.h"
-
-
diff --git a/src/gallium/frontends/dri/utils.h b/src/gallium/frontends/dri/utils.h
deleted file mode 100644
index 44e16ed1c41..00000000000
--- a/src/gallium/frontends/dri/utils.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2002, 2004
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Ian Romanick <idr at us.ibm.com>
- */
-
-#ifndef DRI_DEBUG_H
-#define DRI_DEBUG_H
-
-#include <GL/gl.h>
-#include <GL/internal/dri_interface.h>
-#include "main/glconfig.h"
-#include "main/formats.h"
-
-struct __DRIconfigRec {
-    struct gl_config modes;
-};
-
-#endif /* DRI_DEBUG_H */



More information about the mesa-commit mailing list