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

@@ -53,6 +53,7 @@ class BufferCache {
// VK_WHOLE_SIZE if the constants could not be uploaded (OOM).
// The returned offsets may alias.
std::pair<VkDeviceSize, VkDeviceSize> UploadConstantRegisters(
VkCommandBuffer command_buffer,
const Shader::ConstantRegisterMap& vertex_constant_register_map,
const Shader::ConstantRegisterMap& pixel_constant_register_map,
VkFence fence);
@@ -61,19 +62,17 @@ class BufferCache {
// recently uploaded data or cached copies.
// Returns a buffer and offset that can be used with vkCmdBindIndexBuffer.
// Size will be VK_WHOLE_SIZE if the data could not be uploaded (OOM).
std::pair<VkBuffer, VkDeviceSize> UploadIndexBuffer(uint32_t source_addr,
uint32_t source_length,
IndexFormat format,
VkFence fence);
std::pair<VkBuffer, VkDeviceSize> UploadIndexBuffer(
VkCommandBuffer command_buffer, uint32_t source_addr,
uint32_t source_length, IndexFormat format, VkFence fence);
// Uploads vertex buffer data from guest memory, possibly eliding with
// recently uploaded data or cached copies.
// Returns a buffer and offset that can be used with vkCmdBindVertexBuffers.
// Size will be VK_WHOLE_SIZE if the data could not be uploaded (OOM).
std::pair<VkBuffer, VkDeviceSize> UploadVertexBuffer(uint32_t source_addr,
uint32_t source_length,
Endian endian,
VkFence fence);
std::pair<VkBuffer, VkDeviceSize> UploadVertexBuffer(
VkCommandBuffer command_buffer, uint32_t source_addr,
uint32_t source_length, Endian endian, VkFence fence);
// Flushes all pending data to the GPU.
// Until this is called the GPU is not guaranteed to see any data.