vkd3d: Add VKD3D_CONFIG option to force raw VA CBV descriptors.

For certain ExecuteIndirect() uses, we're forced to use this path
since we have no way to update push descriptors indirectly yet.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
This commit is contained in:
Hans-Kristian Arntzen 2021-11-25 18:15:00 +01:00
parent 59b75b5b1d
commit a8e46bbff1
3 changed files with 4 additions and 1 deletions

View File

@ -87,6 +87,7 @@ extern "C" {
#define VKD3D_CONFIG_FLAG_BREADCRUMBS (1ull << 25)
#define VKD3D_CONFIG_FLAG_PIPELINE_LIBRARY_APP_CACHE_ONLY (1ull << 26)
#define VKD3D_CONFIG_FLAG_SHADER_CACHE_SYNC (1ull << 27)
#define VKD3D_CONFIG_FLAG_FORCE_RAW_VA_CBV (1ull << 28)
typedef HRESULT (*PFN_vkd3d_signal_event)(HANDLE event);

View File

@ -653,6 +653,7 @@ static const struct vkd3d_debug_option vkd3d_config_options[] =
{"breadcrumbs", VKD3D_CONFIG_FLAG_BREADCRUMBS},
{"pipeline_library_app_cache", VKD3D_CONFIG_FLAG_PIPELINE_LIBRARY_APP_CACHE_ONLY},
{"shader_cache_sync", VKD3D_CONFIG_FLAG_SHADER_CACHE_SYNC},
{"force_raw_va_cbv", VKD3D_CONFIG_FLAG_FORCE_RAW_VA_CBV},
};
static void vkd3d_config_flags_init_once(void)

View File

@ -4688,7 +4688,8 @@ static uint32_t vkd3d_bindless_state_get_bindless_flags(struct d3d12_device *dev
* The difference in performance is profound (~15% in some cases).
* On ACO, BDA with NonWritable can be promoted directly to scalar loads,
* which is great. */
if (device_info->properties2.properties.vendorID != VKD3D_VENDOR_ID_NVIDIA)
if ((vkd3d_config_flags & VKD3D_CONFIG_FLAG_FORCE_RAW_VA_CBV) ||
device_info->properties2.properties.vendorID != VKD3D_VENDOR_ID_NVIDIA)
flags |= VKD3D_RAW_VA_ROOT_DESCRIPTOR_CBV;
}