tgsi: uint -> unsigned
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 26 Jun 2023 07:43:07 +0000 (09:43 +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>

20 files changed:
src/gallium/auxiliary/tgsi/tgsi_aa_point.c
src/gallium/auxiliary/tgsi/tgsi_dump.c
src/gallium/auxiliary/tgsi/tgsi_dump.h
src/gallium/auxiliary/tgsi/tgsi_dynamic_indexing.c
src/gallium/auxiliary/tgsi/tgsi_exec.c
src/gallium/auxiliary/tgsi/tgsi_exec.h
src/gallium/auxiliary/tgsi/tgsi_info.c
src/gallium/auxiliary/tgsi/tgsi_info.h
src/gallium/auxiliary/tgsi/tgsi_parse.c
src/gallium/auxiliary/tgsi/tgsi_point_sprite.c
src/gallium/auxiliary/tgsi/tgsi_sanity.c
src/gallium/auxiliary/tgsi/tgsi_scan.c
src/gallium/auxiliary/tgsi/tgsi_scan.h
src/gallium/auxiliary/tgsi/tgsi_text.c
src/gallium/auxiliary/tgsi/tgsi_text.h
src/gallium/auxiliary/tgsi/tgsi_transform.c
src/gallium/auxiliary/tgsi/tgsi_transform.h
src/gallium/auxiliary/tgsi/tgsi_two_side.c
src/gallium/auxiliary/tgsi/tgsi_ureg.c
src/gallium/auxiliary/tgsi/tgsi_vpos.c

index 9391e33..c2ef564 100644 (file)
@@ -283,8 +283,8 @@ tgsi_add_aa_point(const struct tgsi_token *tokens_in,
                   const bool need_texcoord_semantic)
 {
    struct aa_transform_context transform;
-   const uint num_new_tokens = 200; /* should be enough */
-   const uint new_len = tgsi_num_tokens(tokens_in) + num_new_tokens;
+   const unsigned num_new_tokens = 200; /* should be enough */
+   const unsigned new_len = tgsi_num_tokens(tokens_in) + num_new_tokens;
 
    /* setup transformation context */
    memset(&transform, 0, sizeof(transform));
index 586d231..c1f3e89 100644 (file)
@@ -48,11 +48,11 @@ struct dump_ctx
 
    bool dump_float_as_hex;
 
-   uint instno;
-   uint immno;
+   unsigned instno;
+   unsigned immno;
    int indent;
    
-   uint indentation;
+   unsigned indentation;
    FILE *file;
 
    void (*dump_printf)(struct dump_ctx *ctx, const char *format, ...);
@@ -74,9 +74,9 @@ dump_ctx_printf(struct dump_ctx *ctx, const char *format, ...)
 static void
 dump_enum(
    struct dump_ctx *ctx,
-   uint e,
+   unsigned e,
    const char **enums,
-   uint enum_count )
+   unsigned enum_count )
 {
    if (e >= enum_count)
       ctx->dump_printf( ctx, "%u", e );
@@ -222,7 +222,7 @@ _dump_register_dst(
 static void
 _dump_writemask(
    struct dump_ctx *ctx,
-   uint writemask )
+   unsigned writemask )
 {
    if (writemask != TGSI_WRITEMASK_XYZW) {
       CHR( '.' );
@@ -514,9 +514,9 @@ iter_instruction(
    struct tgsi_full_instruction *inst )
 {
    struct dump_ctx *ctx = (struct dump_ctx *) iter;
-   uint instno = ctx->instno++;
+   unsigned instno = ctx->instno++;
    const struct tgsi_opcode_info *info = tgsi_get_opcode_info( inst->Instruction.Opcode );
-   uint i;
+   unsigned i;
    bool first_reg = true;
 
    INSTID( instno );
@@ -649,7 +649,7 @@ iter_instruction(
 void
 tgsi_dump_instruction(
    const struct tgsi_full_instruction *inst,
-   uint instno )
+   unsigned instno )
 {
    struct dump_ctx ctx;
    memset(&ctx, 0, sizeof(ctx));
@@ -675,7 +675,7 @@ prolog(
 }
 
 static void
-init_dump_ctx(struct dump_ctx *ctx, uint flags)
+init_dump_ctx(struct dump_ctx *ctx, unsigned flags)
 {
    memset(ctx, 0, sizeof(*ctx));
 
@@ -690,7 +690,7 @@ init_dump_ctx(struct dump_ctx *ctx, uint flags)
 }
 
 void
-tgsi_dump_to_file(const struct tgsi_token *tokens, uint flags, FILE *file)
+tgsi_dump_to_file(const struct tgsi_token *tokens, unsigned flags, FILE *file)
 {
    struct dump_ctx ctx;
    memset(&ctx, 0, sizeof(ctx));
@@ -704,7 +704,7 @@ tgsi_dump_to_file(const struct tgsi_token *tokens, uint flags, FILE *file)
 }
 
 void
-tgsi_dump(const struct tgsi_token *tokens, uint flags)
+tgsi_dump(const struct tgsi_token *tokens, unsigned flags)
 {
    tgsi_dump_to_file(tokens, flags, NULL);
 }
@@ -747,7 +747,7 @@ str_dump_ctx_printf(struct dump_ctx *ctx, const char *format, ...)
 bool
 tgsi_dump_str(
    const struct tgsi_token *tokens,
-   uint flags,
+   unsigned flags,
    char *str,
    size_t size)
 {
@@ -772,7 +772,7 @@ tgsi_dump_str(
 void
 tgsi_dump_instruction_str(
    const struct tgsi_full_instruction *inst,
-   uint instno,
+   unsigned instno,
    char *str,
    size_t size)
 {
index f5bc8e7..86e9449 100644 (file)
@@ -43,17 +43,17 @@ extern "C" {
 bool
 tgsi_dump_str(
    const struct tgsi_token *tokens,
-   uint flags,
+   unsigned flags,
    char *str,
    size_t size);
 
 void
-tgsi_dump_to_file(const struct tgsi_token *tokens, uint flags, FILE *file);
+tgsi_dump_to_file(const struct tgsi_token *tokens, unsigned flags, FILE *file);
 
 void
 tgsi_dump(
    const struct tgsi_token *tokens,
-   uint flags );
+   unsigned flags );
 
 struct tgsi_full_immediate;
 struct tgsi_full_instruction;
@@ -63,14 +63,14 @@ struct tgsi_full_property;
 void
 tgsi_dump_instruction_str(
    const struct tgsi_full_instruction *inst,
-   uint instno,
+   unsigned instno,
    char *str,
    size_t size);
 
 void
 tgsi_dump_instruction(
    const struct tgsi_full_instruction *inst,
-   uint instno );
+   unsigned instno );
 
 #if defined __cplusplus
 }
index e49a330..f01e099 100644 (file)
@@ -331,8 +331,8 @@ tgsi_remove_dynamic_indexing(const struct tgsi_token *tokens_in,
                              unsigned imm_count)
 {
    struct dIndexing_transform_context transform;
-   const uint num_new_tokens = 1000; /* should be enough */
-   const uint new_len = tgsi_num_tokens(tokens_in) + num_new_tokens;
+   const unsigned num_new_tokens = 1000; /* should be enough */
+   const unsigned new_len = tgsi_num_tokens(tokens_in) + num_new_tokens;
 
    /* setup transformation context */
    memset(&transform, 0, sizeof(transform));
index 7d420ad..ff54a01 100644 (file)
@@ -413,7 +413,7 @@ micro_exp2(union tgsi_exec_channel *dst,
 {
 #if DEBUG
    /* Inf is okay for this instruction, so clamp it to silence assertions. */
-   uint i;
+   unsigned i;
    union tgsi_exec_channel clamped;
 
    for (i = 0; i < 4; i++) {
@@ -985,7 +985,7 @@ print_chan(const char *msg, const union tgsi_exec_channel *chan)
 
 #ifdef DEBUG
 static void
-print_temp(const struct tgsi_exec_machine *mach, uint index)
+print_temp(const struct tgsi_exec_machine *mach, unsigned index)
 {
    const struct tgsi_exec_vector *tmp = &mach->Temps[index];
    int i;
@@ -1028,12 +1028,12 @@ tgsi_exec_machine_bind_shader(
    struct tgsi_image *image,
    struct tgsi_buffer *buffer)
 {
-   uint k;
+   unsigned k;
    struct tgsi_parse_context parse;
    struct tgsi_full_instruction *instructions;
    struct tgsi_full_declaration *declarations;
-   uint maxInstructions = 10, numInstructions = 0;
-   uint maxDeclarations = 10, numDeclarations = 0;
+   unsigned maxInstructions = 10, numInstructions = 0;
+   unsigned maxDeclarations = 10, numDeclarations = 0;
 
 #if 0
    tgsi_dump(tokens, 0);
@@ -1113,7 +1113,7 @@ tgsi_exec_machine_bind_shader(
    }
 
    while( !tgsi_parse_end_of_tokens( &parse ) ) {
-      uint i;
+      unsigned i;
 
       tgsi_parse_token( &parse );
       switch( parse.FullToken.Token.Type ) {
@@ -1142,7 +1142,7 @@ tgsi_exec_machine_bind_shader(
 
       case TGSI_TOKEN_TYPE_IMMEDIATE:
          {
-            uint size = parse.FullToken.FullImmediate.Immediate.NrTokens - 1;
+            unsigned size = parse.FullToken.FullImmediate.Immediate.NrTokens - 1;
             assert( size <= 4 );
             if (mach->ImmLimit >= mach->ImmsReserved) {
                unsigned newReserved = mach->ImmsReserved ? 2 * mach->ImmsReserved : 128;
@@ -1385,21 +1385,21 @@ micro_sub(union tgsi_exec_channel *dst,
 
 static void
 fetch_src_file_channel(const struct tgsi_exec_machine *mach,
-                       const uint file,
-                       const uint swizzle,
+                       const unsigned file,
+                       const unsigned swizzle,
                        const union tgsi_exec_channel *index,
                        const union tgsi_exec_channel *index2D,
                        union tgsi_exec_channel *chan)
 {
-   uint i;
+   unsigned i;
 
    assert(swizzle < 4);
 
    switch (file) {
    case TGSI_FILE_CONSTANT:
       for (i = 0; i < TGSI_QUAD_SIZE; i++) {
-         /* NOTE: copying the const value as a uint instead of float */
-         const uint constbuf = index2D->i[i];
+         /* NOTE: copying the const value as a unsigned instead of float */
+         const unsigned constbuf = index2D->i[i];
          const unsigned pos = index->i[i] * 4 + swizzle;
          /* const buffer bounds check */
          if (pos >= mach->ConstsSize[constbuf] / 4) {
@@ -1412,7 +1412,7 @@ fetch_src_file_channel(const struct tgsi_exec_machine *mach,
             }
             chan->u[i] = 0;
          } else {
-            const uint *buf = (const uint *)mach->Consts[constbuf];
+            const unsigned *buf = (const unsigned *)mach->Consts[constbuf];
             chan->u[i] = buf[pos];
          }
       }
@@ -1513,7 +1513,7 @@ get_index_registers(const struct tgsi_exec_machine *mach,
     *       .x = Indirect.SwizzleX
     */
    if (reg->Register.Indirect) {
-      const uint execmask = mach->ExecMask;
+      const unsigned execmask = mach->ExecMask;
 
       assert(reg->Indirect.File == TGSI_FILE_ADDRESS);
       const union tgsi_exec_channel *addr = &mach->Addrs[reg->Indirect.Index].xyzw[reg->Indirect.Swizzle];
@@ -1555,7 +1555,7 @@ get_index_registers(const struct tgsi_exec_machine *mach,
        *       .y = DimIndirect.SwizzleX
        */
       if (reg->Dimension.Indirect) {
-         const uint execmask = mach->ExecMask;
+         const unsigned execmask = mach->ExecMask;
 
          assert(reg->DimIndirect.File == TGSI_FILE_ADDRESS);
          const union tgsi_exec_channel *addr = &mach->Addrs[reg->DimIndirect.Index].xyzw[reg->DimIndirect.Swizzle];
@@ -1589,11 +1589,11 @@ static void
 fetch_source_d(const struct tgsi_exec_machine *mach,
                union tgsi_exec_channel *chan,
                const struct tgsi_full_src_register *reg,
-              const uint chan_index)
+              const unsigned chan_index)
 {
    union tgsi_exec_channel index;
    union tgsi_exec_channel index2D;
-   uint swizzle;
+   unsigned swizzle;
 
    get_index_registers(mach, reg, &index, &index2D);
 
@@ -1611,7 +1611,7 @@ static void
 fetch_source(const struct tgsi_exec_machine *mach,
              union tgsi_exec_channel *chan,
              const struct tgsi_full_src_register *reg,
-             const uint chan_index,
+             const unsigned chan_index,
              enum tgsi_exec_datatype src_datatype)
 {
    fetch_source_d(mach, chan, reg, chan_index);
@@ -1634,7 +1634,7 @@ static union tgsi_exec_channel *
 store_dest_dstret(struct tgsi_exec_machine *mach,
                  const union tgsi_exec_channel *chan,
                  const struct tgsi_full_dst_register *reg,
-                 uint chan_index)
+                 unsigned chan_index)
 {
    static union tgsi_exec_channel null;
    union tgsi_exec_channel *dst;
@@ -1655,7 +1655,7 @@ store_dest_dstret(struct tgsi_exec_machine *mach,
    if (reg->Register.Indirect) {
       union tgsi_exec_channel index;
       union tgsi_exec_channel indir_index;
-      uint swizzle;
+      unsigned swizzle;
 
       /* which address register (always zero for now) */
       index.i[0] =
@@ -1723,10 +1723,10 @@ static void
 store_dest_double(struct tgsi_exec_machine *mach,
                  const union tgsi_exec_channel *chan,
                  const struct tgsi_full_dst_register *reg,
-                 uint chan_index)
+                 unsigned chan_index)
 {
    union tgsi_exec_channel *dst;
-   const uint execmask = mach->ExecMask;
+   const unsigned execmask = mach->ExecMask;
    int i;
 
    dst = store_dest_dstret(mach, chan, reg, chan_index);
@@ -1744,10 +1744,10 @@ store_dest(struct tgsi_exec_machine *mach,
            const union tgsi_exec_channel *chan,
            const struct tgsi_full_dst_register *reg,
            const struct tgsi_full_instruction *inst,
-           uint chan_index)
+           unsigned chan_index)
 {
    union tgsi_exec_channel *dst;
-   const uint execmask = mach->ExecMask;
+   const unsigned execmask = mach->ExecMask;
    int i;
 
    dst = store_dest_dstret(mach, chan, reg, chan_index);
@@ -1781,9 +1781,9 @@ static void
 exec_kill_if(struct tgsi_exec_machine *mach,
              const struct tgsi_full_instruction *inst)
 {
-   uint uniquemask;
-   uint chan_index;
-   uint kilmask = 0; /* bit 0 = pixel 0, bit 1 = pixel 1, etc */
+   unsigned uniquemask;
+   unsigned chan_index;
+   unsigned kilmask = 0; /* bit 0 = pixel 0, bit 1 = pixel 1, etc */
    union tgsi_exec_channel r[1];
 
    /* This mask stores component bits that were already tested. */
@@ -1791,8 +1791,8 @@ exec_kill_if(struct tgsi_exec_machine *mach,
 
    for (chan_index = 0; chan_index < 4; chan_index++)
    {
-      uint swizzle;
-      uint i;
+      unsigned swizzle;
+      unsigned i;
 
       /* unswizzle channel */
       swizzle = tgsi_util_get_full_src_register_swizzle (
@@ -1910,7 +1910,7 @@ fetch_texel( struct tgsi_sampler *sampler,
              union tgsi_exec_channel *b,
              union tgsi_exec_channel *a )
 {
-   uint j;
+   unsigned j;
    float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE];
 
    /* FIXME: handle explicit derivs, offsets */
@@ -1987,17 +1987,17 @@ fetch_assign_deriv_channel(struct tgsi_exec_machine *mach,
    derivs[1][3] = d.f[3];
 }
 
-static uint
+static unsigned
 fetch_sampler_unit(struct tgsi_exec_machine *mach,
                    const struct tgsi_full_instruction *inst,
-                   uint sampler)
+                   unsigned sampler)
 {
-   uint unit = 0;
+   unsigned unit = 0;
    int i;
    if (inst->Src[sampler].Register.Indirect) {
       const struct tgsi_full_src_register *reg = &inst->Src[sampler];
       union tgsi_exec_channel indir_index, index2;
-      const uint execmask = mach->ExecMask;
+      const unsigned execmask = mach->ExecMask;
       index2.i[0] =
       index2.i[1] =
       index2.i[2] =
@@ -2032,13 +2032,13 @@ fetch_sampler_unit(struct tgsi_exec_machine *mach,
 static void
 exec_tex(struct tgsi_exec_machine *mach,
          const struct tgsi_full_instruction *inst,
-         enum tex_modifier modifier, uint sampler)
+         enum tex_modifier modifier, unsigned sampler)
 {
    const union tgsi_exec_channel *args[5], *proj = NULL;
    union tgsi_exec_channel r[5];
    enum tgsi_sampler_control control = TGSI_SAMPLER_LOD_NONE;
-   uint chan;
-   uint unit;
+   unsigned chan;
+   unsigned unit;
    int8_t offsets[3];
    int dim, shadow_ref, i;
 
@@ -2140,7 +2140,7 @@ static void
 exec_lodq(struct tgsi_exec_machine *mach,
           const struct tgsi_full_instruction *inst)
 {
-   uint resource_unit, sampler_unit;
+   unsigned resource_unit, sampler_unit;
    unsigned dim;
    unsigned i;
    union tgsi_exec_channel coords[4];
@@ -2149,7 +2149,7 @@ exec_lodq(struct tgsi_exec_machine *mach,
 
    resource_unit = fetch_sampler_unit(mach, inst, 1);
    if (inst->Instruction.Opcode == TGSI_OPCODE_LOD) {
-      uint target = mach->SamplerViews[resource_unit].Resource;
+      unsigned target = mach->SamplerViews[resource_unit].Resource;
       dim = tgsi_util_get_texture_coord_dim(target);
       sampler_unit = fetch_sampler_unit(mach, inst, 2);
    } else {
@@ -2215,8 +2215,8 @@ exec_txd(struct tgsi_exec_machine *mach,
 {
    union tgsi_exec_channel r[4];
    float derivs[3][2][TGSI_QUAD_SIZE];
-   uint chan;
-   uint unit;
+   unsigned chan;
+   unsigned unit;
    int8_t offsets[3];
 
    unit = fetch_sampler_unit(mach, inst, 3);
@@ -2322,8 +2322,8 @@ exec_txf(struct tgsi_exec_machine *mach,
          const struct tgsi_full_instruction *inst)
 {
    union tgsi_exec_channel r[4];
-   uint chan;
-   uint unit;
+   unsigned chan;
+   unsigned unit;
    float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE];
    int j;
    int8_t offsets[3];
@@ -2408,8 +2408,8 @@ exec_txq(struct tgsi_exec_machine *mach,
 {
    int result[4];
    union tgsi_exec_channel r[4], src;
-   uint chan;
-   uint unit;
+   unsigned chan;
+   unsigned unit;
    int i,j;
 
    unit = fetch_sampler_unit(mach, inst, 1);
@@ -2437,12 +2437,12 @@ exec_sample(struct tgsi_exec_machine *mach,
             const struct tgsi_full_instruction *inst,
             enum tex_modifier modifier, bool compare)
 {
-   const uint resource_unit = inst->Src[1].Register.Index;
-   const uint sampler_unit = inst->Src[2].Register.Index;
+   const unsigned resource_unit = inst->Src[1].Register.Index;
+   const unsigned sampler_unit = inst->Src[2].Register.Index;
    union tgsi_exec_channel r[5], c1;
    const union tgsi_exec_channel *lod = &ZeroVec;
    enum tgsi_sampler_control control = TGSI_SAMPLER_LOD_NONE;
-   uint chan;
+   unsigned chan;
    unsigned char swizzles[4];
    int8_t offsets[3];
 
@@ -2570,11 +2570,11 @@ static void
 exec_sample_d(struct tgsi_exec_machine *mach,
               const struct tgsi_full_instruction *inst)
 {
-   const uint resource_unit = inst->Src[1].Register.Index;
-   const uint sampler_unit = inst->Src[2].Register.Index;
+   const unsigned resource_unit = inst->Src[1].Register.Index;
+   const unsigned sampler_unit = inst->Src[2].Register.Index;
    union tgsi_exec_channel r[4];
    float derivs[3][2][TGSI_QUAD_SIZE];
-   uint chan;
+   unsigned chan;
    unsigned char swizzles[4];
    int8_t offsets[3];
 
@@ -2776,7 +2776,7 @@ exec_declaration(struct tgsi_exec_machine *mach,
 
    if (mach->ShaderType == PIPE_SHADER_FRAGMENT) {
       if (decl->Declaration.File == TGSI_FILE_INPUT) {
-         uint first, last, mask;
+         unsigned first, last, mask;
 
          first = decl->Range.First;
          last = decl->Range.Last;
@@ -2790,7 +2790,7 @@ exec_declaration(struct tgsi_exec_machine *mach,
           */
          /* XXX make FACE a system value */
          if (decl->Semantic.Name == TGSI_SEMANTIC_FACE) {
-            uint i;
+            unsigned i;
 
             assert(decl->Semantic.Index == 0);
             assert(first == last);
@@ -2801,7 +2801,7 @@ exec_declaration(struct tgsi_exec_machine *mach,
          } else {
             eval_coef_func eval;
             apply_sample_offset_func interp;
-            uint i, j;
+            unsigned i, j;
 
             switch (decl->Interp.Interpolate) {
             case TGSI_INTERPOLATE_CONSTANT:
@@ -2842,7 +2842,7 @@ exec_declaration(struct tgsi_exec_machine *mach,
          }
 
          if (DEBUG_EXECUTION) {
-            uint i, j;
+            unsigned i, j;
             for (i = first; i <= last; ++i) {
                debug_printf("IN[%2u] = ", i);
                for (j = 0; j < TGSI_NUM_CHANNELS; j++) {
@@ -3326,9 +3326,9 @@ static void
 exec_case(struct tgsi_exec_machine *mach,
           const struct tgsi_full_instruction *inst)
 {
-   uint prevMask = mach->SwitchStack[mach->SwitchStackTop - 1].mask;
+   unsigned prevMask = mach->SwitchStack[mach->SwitchStackTop - 1].mask;
    union tgsi_exec_channel src;
-   uint mask = 0;
+   unsigned mask = 0;
 
    fetch_source(mach, &src, &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_UINT);
 
@@ -3356,7 +3356,7 @@ exec_case(struct tgsi_exec_machine *mach,
 static void
 exec_default(struct tgsi_exec_machine *mach)
 {
-   uint prevMask = mach->SwitchStack[mach->SwitchStackTop - 1].mask;
+   unsigned prevMask = mach->SwitchStack[mach->SwitchStackTop - 1].mask;
 
    mach->Switch.mask |= ~mach->Switch.defaultMask & prevMask;
 
@@ -3389,11 +3389,11 @@ static void
 fetch_double_channel(struct tgsi_exec_machine *mach,
                      union tgsi_double_channel *chan,
                      const struct tgsi_full_src_register *reg,
-                     uint chan_0,
-                     uint chan_1)
+                     unsigned chan_0,
+                     unsigned chan_1)
 {
    union tgsi_exec_channel src[2];
-   uint i;
+   unsigned i;
 
    fetch_source_d(mach, &src[0], reg, chan_0);
    fetch_source_d(mach, &src[1], reg, chan_1);
@@ -3411,13 +3411,13 @@ store_double_channel(struct tgsi_exec_machine *mach,
                      const union tgsi_double_channel *chan,
                      const struct tgsi_full_dst_register *reg,
                      const struct tgsi_full_instruction *inst,
-                     uint chan_0,
-                     uint chan_1)
+                     unsigned chan_0,
+                     unsigned chan_1)
 {
    union tgsi_exec_channel dst[2];
-   uint i;
+   unsigned i;
    union tgsi_double_channel temp;
-   const uint execmask = mach->ExecMask;
+   const unsigned execmask = mach->ExecMask;
 
    if (!inst->Instruction.Saturate) {
       for (i = 0; i < TGSI_QUAD_SIZE; i++)
@@ -3636,11 +3636,11 @@ exec_load_img(struct tgsi_exec_machine *mach,
               const struct tgsi_full_instruction *inst)
 {
    union tgsi_exec_channel r[4], sample_r;
-   uint unit;
+   unsigned unit;
    int sample;
    int i, j;
    int dim;
-   uint chan;
+   unsigned chan;
    float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE];
    struct tgsi_image_params params;
 
@@ -3741,15 +3741,15 @@ exec_load(struct tgsi_exec_machine *mach,
       exec_load_membuf(mach, inst);
 }
 
-static uint
+static unsigned
 fetch_store_img_unit(struct tgsi_exec_machine *mach,
                      const struct tgsi_full_dst_register *dst)
 {
-   uint unit = 0;
+   unsigned unit = 0;
    int i;
    if (dst->Register.Indirect) {
       union tgsi_exec_channel indir_index, index2;
-      const uint execmask = mach->ExecMask;
+      const unsigned execmask = mach->ExecMask;
       index2.i[0] =
       index2.i[1] =
       index2.i[2] =
@@ -3784,7 +3784,7 @@ exec_store_img(struct tgsi_exec_machine *mach,
    int dim;
    int sample;
    int i, j;
-   uint unit;
+   unsigned unit;
    unit = fetch_store_img_unit(mach, &inst->Dst[0]);
    dim = get_image_coord_dim(inst->Memory.Texture);
    sample = get_image_coord_sample(inst->Memory.Texture);
@@ -3887,7 +3887,7 @@ exec_atomop_img(struct tgsi_exec_machine *mach,
    int dim;
    int sample;
    int i, j;
-   uint unit, chan;
+   unsigned unit, chan;
    unit = fetch_sampler_unit(mach, inst, 0);
    dim = get_image_coord_dim(inst->Memory.Texture);
    sample = get_image_coord_sample(inst->Memory.Texture);
@@ -3947,7 +3947,7 @@ exec_atomop_membuf(struct tgsi_exec_machine *mach,
                    const struct tgsi_full_instruction *inst)
 {
    union tgsi_exec_channel offset, r0, r1;
-   uint chan, i;
+   unsigned chan, i;
    int execmask = mach->ExecMask & mach->NonHelperMask & ~mach->KillMask;
    IFETCH(&offset, 1, TGSI_CHAN_X);
 
@@ -4058,7 +4058,7 @@ exec_resq_img(struct tgsi_exec_machine *mach,
 {
    int result[4];
    union tgsi_exec_channel r[4];
-   uint unit;
+   unsigned unit;
    int i, chan, j;
    struct tgsi_image_params params;
 
@@ -5284,7 +5284,7 @@ exec_instruction(
    case TGSI_OPCODE_ELSE:
       /* invert CondMask wrt previous mask */
       {
-         uint prevMask;
+         unsigned prevMask;
          assert(mach->CondStackTop > 0);
          prevMask = mach->CondStack[mach->CondStackTop - 1];
          mach->CondMask = ~mach->CondMask & prevMask;
@@ -5948,7 +5948,7 @@ exec_instruction(
 static void
 tgsi_exec_machine_setup_masks(struct tgsi_exec_machine *mach)
 {
-   uint default_mask = 0xf;
+   unsigned default_mask = 0xf;
 
    mach->KillMask = 0;
    mach->OutputVertexOffset = 0;
@@ -5987,7 +5987,7 @@ tgsi_exec_machine_setup_masks(struct tgsi_exec_machine *mach)
 uint
 tgsi_exec_machine_run( struct tgsi_exec_machine *mach, int start_pc )
 {
-   uint i;
+   unsigned i;
 
    mach->pc = start_pc;
 
@@ -6004,7 +6004,7 @@ tgsi_exec_machine_run( struct tgsi_exec_machine *mach, int start_pc )
 #if DEBUG_EXECUTION
       struct tgsi_exec_vector temps[TGSI_EXEC_NUM_TEMPS];
       struct tgsi_exec_vector outputs[PIPE_MAX_ATTRIBS];
-      uint inst = 1;
+      unsigned inst = 1;
 
       if (!start_pc) {
          memset(mach->Temps, 0, sizeof(temps));
@@ -6019,7 +6019,7 @@ tgsi_exec_machine_run( struct tgsi_exec_machine *mach, int start_pc )
       while (mach->pc != -1) {
          bool barrier_hit;
 #if DEBUG_EXECUTION
-         uint i;
+         unsigned i;
 
          tgsi_dump_instruction(&mach->Instructions[mach->pc], inst++);
 #endif
@@ -6034,7 +6034,7 @@ tgsi_exec_machine_run( struct tgsi_exec_machine *mach, int start_pc )
 #if DEBUG_EXECUTION
          for (i = 0; i < TGSI_EXEC_NUM_TEMPS; i++) {
             if (memcmp(&temps[i], &mach->Temps[i], sizeof(temps[i]))) {
-               uint j;
+               unsigned j;
 
                memcpy(&temps[i], &mach->Temps[i], sizeof(temps[i]));
                debug_printf("TEMP[%2u] = ", i);
@@ -6053,7 +6053,7 @@ tgsi_exec_machine_run( struct tgsi_exec_machine *mach, int start_pc )
          if (mach->Outputs) {
             for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
                if (memcmp(&outputs[i], &mach->Outputs[i], sizeof(outputs[i]))) {
-                  uint j;
+                  unsigned j;
 
                   memcpy(&outputs[i], &mach->Outputs[i], sizeof(outputs[i]));
                   debug_printf("OUT[%2u] =  ", i);
index c8bae85..6213bb8 100644 (file)
@@ -247,12 +247,12 @@ struct tgsi_sampler
 /** function call/activation record */
 struct tgsi_call_record
 {
-   uint CondStackTop;
-   uint LoopStackTop;
-   uint ContStackTop;
+   unsigned CondStackTop;
+   unsigned LoopStackTop;
+   unsigned ContStackTop;
    int SwitchStackTop;
    int BreakStackTop;
-   uint ReturnAddr;
+   unsigned ReturnAddr;
 };
 
 /* should match draw_buffer_info */
@@ -263,9 +263,9 @@ struct tgsi_exec_consts_info {
 
 /* Switch-case block state. */
 struct tgsi_switch_record {
-   uint mask;                          /**< execution mask */
+   unsigned mask;                          /**< execution mask */
    union tgsi_exec_channel selector;   /**< a value case statements are compared to */
-   uint defaultMask;                   /**< non-execute mask for default case */
+   unsigned defaultMask;                   /**< non-execute mask for default case */
 };
 
 
@@ -347,14 +347,14 @@ struct tgsi_exec_machine
    unsigned                      LocalMemSize;
 
    /* See GLSL 4.50 specification for definition of helper invocations */
-   uint NonHelperMask;  /**< non-helpers */
+   unsigned NonHelperMask;  /**< non-helpers */
    /* Conditional execution masks */
-   uint CondMask;  /**< For IF/ELSE/ENDIF */
-   uint LoopMask;  /**< For BGNLOOP/ENDLOOP */
-   uint ContMask;  /**< For loop CONT statements */
-   uint FuncMask;  /**< For function calls */
-   uint ExecMask;  /**< = CondMask & LoopMask */
-   uint KillMask;  /**< Mask of channels killed in the current shader execution */
+   unsigned CondMask;  /**< For IF/ELSE/ENDIF */
+   unsigned LoopMask;  /**< For BGNLOOP/ENDLOOP */
+   unsigned ContMask;  /**< For loop CONT statements */
+   unsigned FuncMask;  /**< For function calls */
+   unsigned ExecMask;  /**< = CondMask & LoopMask */
+   unsigned KillMask;  /**< Mask of channels killed in the current shader execution */
 
    /* Current switch-case state. */
    struct tgsi_switch_record Switch;
@@ -363,19 +363,19 @@ struct tgsi_exec_machine
    enum tgsi_break_type BreakType;
 
    /** Condition mask stack (for nested conditionals) */
-   uint CondStack[TGSI_EXEC_MAX_COND_NESTING];
+   unsigned CondStack[TGSI_EXEC_MAX_COND_NESTING];
    int CondStackTop;
 
    /** Loop mask stack (for nested loops) */
-   uint LoopStack[TGSI_EXEC_MAX_LOOP_NESTING];
+   unsigned LoopStack[TGSI_EXEC_MAX_LOOP_NESTING];
    int LoopStackTop;
 
    /** Loop label stack */
-   uint LoopLabelStack[TGSI_EXEC_MAX_LOOP_NESTING];
+   unsigned LoopLabelStack[TGSI_EXEC_MAX_LOOP_NESTING];
    int LoopLabelStackTop;
 
    /** Loop continue mask stack (see comments in tgsi_exec.c) */
-   uint ContStack[TGSI_EXEC_MAX_LOOP_NESTING];
+   unsigned ContStack[TGSI_EXEC_MAX_LOOP_NESTING];
    int ContStackTop;
 
    /** Switch case stack */
@@ -386,7 +386,7 @@ struct tgsi_exec_machine
    int BreakStackTop;
 
    /** Function execution mask stack (for executing subroutine code) */
-   uint FuncStack[TGSI_EXEC_MAX_CALL_NESTING];
+   unsigned FuncStack[TGSI_EXEC_MAX_CALL_NESTING];
    int FuncStackTop;
 
    /** Function call stack for saving/restoring the program counter */
@@ -394,10 +394,10 @@ struct tgsi_exec_machine
    int CallStackTop;
 
    struct tgsi_full_instruction *Instructions;
-   uint NumInstructions;
+   unsigned NumInstructions;
 
    struct tgsi_full_declaration *Declarations;
-   uint NumDeclarations;
+   unsigned NumDeclarations;
 
    struct tgsi_declaration_sampler_view
       SamplerViews[PIPE_MAX_SHADER_SAMPLER_VIEWS];
index 065f3cb..7252705 100644 (file)
@@ -226,7 +226,7 @@ tgsi_opcode_infer_type(enum tgsi_opcode opcode)
  * infer the source type of a TGSI opcode.
  */
 enum tgsi_opcode_type
-tgsi_opcode_infer_src_type(enum tgsi_opcode opcode, uint src_idx)
+tgsi_opcode_infer_src_type(enum tgsi_opcode opcode, unsigned src_idx)
 {
    if (src_idx == 1 &&
        (opcode == TGSI_OPCODE_DLDEXP || opcode == TGSI_OPCODE_LDEXP))
@@ -311,7 +311,7 @@ tgsi_opcode_infer_src_type(enum tgsi_opcode opcode, uint src_idx)
  * infer the destination type of a TGSI opcode.
  */
 enum tgsi_opcode_type
-tgsi_opcode_infer_dst_type(enum tgsi_opcode opcode, uint dst_idx)
+tgsi_opcode_infer_dst_type(enum tgsi_opcode opcode, unsigned dst_idx)
 {
    return tgsi_opcode_infer_type(opcode);
 }
index 34e7af5..73a1c42 100644 (file)
@@ -109,10 +109,10 @@ static inline bool tgsi_type_is_64bit(enum tgsi_opcode_type type)
 }
 
 enum tgsi_opcode_type
-tgsi_opcode_infer_src_type(enum tgsi_opcode opcode, uint src_idx);
+tgsi_opcode_infer_src_type(enum tgsi_opcode opcode, unsigned src_idx);
 
 enum tgsi_opcode_type
-tgsi_opcode_infer_dst_type(enum tgsi_opcode opcode, uint dst_idx);
+tgsi_opcode_infer_dst_type(enum tgsi_opcode opcode, unsigned dst_idx);
 
 #if defined __cplusplus
 }
index 0b95f59..772fc6c 100644 (file)
@@ -143,7 +143,7 @@ tgsi_parse_token(
    case TGSI_TOKEN_TYPE_IMMEDIATE:
    {
       struct tgsi_full_immediate *imm = &ctx->FullToken.FullImmediate;
-      uint imm_count;
+      unsigned imm_count;
 
       memset(imm, 0, sizeof *imm);
       copy_token(&imm->Immediate, &token);
@@ -251,7 +251,7 @@ tgsi_parse_token(
    case TGSI_TOKEN_TYPE_PROPERTY:
    {
       struct tgsi_full_property *prop = &ctx->FullToken.FullProperty;
-      uint prop_count;
+      unsigned prop_count;
 
       memset(prop, 0, sizeof *prop);
       copy_token(&prop->Property, &token);
index bfd4ab3..8dd62c6 100644 (file)
@@ -526,8 +526,8 @@ tgsi_add_point_sprite(const struct tgsi_token *tokens_in,
                       int *aa_point_coord_index)
 {
    struct psprite_transform_context transform;
-   const uint num_new_tokens = 200; /* should be enough */
-   const uint new_len = tgsi_num_tokens(tokens_in) + num_new_tokens;
+   const unsigned num_new_tokens = 200; /* should be enough */
+   const unsigned new_len = tgsi_num_tokens(tokens_in) + num_new_tokens;
    struct tgsi_token *new_tokens;
 
    /* setup transformation context */
index 0e0e398..273459a 100644 (file)
@@ -42,7 +42,7 @@ typedef struct {
    uint32_t file : 28;
    /* max 2 dimensions */
    uint32_t dimensions : 4;
-   uint indices[2];
+   unsigned indices[2];
 } scan_register;
 
 struct sanity_check_ctx
@@ -52,14 +52,14 @@ struct sanity_check_ctx
    struct cso_hash regs_used;
    struct cso_hash regs_ind_used;
 
-   uint num_imms;
-   uint num_instructions;
-   uint index_of_END;
+   unsigned num_imms;
+   unsigned num_instructions;
+   unsigned index_of_END;
 
-   uint errors;
-   uint warnings;
-   uint implied_array_size;
-   uint implied_out_array_size;
+   unsigned errors;
+   unsigned warnings;
+   unsigned implied_array_size;
+   unsigned implied_out_array_size;
 
    bool print;
 };
@@ -76,7 +76,7 @@ scan_register_key(const scan_register *reg)
 
 static void
 fill_scan_register1d(scan_register *reg,
-                     enum tgsi_file_type file, uint index)
+                     enum tgsi_file_type file, unsigned index)
 {
    reg->file = file;
    reg->dimensions = 1;
@@ -86,7 +86,8 @@ fill_scan_register1d(scan_register *reg,
 
 static void
 fill_scan_register2d(scan_register *reg,
-                     enum tgsi_file_type file, uint index1, uint index2)
+                     enum tgsi_file_type file,
+                     unsigned index1, unsigned index2)
 {
    reg->file = file;
    reg->dimensions = 2;
@@ -311,7 +312,7 @@ iter_instruction(
 {
    struct sanity_check_ctx *ctx = (struct sanity_check_ctx *) iter;
    const struct tgsi_opcode_info *info;
-   uint i;
+   unsigned i;
 
    if (inst->Instruction.Opcode == TGSI_OPCODE_END) {
       if (ctx->index_of_END != ~0u) {
@@ -395,7 +396,7 @@ iter_declaration(
 {
    struct sanity_check_ctx *ctx = (struct sanity_check_ctx *) iter;
    enum tgsi_file_type file;
-   uint i;
+   unsigned i;
 
    /* No declarations allowed after the first instruction.
     */
@@ -411,15 +412,15 @@ iter_declaration(
    for (i = decl->Range.First; i <= decl->Range.Last; i++) {
       /* declared TGSI_FILE_INPUT's for geometry and tessellation
        * have an implied second dimension */
-      uint processor = ctx->iter.processor.Processor;
-      uint patch = decl->Semantic.Name == TGSI_SEMANTIC_PATCH ||
+      unsigned processor = ctx->iter.processor.Processor;
+      unsigned patch = decl->Semantic.Name == TGSI_SEMANTIC_PATCH ||
          decl->Semantic.Name == TGSI_SEMANTIC_TESSOUTER ||
          decl->Semantic.Name == TGSI_SEMANTIC_TESSINNER;
       if (file == TGSI_FILE_INPUT && !patch && (
                 processor == PIPE_SHADER_GEOMETRY ||
                 processor == PIPE_SHADER_TESS_CTRL ||
                 processor == PIPE_SHADER_TESS_EVAL)) {
-         uint vert;
+         unsigned vert;
          for (vert = 0; vert < ctx->implied_array_size; ++vert) {
             scan_register *reg = MALLOC(sizeof(scan_register));
             fill_scan_register2d(reg, file, i, vert);
@@ -427,7 +428,7 @@ iter_declaration(
          }
       } else if (file == TGSI_FILE_OUTPUT && !patch &&
                  processor == PIPE_SHADER_TESS_CTRL) {
-         uint vert;
+         unsigned vert;
          for (vert = 0; vert < ctx->implied_out_array_size; ++vert) {
             scan_register *reg = MALLOC(sizeof(scan_register));
             fill_scan_register2d(reg, file, i, vert);
index 6eaff0e..5ac133f 100644 (file)
@@ -606,7 +606,7 @@ scan_declaration(struct tgsi_shader_info *info,
 {
    enum tgsi_file_type file = fulldecl->Declaration.File;
    const unsigned procType = info->processor;
-   uint reg;
+   unsigned reg;
 
    if (fulldecl->Declaration.Array) {
       unsigned array_id = fulldecl->Array.ArrayID;
@@ -831,7 +831,7 @@ scan_declaration(struct tgsi_shader_info *info,
 static void
 scan_immediate(struct tgsi_shader_info *info)
 {
-   uint reg = info->immediate_count++;
+   unsigned reg = info->immediate_count++;
    enum tgsi_file_type file = TGSI_FILE_IMMEDIATE;
 
    info->file_mask[file] |= (1 << reg);
@@ -872,7 +872,7 @@ void
 tgsi_scan_shader(const struct tgsi_token *tokens,
                  struct tgsi_shader_info *info)
 {
-   uint procType, i;
+   unsigned procType, i;
    struct tgsi_parse_context parse;
    unsigned current_depth = 0;
 
index d52555b..2c3795c 100644 (file)
@@ -42,7 +42,7 @@ extern "C" {
  */
 struct tgsi_shader_info
 {
-   uint num_tokens;
+   unsigned num_tokens;
 
    uint8_t num_inputs;
    uint8_t num_outputs;
@@ -62,7 +62,7 @@ struct tgsi_shader_info
    uint8_t processor;
 
    uint32_t file_mask[TGSI_FILE_COUNT];  /**< bitmask of declared registers */
-   uint file_count[TGSI_FILE_COUNT];  /**< number of declared registers */
+   unsigned file_count[TGSI_FILE_COUNT];  /**< number of declared registers */
    int file_max[TGSI_FILE_COUNT];  /**< highest index of declared registers */
    int const_file_max[PIPE_MAX_CONSTANT_BUFFERS];
    unsigned const_buffers_declared; /**< bitmask of declared const buffers */
@@ -75,11 +75,11 @@ struct tgsi_shader_info
    uint8_t output_array_first[PIPE_MAX_SHADER_OUTPUTS];
    unsigned array_max[TGSI_FILE_COUNT];  /**< highest index array per register file */
 
-   uint immediate_count; /**< number of immediates declared */
-   uint num_instructions;
-   uint num_memory_instructions; /**< sampler, buffer, and image instructions */
+   unsigned immediate_count; /**< number of immediates declared */
+   unsigned num_instructions;
+   unsigned num_memory_instructions; /**< sampler, buffer, and image instructions */
 
-   uint opcode_count[TGSI_OPCODE_LAST];  /**< opcode histogram */
+   unsigned opcode_count[TGSI_OPCODE_LAST];  /**< opcode histogram */
 
    /**
     * If a tessellation control shader reads outputs, this describes which ones.
index 11ab803..e2480a3 100644 (file)
@@ -178,7 +178,7 @@ static bool eat_white( const char **pcur )
 /* Parse unsigned integer.
  * No checks for overflow.
  */
-static bool parse_uint( const char **pcur, uint *val )
+static bool parse_uint( const char **pcur, unsigned *val )
 {
    const char *cur = *pcur;
 
@@ -200,7 +200,7 @@ static bool parse_int( const char **pcur, int *val )
    if (*cur == '+' || *cur == '-')
       cur++;
 
-   if (parse_uint(&cur, (uint *)val)) {
+   if (parse_uint(&cur, (unsigned *)val)) {
       *val *= sign;
       *pcur = cur;
       return true;
@@ -363,7 +363,7 @@ static bool parse_header( struct translate_ctx *ctx )
    return true;
 }
 
-static bool parse_label( struct translate_ctx *ctx, uint *val )
+static bool parse_label( struct translate_ctx *ctx, unsigned *val )
 {
    const char *cur = ctx->cur;
 
@@ -398,7 +398,7 @@ parse_file( const char **pcur, enum tgsi_file_type *file )
 static bool
 parse_opt_writemask(
    struct translate_ctx *ctx,
-   uint *writemask )
+   unsigned *writemask )
 {
    const char *cur;
 
@@ -467,7 +467,7 @@ parse_register_file_bracket_index(
    enum tgsi_file_type *file,
    int *index )
 {
-   uint uindex;
+   unsigned uindex;
 
    if (!parse_register_file_bracket( ctx, file ))
       return false;
@@ -504,8 +504,8 @@ struct parsed_bracket {
 
    enum tgsi_file_type ind_file;
    int ind_index;
-   uint ind_comp;
-   uint ind_array;
+   unsigned ind_comp;
+   unsigned ind_array;
 };
 
 
@@ -515,7 +515,7 @@ parse_register_bracket(
    struct parsed_bracket *brackets)
 {
    const char *cur;
-   uint uindex;
+   unsigned uindex;
 
    memset(brackets, 0, sizeof(struct parsed_bracket));
 
@@ -637,8 +637,8 @@ parse_register_src(
 }
 
 struct parsed_dcl_bracket {
-   uint first;
-   uint last;
+   unsigned first;
+   unsigned last;
 };
 
 static bool
@@ -646,7 +646,7 @@ parse_register_dcl_bracket(
    struct translate_ctx *ctx,
    struct parsed_dcl_bracket *bracket)
 {
-   uint uindex;
+   unsigned uindex;
    memset(bracket, 0, sizeof(struct parsed_dcl_bracket));
 
    eat_opt_white( &ctx->cur );
@@ -667,7 +667,7 @@ parse_register_dcl_bracket(
    eat_opt_white( &ctx->cur );
 
    if (ctx->cur[0] == '.' && ctx->cur[1] == '.') {
-      uint uindex;
+      unsigned uindex;
 
       ctx->cur += 2;
       eat_opt_white( &ctx->cur );
@@ -767,7 +767,7 @@ parse_dst_operand(
    struct tgsi_full_dst_register *dst )
 {
    enum tgsi_file_type file;
-   uint writemask;
+   unsigned writemask;
    const char *cur;
    struct parsed_bracket bracket[2];
    int parsed_opt_brackets;
@@ -814,7 +814,7 @@ parse_dst_operand(
 static bool
 parse_optional_swizzle(
    struct translate_ctx *ctx,
-   uint *swizzle,
+   unsigned *swizzle,
    bool *parsed_swizzle,
    int components)
 {
@@ -855,7 +855,7 @@ parse_src_operand(
    struct tgsi_full_src_register *src )
 {
    enum tgsi_file_type file;
-   uint swizzle[4];
+   unsigned swizzle[4];
    bool parsed_swizzle;
    struct parsed_bracket bracket[2];
    int parsed_opt_brackets;
@@ -931,7 +931,7 @@ parse_texoffset_operand(
    struct tgsi_texture_offset *src )
 {
    enum tgsi_file_type file;
-   uint swizzle[3];
+   unsigned swizzle[3];
    bool parsed_swizzle;
    struct parsed_bracket bracket;
 
@@ -996,12 +996,12 @@ parse_instruction(
    bool has_label )
 {
    int i;
-   uint saturate = 0;
-   uint precise = 0;
+   unsigned saturate = 0;
+   unsigned precise = 0;
    const struct tgsi_opcode_info *info;
    struct tgsi_full_instruction inst;
    const char *cur;
-   uint advance;
+   unsigned advance;
 
    inst = tgsi_default_full_instruction();
 
@@ -1078,7 +1078,7 @@ parse_instruction(
             return false;
       }
       else {
-         uint j;
+         unsigned j;
 
          for (j = 0; j < TGSI_TEXTURE_COUNT; j++) {
             if (str_match_nocase_whole( &ctx->cur, tgsi_texture_names[j] )) {
@@ -1145,7 +1145,7 @@ parse_instruction(
    cur = ctx->cur;
    eat_opt_white( &cur );
    if (info->is_branch && *cur == ':') {
-      uint target;
+      unsigned target;
 
       cur++;
       eat_opt_white( &cur );
@@ -1162,7 +1162,7 @@ parse_instruction(
       &inst,
       ctx->tokens_cur,
       ctx->header,
-      (uint) (ctx->tokens_end - ctx->tokens_cur) );
+      (unsigned) (ctx->tokens_end - ctx->tokens_cur) );
    if (advance == 0)
       return false;
    ctx->tokens_cur += advance;
@@ -1244,9 +1244,9 @@ static bool parse_declaration( struct translate_ctx *ctx )
    enum tgsi_file_type file;
    struct parsed_dcl_bracket brackets[2];
    int num_brackets;
-   uint writemask;
+   unsigned writemask;
    const char *cur, *cur2;
-   uint advance;
+   unsigned advance;
    bool is_vs_input;
 
    if (!eat_white( &ctx->cur )) {
@@ -1307,7 +1307,7 @@ static bool parse_declaration( struct translate_ctx *ctx )
    }
 
    if (*cur == ',' && !is_vs_input) {
-      uint i, j;
+      unsigned i, j;
 
       cur++;
       eat_opt_white( &cur );
@@ -1446,7 +1446,7 @@ static bool parse_declaration( struct translate_ctx *ctx )
 
             for (i = 0; i < TGSI_SEMANTIC_COUNT; i++) {
                if (str_match_nocase_whole(&cur, tgsi_semantic_names[i])) {
-                  uint index;
+                  unsigned index;
 
                   cur2 = cur;
                   eat_opt_white( &cur2 );
@@ -1487,7 +1487,7 @@ static bool parse_declaration( struct translate_ctx *ctx )
       cur++;
       eat_opt_white(&cur);
       if (str_match_nocase_whole(&cur, "STREAM")) {
-         uint stream[4];
+         unsigned stream[4];
 
          eat_opt_white(&cur);
          if (*cur != '(') {
@@ -1531,7 +1531,7 @@ static bool parse_declaration( struct translate_ctx *ctx )
    cur = ctx->cur;
    eat_opt_white( &cur );
    if (*cur == ',' && !is_vs_input) {
-      uint i;
+      unsigned i;
 
       cur++;
       eat_opt_white( &cur );
@@ -1549,7 +1549,7 @@ static bool parse_declaration( struct translate_ctx *ctx )
    cur = ctx->cur;
    eat_opt_white( &cur );
    if (*cur == ',' && !is_vs_input) {
-      uint i;
+      unsigned i;
 
       cur++;
       eat_opt_white( &cur );
@@ -1581,7 +1581,7 @@ static bool parse_declaration( struct translate_ctx *ctx )
       &decl,
       ctx->tokens_cur,
       ctx->header,
-      (uint) (ctx->tokens_end - ctx->tokens_cur) );
+      (unsigned) (ctx->tokens_end - ctx->tokens_cur) );
 
    if (advance == 0)
       return false;
@@ -1593,11 +1593,11 @@ static bool parse_declaration( struct translate_ctx *ctx )
 static bool parse_immediate( struct translate_ctx *ctx )
 {
    struct tgsi_full_immediate imm;
-   uint advance;
-   uint type;
+   unsigned advance;
+   unsigned type;
 
    if (*ctx->cur == '[') {
-      uint uindex;
+      unsigned uindex;
 
       ++ctx->cur;
 
@@ -1643,7 +1643,7 @@ static bool parse_immediate( struct translate_ctx *ctx )
       &imm,
       ctx->tokens_cur,
       ctx->header,
-      (uint) (ctx->tokens_end - ctx->tokens_cur) );
+      (unsigned) (ctx->tokens_end - ctx->tokens_cur) );
    if (advance == 0)
       return false;
    ctx->tokens_cur += advance;
@@ -1654,9 +1654,9 @@ static bool parse_immediate( struct translate_ctx *ctx )
 }
 
 static bool
-parse_primitive( const char **pcur, uint *primitive )
+parse_primitive( const char **pcur, unsigned *primitive )
 {
-   uint i;
+   unsigned i;
 
    for (i = 0; i < MESA_PRIM_COUNT; i++) {
       const char *cur = *pcur;
@@ -1671,9 +1671,9 @@ parse_primitive( const char **pcur, uint *primitive )
 }
 
 static bool
-parse_fs_coord_origin( const char **pcur, uint *fs_coord_origin )
+parse_fs_coord_origin( const char **pcur, unsigned *fs_coord_origin )
 {
-   uint i;
+   unsigned i;
 
    for (i = 0; i < ARRAY_SIZE(tgsi_fs_coord_origin_names); i++) {
       const char *cur = *pcur;
@@ -1688,9 +1688,9 @@ parse_fs_coord_origin( const char **pcur, uint *fs_coord_origin )
 }
 
 static bool
-parse_fs_coord_pixel_center( const char **pcur, uint *fs_coord_pixel_center )
+parse_fs_coord_pixel_center( const char **pcur, unsigned *fs_coord_pixel_center )
 {
-   uint i;
+   unsigned i;
 
    for (i = 0; i < ARRAY_SIZE(tgsi_fs_coord_pixel_center_names); i++) {
       const char *cur = *pcur;
@@ -1705,9 +1705,9 @@ parse_fs_coord_pixel_center( const char **pcur, uint *fs_coord_pixel_center )
 }
 
 static bool
-parse_property_next_shader( const char **pcur, uint *next_shader )
+parse_property_next_shader( const char **pcur, unsigned *next_shader )
 {
-   uint i;
+   unsigned i;
 
    for (i = 0; i < ARRAY_SIZE(tgsi_processor_type_names); i++) {
       const char *cur = *pcur;
@@ -1725,8 +1725,8 @@ static bool parse_property( struct translate_ctx *ctx )
 {
    struct tgsi_full_property prop;
    enum tgsi_property_name property_name;
-   uint values[8];
-   uint advance;
+   unsigned values[8];
+   unsigned advance;
    char id[64];
 
    if (!eat_white( &ctx->cur )) {
@@ -1796,7 +1796,7 @@ static bool parse_property( struct translate_ctx *ctx )
       &prop,
       ctx->tokens_cur,
       ctx->header,
-      (uint) (ctx->tokens_end - ctx->tokens_cur) );
+      (unsigned) (ctx->tokens_end - ctx->tokens_cur) );
    if (advance == 0)
       return false;
    ctx->tokens_cur += advance;
@@ -1816,7 +1816,7 @@ static bool translate( struct translate_ctx *ctx )
        ctx->implied_array_size = 32;
 
    while (*ctx->cur != '\0') {
-      uint label_val = 0;
+      unsigned label_val = 0;
       if (!eat_white( &ctx->cur )) {
          report_error( ctx, "Syntax error" );
          return false;
@@ -1852,7 +1852,7 @@ bool
 tgsi_text_translate(
    const char *text,
    struct tgsi_token *tokens,
-   uint num_tokens )
+   unsigned num_tokens )
 {
    struct translate_ctx ctx = {0};
 
index 3b8de2c..78fbcfc 100644 (file)
@@ -40,7 +40,7 @@ bool
 tgsi_text_translate(
    const char *text,
    struct tgsi_token *tokens,
-   uint num_tokens );
+   unsigned num_tokens );
 
 #if defined __cplusplus
 }
index 78753ce..022cf11 100644 (file)
@@ -149,7 +149,7 @@ emit_property(struct tgsi_transform_context *ctx,
  */
 struct tgsi_token *
 tgsi_transform_shader(const struct tgsi_token *tokens_in,
-                      uint initial_tokens_len,
+                      unsigned initial_tokens_len,
                       struct tgsi_transform_context *ctx)
 {
    bool first_instruction = true;
@@ -340,7 +340,7 @@ tgsi_transform_shader(const struct tgsi_token *tokens_in,
 #include "tgsi_text.h"
 
 extern int tgsi_transform_foo( struct tgsi_token *tokens_out,
-                               uint max_tokens_out );
+                               unsigned max_tokens_out );
 
 /* This function exists only so that tgsi_text_translate() doesn't get
  * magic-ed out of the libtgsi.a archive by the build system.  Don't
@@ -349,7 +349,7 @@ extern int tgsi_transform_foo( struct tgsi_token *tokens_out,
  */
 int
 tgsi_transform_foo( struct tgsi_token *tokens_out,
-                    uint max_tokens_out )
+                    unsigned max_tokens_out )
 {
    const char *text = 
       "FRAG\n"
index 2e88159..2d8c595 100644 (file)
@@ -87,9 +87,9 @@ struct tgsi_transform_context
                          const struct tgsi_full_property *prop);
 
    struct tgsi_header *header;
-   uint max_tokens_out;
+   unsigned max_tokens_out;
    struct tgsi_token *tokens_out;
-   uint ti;
+   unsigned ti;
    bool fail;
 };
 
@@ -544,7 +544,7 @@ tgsi_transform_tex_inst(struct tgsi_transform_context *ctx,
 
 extern struct tgsi_token *
 tgsi_transform_shader(const struct tgsi_token *tokens_in,
-                      uint initial_tokens_len,
+                      unsigned initial_tokens_len,
                       struct tgsi_transform_context *ctx);
 
 
index d4c8bf5..d88c3dd 100644 (file)
 struct two_side_transform_context
 {
    struct tgsi_transform_context base;
-   uint num_temps;
-   uint num_inputs;
-   uint face_input;           /**< index of the FACE input */
-   uint front_color_input[2]; /**< INPUT regs */
+   unsigned num_temps;
+   unsigned num_inputs;
+   unsigned face_input;           /**< index of the FACE input */
+   unsigned front_color_input[2]; /**< INPUT regs */
    enum tgsi_interpolate_mode front_color_interp[2];/**< TGSI_INTERPOLATE_x */
-   uint back_color_input[2];  /**< INPUT regs */
-   uint new_colors[2];        /**< TEMP regs */
+   unsigned back_color_input[2];  /**< INPUT regs */
+   unsigned new_colors[2];        /**< TEMP regs */
 };
 
 
@@ -100,8 +100,8 @@ emit_prolog(struct tgsi_transform_context *ctx)
    struct two_side_transform_context *ts = two_side_transform_context(ctx);
    struct tgsi_full_declaration decl;
    struct tgsi_full_instruction inst;
-   uint num_colors = 0;
-   uint i;
+   unsigned num_colors = 0;
+   unsigned i;
 
    /* Declare 0, 1 or 2 new BCOLOR inputs */
    for (i = 0; i < 2; i++) {
@@ -174,7 +174,7 @@ xform_inst(struct tgsi_transform_context *ctx,
    struct two_side_transform_context *ts = two_side_transform_context(ctx);
    const struct tgsi_opcode_info *info =
       tgsi_get_opcode_info(inst->Instruction.Opcode);
-   uint i, j;
+   unsigned i, j;
 
    /* Look for src regs which reference the input color and replace
     * them with the temp color.
@@ -200,8 +200,8 @@ struct tgsi_token *
 tgsi_add_two_side(const struct tgsi_token *tokens_in)
 {
    struct two_side_transform_context transform;
-   const uint num_new_tokens = 100; /* should be enough */
-   const uint new_len = tgsi_num_tokens(tokens_in) + num_new_tokens;
+   const unsigned num_new_tokens = 100; /* should be enough */
+   const unsigned new_len = tgsi_num_tokens(tokens_in) + num_new_tokens;
 
    /* setup transformation context */
    memset(&transform, 0, sizeof(transform));
index 113c619..eb637ef 100644 (file)
@@ -536,7 +536,7 @@ ureg_DECL_constant2D(struct ureg_program *ureg,
    assert(index2D < PIPE_MAX_CONSTANT_BUFFERS);
 
    if (decl->nr_constant_ranges < UREG_MAX_CONSTANT_RANGE) {
-      uint i = decl->nr_constant_ranges++;
+      unsigned i = decl->nr_constant_ranges++;
 
       decl->constant_range[i].first = first;
       decl->constant_range[i].last = last;
@@ -622,7 +622,7 @@ ureg_DECL_hw_atomic(struct ureg_program *ureg,
    struct hw_atomic_decl *decl = &ureg->hw_atomic_decls[buffer_id];
 
    if (decl->nr_hw_atomic_ranges < UREG_MAX_HW_ATOMIC_RANGE) {
-      uint i = decl->nr_hw_atomic_ranges++;
+      unsigned i = decl->nr_hw_atomic_ranges++;
 
       decl->hw_atomic_range[i].first = first;
       decl->hw_atomic_range[i].last = last;
@@ -753,7 +753,7 @@ ureg_DECL_sampler_view(struct ureg_program *ureg,
                        enum tgsi_return_type return_type_w)
 {
    struct ureg_src reg = ureg_src_register(TGSI_FILE_SAMPLER_VIEW, index);
-   uint i;
+   unsigned i;
 
    for (i = 0; i < ureg->nr_sampler_views; i++) {
       if (ureg->sampler_view[i].index == index) {
@@ -1042,8 +1042,8 @@ ureg_DECL_immediate_block_uint( struct ureg_program *ureg,
                                 const unsigned *v,
                                 unsigned nr )
 {
-   uint index;
-   uint i;
+   unsigned index;
+   unsigned i;
 
    if (ureg->nr_immediates + (nr + 3) / 4 > UREG_MAX_IMMEDIATE) {
       set_bad(ureg);
@@ -1058,7 +1058,7 @@ ureg_DECL_immediate_block_uint( struct ureg_program *ureg,
       ureg->immediate[i].nr = nr > 4 ? 4 : nr;
       memcpy(ureg->immediate[i].value.u,
              &v[(i - index) * 4],
-             ureg->immediate[i].nr * sizeof(uint));
+             ureg->immediate[i].nr * sizeof(unsigned));
       nr -= 4;
    }
 
@@ -1265,7 +1265,7 @@ ureg_emit_insn(struct ureg_program *ureg,
                unsigned num_src)
 {
    union tgsi_any_token *out;
-   uint count = 1;
+   unsigned count = 1;
    struct ureg_emit_insn_result result;
 
    validate( opcode, num_dst, num_src );
@@ -2008,7 +2008,7 @@ static void emit_decls( struct ureg_program *ureg )
       struct const_decl *decl = &ureg->const_decls[i];
 
       if (decl->nr_constant_ranges) {
-         uint j;
+         unsigned j;
 
          for (j = 0; j < decl->nr_constant_ranges; j++) {
             emit_decl_range2D(ureg,
@@ -2024,7 +2024,7 @@ static void emit_decls( struct ureg_program *ureg )
       struct hw_atomic_decl *decl = &ureg->hw_atomic_decls[i];
 
       if (decl->nr_hw_atomic_ranges) {
-         uint j;
+         unsigned j;
 
          /* GLSL-to-TGSI generated HW atomic counters in order, and r600 depends
           * on it.
@@ -2236,7 +2236,7 @@ struct ureg_program *
 ureg_create_with_screen(enum pipe_shader_type processor,
                         struct pipe_screen *screen)
 {
-   uint i;
+   unsigned i;
    struct ureg_program *ureg = CALLOC_STRUCT( ureg_program );
    if (!ureg)
       goto no_ureg;
index 869a8e6..e1f0c48 100644 (file)
@@ -85,8 +85,8 @@ tgsi_write_vpos(const struct tgsi_token *tokens_in,
                 unsigned num_immediates)
 {
    struct write_vpos_context transform;
-   const uint num_new_tokens = 1000; /* should be enough */
-   const uint new_len = tgsi_num_tokens(tokens_in) + num_new_tokens;
+   const unsigned num_new_tokens = 1000; /* should be enough */
+   const unsigned new_len = tgsi_num_tokens(tokens_in) + num_new_tokens;
 
    /* setup transformation context */
    memset(&transform, 0, sizeof(transform));