Mesa (main): pan/va: Add VAR_TEX_BUF_GRADIENT instruction

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 2 15:33:06 UTC 2022


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

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Mon May  2 10:58:43 2022 -0400

pan/va: Add VAR_TEX_BUF_GRADIENT instruction

Probably useful for ... something.

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15588>

---

 src/panfrost/bifrost/valhall/ISA.xml      | 23 +++++++++++++++++++++++
 src/panfrost/bifrost/valhall/valhall.c.py |  1 +
 src/panfrost/bifrost/valhall/valhall.py   |  2 ++
 3 files changed, 26 insertions(+)

diff --git a/src/panfrost/bifrost/valhall/ISA.xml b/src/panfrost/bifrost/valhall/ISA.xml
index f41fcf8883c..3c160b16db2 100644
--- a/src/panfrost/bifrost/valhall/ISA.xml
+++ b/src/panfrost/bifrost/valhall/ISA.xml
@@ -2506,6 +2506,29 @@
     <src>Varying offset</src>
   </ins>
 
+  <ins name="VAR_TEX_BUF_GRADIENT" title="Fused varying-texturing" opcode="0x132" unit="VT">
+    <desc>
+      Only works for FP32 varyings. Performance characteristics are similar
+      to LD_VAR_BUF_IMM_F32.v2.f32 followed by TEX, using both V and T units.
+    </desc>
+    <slot/>
+    <skip/>
+    <sample_and_update/>
+    <register_type/>
+    <vartex_register_width/>
+    <dimension/>
+    <array_enable/>
+    <shadow/>
+    <lod_bias_disable/>
+    <lod_clamp_disable/>
+
+    <sr_write_count/>
+
+    <sr write="true"/>
+    <src size="64">Image to read from</src>
+    <src>Varying offset</src>
+  </ins>
+
   <ins name="VAR_TEX_BUF_DUAL" title="Fused varying-texturing" opcode="0x137" unit="VT">
     <desc>
       Only works for FP32 varyings. Performance characteristics are similar
diff --git a/src/panfrost/bifrost/valhall/valhall.c.py b/src/panfrost/bifrost/valhall/valhall.c.py
index 78e397ebdd9..55bfa2c87ea 100644
--- a/src/panfrost/bifrost/valhall/valhall.c.py
+++ b/src/panfrost/bifrost/valhall/valhall.c.py
@@ -68,6 +68,7 @@ SKIP = set([
         # VAR_TEX
         "VAR_TEX_BUF_SINGLE",
         "VAR_TEX_BUF_GATHER",
+        "VAR_TEX_BUF_GRADIENT",
         "VAR_TEX_BUF_DUAL",
 
         # Special cased
diff --git a/src/panfrost/bifrost/valhall/valhall.py b/src/panfrost/bifrost/valhall/valhall.py
index e4b51c6a148..dd4c27493c8 100644
--- a/src/panfrost/bifrost/valhall/valhall.py
+++ b/src/panfrost/bifrost/valhall/valhall.py
@@ -380,6 +380,8 @@ MODIFIERS = {
     "integer_coordinates": Flag("integer_coordinates", 13),
     "fetch_component": Modifier("fetch_component", 14, 2),
     "lod_mode": Modifier("lod_mode", 13, 3),
+    "lod_bias_disable": Modifier("lod_mode", 13, 1),
+    "lod_clamp_disable": Modifier("lod_mode", 14, 1),
     "write_mask": Modifier("write_mask", 22, 4),
     "register_type": Modifier("register_type", 26, 2),
     "dimension": Modifier("dimension", 28, 2),



More information about the mesa-commit mailing list