Closed
Bug 1261565
Opened 9 years ago
Closed 9 years ago
WebGL uses incorrect texture coordinates on Mac OSX 10.11.4
Categories
(Core :: Graphics: CanvasWebGL, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: neil.kronlage, Assigned: jgilbert)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36
Steps to reproduce:
Simplified repro is at: http://www.colorizephoto.com/firefoxbug/repro.html
This sets up a few WebGL shader programs and buffers. The final draw fills the canvas with an image.
Actual results:
The image does not fill the canvas. It only occupies the top right and is clamped in the rest of the canvas.
Expected results:
The image should have filled the entire image.
Safari, Chrome, Edge, IE11 all render this with the image filling the canvas.
| Reporter | ||
Comment 1•9 years ago
|
||
Note, this repros for me on a Macbook Air 2010 running OS X 10.11.4.
| Reporter | ||
Comment 2•9 years ago
|
||
I can't reproduce it with 47/48 on Win 7.
Is it reproducible with a fresh profile?
https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles
Flags: needinfo?(neil.kronlage)
| Reporter | ||
Comment 4•9 years ago
|
||
Thanks for trying this out. I tried an Asus laptop running Windows 10 and cannot reproduce the problem there. So it may be Mac specific. I don't have any other Macs to see if it affects other versions or just mine (Late 2010 MacBook Air 11")
I also tried removing all my profiles and that did not affect the behavior.
Here are the graphic card details from System Information:
NVIDIA GeForce 320M:
Chipset Model: NVIDIA GeForce 320M
Type: GPU
Bus: PCI
VRAM (Total): 256 MB
Vendor: NVIDIA (0x10de)
Device ID: 0x08a2
Revision ID: 0x00a2
ROM Revision: 3571
Displays:
Color LCD:
Display Type: LCD
Resolution: 1366 x 768
Pixel Depth: 32-Bit Color (ARGB8888)
Main Display: Yes
Mirror: Off
Online: Yes
Built-In: Yes
Flags: needinfo?(neil.kronlage)
OS: Unspecified → Mac OS X
Summary: WebGL uses incorrect texture coordinates → WebGL uses incorrect texture coordinates on Mac OSX 10.11.4
Comment 5•9 years ago
|
||
I can reproduce with my mac device.
Assignee: nobody → hshih
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment 6•9 years ago
|
||
Comment 7•9 years ago
|
||
Hi Jeff,
Please check the simplified webgl code: https://pastebin.mozilla.org/8866690
The attachment 8737483 [details] results from the second time we setting the vertex attrib.
My problem is that why we still can get the result as attachment 8738930 [details].
Since the last binded buffer only have position information, the texCoord data is undefined.
After rebind and reset with the correct buffer and attrib, I can see the expect result as attachment 8738930 [details].
Please check: http://people.mozilla.org/~hshih/bug1261565/repro.html
Safari, Chrome, Edge, IE11 and firefox at linux, windows, all render this with the image filling the canvas.
I'm not sure the attachment 8738930 [details] is the correct one.
Flags: needinfo?(jgilbert)
| Assignee | ||
Comment 8•9 years ago
|
||
I suspect this is a bug in the app's (likely implicit) assumptions about location orderings.
I believe we will find that on affected machines:
`program2.attribs.vertexPosition.location != program.attribs.vertexPosition.location`
But rather:
`program2.attribs.vertexPosition.location == program.attribs.texCoordIn.location`
Flags: needinfo?(jgilbert)
| Assignee | ||
Comment 9•9 years ago
|
||
Confirmed this on my Macmini with AMD GPU.
This is a bug in the testcase, not the browser.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
| Assignee | ||
Updated•9 years ago
|
Assignee: hshih → jgilbert
Comment 10•9 years ago
|
||
Hi Jeff,
Is the vertexAttribPointer setting a global status or the status within the buffer?
If it comes with a buffer, we only need to setup the vertexAttribPointer setting once not for every buffer binding.
My question is that why we bind a invalid buffer but still can get the texture coord?
Please check https://pastebin.mozilla.org/8866690 line 30
Flags: needinfo?(jgilbert)
| Assignee | ||
Comment 11•9 years ago
|
||
(In reply to Jerry Shih[:jerry] (UTC+8) from comment #10)
> Hi Jeff,
> Is the vertexAttribPointer setting a global status or the status within the
> buffer?
> If it comes with a buffer, we only need to setup the vertexAttribPointer
> setting once not for every buffer binding.
> My question is that why we bind a invalid buffer but still can get the
> texture coord?
> Please check https://pastebin.mozilla.org/8866690 line 30
It's state attached to specified vertex attrib. vertexAttribPointer stores the current ARRAY_BUFFER, so you can rebind the buffer and use a different one for another vertexAttribPointer.
Flags: needinfo?(jgilbert)
You need to log in
before you can comment on or make changes to this bug.
Description
•