mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
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> (cherry picked from commit83d1241cf5)
This commit is contained in:
parent
4d87eb83da
commit
cd582fa016
2 changed files with 12 additions and 1 deletions
|
|
@ -2314,7 +2314,7 @@
|
|||
"description": "zink: add checks/compat for low-spec descriptor buffer implementations",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "b8b51d96b0146028ecb5c58703707fe994540119",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
@ -3465,6 +3468,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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue