diff options
Diffstat (limited to 'src/gallium/docs/source')
-rw-r--r-- | src/gallium/docs/source/context.rst | 3 | ||||
-rw-r--r-- | src/gallium/docs/source/tgsi.rst | 28 |
2 files changed, 29 insertions, 2 deletions
diff --git a/src/gallium/docs/source/context.rst b/src/gallium/docs/source/context.rst index eae400d5d5b..d17ea4289da 100644 --- a/src/gallium/docs/source/context.rst +++ b/src/gallium/docs/source/context.rst @@ -134,7 +134,8 @@ the ``level``, ``first_layer`` and ``last_layer`` pipe_surface fields specify the mipmap level and the range of layers the texture will be constrained to. In the case of buffers, ``first_element`` and ``last_element`` specify the range within the buffer that will be used -by the shader resource. +by the shader resource. Writes to a shader resource are only allowed +when the ``writable`` flag is set. Surfaces ^^^^^^^^ 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 ^^^^^^^^^^^^^^^^^^^^^^^^ |