OK, I will try it again.
Thanks!


On Thu, Jul 18, 2019 at 9:49 AM Henri Verbeet <hverbeet@gmail.com> wrote:
On Wed, 17 Jul 2019 at 15:48, Józef Kucia <joseph.kucia@gmail.com> wrote:
> +bool vk_format_is_signed_integer(VkFormat format)
> +{
> +    switch (format)
> +    {
> +        case VK_FORMAT_R32G32B32A32_SINT:
> +        case VK_FORMAT_R16G16B16A16_SINT:
> +        case VK_FORMAT_R32G32B32_SINT:
> +        case VK_FORMAT_R8G8B8A8_SINT:
> +        case VK_FORMAT_R32G32_SINT:
> +        case VK_FORMAT_R16G16_SINT:
> +        case VK_FORMAT_R8G8_SINT:
> +        case VK_FORMAT_R32_SINT:
> +        case VK_FORMAT_R16_SINT:
> +        case VK_FORMAT_R8_SINT:
> +            return true;
> +        default:
> +            return false;
> +    }
> +}
> +
> +bool vk_format_is_unsigned_integer(VkFormat format)
> +{
> +    switch (format)
> +    {
> +        case VK_FORMAT_R32G32B32A32_UINT:
> +        case VK_FORMAT_R16G16B16A16_UINT:
> +        case VK_FORMAT_R32G32B32_UINT:
> +        case VK_FORMAT_R8G8B8A8_UINT:
> +        case VK_FORMAT_R32G32_UINT:
> +        case VK_FORMAT_R16G16_UINT:
> +        case VK_FORMAT_R8G8_UINT:
> +        case VK_FORMAT_R32_UINT:
> +        case VK_FORMAT_R16_UINT:
> +        case VK_FORMAT_R8_UINT:
> +            return true;
> +        default:
> +            return false;
> +    }
> +}
That's a little ugly, can we store the format type in vkd3d_formats[]?




--
Regards,
Jactry Zeng