mirror of https://github.com/PCSX2/pcsx2.git
GS: Fix codacy warnings
This commit is contained in:
parent
a71bac037c
commit
4d4825de75
|
@ -230,7 +230,7 @@ void GSDevice11::SetupPS(const PSSelector& sel, const GSHWDrawConfig::PSConstant
|
|||
D3D11_SAMPLER_DESC sd = {};
|
||||
|
||||
const int anisotropy = GSConfig.MaxAnisotropy;
|
||||
if (anisotropy && ssel.aniso)
|
||||
if (anisotropy > 1 && ssel.aniso)
|
||||
{
|
||||
sd.Filter = D3D11_FILTER_ANISOTROPIC;
|
||||
}
|
||||
|
|
|
@ -877,7 +877,7 @@ bool GSDevice12::GetSampler(D3D12::DescriptorHandle* cpu_handle, GSHWDrawConfig:
|
|||
|
||||
D3D12_SAMPLER_DESC sd = {};
|
||||
const int anisotropy = GSConfig.MaxAnisotropy;
|
||||
if (GSConfig.MaxAnisotropy > 1 && ss.aniso)
|
||||
if (anisotropy > 1 && ss.aniso)
|
||||
{
|
||||
sd.Filter = D3D12_FILTER_ANISOTROPIC;
|
||||
}
|
||||
|
|
|
@ -888,7 +888,7 @@ GLuint GSDeviceOGL::CreateSampler(PSSamplerSelector sel)
|
|||
glSamplerParameteri(sampler, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
|
||||
|
||||
const int anisotropy = GSConfig.MaxAnisotropy;
|
||||
if (anisotropy && sel.aniso)
|
||||
if (anisotropy > 1 && sel.aniso)
|
||||
{
|
||||
if (GLExtension::Has("GL_ARB_texture_filter_anisotropic"))
|
||||
glSamplerParameterf(sampler, GL_TEXTURE_MAX_ANISOTROPY, (float)anisotropy);
|
||||
|
|
Loading…
Reference in New Issue