zds = zink_descriptor_set_get(ctx, h, is_compute, &cache_hit);
if (cache_hit) {
pdd_cached(pg)->cache_misses[h] = 0;
- } else {
+ } else if (likely(zink_screen(ctx->base.screen)->descriptor_mode != ZINK_DESCRIPTOR_MODE_NOFALLBACK)) {
if (++pdd_cached(pg)->cache_misses[h] == MAX_CACHE_MISSES) {
const char *set_names[] = {
"UBO",
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" },
+ { "nofallback", ZINK_DESCRIPTOR_MODE_NOFALLBACK, "Cache, never use lazy fallback" },
{ "notemplates", ZINK_DESCRIPTOR_MODE_NOTEMPLATES, "Cache, but disable templated updates" },
DEBUG_NAMED_VALUE_END
};
zink_debug = debug_get_option_zink_debug();
screen->descriptor_mode = debug_get_option_zink_descriptor_mode();
- if (util_bitcount(screen->descriptor_mode) > 1) {
+ if (screen->descriptor_mode > ZINK_DESCRIPTOR_MODE_NOTEMPLATES) {
printf("Specify exactly one descriptor mode.\n");
abort();
}
enum zink_descriptor_mode {
ZINK_DESCRIPTOR_MODE_AUTO,
ZINK_DESCRIPTOR_MODE_LAZY,
+ ZINK_DESCRIPTOR_MODE_NOFALLBACK,
ZINK_DESCRIPTOR_MODE_NOTEMPLATES,
};