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 <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15793>
This commit is contained in:
Alyssa Rosenzweig
2021-12-21 17:06:05 -05:00
committed by Marge Bot
parent a2916aa934
commit fe9cf1d0a4

View File

@@ -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);
}