Closed Bug 958491 Opened 6 years ago Closed 6 years ago

WebGL bug in WebGLContext::GetFramebufferAttachmentParameter

Categories

(Core :: Canvas: WebGL, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla29
Tracking Status
firefox26 --- unaffected
firefox27 --- unaffected
firefox28 --- affected
firefox29 --- affected
firefox-esr24 --- unaffected

People

(Reporter: guillaume.abadie, Assigned: guillaume.abadie)

References

Details

Attachments

(3 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20131216183647

Steps to reproduce:

Directly found when looking at the code. http://dxr.mozilla.org/mozilla-central/source/content/canvas/src/WebGLContextGL.cpp#1427
Depends on: 843668
OS: Mac OS X → All
Hardware: x86 → All
Attached patch patch revision 1Splinter Review
Attachment #8358365 - Flags: review?(jgilbert)
Comment on attachment 8358365 [details] [diff] [review]
patch revision 1

Review of attachment 8358365 [details] [diff] [review]:
-----------------------------------------------------------------

Gross, nice catch!
Attachment #8358365 - Flags: review?(jgilbert) → review+
Unfortunately, I have not followed the Firefox aurora and beta development, but I guess at least one of them might have this issue. Don't you think Jeff?
Status: UNCONFIRMED → NEW
Ever confirmed: true
That's pretty likely. Let me try to throw together a testcase.
Flags: needinfo?(jgilbert)
easy, something like:

gl = create a WebGL 1 context
fbo = gl.createFramebuffer();
tex = gl.createTexture();
gl.bindTexture(gl.TEXTURE_2D, tex);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 2, 2, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHEMENT0, fbo, gl.TEXTURE_2D, tex, 0);
gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHEMENT0, 0x8210);

I just may have found another bug in the source code somewhere else...
Attached file testcase
Flags: needinfo?(jgilbert)
Attachment #8358631 - Flags: feedback+
Needs uplift to aurora28.
https://hg.mozilla.org/mozilla-central/rev/516316e7e0b1
Assignee: nobody → guillaume.abadie
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Attached patch patch 2: add test (obsolete) — Splinter Review
Let's land this test.
Attachment #8385034 - Flags: review?(dglastonbury)
Comment on attachment 8385034 [details] [diff] [review]
patch 2: add test

Review of attachment 8385034 [details] [diff] [review]:
-----------------------------------------------------------------

gtg. Only wonder what happened to test_webgl2_not_exposed.html, because I'm sure I reviewed that patch today.

::: content/canvas/test/webgl/non-conf-tests/mochitest.ini
@@ -10,5 @@
>  [test_webgl_available.html]
>  [test_webgl_conformance.html]
>  [test_webgl_request_context.html]
>  [test_webgl_request_mismatch.html]
> -[test_webgl2_not_exposed.html]

Why did this go?
Attachment #8385034 - Flags: review?(dglastonbury) → review+
Comment on attachment 8385034 [details] [diff] [review]
patch 2: add test

Review of attachment 8385034 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/canvas/test/webgl/non-conf-tests/mochitest.ini
@@ -10,5 @@
>  [test_webgl_available.html]
>  [test_webgl_conformance.html]
>  [test_webgl_request_context.html]
>  [test_webgl_request_mismatch.html]
> -[test_webgl2_not_exposed.html]

It's not supposed to go away, weird.
Attached patch patch 2: testSplinter Review
r=kamidphish
Attachment #8385034 - Attachment is obsolete: true
Attachment #8386391 - Flags: review+
You need to log in before you can comment on or make changes to this bug.