[Mesa-stable] [Mesa-dev] [PATCH] st/nine: Declare lighting consts for ff shaders
Dieter Nützel
Dieter at nuetzel-hh.de
Wed Apr 4 01:32:42 UTC 2018
Tested-by: Dieter Nützel <Dieter at nuetzel-hh.de>
on RX580 together with wine-staging 3.5
with LS 2015
but NOT explicitly with the mentioned shader
Dieter
Am 02.04.2018 18:50, schrieb Axel Davy:
> The lighting constants were not declared previously,
> but were accessed with indirect addressing, which is
> illegal.
>
> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=105442
>
> Signed-off-by: Axel Davy <davyaxel0 at gmail.com>
>
> CC: "17.3 18.0" <mesa-stable at lists.freedesktop.org>
> ---
> src/gallium/state_trackers/nine/nine_ff.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/gallium/state_trackers/nine/nine_ff.c
> b/src/gallium/state_trackers/nine/nine_ff.c
> index d7b697caee..fabc1d3b88 100644
> --- a/src/gallium/state_trackers/nine/nine_ff.c
> +++ b/src/gallium/state_trackers/nine/nine_ff.c
> @@ -810,6 +810,10 @@ nine_ff_build_vs(struct NineDevice9 *device,
> struct vs_build_ctx *vs)
>
> const unsigned loop_label = l++;
>
> + /* Declare all light constants to allow indirect adressing */
> + for (i = 32; i < 96; i++)
> + ureg_DECL_constant(ureg, i);
> +
> ureg_MOV(ureg, rCtr, ureg_imm1f(ureg, 32.0f)); /*
> &lightconst(0) */
> ureg_MOV(ureg, rD, ureg_imm1f(ureg, 0.0f));
> ureg_MOV(ureg, rA, ureg_imm1f(ureg, 0.0f));
More information about the mesa-stable
mailing list