Bug 307316
| Summary: | [WebGL] Prevent READ_FRAMEBUFFER operations from corrupting DRAW_FRAMEBUFFER state | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | roberto_rodriguez2 |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
roberto_rodriguez2
rdar://169621664
Calling framebufferTexture2D() on READ_FRAMEBUFFER was unexpectedly modifying DRAW_FRAMEBUFFER state. The issue was that drawBuffersIfNecessary() unconditionally called glDrawBuffers(), which always targets DRAW_FRAMEBUFFER - so modifying one framebuffer's attachments would corrupt whatever was bound to DRAW_FRAMEBUFFER.
Fix by deferring the glDrawBuffers() call: when attachments change while bound to READ_FRAMEBUFFER, record that sync is needed and perform it when the framebuffer is later bound to DRAW_FRAMEBUFFER.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
roberto_rodriguez2
Pull request: https://github.com/WebKit/WebKit/pull/58181
EWS
Committed 307223@main (45661a525863): <https://commits.webkit.org/307223@main>
Reviewed commits have been landed. Closing PR #58181 and removing active labels.