anv/blorp: Do the gen11 BTI flush
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 17 Apr 2018 22:06:46 +0000 (15:06 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 20 Apr 2018 23:30:14 +0000 (16:30 -0700)
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/intel/vulkan/genX_blorp_exec.c

index b423046d616d9bffda37744689ce99d44938da3c..9023269d61be457bf1824196b512fd8bcfe349bb 100644 (file)
@@ -202,6 +202,20 @@ genX(blorp_exec)(struct blorp_batch *batch,
       genX(cmd_buffer_config_l3)(cmd_buffer, cfg);
    }
 
+#if GEN_GEN >= 11
+   /* The PIPE_CONTROL command description says:
+    *
+    *    "Whenever a Binding Table Index (BTI) used by a Render Taget Message
+    *     points to a different RENDER_SURFACE_STATE, SW must issue a Render
+    *     Target Cache Flush by enabling this bit. When render target flush
+    *     is set due to new association of BTI, PS Scoreboard Stall bit must
+    *     be set in this packet."
+    */
+   cmd_buffer->state.pending_pipe_bits |=
+      ANV_PIPE_RENDER_TARGET_CACHE_FLUSH_BIT |
+      ANV_PIPE_STALL_AT_SCOREBOARD_BIT;
+#endif
+
 #if GEN_GEN == 7
    /* The MI_LOAD/STORE_REGISTER_MEM commands which BLORP uses to implement
     * indirect fast-clear colors can cause GPU hangs if we don't stall first.