anv: Use the PIPE_CONTROL instead of bits for the CS stall W/A
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 16 Feb 2018 19:56:31 +0000 (11:56 -0800)
committerMarge Bot <eric+marge@anholt.net>
Mon, 2 Mar 2020 22:28:11 +0000 (22:28 +0000)
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4005>

src/intel/vulkan/genX_cmd_buffer.c

index 74a052d4807b5796aa244d3fa53837720e3816c1..99885298126410b2c549f74d96e2e17803eb3e89 100644 (file)
@@ -2107,9 +2107,13 @@ genX(cmd_buffer_apply_pipe_flushes)(struct anv_cmd_buffer *cmd_buffer)
           * I chose "Stall at Pixel Scoreboard" since that's what we use in
           * mesa and it seems to work fine. The choice is fairly arbitrary.
           */
-         if ((bits & ANV_PIPE_CS_STALL_BIT) &&
-             !(bits & (ANV_PIPE_FLUSH_BITS | ANV_PIPE_DEPTH_STALL_BIT |
-                       ANV_PIPE_STALL_AT_SCOREBOARD_BIT)))
+         if (pipe.CommandStreamerStallEnable &&
+             !pipe.RenderTargetCacheFlushEnable &&
+             !pipe.DepthCacheFlushEnable &&
+             !pipe.StallAtPixelScoreboard &&
+             !pipe.PostSyncOperation &&
+             !pipe.DepthStallEnable &&
+             !pipe.DCFlushEnable)
             pipe.StallAtPixelScoreboard = true;
       }