-
-
Notifications
You must be signed in to change notification settings - Fork 154
webgl: fix target resolving invalid operation #3868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
webgl: fix target resolving invalid operation #3868
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a WebGL-specific issue where attempting to blit from a multisampled framebuffer results in an invalid operation error when bounds or format don't match between source and destination framebuffers. The fix adds a pre-resolve step for multisampled buffers specifically for WebGL/Emscripten environments.
- Adds source framebuffer target setting capability to GlSceneBlendTask
- Implements WebGL-specific workaround with pre-resolve step before final blit operation
- Maintains existing behavior for non-WebGL platforms
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
tvgGlRenderer.cpp | Sets the source target for blend tasks to enable WebGL workaround |
tvgGlRenderTask.h | Adds source framebuffer member and setter method to GlSceneBlendTask |
tvgGlRenderTask.cpp | Implements WebGL-specific two-step blit operation with pre-resolve |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
fccaaf1
to
9c718fc
Compare
0d83195
to
d48278d
Compare
WebGL attempt to blit from a multisampled framebuffer and the bounds or format of the color buffer don't match with the draw framebuffer. In this case we must to pre-resolve multisampled buffer to the existing render target buffer This workaround applies only in case of webgl (emscripten) #3837
d48278d
to
1c8f71c
Compare
WebGL attempt to blit from a multisampled framebuffer and the bounds or format of the color buffer don't match with the draw framebuffer.
In this case we must to pre-resolve multisampled buffer to the existing render target buffer
This workaround applies only in case of webgl (emscripten)