GPUOpen-Archive / Anvil

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

CommandBufferBase::record_update_buffer takes a pointer to uint32_t instead of void? #74

Closed Silverlan closed 6 years ago

Silverlan commented 6 years ago

vkCmdUpdateBuffer takes a const void* parameter for the data, but _CommandBufferBase::record_updatebuffer takes a _const uint32t*, which seems a little odd to me:

bool record_update_buffer(Anvil::Buffer*  in_dst_buffer_ptr,
                            VkDeviceSize    in_dst_offset,
                            VkDeviceSize    in_data_size,
                            const uint32_t* in_data_ptr);

The parameter should probably be const void* as well.

DominikWitczakAMD commented 6 years ago

I believe the original intent behind in_data_ptr being a uint32_t ptr was that @param in_data_size has to be a mul of 4 as per Vulkan spec.

That being said, I agree this type goes against the original API and should be changed to const void*. Will fix this next week.

DominikWitczakAMD commented 6 years ago

Fixed internally.