Module: Mesa
Branch: main
Commit: fb48d3d1da0ab493fbd22f62dd85a9ab0c0811a0
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=fb48d3d1da0ab493fbd22f62dd85a9ab0c0811a0

Author: Christian Gmeiner <[email protected]>
Date:   Tue Jul 11 15:36:34 2023 +0200

nir: add enta specific intrinsic used for txs lowering

Non of the know etnaviv GPUs support this feature in hardware
and the binary blob provides sizes via uniforms too.

Signed-off-by: Christian Gmeiner <[email protected]>
Acked-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24217>

---

 src/compiler/nir/nir_intrinsics.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/compiler/nir/nir_intrinsics.py 
b/src/compiler/nir/nir_intrinsics.py
index 187f5a555d7..955a87c455e 100644
--- a/src/compiler/nir/nir_intrinsics.py
+++ b/src/compiler/nir/nir_intrinsics.py
@@ -1905,3 +1905,11 @@ system_value("ray_query_global_intel", 1, bit_sizes=[64])
 # is defined to be whatever thing the hardware can easily give you, so long as
 # it's in normalized coordinates in the range [0, 1] across the point.
 intrinsic("load_point_coord_maybe_flipped", dest_comp=2, bit_sizes=[32])
+
+
+# Load texture size values:
+#
+# Takes a sampler # and returns width, height and depth.  If texture is a array
+# texture it returns width, height and array size.  Used for txs lowering.
+intrinsic("load_texture_size_etna", src_comp=[1], dest_comp=3,
+          flags=[CAN_ELIMINATE, CAN_REORDER])

Reply via email to