MCPcopy Create free account
hub / github.com/carbonengine/trinity / DiscoverPermutations

Function DiscoverPermutations

shadercompiler/ShaderCompiler.cpp:224–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222#include "ParserState.h"
223
224bool DiscoverPermutations( Permutations& permutations, const char* shaderSource, size_t shaderLength )
225{
226 ZoneScoped;
227
228 ParserState state( MakeInlineString( shaderSource, shaderSource + shaderLength ) );
229 if( !state.DiscoverPermutations( permutations ) )
230 {
231 return false;
232 }
233 for( auto it = begin( permutations ); it != end( permutations ); ++it )
234 {
235 g_stringTable.AddString( it->name.c_str() );
236 g_stringTable.AddString( it->description.c_str() );
237 for( auto jt = begin( it->options ); jt != end( it->options ); ++jt )
238 {
239 g_stringTable.AddString( jt->name.c_str() );
240 }
241 }
242 return true;
243}
244
245
246struct ProgramArguments

Callers 2

PrintPermutationsFunction · 0.85
mainFunction · 0.85

Calls 5

MakeInlineStringFunction · 0.85
DiscoverPermutationsMethod · 0.80
AddStringMethod · 0.80
beginFunction · 0.50
endFunction · 0.50

Tested by

no test coverage detected