tornavis/source/blender/gpu/vulkan
Jeroen Bakker 8aff713270 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.

NOTE: Test cases have been added to validate this, but they are not
able to run on the Vulkan backend just yet, because they require the
graphics pipeline to be available.

Pull Request: https://projects.blender.org/blender/blender/pulls/107733
2023-05-11 12:23:23 +02:00
..
vk_backend.cc Vulkan: Share Device Between Contexts 2023-05-04 10:06:48 +02:00
vk_backend.hh Vulkan: Share Device Between Contexts 2023-05-04 10:06:48 +02:00
vk_batch.cc Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_batch.hh Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_buffer.cc Vulkan: Ensure Minimum Size of VKBuffer 2023-05-09 10:20:54 +02:00
vk_buffer.hh Vulkan: Share Device Between Contexts 2023-05-04 10:06:48 +02:00
vk_command_buffer.cc Vulkan: Silence Compilation Warnings 2023-05-02 15:52:53 +02:00
vk_command_buffer.hh Vulkan: Silence Compilation Warnings 2023-05-02 15:52:53 +02:00
vk_common.cc Vulkan: Convert VertexBuffer to Contain Supported Attributes 2023-05-11 12:23:23 +02:00
vk_common.hh Vulkan: Convert VertexBuffer to Contain Supported Attributes 2023-05-11 12:23:23 +02:00
vk_context.cc Vulkan: Frame Buffer Flipping 2023-05-09 09:22:26 +02:00
vk_context.hh Vulkan: Frame Buffer Flipping 2023-05-09 09:22:26 +02:00
vk_data_conversion.cc Vulkan: Convert VertexBuffer to Contain Supported Attributes 2023-05-11 12:23:23 +02:00
vk_data_conversion.hh Vulkan: Convert VertexBuffer to Contain Supported Attributes 2023-05-11 12:23:23 +02:00
vk_debug.cc Vulkan: Share Device Between Contexts 2023-05-04 10:06:48 +02:00
vk_debug.hh Vulkan: Share Device Between Contexts 2023-05-04 10:06:48 +02:00
vk_descriptor_pools.cc Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_descriptor_pools.hh Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_descriptor_set.cc Vulkan: Share Device Between Contexts 2023-05-04 10:06:48 +02:00
vk_descriptor_set.hh Cleanup: spelling in comments 2023-04-05 14:39:51 +10:00
vk_device.cc Vulkan: Share Device Between Contexts 2023-05-04 10:06:48 +02:00
vk_device.hh Vulkan: Share Device Between Contexts 2023-05-04 10:06:48 +02:00
vk_drawlist.cc Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_drawlist.hh Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_fence.cc Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_fence.hh Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_framebuffer.cc Vulkan: Frame Buffer Flipping 2023-05-09 09:22:26 +02:00
vk_framebuffer.hh Vulkan: Frame Buffer Flipping 2023-05-09 09:22:26 +02:00
vk_index_buffer.cc Vulkan: Make ShaderInput Optional 2023-05-11 08:44:57 +02:00
vk_index_buffer.hh Vulkan: Share Device Between Contexts 2023-05-04 10:06:48 +02:00
vk_memory.cc Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_memory.hh Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_memory_layout.cc Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_memory_layout.hh Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_pipeline.cc Vulkan: Share Device Between Contexts 2023-05-04 10:06:48 +02:00
vk_pipeline.hh Vulkan: Share Device Between Contexts 2023-05-04 10:06:48 +02:00
vk_pixel_buffer.cc Vulkan: Share Device Between Contexts 2023-05-04 10:06:48 +02:00
vk_pixel_buffer.hh Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_push_constants.cc Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_push_constants.hh Cleanup: format (with BraceWrapping::AfterControlStatement "MultiLine") 2023-05-02 09:37:49 +10:00
vk_query.cc Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_query.hh Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_resource_tracker.cc Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_resource_tracker.hh Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_shader.cc Vulkan: Share Device Between Contexts 2023-05-04 10:06:48 +02:00
vk_shader.hh Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
vk_shader_interface.cc Vulkan: Make ShaderInput Optional 2023-05-11 08:44:57 +02:00
vk_shader_interface.hh Vulkan: Make ShaderInput Optional 2023-05-11 08:44:57 +02:00
vk_shader_log.cc GPU: ShaderLog: Add more const correctness & notes supports 2023-05-04 10:59:26 +02:00
vk_shader_log.hh GPU: ShaderLog: Add more const correctness & notes supports 2023-05-04 10:59:26 +02:00
vk_state_manager.cc Vulkan: Texture Unpacking 2023-04-26 09:23:58 +02:00
vk_state_manager.hh Vulkan: Texture Unpacking 2023-04-26 09:23:58 +02:00
vk_storage_buffer.cc Vulkan: Make ShaderInput Optional 2023-05-11 08:44:57 +02:00
vk_storage_buffer.hh Vulkan: Share Device Between Contexts 2023-05-04 10:06:48 +02:00
vk_texture.cc Vulkan: Make ShaderInput Optional 2023-05-11 08:44:57 +02:00
vk_texture.hh Vulkan: Frame Buffer Flipping 2023-05-09 09:22:26 +02:00
vk_uniform_buffer.cc Vulkan: Make ShaderInput Optional 2023-05-11 08:44:57 +02:00
vk_uniform_buffer.hh Vulkan: Share Device Between Contexts 2023-05-04 10:06:48 +02:00
vk_vertex_buffer.cc Vulkan: Convert VertexBuffer to Contain Supported Attributes 2023-05-11 12:23:23 +02:00
vk_vertex_buffer.hh Vulkan: Convert VertexBuffer to Contain Supported Attributes 2023-05-11 12:23:23 +02:00