zink: make ZINK_DESCRIPTOR_MODE=db the default
this has been getting beat up a lot lately by radv ci (and me), so it should be ready to turn on by default for even more testing in advance of the 23.1 release Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21398>
This commit is contained in:
committed by
Marge Bot
parent
685bd95de9
commit
e375fb0c5c
@@ -440,7 +440,8 @@
|
||||
"extensions": {
|
||||
"VK_EXT_primitives_generated_query": 1,
|
||||
"VK_EXT_color_write_enable": 1,
|
||||
"VK_EXT_extended_dynamic_state3": 1
|
||||
"VK_EXT_extended_dynamic_state3": 1,
|
||||
"VK_EXT_descriptor_buffer": 1
|
||||
},
|
||||
"features": {
|
||||
"VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT": {
|
||||
@@ -457,6 +458,9 @@
|
||||
"extendedDynamicState3RasterizationSamples": true,
|
||||
"extendedDynamicState3ColorWriteMask": true,
|
||||
"extendedDynamicState3LogicOpEnable": true
|
||||
},
|
||||
"VkPhysicalDeviceDescriptorBufferFeaturesEXT": {
|
||||
"descriptorBuffer": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -132,7 +132,6 @@ zink-freedreno-a630-traces:
|
||||
variables:
|
||||
PIGLIT_PROFILES: all
|
||||
PIGLIT_PLATFORM: gbm
|
||||
ZINK_DESCRIPTORS: db
|
||||
RADV_PERFTEST: gpl
|
||||
B2C_TEST_SCRIPT: ./install/valve/gl_combined_testing.sh
|
||||
B2C_JOB_SUCCESS_REGEX: 'Execution is over, pipeline status: 0'
|
||||
|
||||
@@ -2755,9 +2755,6 @@ 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 (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_AUTO) {
|
||||
zink_descriptor_mode = ZINK_DESCRIPTOR_MODE_LAZY;
|
||||
}
|
||||
|
||||
if (screen->info.have_EXT_calibrated_timestamps && !check_have_device_time(screen))
|
||||
goto fail;
|
||||
@@ -2888,39 +2885,70 @@ zink_internal_create_screen(const struct pipe_screen_config *config)
|
||||
screen->resizable_bar = true;
|
||||
}
|
||||
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
|
||||
bool can_db = true;
|
||||
{
|
||||
if (!screen->info.have_EXT_descriptor_buffer) {
|
||||
mesa_loge("Cannot use db descriptor mode without EXT_descriptor_buffer");
|
||||
goto fail;
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
|
||||
mesa_loge("Cannot use db descriptor mode without EXT_descriptor_buffer");
|
||||
goto fail;
|
||||
}
|
||||
can_db = false;
|
||||
}
|
||||
if (!screen->resizable_bar) {
|
||||
mesa_loge("Cannot use db descriptor mode without resizable bar");
|
||||
goto fail;
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
|
||||
mesa_loge("Cannot use db descriptor mode without resizable bar");
|
||||
goto fail;
|
||||
}
|
||||
can_db = false;
|
||||
}
|
||||
if (!screen->info.have_EXT_non_seamless_cube_map) {
|
||||
mesa_loge("Cannot use db descriptor mode without EXT_non_seamless_cube_map");
|
||||
goto fail;
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
|
||||
mesa_loge("Cannot use db descriptor mode without EXT_non_seamless_cube_map");
|
||||
goto fail;
|
||||
}
|
||||
can_db = false;
|
||||
}
|
||||
if (!screen->info.rb2_feats.nullDescriptor) {
|
||||
mesa_loge("Cannot use db descriptor mode without robustness2.nullDescriptor");
|
||||
goto fail;
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
|
||||
mesa_loge("Cannot use db descriptor mode without robustness2.nullDescriptor");
|
||||
goto fail;
|
||||
}
|
||||
can_db = false;
|
||||
}
|
||||
if (ZINK_FBFETCH_DESCRIPTOR_SIZE < screen->info.db_props.inputAttachmentDescriptorSize) {
|
||||
mesa_loge("Cannot use db descriptor mode with inputAttachmentDescriptorSize(%u) > %u", (unsigned)screen->info.db_props.inputAttachmentDescriptorSize, ZINK_FBFETCH_DESCRIPTOR_SIZE);
|
||||
goto fail;
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
|
||||
mesa_loge("Cannot use db descriptor mode with inputAttachmentDescriptorSize(%u) > %u", (unsigned)screen->info.db_props.inputAttachmentDescriptorSize, ZINK_FBFETCH_DESCRIPTOR_SIZE);
|
||||
goto fail;
|
||||
}
|
||||
mesa_logw("zink: bug detected: inputAttachmentDescriptorSize(%u) > %u", (unsigned)screen->info.db_props.inputAttachmentDescriptorSize, ZINK_FBFETCH_DESCRIPTOR_SIZE);
|
||||
can_db = false;
|
||||
}
|
||||
if (screen->compact_descriptors) {
|
||||
/* TODO: bindless */
|
||||
if (screen->info.db_props.maxDescriptorBufferBindings < 3) {
|
||||
mesa_loge("Cannot use db descriptor mode with compact descriptors with maxDescriptorBufferBindings < 3");
|
||||
goto fail;
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
|
||||
mesa_loge("Cannot use db descriptor mode with compact descriptors with maxDescriptorBufferBindings < 3");
|
||||
goto fail;
|
||||
}
|
||||
can_db = false;
|
||||
}
|
||||
} else {
|
||||
if (screen->info.db_props.maxDescriptorBufferBindings < 5) {
|
||||
mesa_loge("Cannot use db descriptor mode with maxDescriptorBufferBindings < 5");
|
||||
goto fail;
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
|
||||
mesa_loge("Cannot use db descriptor mode with maxDescriptorBufferBindings < 5");
|
||||
goto fail;
|
||||
}
|
||||
can_db = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_AUTO) {
|
||||
/* descriptor buffer is not performant with virt yet */
|
||||
if (screen->info.driver_props.driverID == VK_DRIVER_ID_MESA_VENUS)
|
||||
zink_descriptor_mode = ZINK_DESCRIPTOR_MODE_LAZY;
|
||||
else
|
||||
zink_descriptor_mode = can_db ? ZINK_DESCRIPTOR_MODE_DB : ZINK_DESCRIPTOR_MODE_LAZY;
|
||||
}
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
|
||||
const uint32_t sampler_size = MAX2(screen->info.db_props.combinedImageSamplerDescriptorSize, screen->info.db_props.robustUniformTexelBufferDescriptorSize);
|
||||
const uint32_t image_size = MAX2(screen->info.db_props.storageImageDescriptorSize, screen->info.db_props.robustStorageTexelBufferDescriptorSize);
|
||||
if (screen->compact_descriptors) {
|
||||
|
||||
Reference in New Issue
Block a user