zink: add ZINK_DEBUG=nobgc
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22899>
This commit is contained in:

committed by
Marge Bot

parent
0fb5f81ab6
commit
6098c3f9c0
@@ -313,6 +313,8 @@ variable:
|
||||
Debug/use optimal_keys
|
||||
``noopt``
|
||||
Disable async optimized pipeline compiles
|
||||
``nobgc``
|
||||
Disable all async pipeline compiles
|
||||
|
||||
Vulkan Validation Layers
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@@ -813,8 +813,15 @@ zink_gfx_program_compile_queue(struct zink_context *ctx, struct zink_gfx_pipelin
|
||||
struct zink_screen *screen = zink_screen(ctx->base.screen);
|
||||
if (screen->driver_workarounds.disable_optimized_compile)
|
||||
return;
|
||||
if (zink_debug & ZINK_DEBUG_NOBGC) {
|
||||
if (pc_entry->prog->base.uses_shobj)
|
||||
optimized_shobj_compile_job(pc_entry, screen, 0);
|
||||
else
|
||||
optimized_compile_job(pc_entry, screen, 0);
|
||||
} else {
|
||||
util_queue_add_job(&screen->cache_get_thread, pc_entry, &pc_entry->fence,
|
||||
pc_entry->prog->base.uses_shobj ? optimized_shobj_compile_job : optimized_compile_job, NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2129,6 +2136,9 @@ zink_link_gfx_shader(struct pipe_context *pctx, void **shaders)
|
||||
} else {
|
||||
if (zink_screen(pctx->screen)->info.have_EXT_shader_object)
|
||||
prog->base.uses_shobj = !BITSET_TEST(zshaders[MESA_SHADER_FRAGMENT]->info.system_values_read, SYSTEM_VALUE_SAMPLE_MASK_IN);
|
||||
if (zink_debug & ZINK_DEBUG_NOBGC)
|
||||
precompile_job(prog, pctx->screen, 0);
|
||||
else
|
||||
util_queue_add_job(&zink_screen(pctx->screen)->cache_get_thread, prog, &prog->base.cache_fence, precompile_job, NULL, 0);
|
||||
}
|
||||
}
|
||||
@@ -2161,9 +2171,13 @@ zink_create_gfx_shader_state(struct pipe_context *pctx, const struct pipe_shader
|
||||
(screen->info.have_EXT_graphics_pipeline_library && (nir->info.stage == MESA_SHADER_FRAGMENT || nir->info.stage == MESA_SHADER_VERTEX)))) {
|
||||
struct zink_shader *zs = ret;
|
||||
/* sample shading can't precompile */
|
||||
if (nir->info.stage != MESA_SHADER_FRAGMENT || !nir->info.fs.uses_sample_shading)
|
||||
if (nir->info.stage != MESA_SHADER_FRAGMENT || !nir->info.fs.uses_sample_shading) {
|
||||
if (zink_debug & ZINK_DEBUG_NOBGC)
|
||||
precompile_separate_shader_job(zs, screen, 0);
|
||||
else
|
||||
util_queue_add_job(&screen->cache_get_thread, zs, &zs->precompile.fence, precompile_separate_shader_job, NULL, 0);
|
||||
}
|
||||
}
|
||||
ralloc_free(nir);
|
||||
|
||||
return ret;
|
||||
|
@@ -95,6 +95,7 @@ zink_debug_options[] = {
|
||||
{ "noshobj", ZINK_DEBUG_NOSHOBJ, "Disable EXT_shader_object" },
|
||||
{ "optimal_keys", ZINK_DEBUG_OPTIMAL_KEYS, "Debug/use optimal_keys" },
|
||||
{ "noopt", ZINK_DEBUG_NOOPT, "Disable async optimized pipeline compiles" },
|
||||
{ "nobgc", ZINK_DEBUG_NOBGC, "Disable all async pipeline compiles" },
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
|
@@ -224,6 +224,7 @@ enum zink_debug {
|
||||
ZINK_DEBUG_NOSHOBJ = (1<<13),
|
||||
ZINK_DEBUG_OPTIMAL_KEYS = (1<<14),
|
||||
ZINK_DEBUG_NOOPT = (1<<15),
|
||||
ZINK_DEBUG_NOBGC = (1<<16),
|
||||
};
|
||||
|
||||
enum zink_pv_emulation_primitive {
|
||||
|
Reference in New Issue
Block a user