[Mesa-dev] [PATCH 03/10] i965/nir: Move the type_size_*_bytes functions to brw_nir.h

Jason Ekstrand jason at jlekstrand.net
Thu May 26 01:52:19 UTC 2016


---
 src/mesa/drivers/dri/i965/brw_nir.c | 12 ------------
 src/mesa/drivers/dri/i965/brw_nir.h | 13 +++++++++++++
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c
index 45551a1..62ed0e8 100644
--- a/src/mesa/drivers/dri/i965/brw_nir.c
+++ b/src/mesa/drivers/dri/i965/brw_nir.c
@@ -337,18 +337,6 @@ brw_nir_lower_fs_outputs(nir_shader *nir)
    nir_lower_io(nir, nir_var_shader_out, type_size_scalar);
 }
 
-static int
-type_size_scalar_bytes(const struct glsl_type *type)
-{
-   return type_size_scalar(type) * 4;
-}
-
-static int
-type_size_vec4_bytes(const struct glsl_type *type)
-{
-   return type_size_vec4(type) * 16;
-}
-
 static void
 brw_nir_lower_uniforms(nir_shader *nir, bool is_scalar)
 {
diff --git a/src/mesa/drivers/dri/i965/brw_nir.h b/src/mesa/drivers/dri/i965/brw_nir.h
index 2711606..041f337 100644
--- a/src/mesa/drivers/dri/i965/brw_nir.h
+++ b/src/mesa/drivers/dri/i965/brw_nir.h
@@ -25,12 +25,25 @@
 
 #include "brw_context.h"
 #include "brw_reg.h"
+#include "brw_shader.h"
 #include "compiler/nir/nir.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+static inline int
+type_size_scalar_bytes(const struct glsl_type *type)
+{
+   return type_size_scalar(type) * 4;
+}
+
+static inline int
+type_size_vec4_bytes(const struct glsl_type *type)
+{
+   return type_size_vec4(type) * 16;
+}
+
 /* Flags set in the instr->pass_flags field by i965 analysis passes */
 enum {
    BRW_NIR_NON_BOOLEAN           = 0x0,
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list