r600: enable ARB_transform_feedback_overflow_query

This functionality was mostly implemented but not enabled.
The functionality which is using SET_PREDICATION seems to
not work as expected.

This change was tested on palm, barts and cayman,
piglit tests (26/28), and khr-gl45 tests (7/13).

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34726>
This commit is contained in:
Patrick Lerda 2025-04-25 13:34:03 +02:00 committed by Marge Bot
parent 175a67c9bf
commit 8a1ef5bd31
2 changed files with 11 additions and 4 deletions

View file

@ -414,6 +414,7 @@ static void r600_init_screen_caps(struct r600_screen *rscreen)
caps->invalidate_buffer = true;
caps->surface_reinterpret_blocks = true;
caps->query_memory_info = true;
caps->query_so_overflow = family >= CHIP_CEDAR;
caps->framebuffer_no_attachment = true;
caps->legacy_math_rules = true;
caps->can_bind_const_buffer_as_vertex = true;

View file

@ -728,9 +728,12 @@ static void r600_query_hw_do_emit_start(struct r600_common_context *ctx,
emit_sample_streamout(cs, va, query->stream);
break;
case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE:
for (unsigned stream = 0; stream < R600_MAX_STREAMS; ++stream)
for (unsigned stream = 0; stream < R600_MAX_STREAMS; ++stream) {
emit_sample_streamout(cs, va + 32 * stream, stream);
break;
r600_emit_reloc(ctx, &ctx->gfx, query->buffer.buf, RADEON_USAGE_WRITE |
RADEON_PRIO_QUERY);
}
return;
case PIPE_QUERY_TIME_ELAPSED:
/* Write the timestamp after the last draw is done.
* (bottom-of-pipe)
@ -814,9 +817,12 @@ static void r600_query_hw_do_emit_stop(struct r600_common_context *ctx,
break;
case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE:
va += 16;
for (unsigned stream = 0; stream < R600_MAX_STREAMS; ++stream)
for (unsigned stream = 0; stream < R600_MAX_STREAMS; ++stream) {
emit_sample_streamout(cs, va + 32 * stream, stream);
break;
r600_emit_reloc(ctx, &ctx->gfx, query->buffer.buf, RADEON_USAGE_WRITE |
RADEON_PRIO_QUERY);
}
return;
case PIPE_QUERY_TIME_ELAPSED:
va += 8;
FALLTHROUGH;