MCPcopy Create free account
hub / github.com/GPUOpen-Tools/compressonator / clampF16Max

Function clampF16Max

cmp_core/shaders/bc6_encode_kernel.cpp:1258–1281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1256}
1257
1258void clampF16Max(CGU_FLOAT EndPoints[MAX_SUBSETS][MAX_END_POINTS][MAX_DIMENSION_BIG], CGU_BOOL isSigned)
1259{
1260 for (CGU_INT region = 0; region < 2; region++)
1261 for (CGU_INT ab = 0; ab < 2; ab++)
1262 for (CGU_INT rgb = 0; rgb < 3; rgb++)
1263 {
1264 if (isSigned)
1265 {
1266 if (EndPoints[region][ab][rgb] < -FLT16_MAX)
1267 EndPoints[region][ab][rgb] = -FLT16_MAX;
1268 else if (EndPoints[region][ab][rgb] > FLT16_MAX)
1269 EndPoints[region][ab][rgb] = FLT16_MAX;
1270 }
1271 else
1272 {
1273 if (EndPoints[region][ab][rgb] < 0.0)
1274 EndPoints[region][ab][rgb] = 0.0;
1275 else if (EndPoints[region][ab][rgb] > FLT16_MAX)
1276 EndPoints[region][ab][rgb] = FLT16_MAX;
1277 }
1278 // Zero region
1279 // if ((EndPoints[region][ab][rgb] > -0.01) && ((EndPoints[region][ab][rgb] < 0.01))) EndPoints[region][ab][rgb] = 0.0;
1280 }
1281}
1282
1283//=====================================================================================================================
1284#define LOG_CL_BASE 2

Callers 2

FindBestPatternFunction · 0.85
FindBestPatternMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected