zink: add checks/compat for low-spec descriptor buffer implementations
for implementations that can only support 1 descriptor buffer:
* prefer templates
* allow db if explicitly requested, but disable bindless (for testing)
fix #10640
Fixes: b8b51d96b0 ("zink: delete maxDescriptorBufferBindings checks")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27696>
This commit is contained in:
committed by
Marge Bot
parent
60cf1ede4f
commit
83d1241cf5
@@ -837,6 +837,9 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
||||
return 1;
|
||||
|
||||
case PIPE_CAP_BINDLESS_TEXTURE:
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB &&
|
||||
(screen->info.db_props.maxDescriptorBufferBindings < 2 || screen->info.db_props.maxSamplerDescriptorBufferBindings < 2))
|
||||
return 0;
|
||||
return screen->info.have_EXT_descriptor_indexing;
|
||||
|
||||
case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
|
||||
@@ -3537,6 +3540,14 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev
|
||||
mesa_logw("zink: bug detected: inputAttachmentDescriptorSize(%u) > %u", (unsigned)screen->info.db_props.inputAttachmentDescriptorSize, ZINK_FBFETCH_DESCRIPTOR_SIZE);
|
||||
can_db = false;
|
||||
}
|
||||
if (screen->info.db_props.maxDescriptorBufferBindings < 2 || screen->info.db_props.maxSamplerDescriptorBufferBindings < 2) {
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
|
||||
/* allow for testing, but disable bindless */
|
||||
mesa_logw("Cannot use bindless and db descriptor mode with (maxDescriptorBufferBindings||maxSamplerDescriptorBufferBindings) < 2");
|
||||
} else {
|
||||
can_db = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_AUTO) {
|
||||
/* descriptor buffer is not performant with virt yet */
|
||||
|
||||
Reference in New Issue
Block a user