From 5a126157f8cbd7c283669d93e62c3e0842002575 Mon Sep 17 00:00:00 2001 From: Jan Laupetin Date: Sun, 1 Mar 2026 00:55:18 +0100 Subject: [PATCH] fix: not setting shader arg flags when auto creating --- src/ObjCompiling/Techset/CommonShaderArgCreator.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ObjCompiling/Techset/CommonShaderArgCreator.cpp b/src/ObjCompiling/Techset/CommonShaderArgCreator.cpp index 717b15b7..e80e7d23 100644 --- a/src/ObjCompiling/Techset/CommonShaderArgCreator.cpp +++ b/src/ObjCompiling/Techset/CommonShaderArgCreator.cpp @@ -626,6 +626,9 @@ namespace return std::move(result); } + if (constInfo->techFlags) + m_tech_flags |= *constInfo->techFlags; + return NoResult{}; } @@ -635,12 +638,21 @@ namespace if (!maybeCodeSampler) return result::Unexpected(std::format("Missing assignment to shader texture {}", textureResource.m_name)); + const auto samplerInfo = m_common_code_source_infos.GetInfoForCodeSamplerSource(*maybeCodeSampler); + if (!samplerInfo) + return result::Unexpected(std::format("Missing info for code sampler {}", textureResource.m_name)); + techset::CommonShaderArgDestination commonDestination; commonDestination.dx11.m_location.texture_index = textureResource.m_bind_point; commonDestination.dx11.m_location.sampler_index = samplerBindPoint; commonDestination.dx11.m_size = textureResource.m_bind_count; commonDestination.dx11.m_buffer = 0; + if (samplerInfo->techFlags) + m_tech_flags |= *samplerInfo->techFlags; + if (samplerInfo->customSamplerIndex) + m_sampler_flags |= (1 << *samplerInfo->customSamplerIndex); + return AcceptShaderSamplerArgument(commonDestination, *maybeCodeSampler); }