diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/nir/nir_gather_xfb_info.c | 3 | ||||
-rw-r--r-- | src/compiler/nir/nir_xfb_info.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_gather_xfb_info.c b/src/compiler/nir/nir_gather_xfb_info.c index c06a7667ab8..2c50a256a64 100644 --- a/src/compiler/nir/nir_gather_xfb_info.c +++ b/src/compiler/nir/nir_gather_xfb_info.c @@ -86,6 +86,7 @@ add_var_xfb_outputs(nir_xfb_info *xfb, assert(var->data.location_frac + comp_slots <= 8); uint8_t comp_mask = ((1 << comp_slots) - 1) << var->data.location_frac; + unsigned comp_offset = var->data.location_frac; while (comp_mask) { nir_xfb_output_info *output = &xfb->outputs[xfb->output_count++]; @@ -94,10 +95,12 @@ add_var_xfb_outputs(nir_xfb_info *xfb, output->offset = *offset; output->location = *location; output->component_mask = comp_mask & 0xf; + output->component_offset = comp_offset; *offset += util_bitcount(output->component_mask) * 4; (*location)++; comp_mask >>= 4; + comp_offset = 0; } } } diff --git a/src/compiler/nir/nir_xfb_info.h b/src/compiler/nir/nir_xfb_info.h index 6b16ce2a60a..c6a171fde34 100644 --- a/src/compiler/nir/nir_xfb_info.h +++ b/src/compiler/nir/nir_xfb_info.h @@ -34,6 +34,7 @@ typedef struct { uint16_t offset; uint8_t location; uint8_t component_mask; + uint8_t component_offset; } nir_xfb_output_info; typedef struct nir_xfb_info { |