mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 09:12:13 -05:00
LibWeb/WebGL2: Implement getSyncParameter
This commit is contained in:
parent
6bf6cd3f19
commit
e5d59a2d42
Notes:
github-actions[bot]
2025-01-08 14:56:48 +00:00
Author: https://github.com/Lubrsi Commit: https://github.com/LadybirdBrowser/ladybird/commit/e5d59a2d420 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2943 Reviewed-by: https://github.com/kalenikaliaksandr
2 changed files with 17 additions and 1 deletions
|
@ -401,7 +401,7 @@ interface mixin WebGL2RenderingContextBase {
|
|||
undefined deleteSync(WebGLSync? sync);
|
||||
GLenum clientWaitSync(WebGLSync sync, GLbitfield flags, GLuint64 timeout);
|
||||
[FIXME] undefined waitSync(WebGLSync sync, GLbitfield flags, GLint64 timeout);
|
||||
[FIXME] any getSyncParameter(WebGLSync sync, GLenum pname);
|
||||
any getSyncParameter(WebGLSync sync, GLenum pname);
|
||||
|
||||
// Transform Feedback
|
||||
[FIXME] WebGLTransformFeedback createTransformFeedback();
|
||||
|
|
|
@ -951,6 +951,22 @@ public:
|
|||
continue;
|
||||
}
|
||||
|
||||
if (function.name == "getSyncParameter"sv) {
|
||||
// FIXME: In order to ensure consistent behavior across platforms, sync objects may only transition to the
|
||||
// signaled state when the user agent's event loop is not executing a task. In other words:
|
||||
// - A sync object must not become signaled until control has returned to the user agent's main
|
||||
// loop.
|
||||
// - Repeatedly fetching a sync object's SYNC_STATUS parameter in a loop, without returning
|
||||
// control to the user agent, must always return the same value.
|
||||
// FIXME: Remove the GLsync cast once sync_handle actually returns the proper GLsync type.
|
||||
function_impl_generator.append(R"~~~(
|
||||
GLint result = 0;
|
||||
glGetSynciv((GLsync)(sync ? sync->sync_handle() : nullptr), pname, 1, nullptr, &result);
|
||||
return JS::Value(result);
|
||||
)~~~");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (function.name == "bufferData"sv && function.overload_index == 0) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
glBufferData(target, size, 0, usage);
|
||||
|
|
Loading…
Reference in a new issue