This is an internal intrinsic intended to be injected by a (freedreno-specific) 'lower_sampler_io' pass that will be introduced later in this series; and consumed by ir3_compiler_nir.
The intrinsic will load in SSA values for various constants for images (image_dims), namely the format's bytes-per-pixel, y-stride and z-stride; for which the backend compiler will emit the corresponding uniforms. const_index[0] is the image index, and const_index[1] is the index into image_dims' register file for a given image: 0 for bpp, 1 to y-stride and 2 for z-stride. --- src/compiler/nir/nir_intrinsics.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_intrinsics.py index a5cc3f7401c..169c835d746 100644 --- a/src/compiler/nir/nir_intrinsics.py +++ b/src/compiler/nir/nir_intrinsics.py @@ -590,6 +590,8 @@ load("shared", 1, [BASE, ALIGN_MUL, ALIGN_OFFSET], [CAN_ELIMINATE]) load("push_constant", 1, [BASE, RANGE], [CAN_ELIMINATE, CAN_REORDER]) # src[] = { offset }. const_index[] = { base, range } load("constant", 1, [BASE, RANGE], [CAN_ELIMINATE, CAN_REORDER]) +# src[] = { offset }. const_index[] = { image_idx, dim_idx } +load("image_stride", 1, [], [CAN_REORDER]) # Stores work the same way as loads, except now the first source is the value # to store and the second (and possibly third) source specify where to store -- 2.20.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev