mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 09:58:05 +02:00
draw: fix nonzero stream primitives generated queries
the fastpath here can only be taken if there is exactly one stream active, as this will otherwise break nonzero stream primitives generated queries in truth, this num_vertex_streams thing should be a bitmask so that the case of num_streams=1,stream_id!=0 could also be fastpathed, but the complexity probably isn't worth it given the infrequency of use cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15506>
This commit is contained in:
parent
32f117f5f8
commit
36373e8e1e
1 changed files with 3 additions and 3 deletions
|
|
@ -277,7 +277,7 @@ void draw_pt_so_emit( struct pt_so_emit *emit,
|
|||
struct vbuf_render *render = draw->render;
|
||||
unsigned start, i, stream;
|
||||
|
||||
if (!emit->has_so) {
|
||||
if (!emit->has_so && num_vertex_streams == 1) {
|
||||
if (draw->collect_primgen) {
|
||||
unsigned i;
|
||||
unsigned total = 0;
|
||||
|
|
@ -292,7 +292,7 @@ void draw_pt_so_emit( struct pt_so_emit *emit,
|
|||
return;
|
||||
}
|
||||
|
||||
if (!draw->so.num_targets)
|
||||
if (!emit->has_so && !draw->collect_primgen)
|
||||
return;
|
||||
|
||||
/* XXX: need to flush to get prim_vbuf.c to release its allocation??*/
|
||||
|
|
@ -322,7 +322,7 @@ void draw_pt_so_emit( struct pt_so_emit *emit,
|
|||
}
|
||||
render->set_stream_output_info(render,
|
||||
stream,
|
||||
emit->emitted_primitives,
|
||||
emit->has_so ? emit->emitted_primitives : 0,
|
||||
emit->generated_primitives);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue