mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-19 06:40:32 +01:00
zink: print pipeline stats for compute shader-db
this is useful for evaluating compute shaders with zink. the open shader-db doesn't have any compute shaders in it, but shader-db runner is capable of compute and we need to handle it. (Rob's shaderdb definitely has some compute shaders in it, at least.) this gets us pipeline stats printing on zink+nvk for a simple compute shader I wrote when working on common NIR stuff: b.shader_test - type: compute, Code Size: 752, Number of GPRs: 19, SLM Size: 0 Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30135>
This commit is contained in:
parent
8c597c0861
commit
b8dcbfbd39
1 changed files with 7 additions and 1 deletions
|
|
@ -1532,11 +1532,17 @@ create_compute_program(struct zink_context *ctx, nir_shader *nir)
|
|||
_mesa_hash_table_init(&comp->pipelines, comp, NULL, comp->use_local_size ?
|
||||
equals_compute_pipeline_state_local_size :
|
||||
equals_compute_pipeline_state);
|
||||
if (zink_debug & ZINK_DEBUG_NOBGC)
|
||||
|
||||
if (zink_debug & (ZINK_DEBUG_NOBGC|ZINK_DEBUG_SHADERDB))
|
||||
precompile_compute_job(comp, screen, 0);
|
||||
else
|
||||
util_queue_add_job(&screen->cache_get_thread, comp, &comp->base.cache_fence,
|
||||
precompile_compute_job, NULL, 0);
|
||||
|
||||
if (zink_debug & ZINK_DEBUG_SHADERDB) {
|
||||
print_pipeline_stats(screen, comp->base_pipeline, &ctx->dbg);
|
||||
}
|
||||
|
||||
return comp;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue