nir: make nir_variable::{num_members,num_state_slots} a uint16_t
authorRhys Perry <pendingchaos02@gmail.com>
Fri, 15 Nov 2019 14:40:19 +0000 (14:40 +0000)
committerRhys Perry <pendingchaos02@gmail.com>
Wed, 20 Nov 2019 15:05:42 +0000 (15:05 +0000)
Doesn't shrink it (at least, on x86-64) and leaves space for more members.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/compiler/nir/nir.h

index 32bcfe22c2fd1e96d1d01d1499d3fdcc57410385..4db85b3fafd60443af0bcc9c4c5ab5aac90c2469 100644 (file)
@@ -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. */
    /*@}*/