From 3c11fc76543f381ce8ebb315def510978ef274a7 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Sun, 10 Mar 2019 08:35:00 -0500 Subject: nir/lower_io: Add a new buffer_array_length intrinsic and lowering Reviewed-by: Kristian H. Kristensen Reviewed-by: Caio Marcelo de Oliveira Filho --- src/compiler/nir/nir_intrinsics.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/compiler/nir/nir_intrinsics.py') 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, -- cgit v1.2.3