On Wed, Jan 7, 2015 at 3:44 PM, Aditya Avinash <adityaavina...@gmail.com> wrote: > > > On Wed, Jan 7, 2015 at 4:56 AM, Marek Olšák <mar...@gmail.com> wrote: >> >> From: Marek Olšák <marek.ol...@amd.com> >> >> set_shader_resources is unused. >> >> set_shader_buffers should support shader atomic counter buffers and shader >> storage buffers from OpenGL. >> >> The plan is to use slots 0..15 for atomic counters and slots 16..31 >> for storage buffers. Atomic counters are planned to be supported first. >> >> This doesn't add any interface for images. The documentation is added >> for future reference. >> --- >> >> This is the interface only. I don't plan to do anything else for now. >> Comments welcome. >> >> src/gallium/docs/source/context.rst | 16 ++++++++-------- >> src/gallium/docs/source/screen.rst | 4 ++-- >> src/gallium/drivers/galahad/glhd_context.c | 2 +- >> src/gallium/drivers/ilo/ilo_state.c | 2 +- >> src/gallium/drivers/nouveau/nouveau_buffer.c | 2 +- >> src/gallium/drivers/nouveau/nouveau_screen.c | 2 +- >> src/gallium/drivers/nouveau/nv50/nv50_formats.c | 2 +- >> src/gallium/drivers/nouveau/nvc0/nvc0_state.c | 2 +- >> src/gallium/include/pipe/p_context.h | 20 +++++++++++--------- >> src/gallium/include/pipe/p_defines.h | 2 +- >> src/gallium/include/pipe/p_state.h | 10 ++++++++++ >> 11 files changed, 38 insertions(+), 26 deletions(-) >> >> diff --git a/src/gallium/docs/source/context.rst >> b/src/gallium/docs/source/context.rst >> index 5861f46..73fd35f 100644 >> --- a/src/gallium/docs/source/context.rst >> +++ b/src/gallium/docs/source/context.rst >> @@ -126,14 +126,14 @@ 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. Writes to a shader resource are only allowed >> -when the ``writable`` flag is set. >> +There are 2 types of shader resources: buffers and images. >> + >> +Buffers are specified using the ``set_shader_buffers`` method. >> + >> +Images are specified using the ``set_shader_images`` method. When binding >> +images, the ``level``, ``first_layer`` and ``last_layer`` pipe_image_view >> +fields specify the mipmap level and the range of layers the image will be >> +constrained to. >> >> Surfaces >> ^^^^^^^^ > > > set_shader_images are not defined in this patch. > Will it look similar to pipe_surface or pipe_sampler_view?
There will be a separate view for images if this is approved. Marek _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev