diff options
author | Brian Ho <[email protected]> | 2020-06-09 14:48:49 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-22 14:35:46 +0000 |
commit | 7a836ec6319630a3b5dfbb7101b839c4804a092c (patch) | |
tree | 1b6b54bdbf2a9a4d0ddb8ca4f01b9e95ddde70c6 /src | |
parent | 2718353b381790be3dca8a385d23034ea96f8565 (diff) |
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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5059>
Diffstat (limited to 'src')
-rw-r--r-- | src/freedreno/vulkan/tu_cmd_buffer.c | 7 | ||||
-rw-r--r-- | src/freedreno/vulkan/tu_private.h | 2 |
2 files changed, 9 insertions, 0 deletions
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; |