[Mesa-dev] [PATCH 9/9] tgsi: add ArrayID documentation
e0425955 at student.tuwien.ac.at
Thu Mar 14 07:53:39 PDT 2013
On 14.03.2013 15:20, Christian König wrote:
> From: Christian König <christian.koenig at amd.com>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> src/gallium/docs/source/tgsi.rst | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
> diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst
> index d9a7fe9..27fe039 100644
> --- a/src/gallium/docs/source/tgsi.rst
> +++ b/src/gallium/docs/source/tgsi.rst
> @@ -1833,6 +1833,22 @@ If Interpolate flag is set to 1, a Declaration Interpolate token follows.
> If file is TGSI_FILE_RESOURCE, a Declaration Resource token follows.
> +If Array flag is set to 1, a Declaration Array token follows.
> +Array Declaration
> +Declarations can optional have an ArrayID attribute which can be referred by
> +indirect addressing operands. An ArrayID of zero is reserved and treaded as
> +if no ArrayID is specified.
> +If an indirect addressing operand refers to an specific declaration by using
> +an ArrayID only the registers in this declaration are guaranteed to be
> +accessed, accessing any register outside this declaration results in undefined
+ Note that the effective index is zero-based and not relative to the
specified declaration. XXX: Is it ? Should it be ?
> +If no ArrayID is specified with an indirect addressing operand the whole
> +register file might be accessed by this operand.
+ A practice which is strongly discouraged. Don't do this if you have
more than 1 declaration for the file in question ! It will prevent
packing of scalar/vec2 arrays and effective memory alias analysis.
Packing ? Yes !
We can pack arrays if they're declared as e.g.
And the caches will be very very thankful that we don't just access
every 4th element of our 4 times larger than it needs to be buffer !!!
And if your card can't do that, pleeease be nice and still make it
possible for other drivers. :o3
> Declaration Semantic
More information about the mesa-dev