Mesa (main): i915g: Finish the uint -> uint32_t conversion.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 30 17:49:19 UTC 2021


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

Author: Emma Anholt <emma at anholt.net>
Date:   Tue Jun 29 20:32:08 2021 -0700

i915g: Finish the uint -> uint32_t conversion.

My sed job missed a few.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11648>

---

 src/gallium/drivers/i915/i915_fpc_emit.c      | 18 +++++++++---------
 src/gallium/drivers/i915/i915_fpc_translate.c | 19 ++++++++++---------
 src/gallium/drivers/i915/i915_state_derived.c |  2 +-
 src/gallium/drivers/i915/i915_state_sampler.c |  2 +-
 4 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/src/gallium/drivers/i915/i915_fpc_emit.c b/src/gallium/drivers/i915/i915_fpc_emit.c
index 936d2e7eef9..93be86a344d 100644
--- a/src/gallium/drivers/i915/i915_fpc_emit.c
+++ b/src/gallium/drivers/i915/i915_fpc_emit.c
@@ -30,7 +30,7 @@
 #include "i915_fpc.h"
 #include "i915_reg.h"
 
-uint
+uint32_t
 i915_get_temp(struct i915_fp_compile *p)
 {
    int bit = ffs(~p->temp_flag);
@@ -53,7 +53,7 @@ i915_release_temp(struct i915_fp_compile *p, int reg)
  * Get unpreserved temporary, a temp whose value is not preserved between
  * PS program phases.
  */
-uint
+uint32_t
 i915_get_utemp(struct i915_fp_compile *p)
 {
    int bit = ffs(~p->utemp_flag);
@@ -72,7 +72,7 @@ i915_release_utemps(struct i915_fp_compile *p)
    p->utemp_flag = ~0x7;
 }
 
-uint
+uint32_t
 i915_emit_decl(struct i915_fp_compile *p, uint32_t type, uint32_t nr,
                uint32_t d0_flags)
 {
@@ -102,7 +102,7 @@ i915_emit_decl(struct i915_fp_compile *p, uint32_t type, uint32_t nr,
    return reg;
 }
 
-uint
+uint32_t
 i915_emit_arith(struct i915_fp_compile *p, uint32_t op, uint32_t dest,
                 uint32_t mask, uint32_t saturate, uint32_t src0, uint32_t src1,
                 uint32_t src2)
@@ -173,7 +173,7 @@ i915_emit_arith(struct i915_fp_compile *p, uint32_t op, uint32_t dest,
  * \param coord  the i915 source texcoord operand
  * \param opcode  the instruction opcode
  */
-uint
+uint32_t
 i915_emit_texld(struct i915_fp_compile *p, uint32_t dest, uint32_t destmask,
                 uint32_t sampler, uint32_t coord, uint32_t opcode,
                 uint32_t num_coord)
@@ -263,7 +263,7 @@ i915_emit_texld(struct i915_fp_compile *p, uint32_t dest, uint32_t destmask,
    return dest;
 }
 
-uint
+uint32_t
 i915_emit_const1f(struct i915_fp_compile *p, float c0)
 {
    struct i915_fragment_shader *ifs = p->shader;
@@ -293,7 +293,7 @@ i915_emit_const1f(struct i915_fp_compile *p, float c0)
    return 0;
 }
 
-uint
+uint32_t
 i915_emit_const2f(struct i915_fp_compile *p, float c0, float c1)
 {
    struct i915_fragment_shader *ifs = p->shader;
@@ -331,7 +331,7 @@ i915_emit_const2f(struct i915_fp_compile *p, float c0, float c1)
    return 0;
 }
 
-uint
+uint32_t
 i915_emit_const4f(struct i915_fp_compile *p, float c0, float c1, float c2,
                   float c3)
 {
@@ -362,7 +362,7 @@ i915_emit_const4f(struct i915_fp_compile *p, float c0, float c1, float c2,
    return 0;
 }
 
-uint
+uint32_t
 i915_emit_const4fv(struct i915_fp_compile *p, const float *c)
 {
    return i915_emit_const4f(p, c[0], c[1], c[2], c[3]);
diff --git a/src/gallium/drivers/i915/i915_fpc_translate.c b/src/gallium/drivers/i915/i915_fpc_translate.c
index 6c8291f76bf..745252bef11 100644
--- a/src/gallium/drivers/i915/i915_fpc_translate.c
+++ b/src/gallium/drivers/i915/i915_fpc_translate.c
@@ -119,7 +119,7 @@ i915_program_error(struct i915_fp_compile *p, const char *msg, ...)
    p->error = 1;
 }
 
-static uint
+static uint32_t
 get_mapping(struct i915_fragment_shader *fs, int unit)
 {
    int i;
@@ -139,7 +139,7 @@ get_mapping(struct i915_fragment_shader *fs, int unit)
  * Construct a ureg for the given source register.  Will emit
  * constants, apply swizzling and negation as needed.
  */
-static uint
+static uint32_t
 src_vector(struct i915_fp_compile *p,
            const struct i915_full_src_register *source,
            struct i915_fragment_shader *fs)
@@ -248,7 +248,7 @@ src_vector(struct i915_fp_compile *p,
 /**
  * Construct a ureg for a destination register.
  */
-static uint
+static uint32_t
 get_result_vector(struct i915_fp_compile *p,
                   const struct i915_full_dst_register *dest)
 {
@@ -277,7 +277,7 @@ get_result_vector(struct i915_fp_compile *p,
 /**
  * Compute flags for saturation and writemask.
  */
-static uint
+static uint32_t
 get_result_flags(const struct i915_full_instruction *inst)
 {
    const uint32_t writeMask = inst->Dst[0].Register.WriteMask;
@@ -301,7 +301,7 @@ get_result_flags(const struct i915_full_instruction *inst)
 /**
  * Convert TGSI_TEXTURE_x token to DO_SAMPLE_TYPE_x token
  */
-static uint
+static uint32_t
 translate_tex_src_target(struct i915_fp_compile *p, uint32_t tex)
 {
    switch (tex) {
@@ -335,7 +335,7 @@ translate_tex_src_target(struct i915_fp_compile *p, uint32_t tex)
 /**
  * Return the number of coords needed to access a given TGSI_TEXTURE_*
  */
-uint
+uint32_t
 i915_num_coords(uint32_t tex)
 {
    switch (tex) {
@@ -1026,9 +1026,10 @@ i915_fini_compile(struct i915_context *i915, struct i915_fp_compile *p)
       assert(!ifs->program);
 
       ifs->program_len = decl_size + program_size;
-      ifs->program = (uint32_t *)MALLOC(ifs->program_len * sizeof(uint));
-      memcpy(ifs->program, p->declarations, decl_size * sizeof(uint));
-      memcpy(&ifs->program[decl_size], p->program, program_size * sizeof(uint));
+      ifs->program = (uint32_t *)MALLOC(ifs->program_len * sizeof(uint32_t));
+      memcpy(ifs->program, p->declarations, decl_size * sizeof(uint32_t));
+      memcpy(&ifs->program[decl_size], p->program,
+             program_size * sizeof(uint32_t));
    }
 
    /* Release the compilation struct:
diff --git a/src/gallium/drivers/i915/i915_state_derived.c b/src/gallium/drivers/i915/i915_state_derived.c
index b2615f308d3..76ef6ab0e9c 100644
--- a/src/gallium/drivers/i915/i915_state_derived.c
+++ b/src/gallium/drivers/i915/i915_state_derived.c
@@ -35,7 +35,7 @@
 #include "i915_reg.h"
 #include "i915_state.h"
 
-static uint
+static uint32_t
 find_mapping(const struct i915_fragment_shader *fs, int unit)
 {
    int i;
diff --git a/src/gallium/drivers/i915/i915_state_sampler.c b/src/gallium/drivers/i915/i915_state_sampler.c
index 8dad1d10bb6..97d1d02c234 100644
--- a/src/gallium/drivers/i915/i915_state_sampler.c
+++ b/src/gallium/drivers/i915/i915_state_sampler.c
@@ -179,7 +179,7 @@ struct i915_tracked_state i915_hw_samplers = {
  * Sampler views
  */
 
-static uint
+static uint32_t
 translate_texture_format(enum pipe_format pipeFormat,
                          const struct pipe_sampler_view *view)
 {



More information about the mesa-commit mailing list