mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 16:30:10 +01:00
nir: add offset to load_coefficients_agx
for indirect varyings Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
This commit is contained in:
parent
a1f6e2818d
commit
1773eb329c
4 changed files with 5 additions and 3 deletions
|
|
@ -94,7 +94,7 @@ agx_nir_lower_cull_distance_fs(nir_shader *s, unsigned nr_distances)
|
|||
* partial derivatives and the value somewhere.
|
||||
*/
|
||||
nir_def *cf = nir_load_coefficients_agx(
|
||||
b, .component = i & 3,
|
||||
b, nir_imm_int(b, 0), .component = i & 3,
|
||||
.io_semantics.location = VARYING_SLOT_CULL_PRIMITIVE + (i / 4),
|
||||
.io_semantics.num_slots = nr_distances / 4,
|
||||
.interp_mode = INTERP_MODE_NOPERSPECTIVE);
|
||||
|
|
|
|||
|
|
@ -123,7 +123,8 @@ interpolate_channel(nir_builder *b, nir_intrinsic_instr *load, unsigned channel)
|
|||
sem.num_slots = 1;
|
||||
|
||||
nir_def *coefficients = nir_load_coefficients_agx(
|
||||
b, .component = nir_intrinsic_component(load) + channel,
|
||||
b, nir_imm_int(b, 0),
|
||||
.component = nir_intrinsic_component(load) + channel,
|
||||
.interp_mode = interp_mode_for_load(load), .io_semantics = sem);
|
||||
|
||||
if (load->intrinsic == nir_intrinsic_load_input) {
|
||||
|
|
|
|||
|
|
@ -1803,7 +1803,7 @@ intrinsic("load_from_texture_handle_agx", [2], 1, [],
|
|||
# Load the coefficient register corresponding to a given fragment shader input.
|
||||
# Coefficient registers are vec3s that are dotted with <x, y, 1> to interpolate
|
||||
# the input, where x and y are relative to the 32x32 supertile.
|
||||
intrinsic("load_coefficients_agx",
|
||||
intrinsic("load_coefficients_agx", [1],
|
||||
bit_sizes = [32],
|
||||
dest_comp = 3,
|
||||
indices=[COMPONENT, IO_SEMANTICS, INTERP_MODE],
|
||||
|
|
|
|||
|
|
@ -2737,6 +2737,7 @@ nir_get_io_offset_src_number(const nir_intrinsic_instr *instr)
|
|||
case nir_intrinsic_task_payload_atomic_swap:
|
||||
case nir_intrinsic_global_atomic:
|
||||
case nir_intrinsic_global_atomic_swap:
|
||||
case nir_intrinsic_load_coefficients_agx:
|
||||
return 0;
|
||||
case nir_intrinsic_load_ubo:
|
||||
case nir_intrinsic_load_ssbo:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue