mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
ac/nir: Fixed OpenGL CTS transform feedback overflow detection test case
The ordered atomic commits the post-add offset to memory, but overflow was computed using the pre-add offset, causing partial overflows to be missed and counters to become corrupted. Fixes: "KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-one-buffer-per-stream" based on the postwrite buffer offset, rather than the offset before the current workgroups writes. Reviewed-by: Marek Olsak <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40745>
This commit is contained in:
parent
f76e940fb2
commit
c5423d3e27
1 changed files with 3 additions and 1 deletions
|
|
@ -1131,8 +1131,10 @@ ac_nir_ngg_build_streamout_buffer_info(nir_builder *b,
|
|||
nir_def *overflow = nir_ilt(b, buffer_size, buffer_offset);
|
||||
|
||||
any_overflow = nir_ior(b, any_overflow, overflow);
|
||||
nir_def *new_buffer_offset = nir_iadd(b, buffer_offset,
|
||||
workgroup_buffer_sizes[buffer]);
|
||||
overflow_amount[buffer] = nir_imax(b, nir_imm_int(b, 0),
|
||||
nir_isub(b, buffer_offset, buffer_size));
|
||||
nir_isub(b, new_buffer_offset, buffer_size));
|
||||
|
||||
unsigned stream = info->buffer_to_stream[buffer];
|
||||
/* when previous workgroup overflow, we can't emit any primitive */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue