mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-20 19:57:50 +00:00
Implement LogicOP Workaround for Vulkan on AMD GPUs
This fixes black sewers in Paper Mario: TTYD Credit: Antique - [Sudachi] Dev (https://sudachi.emuplace.app/)
This commit is contained in:
parent
6f45ab5344
commit
52eab40fc8
2 changed files with 40 additions and 2 deletions
|
|
@ -1204,7 +1204,24 @@ void RasterizerOpenGL::SyncLogicOpState() {
|
|||
}
|
||||
flags[Dirty::LogicOp] = false;
|
||||
|
||||
const auto& regs = maxwell3d->regs;
|
||||
auto& regs = maxwell3d->regs;
|
||||
|
||||
if (device.IsAmd()) {
|
||||
using namespace Tegra::Engines;
|
||||
struct In {
|
||||
const Maxwell3D::Regs::VertexAttribute::Type d;
|
||||
In(Maxwell3D::Regs::VertexAttribute::Type n) : d(n) {}
|
||||
bool operator()(Maxwell3D::Regs::VertexAttribute n) const {
|
||||
return n.type == d;
|
||||
}
|
||||
};
|
||||
|
||||
bool has_float =
|
||||
std::any_of(regs.vertex_attrib_format.begin(), regs.vertex_attrib_format.end(),
|
||||
In(Maxwell3D::Regs::VertexAttribute::Type::Float));
|
||||
regs.logic_op.enable = static_cast<u32>(!has_float);
|
||||
}
|
||||
|
||||
if (regs.logic_op.enable) {
|
||||
glEnable(GL_COLOR_LOGIC_OP);
|
||||
glLogicOp(MaxwellToGL::LogicOp(regs.logic_op.op));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue