summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_intrinsics.py
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-04-03 19:29:36 -0400
committerJason Ekstrand <[email protected]>2019-07-02 16:15:25 +0000
commit5787a2dfe3091804efc0930560751030950ca7d0 (patch)
tree570aaf3c5d38a66c7f2a7dd0cfa9128fc882bafb /src/compiler/nir/nir_intrinsics.py
parent5375d009be1811e22f654ea82a04164a5752022c (diff)
nir: add pass to lower load_interpolated_input
Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_intrinsics.py')
-rw-r--r--src/compiler/nir/nir_intrinsics.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_intrinsics.py
index c9d0a236c5a..24bb0990805 100644
--- a/src/compiler/nir/nir_intrinsics.py
+++ b/src/compiler/nir/nir_intrinsics.py
@@ -630,6 +630,19 @@ intrinsic("load_sample_pos_from_id", src_comp=[1], dest_comp=2,
# Loads what I believe is the primitive size, for scaling ij to pixel size:
intrinsic("load_size_ir3", dest_comp=1, flags=[CAN_ELIMINATE, CAN_REORDER])
+# Fragment shader input interpolation delta intrinsic.
+#
+# For hw where fragment shader input interpolation is handled in shader, the
+# load_fs_input_interp deltas intrinsics can be used to load the input deltas
+# used for interpolation as follows:
+#
+# vec3 iid = load_fs_input_interp_deltas(varying_slot)
+# vec2 bary = load_barycentric_*(...)
+# float result = iid.x + iid.y * bary.y + iid.z * bary.x
+
+intrinsic("load_fs_input_interp_deltas", src_comp=[1], dest_comp=3,
+ indices=[BASE, COMPONENT], flags=[CAN_ELIMINATE, CAN_REORDER])
+
# Load operations pull data from some piece of GPU memory. All load
# operations operate in terms of offsets into some piece of theoretical
# memory. Loads from externally visible memory (UBO and SSBO) simply take a