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

Function ParseShaderName

shadercompiler/EffectCompilerDX11.cpp:905–936  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

903
904
905bool ParseShaderName( const InlineString& name, InputStageType& type )
906{
907 if( _stricmp( ToString( name ).c_str(), "vertexshader" ) == 0 )
908 {
909 type = VERTEX_STAGE;
910 }
911 else if( _stricmp( ToString( name ).c_str(), "pixelshader" ) == 0 )
912 {
913 type = PIXEL_STAGE;
914 }
915 else if( _stricmp( ToString( name ).c_str(), "computeshader" ) == 0 )
916 {
917 type = COMPUTE_STAGE;
918 }
919 else if( _stricmp( ToString( name ).c_str(), "geometryshader" ) == 0 )
920 {
921 type = GEOMETRY_STAGE;
922 }
923 else if( _stricmp( ToString( name ).c_str(), "hullshader" ) == 0 )
924 {
925 type = HULL_STAGE;
926 }
927 else if( _stricmp( ToString( name ).c_str(), "domainshader" ) == 0 )
928 {
929 type = DOMAIN_STAGE;
930 }
931 else
932 {
933 return false;
934 }
935 return true;
936}
937
938bool EffectCompilerDX11::CompileEffect( const char* source, size_t sourceLength, const std::vector<Macro>& defines, EffectData& result, IWorkQueue* workQueue )
939{

Callers 1

CompileEffectMethod · 0.70

Calls 1

ToStringFunction · 0.70

Tested by

no test coverage detected