Skip to content

Commit

Permalink
st/nine: fix ps ff BLENDTEXTUREALPHA
Browse files Browse the repository at this point in the history
This ff ps operation has the texture alpha as input.
Thus we need to sample the texture.

Fixes: iXit/wine-nine-standalone#105

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
  • Loading branch information
axeldavy committed Apr 10, 2021
1 parent 96739d2 commit 9fa1c42
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/gallium/frontends/nine/nine_ff.c
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,9 @@ nine_ff_build_ps(struct NineDevice9 *device, struct nine_ff_ps_key *key)

if (key->ts[s].colorarg0 == D3DTA_TEXTURE ||
key->ts[s].colorarg1 == D3DTA_TEXTURE ||
key->ts[s].colorarg2 == D3DTA_TEXTURE) {
key->ts[s].colorarg2 == D3DTA_TEXTURE ||
key->ts[s].colorop == D3DTOP_BLENDTEXTUREALPHA ||
key->ts[s].colorop == D3DTOP_BLENDTEXTUREALPHAPM) {
ps.s[s] = ureg_DECL_sampler(ureg, s);
ps.vT[s] = ureg_DECL_fs_input(ureg, texcoord_sn, s, TGSI_INTERPOLATE_PERSPECTIVE);
}
Expand All @@ -1368,7 +1370,9 @@ nine_ff_build_ps(struct NineDevice9 *device, struct nine_ff_ps_key *key)

if (key->ts[s].alphaarg0 == D3DTA_TEXTURE ||
key->ts[s].alphaarg1 == D3DTA_TEXTURE ||
key->ts[s].alphaarg2 == D3DTA_TEXTURE) {
key->ts[s].alphaarg2 == D3DTA_TEXTURE ||
key->ts[s].colorop == D3DTOP_BLENDTEXTUREALPHA ||
key->ts[s].colorop == D3DTOP_BLENDTEXTUREALPHAPM) {
ps.s[s] = ureg_DECL_sampler(ureg, s);
ps.vT[s] = ureg_DECL_fs_input(ureg, texcoord_sn, s, TGSI_INTERPOLATE_PERSPECTIVE);
}
Expand Down

0 comments on commit 9fa1c42

Please sign in to comment.