From 2626a26072c48863904a60f841dd4e83c6dd219c Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 30 Apr 2018 19:36:42 +0200 Subject: [PATCH] [d3d11] Fix sampler state validation for anisotropy Fixes an issue where samplers are not created in Path of Exile. --- src/d3d11/d3d11_sampler.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/d3d11/d3d11_sampler.cpp b/src/d3d11/d3d11_sampler.cpp index dacfcd061..f16541ff7 100644 --- a/src/d3d11/d3d11_sampler.cpp +++ b/src/d3d11/d3d11_sampler.cpp @@ -87,14 +87,10 @@ namespace dxvk { return E_INVALIDARG; } - if (filterBits & 0x40 /* anisotropic */) { - if (pDesc->MaxAnisotropy < 1 - || pDesc->MaxAnisotropy > 16) - return E_INVALIDARG; - } else if (pDesc->MaxAnisotropy < 0 - || pDesc->MaxAnisotropy > 16) { - return E_INVALIDARG; - } else { + if (pDesc->MaxAnisotropy < 0 + || pDesc->MaxAnisotropy > 16) { + return E_INVALIDARG; + } else if ((filterBits & 0x40) == 0 /* not anisotropic */) { // Reset anisotropy if it is not used pDesc->MaxAnisotropy = 0; }