From 5073369d9c14016186aad55ae1676d4c6b907088 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 14 Jul 2023 12:19:45 -0400 Subject: [PATCH] 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 Part-of: (cherry picked from commit 330f728cc4f600721dcad4e9a7ad0b444fbc1c6f) --- .pick_status.json | 2 +- src/gallium/frontends/lavapipe/lvp_pipeline.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 3012694b7ae..0ee03461c94 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c b/src/gallium/frontends/lavapipe/lvp_pipeline.c index 99d440d9142..c66cc313dfc 100644 --- a/src/gallium/frontends/lavapipe/lvp_pipeline.c +++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c @@ -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]; }