gallium,util: Pull u_indices and u_primconvert back into gallium
authorJason Ekstrand <jason.ekstrand@collabora.com>
Mon, 16 Jan 2023 22:03:11 +0000 (16:03 -0600)
committerEric Engestrom <eric@engestrom.ch>
Thu, 26 Jan 2023 15:40:31 +0000 (15:40 +0000)
This was moved in !13741 but doing so created a link-time dependency
between util and gallium which causes problems for Vulkan drivers.
Meanwhile, having mesa/main depend on gallium is fine now that we don't
have any classic drivers.  It's a bit circular but should be harmless.

Fixes: 97ba2f2fd486 ("move util/indices to core util")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8098
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20734>
(cherry picked from commit d292cb82b8ef1311eb4b78af2c90b1840ba5a6bf)

15 files changed:
.pick_status.json
src/gallium/auxiliary/indices/u_indices.c [moved from src/util/indices/u_indices.c with 100% similarity]
src/gallium/auxiliary/indices/u_indices.h [moved from src/util/indices/u_indices.h with 100% similarity]
src/gallium/auxiliary/indices/u_indices_gen.py [moved from src/util/indices/u_indices_gen.py with 100% similarity]
src/gallium/auxiliary/indices/u_indices_priv.h [moved from src/util/indices/u_indices_priv.h with 100% similarity]
src/gallium/auxiliary/indices/u_primconvert.c [moved from src/util/indices/u_primconvert.c with 100% similarity]
src/gallium/auxiliary/indices/u_primconvert.h [moved from src/util/indices/u_primconvert.h with 100% similarity]
src/gallium/auxiliary/indices/u_unfilled_gen.py [moved from src/util/indices/u_unfilled_gen.py with 100% similarity]
src/gallium/auxiliary/indices/u_unfilled_indices.c [moved from src/util/indices/u_unfilled_indices.c with 100% similarity]
src/gallium/auxiliary/meson.build
src/gallium/auxiliary/util/u_vbuf.c
src/gallium/drivers/svga/svga_draw_arrays.c
src/gallium/drivers/svga/svga_draw_elements.c
src/mesa/vbo/vbo_save_api.c
src/util/meson.build

index a557b1c..88f624f 100644 (file)
         "description": "gallium,util: Pull u_indices and u_primconvert back into gallium",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "97ba2f2fd4867779acac611075fee1505e2cf2fb"
     },
index 8745ee6..c7cdc59 100644 (file)
@@ -112,6 +112,10 @@ files_libgallium = files(
   'hud/hud_driver_query.c',
   'hud/hud_fps.c',
   'hud/hud_private.h',
+  'indices/u_indices.h',
+  'indices/u_indices_priv.h',
+  'indices/u_primconvert.c',
+  'indices/u_primconvert.h',
   'os/os_mman.h',
   'os/os_process.c',
   'os/os_process.h',
@@ -498,10 +502,24 @@ idep_u_tracepoints = declare_dependency(
   sources: files_u_tracepoints,
 )
 
+u_indices_gen_c = custom_target(
+  'u_indices_gen.c',
+  input : 'indices/u_indices_gen.py',
+  output : 'u_indices_gen.c',
+  command : [prog_python, '@INPUT@', '@OUTPUT@'],
+)
+
+u_unfilled_gen_c = custom_target(
+  'u_unfilled_gen.c',
+  input : 'indices/u_unfilled_gen.py',
+  output : 'u_unfilled_gen.c',
+  command : [prog_python, '@INPUT@', '@OUTPUT@'],
+)
+
 libgallium_extra_c_args = []
 libgallium = static_library(
   'gallium',
-  [files_libgallium],
+  [files_libgallium, u_indices_gen_c, u_unfilled_gen_c],
   include_directories : [
     inc_loader, inc_gallium, inc_src, inc_include, include_directories('util')
   ],
index 357dc3e..58db9e6 100644 (file)
 #include "util/u_helpers.h"
 #include "util/u_inlines.h"
 #include "util/u_memory.h"
-#include "indices/u_primconvert.h"
 #include "util/u_prim_restart.h"
 #include "util/u_screen.h"
 #include "util/u_upload_mgr.h"
+#include "indices/u_primconvert.h"
 #include "translate/translate.h"
 #include "translate/translate_cache.h"
 #include "cso_cache/cso_cache.h"
index cd967e2..fba33b7 100644 (file)
@@ -25,9 +25,9 @@
 
 #include "svga_cmd.h"
 
+#include "indices/u_indices.h"
 #include "util/u_inlines.h"
 #include "util/u_prim.h"
-#include "indices/u_indices.h"
 
 #include "svga_hw_reg.h"
 #include "svga_draw.h"
index 225edf0..ec7cba7 100644 (file)
  *
  **********************************************************/
 
+#include "indices/u_indices.h"
 #include "util/u_inlines.h"
 #include "util/u_prim.h"
 #include "util/u_upload_mgr.h"
-#include "indices/u_indices.h"
 
 #include "svga_cmd.h"
 #include "svga_draw.h"
index 8283792..a41d518 100644 (file)
@@ -116,7 +116,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "util/bitscan.h"
 #include "util/u_memory.h"
 #include "util/hash_table.h"
-#include "util/indices/u_indices.h"
+#include "gallium/auxiliary/indices/u_indices.h"
 #include "util/u_prim.h"
 
 #include "gallium/include/pipe/p_state.h"
index a6e1273..c400c27 100644 (file)
@@ -159,10 +159,6 @@ files_mesa_util = files(
   'vma.c',
   'vma.h',
   'xxhash.h',
-  'indices/u_indices.h',
-  'indices/u_indices_priv.h',
-  'indices/u_primconvert.c',
-  'indices/u_primconvert.h',
   'mesa_cache_db.c',
   'mesa_cache_db.h',
 )
@@ -244,20 +240,6 @@ endif
 
 u_trace_py = files('perf/u_trace.py')
 
-u_indices_gen_c = custom_target(
-  'u_indices_gen.c',
-  input : 'indices/u_indices_gen.py',
-  output : 'u_indices_gen.c',
-  command : [prog_python, '@INPUT@', '@OUTPUT@'],
-)
-
-u_unfilled_gen_c = custom_target(
-  'u_unfilled_gen.c',
-  input : 'indices/u_unfilled_gen.py',
-  output : 'u_unfilled_gen.c',
-  command : [prog_python, '@INPUT@', '@OUTPUT@'],
-)
-
 libmesa_util_sse41 = static_library(
                'mesa_util_sse41',
                files('streaming-load-memcpy.c'),
@@ -268,7 +250,7 @@ libmesa_util_sse41 = static_library(
 
 _libmesa_util = static_library(
   'mesa_util',
-  [files_mesa_util, files_debug_stack, format_srgb, u_indices_gen_c, u_unfilled_gen_c],
+  [files_mesa_util, files_debug_stack, format_srgb],
   include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
   dependencies : deps_for_libmesa_util,
   link_with: [libmesa_format, libmesa_util_sse41],