anv: Always invalidate the VF cache in BeginCommandBuffer
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 2 Dec 2019 18:14:45 +0000 (12:14 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Thu, 5 Dec 2019 16:59:10 +0000 (10:59 -0600)
I think the reason why we only do this for primaries is that we didn't
expect to have blorp calls in secondaries.  However, you are allowed to
have a full render pass in a secondary command buffer so resolves and
clears can end up in there.  We should just always invalidate.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/genX_cmd_buffer.c

index 44249575c52625021599306ded866e789b3a05a9..d6c6243934cb431ff32da4c79706d43fd46c93e7 100644 (file)
@@ -1393,8 +1393,7 @@ genX(BeginCommandBuffer)(
     * blorp at least once per primary command buffer so it shouldn't be
     * wasted.
     */
-   if (cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY)
-      cmd_buffer->state.pending_pipe_bits |= ANV_PIPE_VF_CACHE_INVALIDATE_BIT;
+   cmd_buffer->state.pending_pipe_bits |= ANV_PIPE_VF_CACHE_INVALIDATE_BIT;
 
    /* We send an "Indirect State Pointers Disable" packet at
     * EndCommandBuffer, so all push contant packets are ignored during a