From ac909e26bd63f82350f39f1c943982e0e2cc95ce Mon Sep 17 00:00:00 2001 From: marauder2k7 Date: Tue, 28 Jan 2025 21:09:57 +0000 Subject: [PATCH] Update featureSet.cpp --- Engine/source/shaderGen/featureSet.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Engine/source/shaderGen/featureSet.cpp b/Engine/source/shaderGen/featureSet.cpp index 0edda8c25..f295536be 100644 --- a/Engine/source/shaderGen/featureSet.cpp +++ b/Engine/source/shaderGen/featureSet.cpp @@ -148,12 +148,15 @@ void FeatureSet::setFeature( const FeatureType &type, bool set, S32 index ) void FeatureSet::addFeature( const FeatureType &type, S32 index, void* argStruct ) { - for ( U32 i=0; i < mFeatures.size(); i++ ) + if (!argStruct) { - const FeatureInfo &info = mFeatures[i]; - if ( info.type == &type && - info.index == index ) - return; + for (U32 i = 0; i < mFeatures.size(); i++) + { + const FeatureInfo& info = mFeatures[i]; + if (info.type == &type && + info.index == index) + return; + } } FeatureInfo info;