Vulkan: Fix register constants on AMD

This commit is contained in:
Dr. Chat
2017-03-13 23:43:34 -05:00
parent 5f5dc61428
commit 855ebb9cfe
5 changed files with 83 additions and 16 deletions

View File

@@ -232,6 +232,16 @@ void CircularBuffer::Flush(Allocation* allocation) {
vkFlushMappedMemoryRanges(*device_, 1, &range);
}
void CircularBuffer::Flush(VkDeviceSize offset, VkDeviceSize length) {
VkMappedMemoryRange range;
range.sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE;
range.pNext = nullptr;
range.memory = gpu_memory_;
range.offset = gpu_base_ + offset;
range.size = length;
vkFlushMappedMemoryRanges(*device_, 1, &range);
}
void CircularBuffer::Clear() {
for (auto alloc : allocations_) {
delete alloc;