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>
This commit is contained in:
Brian Ho
2020-06-09 14:48:49 -04:00
committed by Marge Bot
parent 2718353b38
commit 7a836ec631
2 changed files with 9 additions and 0 deletions
+7
View File
@@ -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;
+2
View File
@@ -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;