Enforce linear filtering for debug 2D primitives. (#164)

This commit is contained in:
Skyth (Asilkan) 2025-01-24 15:00:04 +03:00 committed by GitHub
parent cf5c3423d1
commit fb5d0cd94e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -68,3 +68,16 @@ bool MotionBlurMidAsmHook()
{
return Config::MotionBlur != EMotionBlur::Off;
}
// Hedgehog::MirageDebug::PrepareRenderPrimitive2D
PPC_FUNC_IMPL(__imp__sub_830D25D8);
PPC_FUNC(sub_830D25D8)
{
auto device = reinterpret_cast<GuestDevice*>(base + PPC_LOAD_U32(ctx.r4.u32));
// Set first sampler to use linear filtering.
device->samplerStates[0].data[3] = (device->samplerStates[0].data[3].get() & ~0x1f80000) | 0x1280000;
device->dirtyFlags[3] = device->dirtyFlags[3].get() | 0x80000000ull;
__imp__sub_830D25D8(ctx, base);
}