mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
zink: rework ZINK_PIPELINE_LIBRARY_FORCE into ZINK_DEBUG flag
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18868>
This commit is contained in:
parent
e1314e682e
commit
2136047624
4 changed files with 10 additions and 8 deletions
|
|
@ -273,6 +273,8 @@ variable:
|
|||
Use a maximum of 4 descriptor sets
|
||||
``noreorder``
|
||||
Do not reorder or optimize GL command streams
|
||||
``gpl``
|
||||
Force using Graphics Pipeline Library for all shaders
|
||||
|
||||
Vulkan Validation Layers
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ zink_get_gfx_pipeline(struct zink_context *ctx,
|
|||
struct set_entry *he = NULL;
|
||||
/* TODO: this will eventually be pre-populated by async shader compile */
|
||||
//struct set_entry *he = _mesa_set_search(&prog->libs[idx], &ctx->gfx_pipeline_state.gkey);
|
||||
if (!he && screen->driver_workarounds.force_pipeline_library) {
|
||||
if (!he && (zink_debug & ZINK_DEBUG_GPL)) {
|
||||
create_pipeline_lib(screen, prog, &ctx->gfx_pipeline_state, mode);
|
||||
he = _mesa_set_search(&prog->libs[idx], &ctx->gfx_pipeline_state.gkey);
|
||||
assert(he);
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ zink_debug_options[] = {
|
|||
{ "sync", ZINK_DEBUG_SYNC, "Force synchronization before draws/dispatches" },
|
||||
{ "compact", ZINK_DEBUG_COMPACT, "Use only 4 descriptor sets" },
|
||||
{ "noreorder", ZINK_DEBUG_NOREORDER, "Do not reorder command streams" },
|
||||
{ "gpl", ZINK_DEBUG_GPL, "Force using Graphics Pipeline Library for all shaders" },
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
|
|
@ -2220,7 +2221,6 @@ static void
|
|||
init_driver_workarounds(struct zink_screen *screen)
|
||||
{
|
||||
/* enable implicit sync for all non-mesa drivers */
|
||||
screen->driver_workarounds.force_pipeline_library = debug_get_bool_option("ZINK_PIPELINE_LIBRARY_FORCE", false);
|
||||
screen->driver_workarounds.implicit_sync = true;
|
||||
switch (screen->info.driver_props.driverID) {
|
||||
case VK_DRIVER_ID_MESA_RADV:
|
||||
|
|
@ -2238,14 +2238,14 @@ init_driver_workarounds(struct zink_screen *screen)
|
|||
if (screen->info.have_EXT_graphics_pipeline_library)
|
||||
screen->info.have_EXT_graphics_pipeline_library = screen->info.have_EXT_extended_dynamic_state &&
|
||||
screen->info.have_EXT_extended_dynamic_state2 &&
|
||||
(screen->driver_workarounds.force_pipeline_library ||
|
||||
((zink_debug & ZINK_DEBUG_GPL) ||
|
||||
screen->info.dynamic_state2_feats.extendedDynamicState2PatchControlPoints) &&
|
||||
screen->info.have_KHR_dynamic_rendering &&
|
||||
screen->info.have_EXT_non_seamless_cube_map &&
|
||||
(screen->info.gpl_props.graphicsPipelineLibraryFastLinking ||
|
||||
screen->is_cpu ||
|
||||
screen->driver_workarounds.force_pipeline_library);
|
||||
if (!screen->driver_workarounds.force_pipeline_library)
|
||||
(zink_debug & ZINK_DEBUG_GPL));
|
||||
if (!(zink_debug & ZINK_DEBUG_GPL))
|
||||
screen->info.have_EXT_graphics_pipeline_library = false;
|
||||
screen->driver_workarounds.broken_l4a4 = screen->info.driver_props.driverID == VK_DRIVER_ID_NVIDIA_PROPRIETARY;
|
||||
screen->driver_workarounds.depth_clip_control_missing = !screen->info.have_EXT_depth_clip_control;
|
||||
|
|
@ -2555,10 +2555,10 @@ zink_internal_create_screen(const struct pipe_screen_config *config)
|
|||
goto fail;
|
||||
}
|
||||
|
||||
if (!screen->driver_workarounds.force_pipeline_library)
|
||||
if (!(zink_debug & ZINK_DEBUG_GPL))
|
||||
screen->optimal_keys = !screen->need_decompose_attrs && screen->info.have_EXT_non_seamless_cube_map && !screen->driconf.inline_uniforms;
|
||||
if (screen->optimal_keys)
|
||||
screen->driver_workarounds.force_pipeline_library = false;
|
||||
screen->info.have_EXT_graphics_pipeline_library = false;
|
||||
|
||||
return screen;
|
||||
|
||||
|
|
|
|||
|
|
@ -180,6 +180,7 @@ enum zink_debug {
|
|||
ZINK_DEBUG_SYNC = (1<<4),
|
||||
ZINK_DEBUG_COMPACT = (1<<5),
|
||||
ZINK_DEBUG_NOREORDER = (1<<6),
|
||||
ZINK_DEBUG_GPL = (1<<7),
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1168,7 +1169,6 @@ struct zink_screen {
|
|||
bool depth_clip_control_missing;
|
||||
bool implicit_sync;
|
||||
bool always_feedback_loop;
|
||||
bool force_pipeline_library;
|
||||
unsigned z16_unscaled_bias;
|
||||
unsigned z24_unscaled_bias;
|
||||
} driver_workarounds;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue