diff options
author | Axel Davy <[email protected]> | 2018-04-02 18:25:35 +0200 |
---|---|---|
committer | Axel Davy <[email protected]> | 2018-04-06 23:34:31 +0200 |
commit | 39240926cd45519f35a6fa576c387f727b057aa1 (patch) | |
tree | 962a07299fe584a6f8c44f0d1994cfa076a350ee /src/gallium/state_trackers/nine | |
parent | 67c728f7a9450b04d4de1a29f1dcfb9265a7ebfd (diff) |
st/nine: Declare lighting consts for ff shaders
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 <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
CC: "17.3 18.0" <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine')
-rw-r--r-- | src/gallium/state_trackers/nine/nine_ff.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/nine_ff.c b/src/gallium/state_trackers/nine/nine_ff.c index d7b697caeed..fabc1d3b882 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)); |