diff options
author | Axel Davy <[email protected]> | 2016-11-27 12:55:46 +0100 |
---|---|---|
committer | Axel Davy <[email protected]> | 2016-12-20 23:44:21 +0100 |
commit | 191b90a35c1fa5230937456a95722971d46ed79d (patch) | |
tree | 686c66877df5a8a3d92a095fcf96d6db1cfb6923 /src/gallium/state_trackers | |
parent | 1ee978fa5054617624a7e521d9eddccbcc1f87ce (diff) |
st/nine: Always initialize current in ff ps
The check was not catching all possible cases.
NVE4 should be fine.
Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/nine/nine_ff.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/gallium/state_trackers/nine/nine_ff.c b/src/gallium/state_trackers/nine/nine_ff.c index ecb1dd8d31f..b3183005186 100644 --- a/src/gallium/state_trackers/nine/nine_ff.c +++ b/src/gallium/state_trackers/nine/nine_ff.c @@ -1332,7 +1332,7 @@ nine_ff_build_ps(struct NineDevice9 *device, struct nine_ff_ps_key *key) ps.rTexSrc = ureg_src(ps.rTex); /* Initial values */ - ureg_MOV(ureg, ps.rCur, ureg_imm1f(ureg, 0.0f)); + ureg_MOV(ureg, ps.rCur, ps.vC[0]); ureg_MOV(ureg, ps.rTmp, ureg_imm1f(ureg, 0.0f)); ureg_MOV(ureg, ps.rTex, ureg_imm1f(ureg, 0.0f)); @@ -1452,29 +1452,6 @@ nine_ff_build_ps(struct NineDevice9 *device, struct nine_ff_ps_key *key) ureg_MUL(ureg, ps.rTex, ureg_src(ps.rTex), _X(delta)); } - if (((s == 0 && key->ts[0].colorop != D3DTOP_BUMPENVMAP && - key->ts[0].colorop != D3DTOP_BUMPENVMAPLUMINANCE) || - (s == 1 && - (key->ts[0].colorop == D3DTOP_BUMPENVMAP || - key->ts[0].colorop == D3DTOP_BUMPENVMAPLUMINANCE)))&& - (key->ts[s].resultarg != 0 /* not current */ || - key->ts[s].colorop == D3DTOP_DISABLE || - key->ts[s].alphaop == D3DTOP_DISABLE || - key->ts[s].colorop == D3DTOP_BLENDCURRENTALPHA || - key->ts[s].alphaop == D3DTOP_BLENDCURRENTALPHA || - key->ts[s].colorarg0 == D3DTA_CURRENT || - key->ts[s].colorarg1 == D3DTA_CURRENT || - key->ts[s].colorarg2 == D3DTA_CURRENT || - key->ts[s].alphaarg0 == D3DTA_CURRENT || - key->ts[s].alphaarg1 == D3DTA_CURRENT || - key->ts[s].alphaarg2 == D3DTA_CURRENT)) { - /* Initialize D3DTA_CURRENT. - * (Yes we can do this before the loop but not until - * NVE4 has an instruction scheduling pass.) - */ - ureg_MOV(ureg, ps.rCur, ps.vC[0]); - } - if (key->ts[s].colorop == D3DTOP_BUMPENVMAP || key->ts[s].colorop == D3DTOP_BUMPENVMAPLUMINANCE) continue; |