summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/frontend/maxwell/translate/impl/bitfield_extract.cpp
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-04-17 06:48:35 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:28 +0200
commitbe431f5ed080955cce358e9750347229b2bc9a04 (patch)
tree6980191ce828379c3a0a16418539be676722de67 /src/shader_recompiler/frontend/maxwell/translate/impl/bitfield_extract.cpp
parentshader: Implement SampleMask (diff)
downloadyuzu-be431f5ed080955cce358e9750347229b2bc9a04.tar
yuzu-be431f5ed080955cce358e9750347229b2bc9a04.tar.gz
yuzu-be431f5ed080955cce358e9750347229b2bc9a04.tar.bz2
yuzu-be431f5ed080955cce358e9750347229b2bc9a04.tar.lz
yuzu-be431f5ed080955cce358e9750347229b2bc9a04.tar.xz
yuzu-be431f5ed080955cce358e9750347229b2bc9a04.tar.zst
yuzu-be431f5ed080955cce358e9750347229b2bc9a04.zip
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/translate/impl/bitfield_extract.cpp')
-rw-r--r--src/shader_recompiler/frontend/maxwell/translate/impl/bitfield_extract.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/bitfield_extract.cpp b/src/shader_recompiler/frontend/maxwell/translate/impl/bitfield_extract.cpp
index 0738ae7a6..9d5a87e52 100644
--- a/src/shader_recompiler/frontend/maxwell/translate/impl/bitfield_extract.cpp
+++ b/src/shader_recompiler/frontend/maxwell/translate/impl/bitfield_extract.cpp
@@ -18,10 +18,6 @@ void BFE(TranslatorVisitor& v, u64 insn, const IR::U32& src) {
BitField<48, 1, u64> is_signed;
} const bfe{insn};
- if (bfe.cc != 0) {
- throw NotImplementedException("BFE CC");
- }
-
const IR::U32 offset{v.ir.BitFieldExtract(src, v.ir.Imm32(0), v.ir.Imm32(8), false)};
const IR::U32 count{v.ir.BitFieldExtract(src, v.ir.Imm32(8), v.ir.Imm32(8), false)};
@@ -53,6 +49,13 @@ void BFE(TranslatorVisitor& v, u64 insn, const IR::U32& src) {
result = IR::U32{v.ir.Select(zero_count, zero, result)};
v.X(bfe.dest_reg, result);
+
+ if (bfe.cc != 0) {
+ v.SetZFlag(v.ir.IEqual(result, zero));
+ v.SetSFlag(v.ir.ILessThan(result, zero, true));
+ v.ResetCFlag();
+ v.ResetOFlag();
+ }
}
} // Anonymous namespace