mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
radv: Use buffers_written mask when gathering XFB info.
We need to enable these buffers regardless of whether or not the shader actually writes any outputs to them, otherwise we break XFB queries. Cc: mesa-stable Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34317>
This commit is contained in:
parent
96d11d0f56
commit
15d0804670
1 changed files with 3 additions and 7 deletions
|
|
@ -375,14 +375,10 @@ gather_xfb_info(const nir_shader *nir, struct radv_shader_info *info)
|
|||
assert(xfb->output_count <= MAX_SO_OUTPUTS);
|
||||
so->num_outputs = xfb->output_count;
|
||||
|
||||
for (unsigned i = 0; i < xfb->output_count; i++) {
|
||||
unsigned output_buffer = xfb->outputs[i].buffer;
|
||||
unsigned stream = xfb->buffer_to_stream[xfb->outputs[i].buffer];
|
||||
u_foreach_bit(output_buffer, xfb->buffers_written) {
|
||||
unsigned stream = xfb->buffer_to_stream[output_buffer];
|
||||
so->enabled_stream_buffers_mask |= (1 << output_buffer) << (stream * 4);
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < NIR_MAX_XFB_BUFFERS; i++) {
|
||||
so->strides[i] = xfb->buffers[i].stride / 4;
|
||||
so->strides[output_buffer] = xfb->buffers[output_buffer].stride / 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue