Mesa (master): nv50: use unsigned int for bitfields to silence warnings

Brian Paul brianp at kemper.freedesktop.org
Wed Sep 15 19:57:21 UTC 2010


Module: Mesa
Branch: master
Commit: 68cfc8e996fc33ec680c4153e862dcc762e760fc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=68cfc8e996fc33ec680c4153e862dcc762e760fc

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Sep 15 12:51:09 2010 -0600

nv50: use unsigned int for bitfields to silence warnings

---

 src/gallium/drivers/nv50/nv50_pc.h      |   26 +++++++++++++-------------
 src/gallium/drivers/nv50/nv50_program.h |    6 +++---
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/gallium/drivers/nv50/nv50_pc.h b/src/gallium/drivers/nv50/nv50_pc.h
index 92c6be5..080f99f 100644
--- a/src/gallium/drivers/nv50/nv50_pc.h
+++ b/src/gallium/drivers/nv50/nv50_pc.h
@@ -239,23 +239,23 @@ struct nv_instruction {
    struct nv_basic_block *bb;
    struct nv_basic_block *target; /* target block of control flow insn */
    ubyte cc;
-   ubyte set_cond      : 4;
-   ubyte fixed         : 1; /* don't optimize away */
-   ubyte is_terminator : 1;
-   ubyte is_join       : 1;
-   ubyte is_long       : 1; /* for emission */
+   unsigned set_cond      : 4;
+   unsigned fixed         : 1; /* don't optimize away */
+   unsigned is_terminator : 1;
+   unsigned is_join       : 1;
+   unsigned is_long       : 1; /* for emission */
    /* */
-   ubyte saturate : 1;
-   ubyte centroid : 1;
-   ubyte flat     : 1;
-   ubyte lanes    : 4;
-   ubyte tex_live : 1;
+   unsigned saturate : 1;
+   unsigned centroid : 1;
+   unsigned flat     : 1;
+   unsigned lanes    : 4;
+   unsigned tex_live : 1;
    /* */
    ubyte tex_t; /* TIC binding */
    ubyte tex_s; /* TSC binding */
-   ubyte tex_argc : 3;
-   ubyte tex_cube : 1;
-   ubyte tex_mask : 4;
+   unsigned tex_argc : 3;
+   unsigned tex_cube : 1;
+   unsigned tex_mask : 4;
    /* */
    ubyte quadop;
 };
diff --git a/src/gallium/drivers/nv50/nv50_program.h b/src/gallium/drivers/nv50/nv50_program.h
index 97d2933..c92af31 100644
--- a/src/gallium/drivers/nv50/nv50_program.h
+++ b/src/gallium/drivers/nv50/nv50_program.h
@@ -32,9 +32,9 @@ struct nv50_varying {
    uint8_t id; /* tgsi index */
    uint8_t hw; /* hw index, nv50 wants flat FP inputs last */
 
-   uint8_t mask   : 4;
-   uint8_t linear : 1;
-   uint8_t pad    : 3;
+   unsigned mask   : 4;
+   unsigned linear : 1;
+   unsigned pad    : 3;
 
    ubyte sn; /* semantic name */
    ubyte si; /* semantic index */




More information about the mesa-commit mailing list