diff --git a/src/compiler/nir/nir_divergence_analysis.c b/src/compiler/nir/nir_divergence_analysis.c index f0e2a5742f1..b31d7098c2d 100644 --- a/src/compiler/nir/nir_divergence_analysis.c +++ b/src/compiler/nir/nir_divergence_analysis.c @@ -729,6 +729,7 @@ visit_intrinsic(nir_intrinsic_instr *instr, struct divergence_state *state) case nir_intrinsic_load_constant_agx: case nir_intrinsic_load_texture_handle_agx: case nir_intrinsic_bindless_image_agx: + case nir_intrinsic_bindless_sampler_agx: case nir_intrinsic_load_reg_indirect: case nir_intrinsic_load_const_ir3: case nir_intrinsic_load_frag_size_ir3: diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_intrinsics.py index dab3d857aec..01d3fdc08c7 100644 --- a/src/compiler/nir/nir_intrinsics.py +++ b/src/compiler/nir/nir_intrinsics.py @@ -2340,6 +2340,12 @@ load("exported_agx", [], [BASE], [CAN_ELIMINATE]) intrinsic("bindless_image_agx", [1], dest_comp=1, bit_sizes=[32], indices=[DESC_SET], flags=[CAN_ELIMINATE, CAN_REORDER]) +# AGX-specific bindless sampler handle specifier. Takes both a byte offset into the +# descriptor set (first source) and an index into the global heap (second +# source) to allow optimal pushing heuristics. +intrinsic("bindless_sampler_agx", [1, 1], dest_comp=1, bit_sizes=[16], + indices=[DESC_SET], flags=[CAN_ELIMINATE, CAN_REORDER]) + # Intel-specific query for loading from the isl_image_param struct passed # into the shader as a uniform. The variable is a deref to the image # variable. The const index specifies which of the six parameters to load. diff --git a/src/compiler/nir/nir_opt_preamble.c b/src/compiler/nir/nir_opt_preamble.c index c975cf53828..5ee9e7b63a9 100644 --- a/src/compiler/nir/nir_opt_preamble.c +++ b/src/compiler/nir/nir_opt_preamble.c @@ -240,6 +240,7 @@ can_move_intrinsic(nir_intrinsic_instr *instr, opt_preamble_ctx *ctx) case nir_intrinsic_load_const_ir3: case nir_intrinsic_load_constant_agx: case nir_intrinsic_bindless_image_agx: + case nir_intrinsic_bindless_sampler_agx: return can_move_srcs(&instr->instr, ctx); /* Image/SSBO loads can be moved if they are CAN_REORDER and their