intel/fs: Add support for a new load_reloc_const intrinsic
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6244>
This commit is contained in:

committed by
Marge Bot

parent
8d8a3815ef
commit
91becd84ae
@@ -1386,6 +1386,18 @@ nir_load_param(nir_builder *build, uint32_t param_idx)
|
||||
return &load->dest.ssa;
|
||||
}
|
||||
|
||||
static inline nir_ssa_def *
|
||||
nir_load_reloc_const_intel(nir_builder *b, uint32_t id)
|
||||
{
|
||||
nir_intrinsic_instr *load =
|
||||
nir_intrinsic_instr_create(b->shader,
|
||||
nir_intrinsic_load_reloc_const_intel);
|
||||
nir_intrinsic_set_param_idx(load, id);
|
||||
nir_ssa_dest_init(&load->instr, &load->dest, 1, 32, NULL);
|
||||
nir_builder_instr_insert(b, &load->instr);
|
||||
return &load->dest.ssa;
|
||||
}
|
||||
|
||||
#include "nir_builder_opcodes.h"
|
||||
|
||||
static inline nir_ssa_def *
|
||||
|
@@ -942,3 +942,7 @@ image("store_raw_intel", src_comp=[1, 0])
|
||||
|
||||
# Number of data items being operated on for a SIMD program.
|
||||
system_value("simd_width_intel", 1)
|
||||
|
||||
# Load a relocatable 32-bit value
|
||||
intrinsic("load_reloc_const_intel", dest_comp=1, bit_sizes=[32],
|
||||
indices=[PARAM_IDX], flags=[CAN_ELIMINATE, CAN_REORDER])
|
||||
|
Reference in New Issue
Block a user