vkd3d: Only set VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT for color attachments.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
This commit is contained in:
parent
a94e9b8b6a
commit
910f15dff8
|
@ -538,8 +538,6 @@ static HRESULT vkd3d_get_image_create_info(struct d3d12_device *device,
|
||||||
&& desc->Width == desc->Height && desc->DepthOrArraySize >= 6
|
&& desc->Width == desc->Height && desc->DepthOrArraySize >= 6
|
||||||
&& desc->SampleDesc.Count == 1)
|
&& desc->SampleDesc.Count == 1)
|
||||||
image_info->flags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
|
image_info->flags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
|
||||||
if (desc->Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D)
|
|
||||||
image_info->flags |= VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR;
|
|
||||||
|
|
||||||
if (sparse_resource)
|
if (sparse_resource)
|
||||||
{
|
{
|
||||||
|
@ -631,6 +629,11 @@ static HRESULT vkd3d_get_image_create_info(struct d3d12_device *device,
|
||||||
if (vkd3d_resource_can_be_vrs(device, heap_properties, desc))
|
if (vkd3d_resource_can_be_vrs(device, heap_properties, desc))
|
||||||
image_info->usage |= VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR;
|
image_info->usage |= VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR;
|
||||||
|
|
||||||
|
/* Additional image flags as necessary */
|
||||||
|
if (image_info->imageType == VK_IMAGE_TYPE_3D &&
|
||||||
|
(image_info->usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT))
|
||||||
|
image_info->flags |= VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT;
|
||||||
|
|
||||||
use_concurrent = !!(device->unique_queue_mask & (device->unique_queue_mask - 1));
|
use_concurrent = !!(device->unique_queue_mask & (device->unique_queue_mask - 1));
|
||||||
|
|
||||||
if (!(desc->Flags & D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS))
|
if (!(desc->Flags & D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS))
|
||||||
|
|
Loading…
Reference in New Issue