aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_intrinsics.py
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-03-10 08:35:00 -0500
committerJason Ekstrand <[email protected]>2019-03-15 01:02:19 +0000
commit3c11fc76543f381ce8ebb315def510978ef274a7 (patch)
tree1937551abd717b383ea60777703e1c6c9a1610ad /src/compiler/nir/nir_intrinsics.py
parentc8d42c8cf689fcaac1e0fd8477a8ddf269c4fe4d (diff)
nir/lower_io: Add a new buffer_array_length intrinsic and lowering
Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_intrinsics.py')
-rw-r--r--src/compiler/nir/nir_intrinsics.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_intrinsics.py
index a6c74dc2543..d88e4ef7d45 100644
--- a/src/compiler/nir/nir_intrinsics.py
+++ b/src/compiler/nir/nir_intrinsics.py
@@ -156,6 +156,10 @@ intrinsic("interp_deref_at_sample", src_comp=[1, 1], dest_comp=0,
intrinsic("interp_deref_at_offset", src_comp=[1, 2], dest_comp=0,
flags=[CAN_ELIMINATE, CAN_REORDER])
+# Gets the length of an unsized array at the end of a buffer
+intrinsic("deref_buffer_array_length", src_comp=[-1], dest_comp=1,
+ flags=[CAN_ELIMINATE, CAN_REORDER])
+
# Ask the driver for the size of a given buffer. It takes the buffer index
# as source.
intrinsic("get_buffer_size", src_comp=[-1], dest_comp=1,