[D3D12] DXBC: Fix anisotropic filtering sampler name suffix

This commit is contained in:
Triang3l 2018-09-13 13:26:01 +03:00
parent f882743d7f
commit 8587438f70
1 changed files with 5 additions and 1 deletions

View File

@ -3262,7 +3262,11 @@ uint32_t DxbcShaderTranslator::FindOrAddSamplerBinding(
std::ostringstream name; std::ostringstream name;
name << "xe_sampler" << fetch_constant; name << "xe_sampler" << fetch_constant;
if (aniso_filter != AnisoFilter::kUseFetchConst) { 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 || if (aniso_filter == AnisoFilter::kDisabled ||
aniso_filter == AnisoFilter::kUseFetchConst) { aniso_filter == AnisoFilter::kUseFetchConst) {