gallivm: use unsigned instead of uint
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 23 Jun 2023 14:21:37 +0000 (16:21 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 6 Jul 2023 12:03:43 +0000 (12:03 +0000)
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24002>

src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c

index 0592a7f..a5a049f 100644 (file)
@@ -312,8 +312,8 @@ lp_build_tgsi_aos(struct gallivm_state *gallivm,
 struct lp_build_tgsi_inst_list
 {
    struct tgsi_full_instruction *instructions;
-   uint max_instructions;
-   uint num_instructions;
+   unsigned max_instructions;
+   unsigned num_instructions;
 };
 
 unsigned lp_bld_tgsi_list_init(struct lp_build_tgsi_context * bld_base);
@@ -401,8 +401,8 @@ struct lp_build_tgsi_context
    int pc;
 
    struct tgsi_full_instruction *instructions;
-   uint max_instructions;
-   uint num_instructions;
+   unsigned max_instructions;
+   unsigned num_instructions;
 
    /** This function allows the user to insert some instructions at the
      * beginning of the program.  It is optional and does not need to be
@@ -604,7 +604,7 @@ struct lp_build_tgsi_soa_context
    struct lp_build_mask_context *mask;
    struct lp_exec_mask exec_mask;
 
-   uint num_immediates;
+   unsigned num_immediates;
    bool use_immediates_array;
 };
 
index 35129c3..6f8f4e6 100644 (file)
@@ -867,7 +867,7 @@ lp_build_tgsi_aos(struct gallivm_state *gallivm,
 {
    struct lp_build_tgsi_aos_context bld;
    struct tgsi_parse_context parse;
-   uint num_immediates = 0;
+   unsigned num_immediates = 0;
    unsigned chan;
    int pc = 0;
 
@@ -923,7 +923,7 @@ lp_build_tgsi_aos(struct gallivm_state *gallivm,
       case TGSI_TOKEN_TYPE_IMMEDIATE:
          /* simply copy the immediate values into the next immediates[] slot */
          {
-            const uint size = parse.FullToken.FullImmediate.Immediate.NrTokens - 1;
+            const unsigned size = parse.FullToken.FullImmediate.Immediate.NrTokens - 1;
             float imm[4];
             assert(size <= 4);
             assert(num_immediates < LP_MAX_INLINED_IMMEDIATES);
index fd288f9..fba89e5 100644 (file)
@@ -3010,7 +3010,7 @@ void lp_emit_immediate_soa(
    struct gallivm_state * gallivm = bld_base->base.gallivm;
    LLVMValueRef imms[4];
    unsigned i;
-   const uint size = imm->Immediate.NrTokens - 1;
+   const unsigned size = imm->Immediate.NrTokens - 1;
    assert(size <= 4);
    switch (imm->Immediate.DataType) {
    case TGSI_IMM_FLOAT32:
@@ -4610,7 +4610,7 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm,
        * were forgetting so we're using MAX_VERTEX_VARYING from
        * that spec even though we could assert if it's not
        * set, but that's a lot uglier. */
-      uint max_output_vertices;
+      unsigned max_output_vertices;
 
       /* inputs are always indirect with gs */
       bld.indirect_files |= (1 << TGSI_FILE_INPUT);