Mesa (main): pan/va: Model image load instructions

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 7 13:44:14 UTC 2022


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

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Wed Mar 30 15:51:38 2022 -0400

pan/va: Model image load instructions

These use the attribute pipe, the new versions of LD_ATTR_TEX, but reading
texture descriptors instead of attribute descriptors unlike their Bifrost
predecessors.

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

---

 src/panfrost/bifrost/valhall/ISA.xml | 70 ++++++++++++++++++++++++++++--------
 1 file changed, 56 insertions(+), 14 deletions(-)

diff --git a/src/panfrost/bifrost/valhall/ISA.xml b/src/panfrost/bifrost/valhall/ISA.xml
index b439c22a6ce..b5f76763bb3 100644
--- a/src/panfrost/bifrost/valhall/ISA.xml
+++ b/src/panfrost/bifrost/valhall/ISA.xml
@@ -936,7 +936,7 @@
     <imm name="index" start="12" size="8"/>
   </ins>
 
-  <ins name="LD_ATTR_IMM" title="Load immediate attribute" opcode="0x66" unit="LS">
+  <ins name="LD_ATTR_IMM" title="Load immediate attribute" opcode="0x66" opcode2="0" unit="LS">
     <desc>
       Load `vecsize` components from the attribute descriptor at entry `index`
       of resource table `table` at index (vertex ID, instance ID), converting
@@ -946,6 +946,7 @@
     <vecsize/>
     <regfmt/>
     <slot/>
+    <mod name="descriptor_type" start="128" size="1" implied="true"/>
     <sr write="true"/>
     <src>Vertex ID</src>
     <src>Instance ID</src>
@@ -953,6 +954,60 @@
     <imm name="table" start="16" size="4"/>
   </ins>
 
+  <ins name="LD_ATTR" title="Load indirect attribute" opcode="0x76" opcode2="0" unit="LS">
+    <desc>
+      Load `vecsize` components from the attribute descriptor at the specified
+      location at index (vertex ID, instance ID), converting
+      to the specified register format.
+
+      The index must not diverge within a warp.
+    </desc>
+    <sr_count/>
+    <vecsize/>
+    <regfmt/>
+    <slot/>
+    <mod name="descriptor_type" start="128" size="1" implied="true"/>
+    <sr write="true"/>
+    <src>Vertex ID</src>
+    <src>Instance ID</src>
+    <src>Index and table</src>
+  </ins>
+
+  <ins name="LD_TEX_IMM" title="Load immediate texture" opcode="0x66" opcode2="1" unit="LS">
+    <desc>
+      Load `vecsize` components from the texture descriptor at entry `index`
+      of resource table `table`, converting
+      to the specified register format.
+    </desc>
+    <sr_count/>
+    <vecsize/>
+    <regfmt/>
+    <slot/>
+    <mod name="descriptor_type" start="128" size="1" implied="true"/>
+    <sr write="true"/>
+    <src>X/Y coordinates (16:16)</src>
+    <src>Z/W coordinates (16:16)</src>
+    <imm name="index" start="20" size="4"/>
+    <imm name="table" start="16" size="4"/>
+  </ins>
+
+  <ins name="LD_TEX" title="Load indirect texture" opcode="0x76" opcode2="1" unit="LS">
+    <desc>
+      Load `vecsize` components from the texture descriptor at the specified
+      location at index, converting
+      to the specified register format.
+    </desc>
+    <sr_count/>
+    <vecsize/>
+    <regfmt/>
+    <slot/>
+    <mod name="descriptor_type" start="128" size="1" implied="true"/>
+    <sr write="true"/>
+    <src>X/Y coordinates (16:16)</src>
+    <src>Z/W coordinates (16:16)</src>
+    <src>Index and table</src>
+  </ins>
+
   <ins name="LEA_ATTR_IMM" title="Load effective address of image texel" opcode="0x67" opcode2="0" unit="LS">
     <desc>
       Load the effective address of an attribute specified with the
@@ -1165,19 +1220,6 @@
     <src>Mode descriptor</src>
   </ins>
 
-  <ins name="LD_ATTR" title="Load indirect attribute" opcode="0x76" unit="LS">
-    <!-- TODO: for some reason, blob is using index (1<<24)|x for [x] -->
-    <desc>The index must not diverge within a warp.</desc>
-    <sr_count/>
-    <vecsize/>
-    <regfmt/>
-    <slot/>
-    <sr write="true"/>
-    <src>Vertex ID</src>
-    <src>Instance ID</src>
-    <src>Index</src>
-  </ins>
-
   <ins name="LEA_BUF_IMM" title="Load buffer effective address" opcode="0x5E" unit="LS">
     <desc>
       Load effective address of a buffer with an immediate offset added.



More information about the mesa-commit mailing list