Browse Source

More compiler error fixes

pull/3300/head
Forrest Keller 2 months ago
parent
commit
6575031404
  1. 6
      src/shader_recompiler/ir_opt/texture_pass.cpp

6
src/shader_recompiler/ir_opt/texture_pass.cpp

@ -352,12 +352,12 @@ std::optional<ConstBufferAddr> TryGetConstBuffer(const IR::Inst* inst, Environme
case IR::Opcode::BitFieldUExtract: {
const IR::Value base{inst->Arg(0)};
const IR::Value offset{inst->Arg(1)};
const IR::Value count{inst->Arg(2)};
if (auto res = Track(base, env)) {
if (offset.IsImmediate()) {
res->offset += (offset.U32() / 8);
res->shift_left = offset.U32() % 32;
const u32 total_bits = offset.U32();
res->offset += (total_bits / 8);
res->shift_left = total_bits % 32;
}
return res;
}

Loading…
Cancel
Save