mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
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:
parent
486a820bc6
commit
9e915fd5f7
1 changed files with 23 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue