Last Comment Bug 698088 - Initializing WebGL fake-black textures doesn't rebind previous texture bindings before drawing
: Initializing WebGL fake-black textures doesn't rebind previous texture bindin...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Canvas: WebGL (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla10
Assigned To: Jeff Gilbert [:jgilbert]
:
: Milan Sreckovic [:milan]
Mentors:
Depends on:
Blocks: webgl-conformance
  Show dependency treegraph
 
Reported: 2011-10-28 14:00 PDT by Jeff Gilbert [:jgilbert]
Modified: 2011-11-01 07:40 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Fix to rebind previous GL state after initializing fake-black textures (2.10 KB, patch)
2011-10-28 14:28 PDT, Jeff Gilbert [:jgilbert]
no flags Details | Diff | Splinter Review
Fix to rebind previous GL state after initializing fake-black textures (4.60 KB, patch)
2011-10-28 15:13 PDT, Jeff Gilbert [:jgilbert]
jacob.benoit.1: review+
Details | Diff | Splinter Review

Description Jeff Gilbert [:jgilbert] 2011-10-28 14:00:57 PDT
When there are textures in a context which (for an as-per-spec reason) must be rendered as black, we initialize face-black textures as a prefix to the next draw. When creating these textures, we naturally must change the current texture bindings, which is fine, as long as we reset them to their previous state when we're done. However, instead, we reset the 2d and cubemap textures to 0, instead of the previous values.

This causes the conformance tests for copyTexImage2D and copyTexSubImage2D to fail.
Comment 1 Jeff Gilbert [:jgilbert] 2011-10-28 14:28:13 PDT
Created attachment 570362 [details] [diff] [review]
Fix to rebind previous GL state after initializing fake-black textures

Short and sweet, but unbelievably annoying to track down. APITrace is awesome, though.
Comment 2 Jeff Gilbert [:jgilbert] 2011-10-28 15:13:53 PDT
Created attachment 570372 [details] [diff] [review]
Fix to rebind previous GL state after initializing fake-black textures

Removed copyTexImage2D and copySubTexImage2D from list of failing tests for all platforms.
Comment 4 Jeff Gilbert [:jgilbert] 2011-10-31 17:18:26 PDT
Removed [inbound] from whiteboard as per https://wiki.mozilla.org/Tree_Rules/Inbound
Comment 5 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-11-01 07:40:05 PDT
https://hg.mozilla.org/mozilla-central/rev/c4f4dc3d3b20

Note You need to log in before you can comment on or make changes to this bug.