From: Connor Abbott Date: Mon, 3 Aug 2020 09:13:56 +0000 (+0200) Subject: tu: Reset has_tess after renderpass X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f226b198f5bb09951ecc6833db1b912eb677f708;p=mesa.git tu: Reset has_tess after renderpass Don't force sysmem for render passes after the one that uses tessellation. Also, move this into tu_cmd_state as that's where it belongs. Part-of: --- diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c index 03130750d32..24b0de0085a 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -595,7 +595,7 @@ use_sysmem_rendering(struct tu_cmd_buffer *cmd) cmd->state.render_area.extent.height == 0) return true; - if (cmd->has_tess) + if (cmd->state.has_tess) return true; return false; @@ -2529,8 +2529,8 @@ tu_CmdExecuteCommands(VkCommandBuffer commandBuffer, break; } - if (secondary->has_tess) - cmd->has_tess = true; + if (secondary->state.has_tess) + cmd->state.has_tess = true; } else { assert(tu_cs_is_empty(&secondary->draw_cs)); assert(tu_cs_is_empty(&secondary->draw_epilogue_cs)); @@ -3037,7 +3037,7 @@ tu6_draw_common(struct tu_cmd_buffer *cmd, if (has_tess) { uint64_t tess_factor_iova = 0; - cmd->has_tess = true; + cmd->state.has_tess = true; result = tu6_emit_tess_consts(cmd, draw_count, pipeline, &tess_consts, &tess_factor_iova); if (result != VK_SUCCESS) return result; @@ -3670,6 +3670,7 @@ tu_CmdEndRenderPass(VkCommandBuffer commandBuffer) cmd_buffer->state.pass = NULL; cmd_buffer->state.subpass = NULL; cmd_buffer->state.framebuffer = NULL; + cmd_buffer->state.has_tess = false; } void diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h index 9bccc20b743..b5f76e7319d 100644 --- a/src/freedreno/vulkan/tu_private.h +++ b/src/freedreno/vulkan/tu_private.h @@ -922,6 +922,7 @@ struct tu_cmd_state struct tu_cs_entry tile_store_ib; bool xfb_used; + bool has_tess; }; struct tu_cmd_pool @@ -1007,8 +1008,6 @@ struct tu_cmd_buffer struct tu_cs draw_epilogue_cs; struct tu_cs sub_cs; - bool has_tess; - uint32_t vsc_draw_strm_pitch; uint32_t vsc_prim_strm_pitch; };