[Mesa-stable] [Mesa-dev] [PATCH] tgsi: fix parsing of shared memory declarations

Ilia Mirkin imirkin at alum.mit.edu
Mon Mar 7 18:51:06 UTC 2016


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

On Mon, Mar 7, 2016 at 12:52 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> The SHARED TGSI keyword is only allowed with TGSI_FILE_MEMORY and not
> with TGSI_FILE_BUFFER. I have found this by using the nouveau_compiler
> from command line.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> Cc: "11.2" <mesa-stable at lists.freedesktop.org>
> ---
>  src/gallium/auxiliary/tgsi/tgsi_text.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
> index 91baa01..77598d2 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_text.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
> @@ -1388,7 +1388,9 @@ static boolean parse_declaration( struct translate_ctx *ctx )
>           if (str_match_nocase_whole(&cur, "ATOMIC")) {
>              decl.Declaration.Atomic = 1;
>              ctx->cur = cur;
> -         } else if (str_match_nocase_whole(&cur, "SHARED")) {
> +         }
> +      } else if (file == TGSI_FILE_MEMORY) {
> +         if (str_match_nocase_whole(&cur, "SHARED")) {
>              decl.Declaration.Shared = 1;
>              ctx->cur = cur;
>           }
> --
> 2.7.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-stable mailing list