mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-16 23:39:44 +00:00
LibWeb/WebGL2: Implement MAX_UNIFORM_BLOCK_SIZE parameter
This commit is contained in:
parent
791c258754
commit
0e5e0d922f
Notes:
github-actions[bot]
2024-12-14 08:08:54 +00:00
Author: https://github.com/Lubrsi
Commit: 0e5e0d922f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2905
1 changed files with 7 additions and 0 deletions
|
@ -174,6 +174,7 @@ static void generate_get_parameter(SourceGenerator& generator, int webgl_version
|
||||||
{ "MAX_ARRAY_TEXTURE_LAYERS"sv, { "GLint"sv }, 2 },
|
{ "MAX_ARRAY_TEXTURE_LAYERS"sv, { "GLint"sv }, 2 },
|
||||||
{ "MAX_COLOR_ATTACHMENTS"sv, { "GLint"sv }, 2 },
|
{ "MAX_COLOR_ATTACHMENTS"sv, { "GLint"sv }, 2 },
|
||||||
{ "MAX_VERTEX_UNIFORM_COMPONENTS"sv, { "GLint"sv }, 2 },
|
{ "MAX_VERTEX_UNIFORM_COMPONENTS"sv, { "GLint"sv }, 2 },
|
||||||
|
{ "MAX_UNIFORM_BLOCK_SIZE"sv, { "GLint64"sv }, 2 },
|
||||||
};
|
};
|
||||||
|
|
||||||
auto is_primitive_type = [](StringView type) {
|
auto is_primitive_type = [](StringView type) {
|
||||||
|
@ -199,6 +200,12 @@ static void generate_get_parameter(SourceGenerator& generator, int webgl_version
|
||||||
GLint result;
|
GLint result;
|
||||||
glGetIntegerv(GL_@parameter_name@, &result);
|
glGetIntegerv(GL_@parameter_name@, &result);
|
||||||
return JS::Value(result);
|
return JS::Value(result);
|
||||||
|
)~~~");
|
||||||
|
} else if (type_name == "GLint64"sv) {
|
||||||
|
impl_generator.append(R"~~~(
|
||||||
|
GLint64 result;
|
||||||
|
glGetInteger64v(GL_@parameter_name@, &result);
|
||||||
|
return JS::Value(static_cast<double>(result));
|
||||||
)~~~");
|
)~~~");
|
||||||
} else if (type_name == "DOMString"sv) {
|
} else if (type_name == "DOMString"sv) {
|
||||||
impl_generator.append(R"~~~(
|
impl_generator.append(R"~~~(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue