From: Mike Blumenkrantz Date: Tue, 19 Jul 2022 14:08:07 +0000 (-0400) Subject: zink: add an explicit ZINK_DESCRIPTOR_MODE_CACHED X-Git-Tag: upstream/22.3.5~5930 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6493f6ef7958505a37ac28972ba9d5f9c3c665dc;p=platform%2Fupstream%2Fmesa.git zink: add an explicit ZINK_DESCRIPTOR_MODE_CACHED no functional changes, but now AUTO is no longer a mode that gets used Reviewed-by: Dave Airlie Part-of: --- diff --git a/docs/drivers/zink.rst b/docs/drivers/zink.rst index 8cb2277..f1763e9 100644 --- a/docs/drivers/zink.rst +++ b/docs/drivers/zink.rst @@ -253,6 +253,8 @@ changing the descriptor manager may improve performance: Automatically detect best mode. This is the default. ``lazy`` Disable caching and attempt to use the least amount of CPU. +``cached`` + Use caching to reuse descriptor sets. ``notemplates`` The same as `auto`, but disables the use of `VK_KHR_descriptor_templates`. diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 96942d9..398453b 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -91,6 +91,7 @@ static const struct debug_named_value zink_descriptor_options[] = { { "auto", ZINK_DESCRIPTOR_MODE_AUTO, "Automatically detect best mode" }, { "lazy", ZINK_DESCRIPTOR_MODE_LAZY, "Don't cache, do least amount of updates" }, + { "cached", ZINK_DESCRIPTOR_MODE_CACHED, "Cache, reuse sets" }, { "notemplates", ZINK_DESCRIPTOR_MODE_NOTEMPLATES, "Cache, but disable templated updates" }, DEBUG_NAMED_VALUE_END }; @@ -2211,6 +2212,9 @@ zink_internal_create_screen(const struct pipe_screen_config *config) screen->desc_set_id[ZINK_DESCRIPTOR_TYPE_IMAGE] = 4; screen->desc_set_id[ZINK_DESCRIPTOR_BINDLESS] = 5; } + if (descriptor_mode == ZINK_DESCRIPTOR_MODE_AUTO) { + descriptor_mode = ZINK_DESCRIPTOR_MODE_CACHED; + } if (screen->info.have_EXT_calibrated_timestamps && !check_have_device_time(screen)) goto fail; diff --git a/src/gallium/drivers/zink/zink_screen.h b/src/gallium/drivers/zink/zink_screen.h index bc176be..1fcc7f6 100644 --- a/src/gallium/drivers/zink/zink_screen.h +++ b/src/gallium/drivers/zink/zink_screen.h @@ -77,6 +77,7 @@ enum zink_descriptor_type; enum zink_descriptor_mode { ZINK_DESCRIPTOR_MODE_AUTO, ZINK_DESCRIPTOR_MODE_LAZY, + ZINK_DESCRIPTOR_MODE_CACHED, ZINK_DESCRIPTOR_MODE_NOTEMPLATES, ZINK_DESCRIPTOR_MODE_COMPACT, };