MCPcopy Create free account
hub / github.com/NVIDIA-RTX/RTXNTC / ParseBlockCompressedFormat

Function ParseBlockCompressedFormat

libraries/ntc-utils/src/Manifest.cpp:178–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178std::optional<ntc::BlockCompressedFormat> ParseBlockCompressedFormat(char const* format, bool enableAuto)
179{
180 if (!format || !format[0])
181 return ntc::BlockCompressedFormat::None;
182
183 std::string uppercaseFormat = format;
184 UppercaseString(uppercaseFormat);
185
186 if (uppercaseFormat == "NONE")
187 return ntc::BlockCompressedFormat::None;
188 if (uppercaseFormat == "BC1")
189 return ntc::BlockCompressedFormat::BC1;
190 if (uppercaseFormat == "BC2")
191 return ntc::BlockCompressedFormat::BC2;
192 if (uppercaseFormat == "BC3")
193 return ntc::BlockCompressedFormat::BC3;
194 if (uppercaseFormat == "BC4")
195 return ntc::BlockCompressedFormat::BC4;
196 if (uppercaseFormat == "BC5")
197 return ntc::BlockCompressedFormat::BC5;
198 if (uppercaseFormat == "BC6" || uppercaseFormat == "BC6H")
199 return ntc::BlockCompressedFormat::BC6;
200 if (uppercaseFormat == "BC7")
201 return ntc::BlockCompressedFormat::BC7;
202 if (uppercaseFormat == "AUTO" && enableAuto)
203 return BlockCompressedFormat_Auto;
204
205 return std::optional<ntc::BlockCompressedFormat>();
206}
207
208SemanticLabel ParseSemanticLabel(const char* label)
209{

Callers 4

ParseManifestFunction · 0.85
ProcessCommandLineFunction · 0.85
ProcessCommandLineFunction · 0.85
mainFunction · 0.85

Calls 1

UppercaseStringFunction · 0.85

Tested by 2

ProcessCommandLineFunction · 0.68
mainFunction · 0.68