[Mesa-dev] [PATCH 1/2] glsl: Fix build warning of unhandled case in switch

Anuj Phogat anuj.phogat at gmail.com
Wed Feb 26 12:17:21 PST 2014


Brian Paul had a patch on mailing list to fix this. So, this patch
is no more required.

On Tue, Feb 25, 2014 at 6:32 PM, Anuj Phogat <anuj.phogat at gmail.com> wrote:
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> ---
>  src/glsl/ast_to_hir.cpp | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
> index f06baeb..8a9999f 100644
> --- a/src/glsl/ast_to_hir.cpp
> +++ b/src/glsl/ast_to_hir.cpp
> @@ -2221,6 +2221,11 @@ validate_explicit_location(const struct ast_type_qualifier *qual,
>                 ? (qual->location + FRAG_RESULT_DATA0)
>                 : (qual->location + VARYING_SLOT_VAR0);
>              break;
> +         case MESA_SHADER_COMPUTE:
> +            _mesa_glsl_error(loc, state,
> +                             "compute shader variables cannot be given "
> +                             "explicit locations");
> +            return;
>           }
>        } else {
>           var->data.location = qual->location;
> --
> 1.8.3.1
>


More information about the mesa-dev mailing list