return empty string for es2 (#9623)

This commit is contained in:
Doris Wu
2026-01-23 06:49:54 +08:00
committed by GitHub
parent adcdbb45f9
commit ea8f6a3c92

View File

@@ -1089,9 +1089,16 @@ UTILS_NOINLINE
/* static */ std::string_view process_countBits(OpenGLContext& context) noexcept {
using namespace std::literals;
// bitCount is available in GL 4.0 and GLES 3.1.
if (context.isAtLeastGL<4, 0>() || context.isAtLeastGLES<3, 1>()) {
return ""sv;
}
// GLES 2.0 does not support bitwise operations or unsigned integers.
if (context.isES2()) {
return ""sv;
}
return R"(
// https://graphics.stanford.edu/%7Eseander/bithacks.html
int bitCount(highp uint value) {