GLSL: implement countOneBits().

Bug: tint:1430
Change-Id: I1aa886d1f68e50f0ce6fd5b55d87722742ca5f69
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82140
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
Stephen White 2022-02-28 17:41:47 +00:00 committed by Tint LUCI CQ
parent 2e6269acb0
commit 10c554ecf4
21 changed files with 61 additions and 340 deletions

View File

@ -580,6 +580,9 @@ bool GeneratorImpl::EmitBuiltinCall(std::ostream& out,
if (builtin->IsTexture()) { if (builtin->IsTexture()) {
return EmitTextureCall(out, call, builtin); return EmitTextureCall(out, call, builtin);
} }
if (builtin->Type() == sem::BuiltinType::kCountOneBits) {
return EmitCountOneBitsCall(out, expr);
}
if (builtin->Type() == sem::BuiltinType::kSelect) { if (builtin->Type() == sem::BuiltinType::kSelect) {
return EmitSelectCall(out, expr); return EmitSelectCall(out, expr);
} }
@ -859,6 +862,23 @@ bool GeneratorImpl::EmitInsertBits(std::ostream& out,
return true; return true;
} }
bool GeneratorImpl::EmitCountOneBitsCall(std::ostream& out,
const ast::CallExpression* expr) {
// GLSL's bitCount returns an integer type, so cast it to the appropriate
// unsigned type.
if (!EmitType(out, TypeOf(expr)->UnwrapRef(), ast::StorageClass::kNone,
ast::Access::kReadWrite, "")) {
return false;
}
out << "(bitCount(";
if (!EmitExpression(out, expr->args[0])) {
return false;
}
out << "))";
return true;
}
bool GeneratorImpl::EmitSelectCall(std::ostream& out, bool GeneratorImpl::EmitSelectCall(std::ostream& out,
const ast::CallExpression* expr) { const ast::CallExpression* expr) {
auto* expr_false = expr->args[0]; auto* expr_false = expr->args[0];
@ -1589,7 +1609,7 @@ std::string GeneratorImpl::generate_builtin_name(const sem::Builtin* builtin) {
case sem::BuiltinType::kAtan2: case sem::BuiltinType::kAtan2:
return "atan"; return "atan";
case sem::BuiltinType::kCountOneBits: case sem::BuiltinType::kCountOneBits:
return "countbits"; return "bitCount";
case sem::BuiltinType::kDpdx: case sem::BuiltinType::kDpdx:
return "ddx"; return "ddx";
case sem::BuiltinType::kDpdxCoarse: case sem::BuiltinType::kDpdxCoarse:

View File

@ -194,6 +194,11 @@ class GeneratorImpl : public TextGenerator {
/// @param out the output of the expression stream /// @param out the output of the expression stream
/// @param expr the call expression /// @param expr the call expression
/// @returns true if the call expression is emitted /// @returns true if the call expression is emitted
bool EmitCountOneBitsCall(std::ostream& out, const ast::CallExpression* expr);
/// Handles generating a call to the `countOneBits()` builtin
/// @param out the output of the expression stream
/// @param expr the call expression
/// @returns true if the call expression is emitted
bool EmitSelectCall(std::ostream& out, const ast::CallExpression* expr); bool EmitSelectCall(std::ostream& out, const ast::CallExpression* expr);
/// Handles generating a call to the `dot()` builtin /// Handles generating a call to the `dot()` builtin
/// @param out the output of the expression stream /// @param out the output of the expression stream

View File

@ -198,7 +198,7 @@ INSTANTIATE_TEST_SUITE_P(
BuiltinData{BuiltinType::kClamp, ParamType::kU32, "clamp"}, BuiltinData{BuiltinType::kClamp, ParamType::kU32, "clamp"},
BuiltinData{BuiltinType::kCos, ParamType::kF32, "cos"}, BuiltinData{BuiltinType::kCos, ParamType::kF32, "cos"},
BuiltinData{BuiltinType::kCosh, ParamType::kF32, "cosh"}, BuiltinData{BuiltinType::kCosh, ParamType::kF32, "cosh"},
BuiltinData{BuiltinType::kCountOneBits, ParamType::kU32, "countbits"}, BuiltinData{BuiltinType::kCountOneBits, ParamType::kU32, "bitCount"},
BuiltinData{BuiltinType::kCross, ParamType::kF32, "cross"}, BuiltinData{BuiltinType::kCross, ParamType::kF32, "cross"},
BuiltinData{BuiltinType::kDeterminant, ParamType::kF32, "determinant"}, BuiltinData{BuiltinType::kDeterminant, ParamType::kF32, "determinant"},
BuiltinData{BuiltinType::kDistance, ParamType::kF32, "distance"}, BuiltinData{BuiltinType::kDistance, ParamType::kF32, "distance"},

View File

@ -1,9 +1,7 @@
SKIP: FAILED
#version 310 es #version 310 es
void countOneBits_0d0e46() { void countOneBits_0d0e46() {
uvec4 res = countbits(uvec4(0u, 0u, 0u, 0u)); uvec4 res = uvec4(bitCount(uvec4(0u, 0u, 0u, 0u)));
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -18,19 +16,11 @@ void main() {
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:4: 'countbits' : no matching overloaded function found
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp 4-component vector of uint'
ERROR: 0:4: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
void countOneBits_0d0e46() { void countOneBits_0d0e46() {
uvec4 res = countbits(uvec4(0u, 0u, 0u, 0u)); uvec4 res = uvec4(bitCount(uvec4(0u, 0u, 0u, 0u)));
} }
void fragment_main() { void fragment_main() {
@ -41,18 +31,10 @@ void main() {
fragment_main(); fragment_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:5: 'countbits' : no matching overloaded function found
ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
ERROR: 0:5: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
#version 310 es #version 310 es
void countOneBits_0d0e46() { void countOneBits_0d0e46() {
uvec4 res = countbits(uvec4(0u, 0u, 0u, 0u)); uvec4 res = uvec4(bitCount(uvec4(0u, 0u, 0u, 0u)));
} }
void compute_main() { void compute_main() {
@ -64,11 +46,3 @@ void main() {
compute_main(); compute_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:4: 'countbits' : no matching overloaded function found
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp 4-component vector of uint'
ERROR: 0:4: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@ -1,9 +1,7 @@
SKIP: FAILED
#version 310 es #version 310 es
void countOneBits_0f7980() { void countOneBits_0f7980() {
ivec4 res = countbits(ivec4(0, 0, 0, 0)); ivec4 res = ivec4(bitCount(ivec4(0, 0, 0, 0)));
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -18,19 +16,11 @@ void main() {
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:4: 'countbits' : no matching overloaded function found
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp 4-component vector of int'
ERROR: 0:4: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
void countOneBits_0f7980() { void countOneBits_0f7980() {
ivec4 res = countbits(ivec4(0, 0, 0, 0)); ivec4 res = ivec4(bitCount(ivec4(0, 0, 0, 0)));
} }
void fragment_main() { void fragment_main() {
@ -41,18 +31,10 @@ void main() {
fragment_main(); fragment_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:5: 'countbits' : no matching overloaded function found
ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of int'
ERROR: 0:5: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
#version 310 es #version 310 es
void countOneBits_0f7980() { void countOneBits_0f7980() {
ivec4 res = countbits(ivec4(0, 0, 0, 0)); ivec4 res = ivec4(bitCount(ivec4(0, 0, 0, 0)));
} }
void compute_main() { void compute_main() {
@ -64,11 +46,3 @@ void main() {
compute_main(); compute_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:4: 'countbits' : no matching overloaded function found
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp 4-component vector of int'
ERROR: 0:4: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@ -1,9 +1,7 @@
SKIP: FAILED
#version 310 es #version 310 es
void countOneBits_65d2ae() { void countOneBits_65d2ae() {
ivec3 res = countbits(ivec3(0, 0, 0)); ivec3 res = ivec3(bitCount(ivec3(0, 0, 0)));
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -18,19 +16,11 @@ void main() {
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:4: 'countbits' : no matching overloaded function found
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp 3-component vector of int'
ERROR: 0:4: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
void countOneBits_65d2ae() { void countOneBits_65d2ae() {
ivec3 res = countbits(ivec3(0, 0, 0)); ivec3 res = ivec3(bitCount(ivec3(0, 0, 0)));
} }
void fragment_main() { void fragment_main() {
@ -41,18 +31,10 @@ void main() {
fragment_main(); fragment_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:5: 'countbits' : no matching overloaded function found
ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp mediump 3-component vector of int'
ERROR: 0:5: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
#version 310 es #version 310 es
void countOneBits_65d2ae() { void countOneBits_65d2ae() {
ivec3 res = countbits(ivec3(0, 0, 0)); ivec3 res = ivec3(bitCount(ivec3(0, 0, 0)));
} }
void compute_main() { void compute_main() {
@ -64,11 +46,3 @@ void main() {
compute_main(); compute_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:4: 'countbits' : no matching overloaded function found
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp 3-component vector of int'
ERROR: 0:4: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@ -1,9 +1,7 @@
SKIP: FAILED
#version 310 es #version 310 es
void countOneBits_690cfc() { void countOneBits_690cfc() {
uvec3 res = countbits(uvec3(0u, 0u, 0u)); uvec3 res = uvec3(bitCount(uvec3(0u, 0u, 0u)));
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -18,19 +16,11 @@ void main() {
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:4: 'countbits' : no matching overloaded function found
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp 3-component vector of uint'
ERROR: 0:4: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
void countOneBits_690cfc() { void countOneBits_690cfc() {
uvec3 res = countbits(uvec3(0u, 0u, 0u)); uvec3 res = uvec3(bitCount(uvec3(0u, 0u, 0u)));
} }
void fragment_main() { void fragment_main() {
@ -41,18 +31,10 @@ void main() {
fragment_main(); fragment_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:5: 'countbits' : no matching overloaded function found
ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp mediump 3-component vector of uint'
ERROR: 0:5: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
#version 310 es #version 310 es
void countOneBits_690cfc() { void countOneBits_690cfc() {
uvec3 res = countbits(uvec3(0u, 0u, 0u)); uvec3 res = uvec3(bitCount(uvec3(0u, 0u, 0u)));
} }
void compute_main() { void compute_main() {
@ -64,11 +46,3 @@ void main() {
compute_main(); compute_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:4: 'countbits' : no matching overloaded function found
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp 3-component vector of uint'
ERROR: 0:4: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@ -1,9 +1,7 @@
SKIP: FAILED
#version 310 es #version 310 es
void countOneBits_94fd81() { void countOneBits_94fd81() {
uvec2 res = countbits(uvec2(0u, 0u)); uvec2 res = uvec2(bitCount(uvec2(0u, 0u)));
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -18,19 +16,11 @@ void main() {
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:4: 'countbits' : no matching overloaded function found
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of uint'
ERROR: 0:4: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
void countOneBits_94fd81() { void countOneBits_94fd81() {
uvec2 res = countbits(uvec2(0u, 0u)); uvec2 res = uvec2(bitCount(uvec2(0u, 0u)));
} }
void fragment_main() { void fragment_main() {
@ -41,18 +31,10 @@ void main() {
fragment_main(); fragment_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:5: 'countbits' : no matching overloaded function found
ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp mediump 2-component vector of uint'
ERROR: 0:5: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
#version 310 es #version 310 es
void countOneBits_94fd81() { void countOneBits_94fd81() {
uvec2 res = countbits(uvec2(0u, 0u)); uvec2 res = uvec2(bitCount(uvec2(0u, 0u)));
} }
void compute_main() { void compute_main() {
@ -64,11 +46,3 @@ void main() {
compute_main(); compute_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:4: 'countbits' : no matching overloaded function found
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of uint'
ERROR: 0:4: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@ -1,9 +1,7 @@
SKIP: FAILED
#version 310 es #version 310 es
void countOneBits_ae44f9() { void countOneBits_ae44f9() {
uint res = countbits(1u); uint res = uint(bitCount(1u));
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -18,19 +16,11 @@ void main() {
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:4: 'countbits' : no matching overloaded function found
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp uint'
ERROR: 0:4: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
void countOneBits_ae44f9() { void countOneBits_ae44f9() {
uint res = countbits(1u); uint res = uint(bitCount(1u));
} }
void fragment_main() { void fragment_main() {
@ -41,18 +31,10 @@ void main() {
fragment_main(); fragment_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:5: 'countbits' : no matching overloaded function found
ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp mediump uint'
ERROR: 0:5: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
#version 310 es #version 310 es
void countOneBits_ae44f9() { void countOneBits_ae44f9() {
uint res = countbits(1u); uint res = uint(bitCount(1u));
} }
void compute_main() { void compute_main() {
@ -64,11 +46,3 @@ void main() {
compute_main(); compute_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:4: 'countbits' : no matching overloaded function found
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp uint'
ERROR: 0:4: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@ -1,9 +1,7 @@
SKIP: FAILED
#version 310 es #version 310 es
void countOneBits_af90e2() { void countOneBits_af90e2() {
ivec2 res = countbits(ivec2(0, 0)); ivec2 res = ivec2(bitCount(ivec2(0, 0)));
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -18,19 +16,11 @@ void main() {
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:4: 'countbits' : no matching overloaded function found
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of int'
ERROR: 0:4: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
void countOneBits_af90e2() { void countOneBits_af90e2() {
ivec2 res = countbits(ivec2(0, 0)); ivec2 res = ivec2(bitCount(ivec2(0, 0)));
} }
void fragment_main() { void fragment_main() {
@ -41,18 +31,10 @@ void main() {
fragment_main(); fragment_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:5: 'countbits' : no matching overloaded function found
ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp mediump 2-component vector of int'
ERROR: 0:5: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
#version 310 es #version 310 es
void countOneBits_af90e2() { void countOneBits_af90e2() {
ivec2 res = countbits(ivec2(0, 0)); ivec2 res = ivec2(bitCount(ivec2(0, 0)));
} }
void compute_main() { void compute_main() {
@ -64,11 +46,3 @@ void main() {
compute_main(); compute_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:4: 'countbits' : no matching overloaded function found
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of int'
ERROR: 0:4: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@ -1,9 +1,7 @@
SKIP: FAILED
#version 310 es #version 310 es
void countOneBits_fd88b2() { void countOneBits_fd88b2() {
int res = countbits(1); int res = int(bitCount(1));
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -18,19 +16,11 @@ void main() {
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:4: 'countbits' : no matching overloaded function found
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp int'
ERROR: 0:4: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
void countOneBits_fd88b2() { void countOneBits_fd88b2() {
int res = countbits(1); int res = int(bitCount(1));
} }
void fragment_main() { void fragment_main() {
@ -41,18 +31,10 @@ void main() {
fragment_main(); fragment_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:5: 'countbits' : no matching overloaded function found
ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp mediump int'
ERROR: 0:5: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
#version 310 es #version 310 es
void countOneBits_fd88b2() { void countOneBits_fd88b2() {
int res = countbits(1); int res = int(bitCount(1));
} }
void compute_main() { void compute_main() {
@ -64,11 +46,3 @@ void main() {
compute_main(); compute_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:4: 'countbits' : no matching overloaded function found
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp int'
ERROR: 0:4: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
void main_1() { void main_1() {
@ -7,7 +5,7 @@ void main_1() {
int i1 = 30; int i1 = 30;
uvec2 v2u1 = uvec2(10u, 20u); uvec2 v2u1 = uvec2(10u, 20u);
ivec2 v2i1 = ivec2(30, 40); ivec2 v2i1 = ivec2(30, 40);
ivec2 x_1 = countbits(v2i1); ivec2 x_1 = ivec2(bitCount(v2i1));
return; return;
} }
@ -20,11 +18,3 @@ void main() {
tint_symbol(); tint_symbol();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:8: 'countbits' : no matching overloaded function found
ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of int'
ERROR: 0:8: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
void main_1() { void main_1() {
@ -7,7 +5,7 @@ void main_1() {
int i1 = 30; int i1 = 30;
uvec2 v2u1 = uvec2(10u, 20u); uvec2 v2u1 = uvec2(10u, 20u);
ivec2 v2i1 = ivec2(30, 40); ivec2 v2i1 = ivec2(30, 40);
ivec2 x_1 = ivec2(countbits(v2u1)); ivec2 x_1 = ivec2(uvec2(bitCount(v2u1)));
return; return;
} }
@ -20,10 +18,3 @@ void main() {
tint_symbol(); tint_symbol();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:8: 'countbits' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
void main_1() { void main_1() {
@ -7,7 +5,7 @@ void main_1() {
int i1 = 30; int i1 = 30;
uvec2 v2u1 = uvec2(10u, 20u); uvec2 v2u1 = uvec2(10u, 20u);
ivec2 v2i1 = ivec2(30, 40); ivec2 v2i1 = ivec2(30, 40);
int x_1 = countbits(i1); int x_1 = int(bitCount(i1));
return; return;
} }
@ -20,11 +18,3 @@ void main() {
tint_symbol(); tint_symbol();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:8: 'countbits' : no matching overloaded function found
ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp highp int'
ERROR: 0:8: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
void main_1() { void main_1() {
@ -7,7 +5,7 @@ void main_1() {
int i1 = 30; int i1 = 30;
uvec2 v2u1 = uvec2(10u, 20u); uvec2 v2u1 = uvec2(10u, 20u);
ivec2 v2i1 = ivec2(30, 40); ivec2 v2i1 = ivec2(30, 40);
int x_1 = int(countbits(u1)); int x_1 = int(uint(bitCount(u1)));
return; return;
} }
@ -20,10 +18,3 @@ void main() {
tint_symbol(); tint_symbol();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:8: 'countbits' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
void main_1() { void main_1() {
@ -7,7 +5,7 @@ void main_1() {
int i1 = 30; int i1 = 30;
uvec2 v2u1 = uvec2(10u, 20u); uvec2 v2u1 = uvec2(10u, 20u);
ivec2 v2i1 = ivec2(30, 40); ivec2 v2i1 = ivec2(30, 40);
uvec2 x_1 = uvec2(countbits(v2i1)); uvec2 x_1 = uvec2(ivec2(bitCount(v2i1)));
return; return;
} }
@ -20,10 +18,3 @@ void main() {
tint_symbol(); tint_symbol();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:8: 'countbits' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
void main_1() { void main_1() {
@ -7,7 +5,7 @@ void main_1() {
int i1 = 30; int i1 = 30;
uvec2 v2u1 = uvec2(10u, 20u); uvec2 v2u1 = uvec2(10u, 20u);
ivec2 v2i1 = ivec2(30, 40); ivec2 v2i1 = ivec2(30, 40);
uvec2 x_1 = countbits(v2u1); uvec2 x_1 = uvec2(bitCount(v2u1));
return; return;
} }
@ -20,11 +18,3 @@ void main() {
tint_symbol(); tint_symbol();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:8: 'countbits' : no matching overloaded function found
ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of uint'
ERROR: 0:8: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
void main_1() { void main_1() {
@ -7,7 +5,7 @@ void main_1() {
int i1 = 30; int i1 = 30;
uvec2 v2u1 = uvec2(10u, 20u); uvec2 v2u1 = uvec2(10u, 20u);
ivec2 v2i1 = ivec2(30, 40); ivec2 v2i1 = ivec2(30, 40);
uint x_1 = uint(countbits(i1)); uint x_1 = uint(int(bitCount(i1)));
return; return;
} }
@ -20,10 +18,3 @@ void main() {
tint_symbol(); tint_symbol();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:8: 'countbits' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
void main_1() { void main_1() {
@ -7,7 +5,7 @@ void main_1() {
int i1 = 30; int i1 = 30;
uvec2 v2u1 = uvec2(10u, 20u); uvec2 v2u1 = uvec2(10u, 20u);
ivec2 v2i1 = ivec2(30, 40); ivec2 v2i1 = ivec2(30, 40);
uint x_1 = countbits(u1); uint x_1 = uint(bitCount(u1));
return; return;
} }
@ -20,11 +18,3 @@ void main() {
tint_symbol(); tint_symbol();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:8: 'countbits' : no matching overloaded function found
ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp highp uint'
ERROR: 0:8: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -39,7 +37,7 @@ int f1_() {
if ((x_65 > x_67)) { if ((x_65 > x_67)) {
a = (a + 1); a = (a + 1);
} }
i = countbits(a); i = int(bitCount(a));
int x_75 = i; int x_75 = i;
int x_77 = x_11.x_GLF_uniform_int_values[0].el; int x_77 = x_11.x_GLF_uniform_int_values[0].el;
if ((x_75 < x_77)) { if ((x_75 < x_77)) {
@ -85,11 +83,3 @@ void main() {
x_GLF_color_1_1 = inner_result.x_GLF_color_1; x_GLF_color_1_1 = inner_result.x_GLF_color_1;
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:40: 'countbits' : no matching overloaded function found
ERROR: 0:40: 'assign' : cannot convert from ' const float' to ' temp mediump int'
ERROR: 0:40: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl:1:13 warning: use of deprecated language feature: the @stride attribute is deprecated; use a larger type if necessary vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl:1:13 warning: use of deprecated language feature: the @stride attribute is deprecated; use a larger type if necessary
type Arr = @stride(16) array<f32, 1>; type Arr = @stride(16) array<f32, 1>;
^^^^^^ ^^^^^^
@ -47,7 +45,7 @@ int f1_() {
if ((x_65 > x_67)) { if ((x_65 > x_67)) {
a = (a + 1); a = (a + 1);
} }
i = countbits(a); i = int(bitCount(a));
int x_75 = i; int x_75 = i;
int x_77 = x_11.x_GLF_uniform_int_values[0].el; int x_77 = x_11.x_GLF_uniform_int_values[0].el;
if ((x_75 < x_77)) { if ((x_75 < x_77)) {
@ -93,11 +91,3 @@ void main() {
x_GLF_color_1_1 = inner_result.x_GLF_color_1; x_GLF_color_1_1 = inner_result.x_GLF_color_1;
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:40: 'countbits' : no matching overloaded function found
ERROR: 0:40: 'assign' : cannot convert from ' const float' to ' temp mediump int'
ERROR: 0:40: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.