tu: Use tu_cs_add_entries() with non-render-pass secondaries
authorConnor Abbott <cwabbott0@gmail.com>
Fri, 17 Apr 2020 13:28:10 +0000 (15:28 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 17 Apr 2020 14:11:07 +0000 (14:11 +0000)
commit64e3b8d66b9d4103ff815606ff20b39246418122
treebc308106c6fa7fd502d1c3f634a9c6f6111470c9
parentac0b8d58b963efbeadb4461b39f7d910996c2db7
tu: Use tu_cs_add_entries() with non-render-pass secondaries

Even though vkCmdRenderPassBegin() isn't allowed inside a secondary
command buffer, vkCmdDispatch() is, and we emit an IB with compute
dispatches, which means that if the secondary command buffer records a
vkCmdDispatch() then we'll have an IB inside an IB, which is illegal.
Fixes hangs in e.g.
dEQP-VK.api.command_buffers.record_simul_use_secondary_one_primary.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4605>
src/freedreno/vulkan/tu_cmd_buffer.c