mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Validate tiled resources tier for 3D textures.
This commit is contained in:
parent
1a0d85b8d6
commit
0b67481496
Notes:
Alexandre Julliard
2023-06-27 23:33:57 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/216
@ -1465,6 +1465,7 @@ static HRESULT vkd3d_init_device_caps(struct d3d12_device *device,
|
|||||||
vulkan_info->device_limits = physical_device_info->properties2.properties.limits;
|
vulkan_info->device_limits = physical_device_info->properties2.properties.limits;
|
||||||
vulkan_info->sparse_properties = physical_device_info->properties2.properties.sparseProperties;
|
vulkan_info->sparse_properties = physical_device_info->properties2.properties.sparseProperties;
|
||||||
vulkan_info->sparse_binding = features->sparseBinding;
|
vulkan_info->sparse_binding = features->sparseBinding;
|
||||||
|
vulkan_info->sparse_residency_3d = features->sparseResidencyImage3D;
|
||||||
vulkan_info->rasterization_stream = physical_device_info->xfb_properties.transformFeedbackRasterizationStreamSelect;
|
vulkan_info->rasterization_stream = physical_device_info->xfb_properties.transformFeedbackRasterizationStreamSelect;
|
||||||
vulkan_info->transform_feedback_queries = physical_device_info->xfb_properties.transformFeedbackQueries;
|
vulkan_info->transform_feedback_queries = physical_device_info->xfb_properties.transformFeedbackQueries;
|
||||||
vulkan_info->uav_read_without_format = features->shaderStorageImageReadWithoutFormat;
|
vulkan_info->uav_read_without_format = features->shaderStorageImageReadWithoutFormat;
|
||||||
|
@ -1679,6 +1679,15 @@ HRESULT d3d12_resource_validate_desc(const D3D12_RESOURCE_DESC *desc, struct d3d
|
|||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (desc->Layout == D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE)
|
||||||
|
{
|
||||||
|
if (desc->Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D && !device->vk_info.sparse_residency_3d)
|
||||||
|
{
|
||||||
|
WARN("The device does not support tiled 3D images.\n");
|
||||||
|
return E_INVALIDARG;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!d3d12_resource_validate_texture_format(desc, format)
|
if (!d3d12_resource_validate_texture_format(desc, format)
|
||||||
|| !d3d12_resource_validate_texture_alignment(desc, format))
|
|| !d3d12_resource_validate_texture_alignment(desc, format))
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
@ -151,6 +151,7 @@ struct vkd3d_vulkan_info
|
|||||||
|
|
||||||
VkPhysicalDeviceSparseProperties sparse_properties;
|
VkPhysicalDeviceSparseProperties sparse_properties;
|
||||||
bool sparse_binding;
|
bool sparse_binding;
|
||||||
|
bool sparse_residency_3d;
|
||||||
|
|
||||||
VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT texel_buffer_alignment_properties;
|
VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT texel_buffer_alignment_properties;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user