From 38cb7d37591cc3b8b6e5153e52195e8c73dd2504 Mon Sep 17 00:00:00 2001 From: Jan Laupetin Date: Sat, 28 Feb 2026 11:35:37 +0000 Subject: [PATCH] feat: set proper tech flags and sampler flags for loaded techniques --- 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 8afff667..717b15b7 100644 --- a/src/ObjCompiling/Techset/CommonShaderArgCreator.cpp +++ b/src/ObjCompiling/Techset/CommonShaderArgCreator.cpp @@ -230,6 +230,9 @@ namespace } m_args.emplace_back(argumentType, commonDestination, techset::CommonShaderArgValue{.code_const_source = value}); + if (maybeInfo->techFlags) + m_tech_flags |= *maybeInfo->techFlags; + return NoResult{}; } @@ -241,7 +244,16 @@ namespace .m_value_type = techset::CommonShaderValueType::CODE_SAMPLER, }; + const auto maybeInfo = m_common_code_source_infos.GetInfoForCodeSamplerSource(codeSamplerSource); + if (!maybeInfo) + return result::Unexpected("Could not find info for code sampler"); + m_args.emplace_back(argumentType, commonDestination, techset::CommonShaderArgValue{.code_sampler_source = codeSamplerSource}); + if (maybeInfo->techFlags) + m_tech_flags |= *maybeInfo->techFlags; + if (maybeInfo->customSamplerIndex) + m_sampler_flags |= (1 << *maybeInfo->customSamplerIndex); + return NoResult{}; }