From 5ef0f9f62254ba4c6778cc238f43e2437833ad00 Mon Sep 17 00:00:00 2001 From: Jonathan Marek Date: Sun, 14 Jun 2020 10:15:45 -0400 Subject: [PATCH] turnip: compute and graphics have completely separate state 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 Part-of: --- src/freedreno/vulkan/tu_cmd_buffer.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c index 5276140bd27..04765a3d896 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -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)); -- 2.30.2