pan/bi: Add bi_fill

Likewise generates LOAD from tls.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
This commit is contained in:
Alyssa Rosenzweig
2020-10-14 19:27:47 -04:00
committed by Marge Bot
parent 486a820bc6
commit 9e915fd5f7

View File

@@ -197,6 +197,29 @@ bi_spill(unsigned node, uint64_t offset, unsigned channels)
return store;
}
static bi_instruction
bi_fill(unsigned node, uint64_t offset, unsigned channels)
{
bi_instruction load = {
.type = BI_LOAD,
.segment = BI_SEGMENT_TLS,
.vector_channels = channels,
.dest = node,
.dest_type = nir_type_uint32,
.src = {
BIR_INDEX_CONSTANT,
BIR_INDEX_CONSTANT | 32,
},
.src_types = {
nir_type_uint32,
nir_type_uint32
},
.constant = { .u64 = offset },
};
return load;
}
/* If register allocation fails, find the best spill node */
static signed