[Mesa-dev] [PATCH] util: fix swizzle of INSTANCEID system value

Marek Olšák maraeo at gmail.com
Fri Apr 7 14:28:28 UTC 2017


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Fri, Apr 7, 2017 at 12:24 PM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> radeonsi added stricter checking for correct swizzles in debug builds.
>
> Reported-by: Michel Dänzer <michel.daenzer at amd.com>
> Fixes: 4cf29427770f ("radeonsi: support 64-bit system values")
> ---
>  src/gallium/auxiliary/util/u_simple_shaders.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/util/u_simple_shaders.c b/src/gallium/auxiliary/util/u_simple_shaders.c
> index 7342b3d..613ec4a 100644
> --- a/src/gallium/auxiliary/util/u_simple_shaders.c
> +++ b/src/gallium/auxiliary/util/u_simple_shaders.c
> @@ -112,21 +112,21 @@ void *util_make_layered_clear_vertex_shader(struct pipe_context *pipe)
>           "VERT\n"
>           "DCL IN[0]\n"
>           "DCL IN[1]\n"
>           "DCL SV[0], INSTANCEID\n"
>           "DCL OUT[0], POSITION\n"
>           "DCL OUT[1], GENERIC[0]\n"
>           "DCL OUT[2], LAYER\n"
>
>           "MOV OUT[0], IN[0]\n"
>           "MOV OUT[1], IN[1]\n"
> -         "MOV OUT[2], SV[0]\n"
> +         "MOV OUT[2].x, SV[0].xxxx\n"
>           "END\n";
>     struct tgsi_token tokens[1000];
>     struct pipe_shader_state state;
>
>     if (!tgsi_text_translate(text, tokens, ARRAY_SIZE(tokens))) {
>        assert(0);
>        return NULL;
>     }
>     pipe_shader_state_from_tgsi(&state, tokens);
>     return pipe->create_vs_state(pipe, &state);
> --
> 2.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list