tu: Fix xfb when there is a hole at the end
We were handling the case where we had an unassigned output in the middle of the outputs array, but v->outputs can be smaller than the shader's info.num_outputs when an output at the end isn't assigned. This lead to us reading garbage after the end, and assuming that it corresponded to r0.x and overwriting the xfb entry for some other random output with the unassigned output's entry. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12310>
This commit is contained in:
@@ -281,6 +281,3 @@ dEQP-VK.ssbo.layout.random.all_shared_buffer.5,Fail
|
||||
dEQP-VK.ssbo.layout.random.nested_structs_arrays.0,Fail
|
||||
dEQP-VK.ssbo.layout.random.nested_structs_arrays.17,Fail
|
||||
dEQP-VK.ssbo.layout.random.scalar.19,Fail
|
||||
|
||||
# "Mismatch at offset 0 expected -89 received 0 (elemNdx=0 vecNdx=0 compNdx=0)"
|
||||
dEQP-VK.transform_feedback.fuzz.various_buffers.buffers100_instance_array_vertex,Fail
|
||||
|
||||
@@ -726,8 +726,8 @@ tu6_setup_streamout(struct tu_cs *cs,
|
||||
unsigned k = out->register_index;
|
||||
unsigned idx;
|
||||
|
||||
/* Skip it, if there's an unused reg in the middle of outputs. */
|
||||
if (v->outputs[k].regid == INVALID_REG)
|
||||
/* Skip it, if it's an output that was never assigned a register. */
|
||||
if (k >= v->outputs_count || v->outputs[k].regid == INVALID_REG)
|
||||
continue;
|
||||
|
||||
ncomp[out->output_buffer] += out->num_components;
|
||||
|
||||
Reference in New Issue
Block a user