VkDescriptorType descriptorType,
const VkDescriptorInfo* pDescriptors)
{
- const VkWriteDescriptorSet write =
+ const VkWriteDescriptorSet writeParams =
{
VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
DE_NULL,
descriptorType, //!< descriptorType
pDescriptors, //!< pDescriptors
};
- m_writes.push_back(write);
+ m_writes.push_back(writeParams);
return *this;
}
deUint32 destArrayElement,
deUint32 count)
{
- const VkCopyDescriptorSet copy =
+ const VkCopyDescriptorSet copyParams =
{
VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET,
DE_NULL,
destArrayElement, //!< destArrayElement
count, //!< count
};
- m_copies.push_back(copy);
+ m_copies.push_back(copyParams);
return *this;
}
class Location
{
public:
- static inline Location binding (deUint32 binding)
+ static inline Location binding (deUint32 binding_)
{
- return Location(binding, 0u);
+ return Location(binding_, 0u);
}
- static inline Location bindingArrayElement (deUint32 binding, deUint32 arrayElement)
+ static inline Location bindingArrayElement (deUint32 binding_, deUint32 arrayElement)
{
- return Location(binding, arrayElement);
+ return Location(binding_, arrayElement);
}
private:
// \note private to force use of factory methods that have more descriptive names
- inline Location (deUint32 binding, deUint32 arrayElement)
- : m_binding (binding)
+ inline Location (deUint32 binding_, deUint32 arrayElement)
+ : m_binding (binding_)
, m_arrayElement (arrayElement)
{
}
bool MemoryRequirement::matchesHeap (VkMemoryPropertyFlags heapFlags) const
{
+ // sanity check
+ if ((m_flags & FLAG_COHERENT) && !(m_flags & FLAG_HOST_VISIBLE))
+ DE_FATAL("Coherent memory must be host-visible");
+ if ((m_flags & FLAG_HOST_VISIBLE) && (m_flags & FLAG_LAZY_ALLOCATION))
+ DE_FATAL("Lazily allocated memory cannot be mappable");
+
// host-visible
if ((m_flags & FLAG_HOST_VISIBLE) && !(heapFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT))
return false;
MemoryRequirement::MemoryRequirement (deUint32 flags)
: m_flags(flags)
{
- if ((flags & FLAG_COHERENT) && !(flags & FLAG_HOST_VISIBLE))
- DE_FATAL("Coherent memory must be host-visible");
- if ((flags & FLAG_HOST_VISIBLE) && (flags & FLAG_LAZY_ALLOCATION))
- DE_FATAL("Lazily allocated memory cannot be mappable");
}
// SimpleAllocator
MovePtr<Allocation> SimpleAllocator::allocate (const VkMemoryRequirements& memReqs, MemoryRequirement requirement)
{
const deUint32 memoryTypeNdx = selectMatchingMemoryType(m_memProps, memReqs.memoryTypeBits, requirement);
- const VkMemoryAllocInfo allocInfo =
+ const VkMemoryAllocInfo allocInfo =
{
VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO, // VkStructureType sType;
DE_NULL, // const void* pNext;