From 7a836ec6319630a3b5dfbb7101b839c4804a092c Mon Sep 17 00:00:00 2001 From: Brian Ho Date: Tue, 9 Jun 2020 14:48:49 -0400 Subject: turnip: Force sysmem for tessellation Tessellation is incompatible with HW binning (dEQP tests fail when we set forcebin), so force sysmem when we finish recording a command buffer that uses a tess pipeline. Part-of: --- src/freedreno/vulkan/tu_cmd_buffer.c | 7 +++++++ src/freedreno/vulkan/tu_private.h | 2 ++ 2 files changed, 9 insertions(+) (limited to 'src') diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c index 2f88ca758cb..41d6bfcdedd 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -730,6 +730,9 @@ use_sysmem_rendering(struct tu_cmd_buffer *cmd) if (cmd->state.framebuffer->layers > 1) return true; + if (cmd->has_tess) + return true; + return cmd->state.tiling_config.force_sysmem; } @@ -2514,6 +2517,9 @@ tu_CmdExecuteCommands(VkCommandBuffer commandBuffer, cmd->record_result = result; break; } + + if (secondary->has_tess) + cmd->has_tess = true; } else { assert(tu_cs_is_empty(&secondary->draw_cs)); assert(tu_cs_is_empty(&secondary->draw_epilogue_cs)); @@ -3217,6 +3223,7 @@ tu6_bind_draw_states(struct tu_cmd_buffer *cmd, pipeline->active_stages & VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT; struct tu_cs_entry tess_consts = {}; if (has_tess) { + cmd->has_tess = true; result = tu6_emit_tess_consts(cmd, draw, pipeline, &tess_consts); if (result != VK_SUCCESS) return result; diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h index df843ee2789..532ab64362c 100644 --- a/src/freedreno/vulkan/tu_private.h +++ b/src/freedreno/vulkan/tu_private.h @@ -967,6 +967,8 @@ struct tu_cmd_buffer struct tu_bo scratch_bo; + bool has_tess; + struct tu_bo vsc_draw_strm; struct tu_bo vsc_prim_strm; uint32_t vsc_draw_strm_pitch; -- cgit v1.2.3