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

Author: Erik Faye-Lund <[email protected]>
Date:   Fri Jun 23 14:36:29 2023 +0200

draw: use uint32_t instead of uint

In these cases we actually want uint32_t, because we're doing 32-bit
things to them.

The hwinfo-bit is only being used by i915, and should probably be
moved to i915 instead. But it shoukd *also* be converted, so let's do
that now.

While we're at it, fixup the bit-setting as well.

Reviewed-by: Eric Engestrom <[email protected]>
Reviewed-by: Yonggang Luo <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23833>

---

 src/gallium/auxiliary/draw/draw_pipe_aapoint.c | 4 ++--
 src/gallium/auxiliary/draw/draw_vertex.h       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c 
b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
index b1b66f6532f..12d5ed0fe40 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
@@ -122,7 +122,7 @@ struct aapoint_stage
  */
 struct aa_transform_context {
    struct tgsi_transform_context base;
-   uint tempsUsed;  /**< bitmask */
+   uint32_t tempsUsed;  /**< bitmask */
    int colorOutput; /**< which output is the primary color */
    int maxInput, maxGeneric;  /**< max input index found */
    int tmp0, colorTemp;  /**< temp registers */
@@ -156,7 +156,7 @@ aa_transform_decl(struct tgsi_transform_context *ctx,
       uint i;
       for (i = decl->Range.First;
            i <= decl->Range.Last; i++) {
-         aactx->tempsUsed |= (1 << i);
+         aactx->tempsUsed |= 1u << i;
       }
    }
 
diff --git a/src/gallium/auxiliary/draw/draw_vertex.h 
b/src/gallium/auxiliary/draw/draw_vertex.h
index 7da4bf38a01..af912ca7e3e 100644
--- a/src/gallium/auxiliary/draw/draw_vertex.h
+++ b/src/gallium/auxiliary/draw/draw_vertex.h
@@ -67,7 +67,7 @@ enum attrib_emit {
 struct vertex_info
 {
    uint num_attribs;
-   uint hwfmt[4];      /**< hardware format info for this format */
+   uint32_t hwfmt[4];  /**< hardware format info for this format */
    uint size;          /**< total vertex size in dwords */
 
    /* Keep this small and at the end of the struct to allow quick

Reply via email to