(VkDeviceSize)(m_data.bufferLen ? m_data.bufferLen : 1),
(VkDeviceSize)256);
+ VkBufferUsageFlags usage = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT;
if (m_data.descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER ||
m_data.descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC)
{
size = deIntRoundToPow2((int)size, (int)robustness2Properties.robustUniformBufferAccessSizeAlignment);
+ usage |= VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT;
}
else if (m_data.descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER ||
m_data.descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC)
{
size = deIntRoundToPow2((int)size, (int)robustness2Properties.robustStorageBufferAccessSizeAlignment);
+ usage |= VK_BUFFER_USAGE_STORAGE_BUFFER_BIT;
+ }
+ else if (m_data.descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER)
+ {
+ usage |= VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT;
+ }
+ else if (m_data.descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER)
+ {
+ usage |= VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT;
}
else if (m_data.descriptorType == VERTEX_ATTRIBUTE_FETCH)
{
}
buffer = de::MovePtr<BufferWithMemory>(new BufferWithMemory(
- vk, device, allocator, makeBufferCreateInfo(size,
- VK_BUFFER_USAGE_STORAGE_BUFFER_BIT |
- VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT |
- VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT |
- VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT |
- VK_BUFFER_USAGE_VERTEX_BUFFER_BIT),
- MemoryRequirement::HostVisible));
+ vk, device, allocator, makeBufferCreateInfo(size, usage), MemoryRequirement::HostVisible));
bufferPtr = (deUint8 *)buffer->getAllocation().getHostPtr();
deMemset(bufferPtr, 0x3f, (size_t)size);