lavapipe: use the component offset directly for xfb

the mask is only indicative of the components being used, not the offset
from which they start

cc: mesa-stable

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24163>
(cherry picked from commit 330f728cc4)
This commit is contained in:
Mike Blumenkrantz 2023-07-14 12:19:45 -04:00 committed by Dylan Baker
parent 4ce8ed7bbe
commit 5073369d9c
2 changed files with 2 additions and 2 deletions

View file

@ -22584,7 +22584,7 @@
"description": "lavapipe: use the component offset directly for xfb",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -544,7 +544,7 @@ lvp_shader_xfb_init(struct lvp_shader *shader)
shader->stream_output.output[i].dst_offset = xfb_info->outputs[i].offset / 4;
shader->stream_output.output[i].register_index = output_mapping[xfb_info->outputs[i].location];
shader->stream_output.output[i].num_components = util_bitcount(xfb_info->outputs[i].component_mask);
shader->stream_output.output[i].start_component = ffs(xfb_info->outputs[i].component_mask) - 1;
shader->stream_output.output[i].start_component = xfb_info->outputs[i].component_offset;
shader->stream_output.output[i].stream = xfb_info->buffer_to_stream[xfb_info->outputs[i].buffer];
}