MCPcopy Create free account
hub / github.com/dfranx/ShaderDebugger / GetVectorTypeFromName

Function GetVectorTypeFromName

src/Utils.cpp:79–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77 }
78
79 bv_type GetVectorTypeFromName(const char* name)
80 {
81 static const char* iNames[] = { "ivec4", "ivec3", "ivec2", "int4", "int3", "int2" };
82 static const char* uNames[] = { "uvec4", "uvec3", "uvec2", "uint4", "uint3", "uint2" };
83 static const char* bNames[] = { "bvec4", "bvec3", "bvec2", "bool4", "bool3", "bool2" };
84
85 for (u8 i = 0; i < 6; i++) {
86 if (strcmp(name, iNames[i]) == 0) return bv_type_int;
87 if (strcmp(name, uNames[i]) == 0) return bv_type_uint;
88 if (strcmp(name, bNames[i]) == 0) return bv_type_uchar;
89 }
90
91 return bv_type_float;
92 }
93 void GetMatrixSizeFromName(const char* name, int* cols, int* rows)
94 {
95 static const std::vector<int> col_list = {

Callers 3

SetGlobalValueMethod · 0.85
DefaultConstructorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected