[PATCH vkd3d] libs/vkd3d: Use VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT only if array size is >= 6.

Józef Kucia joseph.kucia at gmail.com
Thu Jun 7 09:16:21 CDT 2018


On Thu, Jun 7, 2018 at 4:03 PM, Henri Verbeet <hverbeet at gmail.com> wrote:
> On 7 June 2018 at 15:52, Józef Kucia <joseph.kucia at gmail.com> wrote:
>> +    if (desc->Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE2D
>> +            && desc->Width == desc->Height && desc->DepthOrArraySize >= 6)
>>          image_info.flags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
> Should that be a multiple of 6? I.e., are partial cubemap arrays a
> thing in Direct3D 12?

I think you can create a cube shader resource view for 2D textures,
even if the array size is not a multiple of 6. At least, it works that
way in Direct3D 11. We have some tests in
test_create_shader_resource_view().



More information about the wine-devel mailing list