Move blob from compiler/ to util/
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 18 Sep 2019 19:32:00 +0000 (14:32 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Thu, 19 Sep 2019 19:56:22 +0000 (19:56 +0000)
There's nothing whatsoever compiler-specific about it other than that's
currently where it's used.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
15 files changed:
src/compiler/Makefile.sources
src/compiler/glsl/tests/meson.build
src/compiler/glsl_types.h
src/compiler/meson.build
src/compiler/nir/nir_serialize.h
src/gallium/drivers/iris/iris_disk_cache.c
src/intel/vulkan/anv_pipeline_cache.c
src/mesa/drivers/dri/i965/brw_disk_cache.c
src/mesa/main/program_binary.c
src/mesa/state_tracker/st_shader_cache.h
src/util/Makefile.sources
src/util/blob.c [moved from src/compiler/blob.c with 100% similarity]
src/util/blob.h [moved from src/compiler/blob.h with 100% similarity]
src/util/blob_test.c [moved from src/compiler/glsl/tests/blob_test.c with 100% similarity]
src/util/meson.build

index ac6c067..c4d2c2b 100644 (file)
@@ -1,6 +1,4 @@
 LIBCOMPILER_FILES = \
-       blob.c \
-       blob.h \
        builtin_type_macros.h \
        glsl_types.cpp \
        glsl_types.h \
index dc017ca..e9272fe 100644 (file)
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
-test(
-  'blob_test',
-  executable(
-    'blob_test',
-    'blob_test.c',
-    c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
-    include_directories : [inc_common, inc_compiler],
-    link_with : [libglsl],
-  ),
-  suite : ['compiler', 'glsl'],
-)
-
 if with_shader_cache
   test(
     'cache_test',
index dcd7eea..1059660 100644 (file)
@@ -29,8 +29,8 @@
 #include <assert.h>
 
 #include "shader_enums.h"
-#include "blob.h"
 #include "c11/threads.h"
+#include "util/blob.h"
 #include "util/macros.h"
 
 #ifdef __cplusplus
index 108dc7e..d4a4084 100644 (file)
@@ -24,8 +24,6 @@ inc_glsl = include_directories('glsl')
 inc_spirv = include_directories('spirv')
 
 files_libcompiler = files(
-  'blob.c',
-  'blob.h',
   'builtin_type_macros.h',
   'glsl_types.cpp',
   'glsl_types.h',
index f77d8e3..528988f 100644 (file)
@@ -25,7 +25,7 @@
 #define _NIR_SERIALIZE_H
 
 #include "nir.h"
-#include "compiler/blob.h"
+#include "util/blob.h"
 
 #ifdef __cplusplus
 extern "C" {
index 325903c..2b5889c 100644 (file)
@@ -31,8 +31,8 @@
 #include <assert.h>
 #include <string.h>
 
-#include "compiler/blob.h"
 #include "compiler/nir/nir.h"
+#include "util/blob.h"
 #include "util/build_id.h"
 #include "util/disk_cache.h"
 #include "util/mesa-sha1.h"
index 7c9f8a6..9c315d5 100644 (file)
@@ -21,7 +21,7 @@
  * IN THE SOFTWARE.
  */
 
-#include "compiler/blob.h"
+#include "util/blob.h"
 #include "util/hash_table.h"
 #include "util/debug.h"
 #include "util/disk_cache.h"
index ccf389c..1b4cb43 100644 (file)
  * IN THE SOFTWARE.
  */
 
-#include "compiler/blob.h"
 #include "compiler/glsl/ir_uniform.h"
 #include "compiler/glsl/shader_cache.h"
 #include "main/mtypes.h"
+#include "util/blob.h"
 #include "util/build_id.h"
 #include "util/debug.h"
 #include "util/disk_cache.h"
index 39537cf..8c2db25 100644 (file)
  */
 
 
-#include "compiler/blob.h"
 #include "compiler/glsl/serialize.h"
 #include "main/errors.h"
 #include "main/mtypes.h"
 #include "main/shaderapi.h"
 #include "util/bitscan.h"
+#include "util/blob.h"
 #include "util/crc32.h"
 #include "program_binary.h"
 #include "program/prog_parameter.h"
index 67cc084..2a74ea1 100644 (file)
@@ -25,9 +25,9 @@
 #define ST_SHADER_CACHE_H
 
 #include "st_context.h"
-#include "compiler/blob.h"
 #include "main/mtypes.h"
 #include "pipe/p_state.h"
+#include "util/blob.h"
 #include "util/disk_cache.h"
 #include "util/mesa-sha1.h"
 
index cf8c848..109de1e 100644 (file)
@@ -5,6 +5,8 @@ MESA_UTIL_FILES := \
        bitscan.c \
        bitscan.h \
        bitset.h \
+       blob.c \
+       blob.h \
        build_id.c \
        build_id.h \
        crc32.c \
similarity index 100%
rename from src/compiler/blob.c
rename to src/util/blob.c
similarity index 100%
rename from src/compiler/blob.h
rename to src/util/blob.h
index c981a14..60989c9 100644 (file)
@@ -29,6 +29,8 @@ files_mesa_util = files(
   'bitscan.c',
   'bitscan.h',
   'bitset.h',
+  'blob.c',
+  'blob.h',
   'build_id.c',
   'build_id.h',
   'crc32.c',
@@ -144,6 +146,7 @@ deps_for_libmesa_util = [
   dep_thread,
   dep_atomic,
   dep_m,
+  dep_valgrind,
 ]
 
 if with_platform_android
@@ -203,6 +206,18 @@ if with_tests
   )
 
   test(
+    'blob',
+    executable(
+      'blob_test',
+      files('blob_test.c'),
+      include_directories : inc_common,
+      dependencies : idep_mesautil,
+      c_args : [c_msvc_compat_args],
+    ),
+    suite : ['util'],
+  )
+
+  test(
     'roundeven',
     executable(
       'roundeven_test',