[Mesa-dev] [PATCH 05/23] glsl: Add gl_uniform_storage fields to keep track of image uniform indices.

Paul Berry stereotype441 at gmail.com
Wed Dec 11 13:22:41 PST 2013


On 26 November 2013 00:02, Francisco Jerez <currojerez at riseup.net> wrote:

> ---
>  src/glsl/ir_uniform.h | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>
> diff --git a/src/glsl/ir_uniform.h b/src/glsl/ir_uniform.h
> index 13faab7..0704061 100644
> --- a/src/glsl/ir_uniform.h
> +++ b/src/glsl/ir_uniform.h
> @@ -118,6 +118,25 @@ struct gl_uniform_storage {
>        bool active;
>     } sampler[MESA_SHADER_TYPES];
>
> +   struct {
> +      /**
> +       * Base image index
> +       *
> +       * If \c ::base_type is \c GLSL_TYPE_IMAGE, this represents the
> +       * index of this image.  If \c ::array_elements is not zero, the
> +       * array will use indices \c index through \c index + \c
> +       * ::array_elements - 1, inclusive.
> +       *
> +       * Note that the index may be different in each shader stage.
> +       */
> +      uint8_t index;
> +
> +      /**
> +       * Whether this image is used in this shader stage.
> +       */
> +      bool active;
> +   } image[MESA_SHADER_TYPES];
> +
>

The new anonymous struct duplicates the anonymous struct just above it.
Can we make it a named struct so that we can re-use it?

With that change, this patch is:

Reviewed-by: Paul Berry <stereotype441 at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131211/7c112dba/attachment.html>


More information about the mesa-dev mailing list