zink: add ZINK_DEBUG=quiet
mainly for use with ZINK_DEBUG=optimal_keys on turnip since spamming a warning like that constantly is pointless Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25037>
This commit is contained in:

committed by
Marge Bot

parent
cb76e90793
commit
1e1f58c1ac
@@ -317,6 +317,8 @@ variable:
|
||||
Disable all async pipeline compiles
|
||||
``mem``
|
||||
Enable memory allocation debugging
|
||||
``quiet``
|
||||
Suppress probably-harmless warnings
|
||||
|
||||
Vulkan Validation Layers
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@@ -105,6 +105,7 @@ zink_debug_options[] = {
|
||||
{ "nobgc", ZINK_DEBUG_NOBGC, "Disable all async pipeline compiles" },
|
||||
{ "dgc", ZINK_DEBUG_DGC, "Use DGC (driver testing only)" },
|
||||
{ "mem", ZINK_DEBUG_MEM, "Debug memory allocations" },
|
||||
{ "quiet", ZINK_DEBUG_QUIET, "Suppress warnings" },
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
@@ -2573,6 +2574,8 @@ zink_create_logical_device(struct zink_screen *screen)
|
||||
static void
|
||||
check_base_requirements(struct zink_screen *screen)
|
||||
{
|
||||
if (zink_debug & ZINK_DEBUG_QUIET)
|
||||
return;
|
||||
if (!screen->info.feats.features.logicOp ||
|
||||
!screen->info.feats.features.fillModeNonSolid ||
|
||||
!screen->info.feats.features.shaderClipDistance ||
|
||||
@@ -2878,7 +2881,7 @@ init_optimal_keys(struct zink_screen *screen)
|
||||
!screen->driver_workarounds.lower_robustImageAccess2 &&
|
||||
!screen->driconf.emulate_point_smooth &&
|
||||
!screen->driver_workarounds.needs_zs_shader_swizzle;
|
||||
if (!screen->optimal_keys && zink_debug & ZINK_DEBUG_OPTIMAL_KEYS) {
|
||||
if (!screen->optimal_keys && zink_debug & ZINK_DEBUG_OPTIMAL_KEYS && !(zink_debug & ZINK_DEBUG_QUIET)) {
|
||||
fprintf(stderr, "The following criteria are preventing optimal_keys enablement:\n");
|
||||
if (screen->need_decompose_attrs)
|
||||
fprintf(stderr, "missing vertex attribute formats\n");
|
||||
@@ -2903,8 +2906,9 @@ init_optimal_keys(struct zink_screen *screen)
|
||||
CHECK_OR_PRINT(rb_image_feats.robustImageAccess);
|
||||
printf("\n");
|
||||
mesa_logw("zink: force-enabling optimal_keys despite missing features. Good luck!");
|
||||
screen->optimal_keys = true;
|
||||
}
|
||||
if (zink_debug & ZINK_DEBUG_OPTIMAL_KEYS)
|
||||
screen->optimal_keys = true;
|
||||
if (!screen->optimal_keys)
|
||||
screen->info.have_EXT_graphics_pipeline_library = false;
|
||||
|
||||
|
@@ -240,6 +240,7 @@ enum zink_debug {
|
||||
ZINK_DEBUG_NOBGC = (1<<16),
|
||||
ZINK_DEBUG_DGC = (1<<17),
|
||||
ZINK_DEBUG_MEM = (1<<18),
|
||||
ZINK_DEBUG_QUIET = (1<<19),
|
||||
};
|
||||
|
||||
enum zink_pv_emulation_primitive {
|
||||
|
Reference in New Issue
Block a user