Fix D3D12 anisotropic comparison/min/max filter checks

This commit is contained in:
baldurk
2018-08-10 23:51:09 +01:00
parent e2c6dc0317
commit 2f82f41e32
+3 -3
View File
@@ -283,21 +283,21 @@ TextureFilter MakeFilter(D3D12_FILTER filter)
ret.filter = FilterFunction::Normal;
if(filter >= D3D12_FILTER_COMPARISON_MIN_MAG_MIP_POINT &&
filter < D3D12_FILTER_COMPARISON_ANISOTROPIC)
filter <= D3D12_FILTER_COMPARISON_ANISOTROPIC)
{
ret.filter = FilterFunction::Comparison;
// the first 0x7f is the min/mag/mip filtering
filter = D3D12_FILTER(filter & 0x7f);
}
else if(filter >= D3D12_FILTER_MINIMUM_MIN_MAG_MIP_POINT &&
filter < D3D12_FILTER_MINIMUM_ANISOTROPIC)
filter <= D3D12_FILTER_MINIMUM_ANISOTROPIC)
{
ret.filter = FilterFunction::Minimum;
// the first 0x7f is the min/mag/mip filtering
filter = D3D12_FILTER(filter & 0x7f);
}
else if(filter >= D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_POINT &&
filter < D3D12_FILTER_MAXIMUM_ANISOTROPIC)
filter <= D3D12_FILTER_MAXIMUM_ANISOTROPIC)
{
ret.filter = FilterFunction::Maximum;
// the first 0x7f is the min/mag/mip filtering