diff options
author | Francisco Jerez <[email protected]> | 2012-05-01 02:47:03 +0200 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2012-05-11 12:39:40 +0200 |
commit | 5f55cbc7d93c6568566893f9345e43fff311a32b (patch) | |
tree | de19782dee5eb32e279e4f0da962e6763fd3c200 /src/gallium/docs/source | |
parent | a5f44cc8c2ce0916809ce5da5a2490ad000ef099 (diff) |
gallium: Add context hooks for binding shader resources.
Diffstat (limited to 'src/gallium/docs/source')
-rw-r--r-- | src/gallium/docs/source/context.rst | 20 | ||||
-rw-r--r-- | src/gallium/docs/source/screen.rst | 4 |
2 files changed, 23 insertions, 1 deletions
diff --git a/src/gallium/docs/source/context.rst b/src/gallium/docs/source/context.rst index cb9b8de7d5a..eae400d5d5b 100644 --- a/src/gallium/docs/source/context.rst +++ b/src/gallium/docs/source/context.rst @@ -120,6 +120,22 @@ to the array index which is used for sampling. * ``sampler_view_destroy`` destroys a sampler view and releases its reference to associated texture. +Shader Resources +^^^^^^^^^^^^^^^^ + +Shader resources are textures or buffers that may be read or written +from a shader without an associated sampler. This means that they +have no support for floating point coordinates, address wrap modes or +filtering. + +Shader resources are specified for all the shader stages at once using +the ``set_shader_resources`` method. When binding texture resources, +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. + Surfaces ^^^^^^^^ @@ -575,7 +591,9 @@ The compute program has access to four special resources: These resources use a byte-based addressing scheme, and they can be accessed from the compute program by means of the LOAD/STORE TGSI -opcodes. +opcodes. Additional resources to be accessed using the same opcodes +may be specified by the user with the ``set_compute_resources`` +method. In addition, normal texture sampling is allowed from the compute program: ``bind_compute_sampler_states`` may be used to set up texture diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst index 5d8280a244b..8e4584023df 100644 --- a/src/gallium/docs/source/screen.rst +++ b/src/gallium/docs/source/screen.rst @@ -249,6 +249,10 @@ resources might be created and handled quite differently. process. * ``PIPE_BIND_GLOBAL``: A buffer that can be mapped into the global address space of a compute program. +* ``PIPE_BIND_SHADER_RESOURCE``: A buffer or texture that can be + bound to the graphics pipeline as a shader resource. +* ``PIPE_BIND_COMPUTE_RESOURCE``: A buffer or texture that can be + bound to the compute program as a shader resource. .. _pipe_usage: |