var->data.invariant = ir->data.invariant;
var->data.location = ir->data.location;
var->data.stream = ir->data.stream;
+ if (ir->data.stream & (1u << 31))
+ var->data.stream |= NIR_STREAM_PACKED;
var->data.compact = false;
switch(ir->data.mode) {
#define NIR_TRUE (~0u)
#define NIR_MAX_VEC_COMPONENTS 4
#define NIR_MAX_MATRIX_COLUMNS 4
+#define NIR_STREAM_PACKED (1 << 8)
typedef uint8_t nir_component_mask_t;
/** Defines a cast function
/**
* Vertex stream output identifier.
*
- * For packed outputs, bit 31 is set and bits [2*i+1,2*i] indicate the
- * stream of the i-th component.
+ * For packed outputs, NIR_STREAM_PACKED is set and bits [2*i+1,2*i]
+ * indicate the stream of the i-th component.
*/
- unsigned stream;
+ unsigned stream:9;
/**
* output index for dual source blending.
ubyte usagemask = ((1 << num_components) - 1) << component;
unsigned gs_out_streams;
- if (var->data.stream & (1u << 31)) {
- gs_out_streams = var->data.stream & ~(1u << 31);
+ if (var->data.stream & NIR_STREAM_PACKED) {
+ gs_out_streams = var->data.stream & ~NIR_STREAM_PACKED;
} else {
assert(var->data.stream < 4);
gs_out_streams = 0;