[Mesa-dev] [PATCH 1/3] glsl: Allow binding of image variables with 420pack.

Ilia Mirkin imirkin at alum.mit.edu
Mon Dec 7 15:43:30 PST 2015


On Mon, Dec 7, 2015 at 6:35 PM, Matt Turner <mattst88 at gmail.com> wrote:
> This interaction was missed in the addition of ARB_image_load_store.
>
> Cc: "11.0 11.1" <mesa-stable at lists.freedesktop.org>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93266
> ---
>  src/glsl/ast_to_hir.cpp | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
> index 8fcda63..6d7e40f 100644
> --- a/src/glsl/ast_to_hir.cpp
> +++ b/src/glsl/ast_to_hir.cpp
> @@ -2649,7 +2649,9 @@ apply_explicit_binding(struct _mesa_glsl_parse_state *state,
>
>           return;
>        }
> -   } else if (state->is_version(420, 310) && base_type->is_image()) {
> +   } else if ((state->is_version(420, 310) ||
> +               state->ARB_shading_language_420pack_enable) &&

Presumably you later replace this with state->has_420pack_or_es31() ?
Either way,

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

[I'd like to also encourage you to add a piglit test to cover this,
but that shouldn't gate this fix.]

> +              base_type->is_image()) {
>        assert(ctx->Const.MaxImageUnits <= MAX_IMAGE_UNITS);
>        if (max_index >= ctx->Const.MaxImageUnits) {
>           _mesa_glsl_error(loc, state, "Image binding %d exceeds the "
> --
> 2.4.9
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list