gallium: add a RESQ opcode to query info about a resource

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Ilia Mirkin
2015-12-13 22:11:25 -05:00
parent ebfb5446c7
commit 90ba06618e
3 changed files with 14 additions and 1 deletions

View File

@@ -2311,6 +2311,18 @@ Resource Access Opcodes
texture arrays and 2D textures. address.w is always
ignored.
.. opcode:: RESQ - Query information about a resource
Syntax: ``RESQ dst, resource``
Example: ``RESQ TEMP[0], BUFFER[0]``
Returns information about the buffer or image resource. For buffer
resources, the size (in bytes) is returned in the x component. For
image resources, .xyz will contain the width/height/layers of the
image, while .w will contain the number of samples for multi-sampled
images.
.. _threadsyncopcodes: