Mesa (master): nir: make nir_variable::{num_members,num_state_slots} a uint16_t

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 20 16:12:00 UTC 2019


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

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Fri Nov 15 14:40:19 2019 +0000

nir: make nir_variable::{num_members,num_state_slots} a uint16_t

Doesn't shrink it (at least, on x86-64) and leaves space for more members.

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Connor Abbott <cwabbott0 at gmail.com>

---

 src/compiler/nir/nir.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 32bcfe22c2f..4db85b3fafd 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -505,7 +505,7 @@ typedef struct nir_variable {
    } data;
 
    /* Number of nir_variable_data members */
-   unsigned num_members;
+   uint16_t num_members;
 
    /**
     * Built-in state that backs this uniform
@@ -519,7 +519,7 @@ typedef struct nir_variable {
     * \c state_slots will be \c NULL.
     */
    /*@{*/
-   unsigned num_state_slots;    /**< Number of state slots used */
+   uint16_t num_state_slots;    /**< Number of state slots used */
    nir_state_slot *state_slots;  /**< State descriptors. */
    /*@}*/
 




More information about the mesa-commit mailing list