aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/docs/source/tgsi.rst
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2012-04-30 20:20:29 +0200
committerFrancisco Jerez <[email protected]>2012-05-11 12:39:41 +0200
commitb8e808f1ef9462af8545999df514fddbbff34345 (patch)
tree6431be43337a12c166fae50e87e6f8b7e14c9d6c /src/gallium/docs/source/tgsi.rst
parent82c90b2da8e236bc134cb2bd0ec4e09551b12164 (diff)
gallium/tgsi: Add resource write-back support.
Define a new STORE opcode with a role dual to the LOAD opcode, and add flags to specify that a shader resource is intended for writing.
Diffstat (limited to 'src/gallium/docs/source/tgsi.rst')
-rw-r--r--src/gallium/docs/source/tgsi.rst28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst
index eb8be46e354..f32aff1c7b3 100644
--- a/src/gallium/docs/source/tgsi.rst
+++ b/src/gallium/docs/source/tgsi.rst
@@ -1490,6 +1490,29 @@ Resource Access Opcodes
texture arrays and 2D textures. address.w is always
ignored.
+.. opcode:: STORE - Write data to a shader resource
+
+ Syntax: ``STORE resource, address, src``
+
+ Example: ``STORE RES[0], TEMP[0], TEMP[1]``
+
+ Using the provided integer address, STORE writes data
+ to the specified buffer or texture.
+
+ The 'address' is specified as a vector of unsigned
+ integers. If the 'address' is out of range the result
+ is unspecified.
+
+ Only the first mipmap level of a resource can be
+ written to using this instruction.
+
+ For 1D or 2D texture arrays, the array index is
+ provided as an unsigned integer in address.y or
+ address.z, respectively. address.yz are ignored for
+ buffers and 1D textures. address.z is ignored for 1D
+ texture arrays and 2D textures. address.w is always
+ ignored.
+
Explanation of symbols used
------------------------------
@@ -1745,7 +1768,7 @@ Declaration Resource
Follows Declaration token if file is TGSI_FILE_RESOURCE.
- DCL RES[#], resource [, RAW]
+ DCL RES[#], resource [, WR] [, RAW]
Declares a shader input resource and assigns it to a RES[#]
register.
@@ -1766,6 +1789,9 @@ Declaration Resource
interpreted in byte units instead of texel units. The result of
accessing a misaligned address is undefined.
+ Usage of the STORE opcode is only allowed if the WR (writable) flag
+ is set.
+
Properties
^^^^^^^^^^^^^^^^^^^^^^^^