turnip: compute and graphics have completely separate state
authorJonathan Marek <jonathan@marek.ca>
Sun, 14 Jun 2020 14:15:45 +0000 (10:15 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 17 Jun 2020 15:32:30 +0000 (15:32 +0000)
The comment about fragment shader state overwriting compute shader state
is wrong, if either path is overwriting the other's state then it is a
mistake.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5446>

src/freedreno/vulkan/tu_cmd_buffer.c

index 5276140bd27927ab73f5f684eb85a0c384129693..04765a3d8968460fe9b81b5ba415f24311c56dcf 100644 (file)
@@ -3507,12 +3507,7 @@ tu6_bind_draw_states(struct tu_cmd_buffer *cmd,
     * bits to preserve instead. The only things not emitted here are
     * compute-related state.
     */
-   cmd->state.dirty &= TU_CMD_DIRTY_COMPUTE_DESCRIPTOR_SETS;
-
-   /* Fragment shader state overwrites compute shader state, so flag the
-    * compute pipeline for re-emit.
-    */
-   cmd->state.dirty |= TU_CMD_DIRTY_COMPUTE_PIPELINE;
+   cmd->state.dirty &= (TU_CMD_DIRTY_COMPUTE_DESCRIPTOR_SETS | TU_CMD_DIRTY_COMPUTE_PIPELINE);
    return VK_SUCCESS;
 }
 
@@ -3877,11 +3872,6 @@ tu_dispatch(struct tu_cmd_buffer *cmd,
    cmd->state.dirty &=
       ~(TU_CMD_DIRTY_COMPUTE_DESCRIPTOR_SETS | TU_CMD_DIRTY_COMPUTE_PIPELINE);
 
-   /* Compute shader state overwrites fragment shader state, so we flag the
-    * graphics pipeline for re-emit.
-    */
-   cmd->state.dirty |= TU_CMD_DIRTY_PIPELINE;
-
    tu_cs_emit_pkt7(cs, CP_SET_MARKER, 1);
    tu_cs_emit(cs, A6XX_CP_SET_MARKER_0_MODE(RM6_COMPUTE));