Closed Bug 1009734 Opened 11 years ago Closed 11 years ago

Firefox is issuing incorrect errors for WebGL

Categories

(Core :: Graphics: CanvasWebGL, defect)

29 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: mozilla2, Assigned: jgilbert)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release) Build ID: 20140506152807 Steps to reproduce: 1) Open the Web Console 2_ Run the attached file or go to http://greggman.com/downloads/examples/bogus-webgl-errors.html Actual results: There are incorrect errors about WebGL in the console. Expected results: There should be no errors in the console The specific issue is Firefox is checking if a texture is renderable at bindTexture time. This is incorrect behavior. A texture can not be checked for being valid until someone tries to render with it. It is perfectly legal WebGL to bind an invalid texture. There are similar incorrect checks for binding framebuffers and renderbuffers (and buffers?)
Component: Untriaged → Canvas: WebGL
Product: Firefox → Core
Any chance this bug can be fixed? It's really annoying to get BS warnings in the console. A typical use case is writing a function that auto sets filtering / mips for NPOT vs POT textures. To make it callable from anywhere it binds the texture because it can't assume it was already bound. So gl.bindTexture(..., tex); gl.texImage2D(..., img); setFilteringAndMipsForTexture(tex, img.width, img.height) function setFilteringAndMipsForTexture(tex, width, height) { gl.bindTexture(..., tex); // generates incorrect warning in Firefox
(In reply to Gregg Tavares from comment #1) > Any chance this bug can be fixed? It's really annoying to get BS warnings in > the console. > > A typical use case is writing a function that auto sets filtering / mips for > NPOT vs POT textures. To make it callable from anywhere it binds the texture > because it can't assume it was already bound. So > > gl.bindTexture(..., tex); > gl.texImage2D(..., img); > setFilteringAndMipsForTexture(tex, img.width, img.height) > > function setFilteringAndMipsForTexture(tex, width, height) { > gl.bindTexture(..., tex); // generates incorrect warning in Firefox Yeah, this should be fairly easy to fix.
Flags: needinfo?(jgilbert)
Assignee: nobody → jgilbert
Flags: needinfo?(jgilbert)
OS: Mac OS X → All
Hardware: x86 → All
Neuter yet another myopic optimization.
Attachment #8588855 - Flags: review?(dglastonbury)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 8588855 [details] [diff] [review] 0001-Wait-until-draw-time-to-check-texture-completeness.patch Review of attachment 8588855 [details] [diff] [review]: ----------------------------------------------------------------- So we just need to take away code?
Attachment #8588855 - Flags: review?(dglastonbury) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: