From: Alyssa Rosenzweig Date: Tue, 21 Dec 2021 22:06:05 +0000 (-0500) Subject: pan/bi: Fix spilling on Valhall X-Git-Tag: upstream/22.3.5~10796 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe9cf1d0a4564a6f9b75ee04f266c7d180522de5;p=platform%2Fupstream%2Fmesa.git pan/bi: Fix spilling on Valhall We need a slightly different idiom on Valhall, since the segment modifiers no longer exist but we now have an immediate offset. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/bi_ra.c b/src/panfrost/bifrost/bi_ra.c index b5ba87ba593..8b14c0ec79a 100644 --- a/src/panfrost/bifrost/bi_ra.c +++ b/src/panfrost/bifrost/bi_ra.c @@ -479,12 +479,18 @@ bi_count_read_index(bi_instr *I, bi_index index) * for the target, so the spill/fill code becomes architecture-independent. */ +static bi_index +bi_tls_ptr(bool hi) +{ + return bi_fau(BIR_FAU_TLS_PTR, hi); +} + static bi_instr * bi_load_tl(bi_builder *b, unsigned bits, bi_index src, unsigned offset) { if (b->shader->arch >= 9) { - return bi_load_to(b, bits, src, va_zero_lut(), va_zero_lut(), - BI_SEG_TL, offset); + return bi_load_to(b, bits, src, bi_tls_ptr(false), + bi_tls_ptr(true), BI_SEG_TL, offset); } else { return bi_load_to(b, bits, src, bi_imm_u32(offset), bi_zero(), BI_SEG_TL, 0); @@ -495,7 +501,7 @@ static void bi_store_tl(bi_builder *b, unsigned bits, bi_index src, unsigned offset) { if (b->shader->arch >= 9) { - bi_store(b, bits, src, va_zero_lut(), va_zero_lut(), BI_SEG_TL, offset); + bi_store(b, bits, src, bi_tls_ptr(false), bi_tls_ptr(true), BI_SEG_TL, offset); } else { bi_store(b, bits, src, bi_imm_u32(offset), bi_zero(), BI_SEG_TL, 0); }