anv/cmd_buffer: Apply flush operations prior to executing secondaries
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 24 Mar 2017 23:30:24 +0000 (16:30 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 28 Mar 2017 21:56:55 +0000 (14:56 -0700)
This fixes rendering issues in the Vulkan port of skia on some hardware.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
src/intel/vulkan/genX_cmd_buffer.c

index 39856b9af7c77c2580433df3a727c26bdb5094e4..b87d8693fd010d69e7cd64bb131c6931253e31e5 100644 (file)
@@ -654,6 +654,11 @@ genX(CmdExecuteCommands)(
     */
    genX(cmd_buffer_enable_pma_fix)(primary, false);
 
+   /* The secondary command buffer doesn't know which textures etc. have been
+    * flushed prior to their execution.  Apply those flushes now.
+    */
+   genX(cmd_buffer_apply_pipe_flushes)(primary);
+
    for (uint32_t i = 0; i < commandBufferCount; i++) {
       ANV_FROM_HANDLE(anv_cmd_buffer, secondary, pCmdBuffers[i]);