mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-08-22 00:23:24 +02:00
shader: Fix TEX mask
This commit is contained in:
parent
f8115a6a9e
commit
a8d8fd40f7
@ -188,6 +188,7 @@ void Impl(TranslatorVisitor& v, u64 insn, bool aoffi, Blod blod, bool lc,
|
|||||||
}
|
}
|
||||||
}()};
|
}()};
|
||||||
|
|
||||||
|
IR::Reg dest_reg{tex.dest_reg};
|
||||||
for (int element = 0; element < 4; ++element) {
|
for (int element = 0; element < 4; ++element) {
|
||||||
if (((tex.mask >> element) & 1) == 0) {
|
if (((tex.mask >> element) & 1) == 0) {
|
||||||
continue;
|
continue;
|
||||||
@ -198,7 +199,8 @@ void Impl(TranslatorVisitor& v, u64 insn, bool aoffi, Blod blod, bool lc,
|
|||||||
} else {
|
} else {
|
||||||
value = IR::F32{v.ir.CompositeExtract(sample, element)};
|
value = IR::F32{v.ir.CompositeExtract(sample, element)};
|
||||||
}
|
}
|
||||||
v.F(tex.dest_reg + element, value);
|
v.F(dest_reg, value);
|
||||||
|
++dest_reg;
|
||||||
}
|
}
|
||||||
if (tex.sparse_pred != IR::Pred::PT) {
|
if (tex.sparse_pred != IR::Pred::PT) {
|
||||||
v.ir.SetPred(tex.sparse_pred, v.ir.LogicalNot(v.ir.GetSparseFromOp(sample)));
|
v.ir.SetPred(tex.sparse_pred, v.ir.LogicalNot(v.ir.GetSparseFromOp(sample)));
|
||||||
|
Loading…
Reference in New Issue
Block a user