Module: Mesa Branch: master Commit: 49817cb3eaddf1085dadbdcadf2c3c93b02a8f16 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=49817cb3eaddf1085dadbdcadf2c3c93b02a8f16
Author: Connor Abbott <cwabbo...@gmail.com> Date: Wed Feb 5 17:18:47 2020 +0100 tu: Don't emit initial render target state in tile_load_ib Emitting it directly in CmdBeginRenderPass should be around the same, except that now we can easily share it with the sysmem path. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3713> --- src/freedreno/vulkan/tu_cmd_buffer.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c index 6c251757c94..7a70c9f5abb 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -1419,8 +1419,9 @@ tu_cmd_prepare_tile_load_ib(struct tu_cmd_buffer *cmd, const VkRenderPassBeginInfo *info) { const uint32_t tile_load_space = - 8 + (23+19) * cmd->state.pass->attachment_count + - 21 + (13 * cmd->state.subpass->color_count + 8) + 11; + 2 * 3 /* blit_scissor */ + + (20 /* load */ + 19 /* clear */) * cmd->state.pass->attachment_count + + 2 /* cache invalidate */; struct tu_cs sub_cs; @@ -1448,10 +1449,6 @@ tu_cmd_prepare_tile_load_ib(struct tu_cmd_buffer *cmd, if (cmd->state.subpass->input_count) tu6_emit_event_write(cmd, &sub_cs, CACHE_INVALIDATE, false); - tu6_emit_zs(cmd, cmd->state.subpass, &sub_cs); - tu6_emit_mrt(cmd, cmd->state.subpass, &sub_cs); - tu6_emit_msaa(cmd, cmd->state.subpass, &sub_cs); - cmd->state.tile_load_ib = tu_cs_end_sub_stream(&cmd->sub_cs, &sub_cs); } @@ -2322,6 +2319,16 @@ tu_CmdBeginRenderPass(VkCommandBuffer commandBuffer, tu_cmd_prepare_tile_load_ib(cmd, pRenderPassBegin); tu_cmd_prepare_tile_store_ib(cmd); + VkResult result = tu_cs_reserve_space(cmd->device, &cmd->draw_cs, 1024); + if (result != VK_SUCCESS) { + cmd->record_result = result; + return; + } + + tu6_emit_zs(cmd, cmd->state.subpass, &cmd->draw_cs); + tu6_emit_mrt(cmd, cmd->state.subpass, &cmd->draw_cs); + tu6_emit_msaa(cmd, cmd->state.subpass, &cmd->draw_cs); + /* note: use_hw_binning only checks tiling config */ if (use_hw_binning(cmd)) cmd->use_vsc_data = true; _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit