From 8587438f703d824f216eaa8831ff87151ea81c79 Mon Sep 17 00:00:00 2001 From: Triang3l Date: Thu, 13 Sep 2018 13:26:01 +0300 Subject: [PATCH] [D3D12] DXBC: Fix anisotropic filtering sampler name suffix --- src/xenia/gpu/dxbc_shader_translator.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xenia/gpu/dxbc_shader_translator.cc b/src/xenia/gpu/dxbc_shader_translator.cc index 8b2ab23b5..ba4e61dfd 100644 --- a/src/xenia/gpu/dxbc_shader_translator.cc +++ b/src/xenia/gpu/dxbc_shader_translator.cc @@ -3262,7 +3262,11 @@ uint32_t DxbcShaderTranslator::FindOrAddSamplerBinding( std::ostringstream name; name << "xe_sampler" << fetch_constant; if (aniso_filter != AnisoFilter::kUseFetchConst) { - name << "_a" << (1u << uint32_t(aniso_filter)); + if (aniso_filter == AnisoFilter::kDisabled) { + name << "_a0"; + } else { + name << "_a" << (1u << (uint32_t(aniso_filter) - 1)); + } } if (aniso_filter == AnisoFilter::kDisabled || aniso_filter == AnisoFilter::kUseFetchConst) {