15 #include <vsg/state/Buffer.h>
31 BufferInfo(
Buffer* in_buffer, VkDeviceSize in_offset, VkDeviceSize in_range,
Data* in_data =
nullptr);
48 explicit operator bool()
const {
return buffer.valid() && data.valid() && range != 0; }
51 VkDeviceSize offset = 0;
52 VkDeviceSize range = 0;
59 return data && data->differentModifiedCount(copiedModifiedCounts[deviceID]);
65 return data && data->getModifiedCount(copiedModifiedCounts[deviceID]);
75 using BufferInfoList = std::vector<ref_ptr<BufferInfo>>;
79 std::vector<VkBuffer> vkBuffers;
80 std::vector<VkDeviceSize> offsets;
84 extern VSG_DECLSPEC
void assignVulkanArrayData(uint32_t deviceID,
const BufferInfoList& arrays,
VulkanArrayData& vkd);
88 extern VSG_DECLSPEC
bool createBufferAndTransferData(
Context& context,
const BufferInfoList& bufferInfoList, VkBufferUsageFlags usage, VkSharingMode sharingMode);
90 extern VSG_DECLSPEC BufferInfoList createHostVisibleBuffer(
Device* device,
const DataList& dataList, VkBufferUsageFlags usage, VkSharingMode sharingMode);
92 extern VSG_DECLSPEC
void copyDataListToBuffers(
Device* device, BufferInfoList& bufferInfoList);
BufferInfo encapsulates the settings that map to VkDescriptorBufferInfo.
Definition: BufferInfo.h:27
int compare(const Object &rhs_object) const override
compare two objects, return -1 if this object is less than rhs, return 0 if it's equal,...
bool requiresCopy(uint32_t deviceID) const
return true if the BufferInfo's data has been modified and should be copied to the buffer
Definition: BufferInfo.h:57
void copyDataToBuffer(uint32_t deviceID)
bool syncModifiedCounts(uint32_t deviceID)
return true if the BufferInfo's data has been modified and should be copied to the buffer,...
Definition: BufferInfo.h:63
Device encapsulates VkDevice, a logical handle to the PhysicalDevice with capabilities specified duri...
Definition: Device.h:37
Definition: BufferInfo.h:78
vk_buffer that manages a single logical device supported.
Definition: vk_buffer.h:28