GPUOpen-Archive / Anvil

Anvil is a cross-platform framework for Vulkan
MIT License
594 stars 62 forks source link

get_image_format_properties uses stencil usage flags of 0, which is not allowed #153

Open Silverlan opened 5 years ago

Silverlan commented 5 years ago

PhysicalDevice::get_image_format_properties sets the stencilUsage-member in this code block to 0:

if (m_extension_info_ptr->get_device_extension_info()->ext_separate_stencil_usage() )
{
    VkImageStencilUsageCreateInfoEXT create_info;

    create_info.pNext        = nullptr;
    create_info.stencilUsage = 0;
    create_info.sType        = VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT;

    image_stencil_usage_create_info_struct_id = input_struct_chainer.append_struct(create_info);
}

This is not allowed according to the specification and throws a validation error in the latest Vulkan SDK version: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageStencilUsageCreateInfoEXT-stencilUsage-requiredbitmask