From: Conor McCarthy cmccarthy@codeweavers.com
--- README | 4 ++++ libs/vkd3d/device.c | 4 ++++ libs/vkd3d/vkd3d_private.h | 1 + 3 files changed, 9 insertions(+)
diff --git a/README b/README index 465d5f915..87784033e 100644 --- a/README +++ b/README @@ -51,6 +51,10 @@ commas or semicolons. even when the output supports colour.
* VKD3D_CONFIG - a list of options that change the behavior of libvkd3d. + * tiled_tier_0 - Do not report support for tiled resources. This option may + prevent failures due to unsupported sparse image formats which can occur + with some hardware/drivers. Tiled resources are still supported if an app + uses them anyway and the Vulkan driver supports them. * virtual_heaps - Create descriptors for each D3D12 root signature descriptor range instead of entire descriptor heaps. Useful when push constant or bound descriptor limits are exceeded. diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 3c54632ca..fce248919 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -498,6 +498,7 @@ static const struct vkd3d_debug_option vkd3d_config_options[] = { {"virtual_heaps", VKD3D_CONFIG_FLAG_VIRTUAL_HEAPS}, /* always use virtual descriptor heaps */ {"vk_debug", VKD3D_CONFIG_FLAG_VULKAN_DEBUG}, /* enable Vulkan debug extensions */ + {"tiled_tier_0", VKD3D_CONFIG_FLAG_TILED_TIER_0}, /* do not report tiled resource support */ };
static uint64_t vkd3d_init_config_flags(void) @@ -1485,6 +1486,9 @@ static HRESULT vkd3d_init_device_caps(struct d3d12_device *device, else device->feature_options.TiledResourcesTier = D3D12_TILED_RESOURCES_TIER_3;
+ if (device->vkd3d_instance->config_flags & VKD3D_CONFIG_FLAG_TILED_TIER_0) + device->feature_options.TiledResourcesTier = D3D12_TILED_RESOURCES_TIER_NOT_SUPPORTED; + /* FIXME: Implement tiled resources. */ if (device->feature_options.TiledResourcesTier) { diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index c999ef79e..0964be49c 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -165,6 +165,7 @@ enum vkd3d_config_flags { VKD3D_CONFIG_FLAG_VULKAN_DEBUG = 0x00000001, VKD3D_CONFIG_FLAG_VIRTUAL_HEAPS = 0x00000002, + VKD3D_CONFIG_FLAG_TILED_TIER_0 = 0x00000004, };
struct vkd3d_instance