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

Author: Yonggang Luo <[email protected]>
Date:   Wed Oct 25 15:23:06 2023 +0800

treewide: Replace the include of nir_types.h with glsl_types.h

Signed-off-by: Yonggang Luo <[email protected]>
Acked-by: Caio Oliveira <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26753>

---

 src/asahi/compiler/agx_compile.c                   |  2 +-
 src/compiler/clc/clc.c                             |  1 -
 src/compiler/clc/clc_helpers.h                     |  2 +-
 .../glsl/gl_nir_lower_named_interface_blocks.c     |  2 +-
 .../glsl/gl_nir_opt_dead_builtin_varyings.c        |  3 +-
 src/compiler/meson.build                           |  1 -
 src/compiler/nir/nir.h                             |  2 +-
 src/compiler/nir/nir_lower_var_copies.c            |  2 +-
 src/compiler/nir_types.h                           | 36 ----------------------
 src/compiler/spirv/vtn_cmat.c                      |  1 -
 src/gallium/drivers/freedreno/ir3/ir3_cmdline.c    |  2 +-
 .../lima/standalone/lima_compiler_cmdline.c        |  2 +-
 src/gallium/drivers/vc4/vc4_program.c              |  2 +-
 .../frontends/rusticl/rusticl_mesa_bindings.h      |  2 +-
 src/microsoft/clc/clc_compiler.c                   |  1 -
 src/microsoft/clc/clc_nir.c                        |  1 -
 src/microsoft/compiler/dxil_enums.c                |  2 +-
 src/panfrost/compiler/bifrost_compile.c            |  2 +-
 src/panfrost/midgard/compiler.h                    |  2 +-
 src/panfrost/midgard/midgard_compile.c             |  2 +-
 20 files changed, 14 insertions(+), 56 deletions(-)

diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c
index ea3b69779c4..330454ffa43 100644
--- a/src/asahi/compiler/agx_compile.c
+++ b/src/asahi/compiler/agx_compile.c
@@ -7,7 +7,7 @@
 
 #include "agx_compile.h"
 #include "compiler/nir/nir_builder.h"
-#include "compiler/nir_types.h"
+#include "glsl_types.h"
 #include "util/glheader.h"
 #include "util/macros.h"
 #include "util/u_debug.h"
diff --git a/src/compiler/clc/clc.c b/src/compiler/clc/clc.c
index bd2b28fc68c..da7e56c7cb2 100644
--- a/src/compiler/clc/clc.c
+++ b/src/compiler/clc/clc.c
@@ -24,7 +24,6 @@
 #include "nir/nir.h"
 #include "nir/nir_serialize.h"
 #include "glsl_types.h"
-#include "nir_types.h"
 #include "clc.h"
 #include "clc_helpers.h"
 #include "nir_clc_helpers.h"
diff --git a/src/compiler/clc/clc_helpers.h b/src/compiler/clc/clc_helpers.h
index aa8728435dc..1050352bb39 100644
--- a/src/compiler/clc/clc_helpers.h
+++ b/src/compiler/clc/clc_helpers.h
@@ -24,7 +24,7 @@
 #ifndef MESA_CLC_HELPERS_H
 #define MESA_CLC_HELPERS_H
 
-#include "nir_types.h"
+#include "glsl_types.h"
 
 #include "clc.h"
 #include "util/u_string.h"
diff --git a/src/compiler/glsl/gl_nir_lower_named_interface_blocks.c 
b/src/compiler/glsl/gl_nir_lower_named_interface_blocks.c
index 6249b4c1186..0ef25504fce 100644
--- a/src/compiler/glsl/gl_nir_lower_named_interface_blocks.c
+++ b/src/compiler/glsl/gl_nir_lower_named_interface_blocks.c
@@ -62,8 +62,8 @@
 #include "nir.h"
 #include "nir_builder.h"
 #include "nir_deref.h"
-#include "nir_types.h"
 #include "gl_nir.h"
+#include "glsl_types.h"
 
 #include "main/shader_types.h"
 
diff --git a/src/compiler/glsl/gl_nir_opt_dead_builtin_varyings.c 
b/src/compiler/glsl/gl_nir_opt_dead_builtin_varyings.c
index 9b3e30d754b..429fb254f04 100644
--- a/src/compiler/glsl/gl_nir_opt_dead_builtin_varyings.c
+++ b/src/compiler/glsl/gl_nir_opt_dead_builtin_varyings.c
@@ -45,11 +45,10 @@
 
 #include "gl_nir_link_varyings.h"
 #include "gl_nir_linker.h"
+#include "glsl_types.h"
 #include "linker_util.h"
 #include "nir_builder.h"
-#include "nir_types.h"
 
-#include "compiler/glsl_types.h"
 #include "main/consts_exts.h"
 #include "main/shader_types.h"
 #include "util/u_string.h"
diff --git a/src/compiler/meson.build b/src/compiler/meson.build
index ff51bfd5629..1dae56d1b2b 100644
--- a/src/compiler/meson.build
+++ b/src/compiler/meson.build
@@ -45,7 +45,6 @@ astc_decoder_glsl_file = files('glsl/astc_decoder.glsl')
 files_libcompiler = files(
   'glsl_types.c',
   'glsl_types.h',
-  'nir_types.h',
   'shader_enums.c',
   'shader_enums.h',
   'shader_info.h',
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 5363cbd6075..7853f0c02bc 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -28,8 +28,8 @@
 #ifndef NIR_H
 #define NIR_H
 
+#include "compiler/glsl_types.h"
 #include "compiler/glsl/list.h"
-#include "compiler/nir_types.h"
 #include "compiler/shader_enums.h"
 #include "compiler/shader_info.h"
 #include "util/bitscan.h"
diff --git a/src/compiler/nir/nir_lower_var_copies.c 
b/src/compiler/nir/nir_lower_var_copies.c
index e66f36dd46d..19d8feec78a 100644
--- a/src/compiler/nir/nir_lower_var_copies.c
+++ b/src/compiler/nir/nir_lower_var_copies.c
@@ -21,7 +21,7 @@
  * IN THE SOFTWARE.
  */
 
-#include "compiler/nir_types.h"
+#include "compiler/glsl_types.h"
 #include "nir.h"
 #include "nir_builder.h"
 #include "nir_deref.h"
diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h
deleted file mode 100644
index 7886d734c94..00000000000
--- a/src/compiler/nir_types.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright © 2014 Connor Abbott
- *
- * 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
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * 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 NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS 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:
- *    Connor Abbott ([email protected])
- *
- */
-
-#ifndef NIR_TYPES_H
-#define NIR_TYPES_H
-
-#include <stdio.h>
-#include <stdbool.h>
-
-#include "glsl_types.h"
-
-#endif /* NIR_TYPES_H */
diff --git a/src/compiler/spirv/vtn_cmat.c b/src/compiler/spirv/vtn_cmat.c
index e902b219a6a..e9744d0313a 100644
--- a/src/compiler/spirv/vtn_cmat.c
+++ b/src/compiler/spirv/vtn_cmat.c
@@ -5,7 +5,6 @@
 
 #include "glsl_types.h"
 #include "nir.h"
-#include "nir_types.h"
 #include "vtn_private.h"
 
 static enum glsl_cmat_use
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c 
b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
index c1a1528c67b..3051084776c 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
@@ -46,10 +46,10 @@
 
 #include "main/mtypes.h"
 
+#include "compiler/glsl_types.h"
 #include "compiler/glsl/gl_nir.h"
 #include "compiler/glsl/glsl_to_nir.h"
 #include "compiler/glsl/standalone.h"
-#include "compiler/nir_types.h"
 #include "compiler/spirv/nir_spirv.h"
 
 #include "pipe/p_context.h"
diff --git a/src/gallium/drivers/lima/standalone/lima_compiler_cmdline.c 
b/src/gallium/drivers/lima/standalone/lima_compiler_cmdline.c
index 8a37789f817..47e329d1aa8 100644
--- a/src/gallium/drivers/lima/standalone/lima_compiler_cmdline.c
+++ b/src/gallium/drivers/lima/standalone/lima_compiler_cmdline.c
@@ -28,10 +28,10 @@
 
 #include "main/mtypes.h"
 
+#include "compiler/glsl_types.h"
 #include "compiler/glsl/standalone.h"
 #include "compiler/glsl/glsl_to_nir.h"
 #include "compiler/glsl/gl_nir.h"
-#include "compiler/nir_types.h"
 
 #include "lima_context.h"
 #include "lima_program.h"
diff --git a/src/gallium/drivers/vc4/vc4_program.c 
b/src/gallium/drivers/vc4/vc4_program.c
index 611cf3e100e..23b7790b98e 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -31,9 +31,9 @@
 #include "util/ralloc.h"
 #include "util/hash_table.h"
 #include "tgsi/tgsi_dump.h"
+#include "compiler/glsl_types.h"
 #include "compiler/nir/nir.h"
 #include "compiler/nir/nir_builder.h"
-#include "compiler/nir_types.h"
 #include "nir/tgsi_to_nir.h"
 #include "vc4_context.h"
 #include "vc4_qpu.h"
diff --git a/src/gallium/frontends/rusticl/rusticl_mesa_bindings.h 
b/src/gallium/frontends/rusticl/rusticl_mesa_bindings.h
index 43b4fc1e0fe..291088e2843 100644
--- a/src/gallium/frontends/rusticl/rusticl_mesa_bindings.h
+++ b/src/gallium/frontends/rusticl/rusticl_mesa_bindings.h
@@ -5,8 +5,8 @@
 #include "compiler/clc/clc.h"
 #include "compiler/clc/clc_helpers.h"
 #include "compiler/shader_enums.h"
+#include "glsl_types.h"
 #include "nir_serialize.h"
-#include "nir_types.h"
 #include "spirv/nir_spirv.h"
 
 #include "pipe/p_context.h"
diff --git a/src/microsoft/clc/clc_compiler.c b/src/microsoft/clc/clc_compiler.c
index 0acef6c036f..8b32d1d55d8 100644
--- a/src/microsoft/clc/clc_compiler.c
+++ b/src/microsoft/clc/clc_compiler.c
@@ -25,7 +25,6 @@
 #include "nir_clc_helpers.h"
 #include "nir_serialize.h"
 #include "glsl_types.h"
-#include "nir_types.h"
 #include "clc_compiler.h"
 #include "clc_helpers.h"
 #include "clc_nir.h"
diff --git a/src/microsoft/clc/clc_nir.c b/src/microsoft/clc/clc_nir.c
index d5305e84153..dc3c2c90e0a 100644
--- a/src/microsoft/clc/clc_nir.c
+++ b/src/microsoft/clc/clc_nir.c
@@ -24,7 +24,6 @@
 #include "util/u_math.h"
 #include "nir.h"
 #include "glsl_types.h"
-#include "nir_types.h"
 #include "nir_builder.h"
 
 #include "clc_nir.h"
diff --git a/src/microsoft/compiler/dxil_enums.c 
b/src/microsoft/compiler/dxil_enums.c
index 473f0820141..2ea67e5ee15 100644
--- a/src/microsoft/compiler/dxil_enums.c
+++ b/src/microsoft/compiler/dxil_enums.c
@@ -23,8 +23,8 @@
 
 #include "dxil_enums.h"
 
+#include "glsl_types.h"
 #include "nir.h"
-#include "nir_types.h"
 
 #include "util/u_debug.h"
 
diff --git a/src/panfrost/compiler/bifrost_compile.c 
b/src/panfrost/compiler/bifrost_compile.c
index 72c65cb8d5c..90020640329 100644
--- a/src/panfrost/compiler/bifrost_compile.c
+++ b/src/panfrost/compiler/bifrost_compile.c
@@ -25,9 +25,9 @@
  *      Alyssa Rosenzweig <[email protected]>
  */
 
+#include "compiler/glsl_types.h"
 #include "compiler/glsl/glsl_to_nir.h"
 #include "compiler/nir/nir_builder.h"
-#include "compiler/nir_types.h"
 #include "util/u_debug.h"
 
 #include "bifrost/disassemble.h"
diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h
index e0c9275ca28..119bc5e5f4e 100644
--- a/src/panfrost/midgard/compiler.h
+++ b/src/panfrost/midgard/compiler.h
@@ -36,8 +36,8 @@
 #include "util/u_dynarray.h"
 #include "util/u_math.h"
 
+#include "compiler/glsl_types.h"
 #include "compiler/nir/nir.h"
-#include "compiler/nir_types.h"
 #include "panfrost/util/lcra.h"
 #include "panfrost/util/pan_ir.h"
 
diff --git a/src/panfrost/midgard/midgard_compile.c 
b/src/panfrost/midgard/midgard_compile.c
index f4f2ba4f5c4..2864b3195bc 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -31,9 +31,9 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 
+#include "compiler/glsl_types.h"
 #include "compiler/glsl/glsl_to_nir.h"
 #include "compiler/nir/nir_builder.h"
-#include "compiler/nir_types.h"
 #include "util/half_float.h"
 #include "util/list.h"
 #include "util/u_debug.h"

Reply via email to