anv/gen7: Add memory barrier to vkCmdWaitEvents call
authorJordan Justen <jordan.l.justen@intel.com>
Tue, 12 Apr 2016 17:15:38 +0000 (10:15 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Tue, 17 May 2016 20:04:03 +0000 (13:04 -0700)
We also have this barrier call for gen8 vkCmdWaitEvents.

We don't implement waiting on events for gen7 yet, but this barrier at
least helps to not regress CTS cases when data caching is enabled.
Without this, the tests would intermittently report a failure when the
data cache was enabled.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/gen7_cmd_buffer.c

index 62d9f4644a1e4556e0004805cbab29119ef704c6..32bae027725bb51d09e8961733b14e976d359dac 100644 (file)
@@ -546,4 +546,10 @@ void genX(CmdWaitEvents)(
     const VkImageMemoryBarrier*                 pImageMemoryBarriers)
 {
    stub();
+
+   genX(CmdPipelineBarrier)(commandBuffer, srcStageMask, destStageMask,
+                            false, /* byRegion */
+                            memoryBarrierCount, pMemoryBarriers,
+                            bufferMemoryBarrierCount, pBufferMemoryBarriers,
+                            imageMemoryBarrierCount, pImageMemoryBarriers);
 }