tgsi: use tgsi_semantic enum type in ureg code
authorBrian Paul <brianp@vmware.com>
Wed, 7 Feb 2018 05:17:10 +0000 (22:17 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 8 Feb 2018 01:43:01 +0000 (18:43 -0700)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/tgsi/tgsi_ureg.c
src/gallium/auxiliary/tgsi/tgsi_ureg.h

index bb7da4b074b2a1b2fe08ec30c8d8fe5058b03599..b3f8b1e14e56803cd2b4d9420db9c932e9d37a44 100644 (file)
@@ -112,7 +112,7 @@ struct ureg_program
    int next_shader_processor;
 
    struct {
-      unsigned semantic_name;
+      enum tgsi_semantic semantic_name;
       unsigned semantic_index;
       enum tgsi_interpolate_mode interp;
       unsigned char cylindrical_wrap;
@@ -127,13 +127,13 @@ struct ureg_program
    unsigned vs_inputs[PIPE_MAX_ATTRIBS/32];
 
    struct {
-      unsigned semantic_name;
+      enum tgsi_semantic semantic_name;
       unsigned semantic_index;
    } system_value[UREG_MAX_SYSTEM_VALUE];
    unsigned nr_system_values;
 
    struct {
-      unsigned semantic_name;
+      enum tgsi_semantic semantic_name;
       unsigned semantic_index;
       unsigned streams;
       unsigned usage_mask; /* = TGSI_WRITEMASK_* */
@@ -281,7 +281,7 @@ ureg_property(struct ureg_program *ureg, unsigned name, unsigned value)
 
 struct ureg_src
 ureg_DECL_fs_input_cyl_centroid_layout(struct ureg_program *ureg,
-                       unsigned semantic_name,
+                       enum tgsi_semantic semantic_name,
                        unsigned semantic_index,
                        enum tgsi_interpolate_mode interp_mode,
                        unsigned cylindrical_wrap,
@@ -334,7 +334,7 @@ out:
 
 struct ureg_src
 ureg_DECL_fs_input_cyl_centroid(struct ureg_program *ureg,
-                       unsigned semantic_name,
+                       enum tgsi_semantic semantic_name,
                        unsigned semantic_index,
                        enum tgsi_interpolate_mode interp_mode,
                        unsigned cylindrical_wrap,
@@ -363,7 +363,7 @@ ureg_DECL_vs_input( struct ureg_program *ureg,
 
 struct ureg_src
 ureg_DECL_input_layout(struct ureg_program *ureg,
-                unsigned semantic_name,
+                enum tgsi_semantic semantic_name,
                 unsigned semantic_index,
                 unsigned index,
                 unsigned usage_mask,
@@ -378,7 +378,7 @@ ureg_DECL_input_layout(struct ureg_program *ureg,
 
 struct ureg_src
 ureg_DECL_input(struct ureg_program *ureg,
-                unsigned semantic_name,
+                enum tgsi_semantic semantic_name,
                 unsigned semantic_index,
                 unsigned array_id,
                 unsigned array_size)
@@ -390,7 +390,7 @@ ureg_DECL_input(struct ureg_program *ureg,
 
 struct ureg_src
 ureg_DECL_system_value(struct ureg_program *ureg,
-                       unsigned semantic_name,
+                       enum tgsi_semantic semantic_name,
                        unsigned semantic_index)
 {
    unsigned i;
@@ -418,7 +418,7 @@ out:
 
 struct ureg_dst
 ureg_DECL_output_layout(struct ureg_program *ureg,
-                        unsigned semantic_name,
+                        enum tgsi_semantic semantic_name,
                         unsigned semantic_index,
                         unsigned streams,
                         unsigned index,
@@ -492,7 +492,7 @@ ureg_DECL_output(struct ureg_program *ureg,
 
 struct ureg_dst
 ureg_DECL_output_array(struct ureg_program *ureg,
-                       unsigned semantic_name,
+                       enum tgsi_semantic semantic_name,
                        unsigned semantic_index,
                        unsigned array_id,
                        unsigned array_size)
@@ -1505,7 +1505,7 @@ emit_decl_semantic(struct ureg_program *ureg,
                    unsigned file,
                    unsigned first,
                    unsigned last,
-                   unsigned semantic_name,
+                   enum tgsi_semantic semantic_name,
                    unsigned semantic_index,
                    unsigned streams,
                    unsigned usage_mask,
@@ -1574,7 +1574,7 @@ emit_decl_fs(struct ureg_program *ureg,
              unsigned file,
              unsigned first,
              unsigned last,
-             unsigned semantic_name,
+             enum tgsi_semantic semantic_name,
              unsigned semantic_index,
              enum tgsi_interpolate_mode interpolate,
              unsigned cylindrical_wrap,
index 2bab23dc4f64e927334acd9fb7d6fb3e4754c3d1..03496896aa4c7c95df370522e46898d16b5f7255 100644 (file)
@@ -168,7 +168,7 @@ ureg_property(struct ureg_program *ureg, unsigned name, unsigned value);
 
 struct ureg_src
 ureg_DECL_fs_input_cyl_centroid_layout(struct ureg_program *,
-                       unsigned semantic_name,
+                       enum tgsi_semantic semantic_name,
                        unsigned semantic_index,
                        enum tgsi_interpolate_mode interp_mode,
                        unsigned cylindrical_wrap,
@@ -180,7 +180,7 @@ ureg_DECL_fs_input_cyl_centroid_layout(struct ureg_program *,
 
 struct ureg_src
 ureg_DECL_fs_input_cyl_centroid(struct ureg_program *,
-                       unsigned semantic_name,
+                       enum tgsi_semantic semantic_name,
                        unsigned semantic_index,
                        enum tgsi_interpolate_mode interp_mode,
                        unsigned cylindrical_wrap,
@@ -190,7 +190,7 @@ ureg_DECL_fs_input_cyl_centroid(struct ureg_program *,
 
 static inline struct ureg_src
 ureg_DECL_fs_input_cyl(struct ureg_program *ureg,
-                       unsigned semantic_name,
+                       enum tgsi_semantic semantic_name,
                        unsigned semantic_index,
                        enum tgsi_interpolate_mode interp_mode,
                        unsigned cylindrical_wrap)
@@ -205,7 +205,7 @@ ureg_DECL_fs_input_cyl(struct ureg_program *ureg,
 
 static inline struct ureg_src
 ureg_DECL_fs_input(struct ureg_program *ureg,
-                   unsigned semantic_name,
+                   enum tgsi_semantic semantic_name,
                    unsigned semantic_index,
                    enum tgsi_interpolate_mode interp_mode)
 {
@@ -222,7 +222,7 @@ ureg_DECL_vs_input( struct ureg_program *,
 
 struct ureg_src
 ureg_DECL_input_layout(struct ureg_program *,
-                unsigned semantic_name,
+                enum tgsi_semantic semantic_name,
                 unsigned semantic_index,
                 unsigned index,
                 unsigned usage_mask,
@@ -231,19 +231,19 @@ ureg_DECL_input_layout(struct ureg_program *,
 
 struct ureg_src
 ureg_DECL_input(struct ureg_program *,
-                unsigned semantic_name,
+                enum tgsi_semantic semantic_name,
                 unsigned semantic_index,
                 unsigned array_id,
                 unsigned array_size);
 
 struct ureg_src
 ureg_DECL_system_value(struct ureg_program *,
-                       unsigned semantic_name,
+                       enum tgsi_semantic semantic_name,
                        unsigned semantic_index);
 
 struct ureg_dst
 ureg_DECL_output_layout(struct ureg_program *,
-                        unsigned semantic_name,
+                        enum tgsi_semantic semantic_name,
                         unsigned semantic_index,
                         unsigned streams,
                         unsigned index,
@@ -253,7 +253,7 @@ ureg_DECL_output_layout(struct ureg_program *,
 
 struct ureg_dst
 ureg_DECL_output_masked(struct ureg_program *,
-                        unsigned semantic_name,
+                        enum tgsi_semantic semantic_name,
                         unsigned semantic_index,
                         unsigned usage_mask,
                         unsigned array_id,
@@ -261,12 +261,12 @@ ureg_DECL_output_masked(struct ureg_program *,
 
 struct ureg_dst
 ureg_DECL_output(struct ureg_program *,
-                 unsigned semantic_name,
+                 enum tgsi_semantic semantic_name,
                  unsigned semantic_index);
 
 struct ureg_dst
 ureg_DECL_output_array(struct ureg_program *ureg,
-                       unsigned semantic_name,
+                       enum tgsi_semantic semantic_name,
                        unsigned semantic_index,
                        unsigned array_id,
                        unsigned array_size);