LibWeb/WebGL: Don't treat WebGLUniformLocation as WebGLObject

...in code generator. `is_webgl_object_type()` is only supposed to
return true for objects inheriting from WebGLObject.
This commit is contained in:
Aliaksandr Kalenik 2024-12-17 10:23:06 +01:00 committed by Alexander Kalenik
parent cf730870c5
commit fbae24f7a9
Notes: github-actions[bot] 2024-12-19 12:39:42 +00:00

View file

@ -24,7 +24,6 @@ static bool is_webgl_object_type(StringView type_name)
|| type_name == "WebGLSampler"sv
|| type_name == "WebGLShader"sv
|| type_name == "WebGLTexture"sv
|| type_name == "WebGLUniformLocation"sv
|| type_name == "WebGLVertexArrayObject"sv;
}
@ -1064,6 +1063,10 @@ public:
gl_call_arguments.append(ByteString::formatted("{} ? {}->handle() : 0", parameter_name, parameter_name));
continue;
}
if (parameter.type->name() == "WebGLUniformLocation"sv) {
gl_call_arguments.append(ByteString::formatted("{} ? {}->handle() : 0", parameter_name, parameter_name));
continue;
}
if (parameter.type->name() == "WebGLSync"sv) {
// FIXME: Remove the GLsync cast once sync_handle actually returns the proper GLsync type.
gl_call_arguments.append(ByteString::formatted("(GLsync)({} ? {}->sync_handle() : nullptr)", parameter_name, parameter_name));