mirror of https://github.com/PCSX2/pcsx2.git
GS-d3d11: MaxAnisotropy value range is 1-16, clamp it.
This commit is contained in:
parent
0375f9c0ae
commit
66cfb403c6
|
@ -374,7 +374,7 @@ bool GSDevice11::Create(const WindowInfo& wi)
|
|||
sd.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;
|
||||
sd.MinLOD = -FLT_MAX;
|
||||
sd.MaxLOD = FLT_MAX;
|
||||
sd.MaxAnisotropy = D3D11_MIN_MAXANISOTROPY;
|
||||
sd.MaxAnisotropy = 1;
|
||||
sd.ComparisonFunc = D3D11_COMPARISON_NEVER;
|
||||
|
||||
m_dev->CreateSamplerState(&sd, m_convert.ln.put());
|
||||
|
|
|
@ -56,7 +56,7 @@ bool GSDevice11::CreateTextureFX()
|
|||
sd.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;
|
||||
sd.MinLOD = -FLT_MAX;
|
||||
sd.MaxLOD = FLT_MAX;
|
||||
sd.MaxAnisotropy = D3D11_MIN_MAXANISOTROPY;
|
||||
sd.MaxAnisotropy = 1;
|
||||
sd.ComparisonFunc = D3D11_COMPARISON_NEVER;
|
||||
|
||||
hr = m_dev->CreateSamplerState(&sd, m_palette_ss.put());
|
||||
|
@ -237,7 +237,7 @@ void GSDevice11::SetupPS(PSSelector sel, const GSHWDrawConfig::PSConstantBuffer*
|
|||
sd.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;
|
||||
sd.MinLOD = -FLT_MAX;
|
||||
sd.MaxLOD = FLT_MAX;
|
||||
sd.MaxAnisotropy = anisotropy;
|
||||
sd.MaxAnisotropy = std::clamp(anisotropy, 1, 16);
|
||||
sd.ComparisonFunc = D3D11_COMPARISON_NEVER;
|
||||
|
||||
m_dev->CreateSamplerState(&sd, &ss0);
|
||||
|
|
Loading…
Reference in New Issue