panvk/csf: Fix TLS pointer copy
The source/destination was inverted. While at it, make this copy conditional on tlsinfo.tls.size > 0. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31248>
This commit is contained in:

committed by
Marge Bot

parent
28e4d22497
commit
ae9df204e9
@@ -160,12 +160,14 @@ panvk_per_arch(CmdDispatchBase)(VkCommandBuffer commandBuffer,
|
||||
unsigned task_increment = 0;
|
||||
|
||||
/* Copy the global TLS pointer to the per-job TSD. */
|
||||
cs_move64_to(b, cs_scratch_reg64(b, 0), tsd.gpu);
|
||||
cs_load64_to(b, cs_scratch_reg64(b, 2), cs_scratch_reg64(b, 0), 8);
|
||||
cs_wait_slot(b, SB_ID(LS), false);
|
||||
cs_move64_to(b, cs_scratch_reg64(b, 0), cmdbuf->state.tls.desc.gpu);
|
||||
cs_store64(b, cs_scratch_reg64(b, 2), cs_scratch_reg64(b, 0), 8);
|
||||
cs_wait_slot(b, SB_ID(LS), false);
|
||||
if (tlsinfo.tls.size) {
|
||||
cs_move64_to(b, cs_scratch_reg64(b, 0), cmdbuf->state.tls.desc.gpu);
|
||||
cs_load64_to(b, cs_scratch_reg64(b, 2), cs_scratch_reg64(b, 0), 8);
|
||||
cs_wait_slot(b, SB_ID(LS), false);
|
||||
cs_move64_to(b, cs_scratch_reg64(b, 0), tsd.gpu);
|
||||
cs_store64(b, cs_scratch_reg64(b, 2), cs_scratch_reg64(b, 0), 8);
|
||||
cs_wait_slot(b, SB_ID(LS), false);
|
||||
}
|
||||
|
||||
cs_update_compute_ctx(b) {
|
||||
cs_move64_to(b, cs_sr_reg64(b, 0), cs_desc_state->res_table);
|
||||
|
Reference in New Issue
Block a user