Vulkan: Also invalidate fragment uniform buffer

This commit is contained in:
Hans-Kristian Arntzen 2016-03-21 11:49:27 +01:00
parent 840278796e
commit 7899d449e6

View File

@ -1351,7 +1351,7 @@ static void vulkan_readback(vk_t *vk)
VK_PIPELINE_STAGE_HOST_BIT);
}
static void vulkan_flush_vertex_caches(vk_t *vk)
static void vulkan_flush_caches(vk_t *vk)
{
VkMemoryBarrier barrier = { VK_STRUCTURE_TYPE_MEMORY_BARRIER };
barrier.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT;
@ -1359,7 +1359,9 @@ static void vulkan_flush_vertex_caches(vk_t *vk)
VKFUNC(vkCmdPipelineBarrier)(vk->cmd,
VK_PIPELINE_STAGE_HOST_BIT,
VK_PIPELINE_STAGE_VERTEX_INPUT_BIT | VK_PIPELINE_STAGE_VERTEX_SHADER_BIT,
VK_PIPELINE_STAGE_VERTEX_INPUT_BIT |
VK_PIPELINE_STAGE_VERTEX_SHADER_BIT |
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
false,
1, &barrier,
0, NULL, 0, NULL);
@ -1421,7 +1423,7 @@ static bool vulkan_frame(void *data, const void *frame,
memset(&vk->tracker, 0, sizeof(vk->tracker));
vulkan_flush_vertex_caches(vk);
vulkan_flush_caches(vk);
/* Upload texture */
retro_perf_start(&copy_frame);