nir: add enta specific intrinsic used for txs lowering
authorChristian Gmeiner <cgmeiner@igalia.com>
Tue, 11 Jul 2023 13:36:34 +0000 (15:36 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 21 Jul 2023 08:52:03 +0000 (08:52 +0000)
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 <cgmeiner@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24217>

src/compiler/nir/nir_intrinsics.py

index 187f5a5..955a87c 100644 (file)
@@ -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])