Skip to content

Commit

Permalink
GS:MTL: Fix inverted UseMipmapFiltering check
Browse files Browse the repository at this point in the history
  • Loading branch information
TellowKrinkle committed May 30, 2024
1 parent 5210389 commit 525a7c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pcsx2/GS/Renderers/Metal/GSDeviceMTL.mm
Original file line number Diff line number Diff line change
Expand Up @@ -814,9 +814,11 @@ static void OnMainThread(Fn&& fn)
[sdesc setRAddressMode:MTLSamplerAddressModeClampToEdge];

[sdesc setMaxAnisotropy:GSConfig.MaxAnisotropy && sel.aniso ? GSConfig.MaxAnisotropy : 1];
[sdesc setLodMaxClamp:(sel.lodclamp || sel.UseMipmapFiltering()) ? 0.25f : FLT_MAX];
bool clampLOD = sel.lodclamp || !sel.UseMipmapFiltering();
const char* clampdesc = clampLOD ? " LODClamp" : "";
[sdesc setLodMaxClamp:clampLOD ? 0.25f : FLT_MAX];

[sdesc setLabel:[NSString stringWithFormat:@"%s%s %s%s", taudesc, tavdesc, magname, minname]];
[sdesc setLabel:[NSString stringWithFormat:@"%s%s %s%s%s", taudesc, tavdesc, magname, minname, clampdesc]];
MRCOwned<id<MTLSamplerState>> ret = MRCTransfer([dev newSamplerStateWithDescriptor:sdesc]);
pxAssertRel(ret, "Failed to create sampler!");
return ret;
Expand Down

0 comments on commit 525a7c4

Please sign in to comment.