mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 00:00:12 +01:00
freedreno/a6xx: Handle nested pipeline stats queries
Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23301>
This commit is contained in:
parent
a475b7f66d
commit
d52e9097e1
4 changed files with 13 additions and 6 deletions
|
|
@ -215,8 +215,6 @@ spec@ext_texture_snorm@fbo-generatemipmap-formats@GL_LUMINANCE16_SNORM NPOT,Fail
|
|||
|
||||
spec@ext_texture_snorm@multisample-formats 2 gl_ext_texture_snorm,Fail
|
||||
spec@ext_texture_snorm@multisample-formats 4 gl_ext_texture_snorm,Fail
|
||||
spec@ext_transform_feedback@intervening-read prims_generated,Fail
|
||||
spec@ext_transform_feedback@intervening-read prims_generated use_gs,Fail
|
||||
spec@ext_transform_feedback@structs struct-array-elem run,Fail
|
||||
spec@ext_transform_feedback@structs struct-array-elem run interface,Fail
|
||||
spec@ext_transform_feedback@tessellation triangle_fan flat_first,Fail
|
||||
|
|
|
|||
|
|
@ -221,8 +221,6 @@ spec@ext_texture_snorm@fbo-generatemipmap-formats@GL_LUMINANCE16_SNORM NPOT,Fail
|
|||
|
||||
spec@ext_texture_snorm@multisample-formats 2 gl_ext_texture_snorm,Fail
|
||||
spec@ext_texture_snorm@multisample-formats 4 gl_ext_texture_snorm,Fail
|
||||
spec@ext_transform_feedback@intervening-read prims_generated,Fail
|
||||
spec@ext_transform_feedback@intervening-read prims_generated use_gs,Fail
|
||||
spec@ext_transform_feedback@structs struct-array-elem run,Fail
|
||||
spec@ext_transform_feedback@structs struct-array-elem run interface,Fail
|
||||
spec@ext_transform_feedback@tessellation triangle_fan flat_first,Fail
|
||||
|
|
|
|||
|
|
@ -399,7 +399,9 @@ pipeline_stats_resume(struct fd_acc_query *aq, struct fd_batch *batch)
|
|||
CP_REG_TO_MEM_0_REG(counter_base));
|
||||
stats_reloc(ring, aq, start);
|
||||
|
||||
fd6_event_write(batch, ring, START_PRIMITIVE_CTRS, false);
|
||||
if (!batch->pipeline_stats_queries_active)
|
||||
fd6_event_write(batch, ring, START_PRIMITIVE_CTRS, false);
|
||||
batch->pipeline_stats_queries_active++;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -416,7 +418,10 @@ pipeline_stats_pause(struct fd_acc_query *aq, struct fd_batch *batch)
|
|||
CP_REG_TO_MEM_0_REG(counter_base));
|
||||
stats_reloc(ring, aq, stop);
|
||||
|
||||
fd6_event_write(batch, ring, STOP_PRIMITIVE_CTRS, false);
|
||||
assert(batch->pipeline_stats_queries_active > 0);
|
||||
batch->pipeline_stats_queries_active--;
|
||||
if (batch->pipeline_stats_queries_active)
|
||||
fd6_event_write(batch, ring, STOP_PRIMITIVE_CTRS, false);
|
||||
|
||||
/* result += stop - start: */
|
||||
OUT_PKT7(ring, CP_MEM_TO_MEM, 9);
|
||||
|
|
|
|||
|
|
@ -281,6 +281,12 @@ struct fd_batch {
|
|||
*/
|
||||
uint32_t next_sample_offset;
|
||||
|
||||
/* The # of pipeline-stats queries running. In case of nested
|
||||
* queries using START/STOP_PRIMITIVE_CNTRS, we need to start
|
||||
* only on the first one and stop only on the last one.
|
||||
*/
|
||||
uint32_t pipeline_stats_queries_active;
|
||||
|
||||
/* cached samples (in case multiple queries need to reference
|
||||
* the same sample snapshot)
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue