Vulkan: Convert VertexBuffer to Contain Supported Attributes #107733

Merged
Jeroen Bakker merged 7 commits from Jeroen-Bakker/blender:vulkan-attribute-data-conversions into main 2023-05-11 12:23:29 +02:00

7 Commits

Author SHA1 Message Date
Jeroen Bakker 90a1b998b3 Fix spelling 2023-05-11 12:21:19 +02:00
Jeroen Bakker 253527cd8a Add COMP_(U/I)(8/16/32) test cases 2023-05-11 12:18:44 +02:00
Jeroen Bakker 56912d80ee Merge branch 'main' into vulkan-attribute-data-conversions 2023-05-11 10:37:29 +02:00
Jeroen Bakker d77ad93ef8 Commit before merge. 2023-05-11 10:34:40 +02:00
Jeroen Bakker 5cd06013a4 Merge branch 'main' into vulkan-attribute-data-conversions 2023-05-11 10:15:02 +02:00
Jeroen Bakker 66f7fd6667 Use correct VkFormat based on the fetch mode and conversion. 2023-05-08 13:49:06 +02:00
Jeroen Bakker ad7465be67 Vulkan: Convert VertexBuffer to Contain Supported Attributes
Vulkan doesn't have a conversion from uint32_t/int32_t to float. It does
have conversions from 16/8 bits. Main reason is that Vulkan expects that
there is no benefit when converting 32 bits from one type to the other
and should be solved by passing the right data type.

In Blender however this isn't the case as there are benefits on other
GPU backends (OpenGL for example).

This PR adds helper function to check if conversion is needed and
perform any conversions in place. It also implements the function to
upload vertex buffers to the GPU.
2023-05-08 12:28:11 +02:00