Bug 82991

Summary: Inverted bumpmap in webgl applications
Product: Mesa Reporter: FERLET Patrice <metal3d>
Component: Drivers/DRI/i965Assignee: Andrés Gómez García <agomez>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: major    
Priority: medium CC: agomez, huax.lu
Version: 10.2   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: glxinfo outuput
glxinfo on mesa 10.2.5 version
Sample simple application using three.js
Screenshot of the attached application rendered with swrast on GNU/Linux
Screenshot of the attached application rendered with i965 on GNU/Linux
Trace execution file from the sample application using apitrace

Description FERLET Patrice 2014-08-23 14:38:52 UTC
Created attachment 105161 [details]
glxinfo outuput

Trying some examples with THREE.js library in Firefox and Chrome/Chromium, Linux based system with intel graphic cards shows inverted bumpmap.

You can see the example here:
https://github.com/mrdoob/three.js/issues/4157

It seeme that the problem appears long time ago (2013 for this issue).

I'm not sure about my driver version. I send you glxinfo output from my Fedora 20 installed on lenovo b590 laptop.
Comment 1 FERLET Patrice 2014-08-23 14:59:40 UTC
The example game is here:

http://jeromeetienne.github.io/marbletable2/
Comment 2 Ian Romanick 2014-08-23 17:43:45 UTC
We've come a long way since Mesa 10.1.5.  Can you try with one of the 10.2 stable releases?  10.2.6 is the most recent.
Comment 3 FERLET Patrice 2014-08-28 12:16:51 UTC
Same with 10.2 version. Installed from kwizart testing repository.

The bump-map on chrome and firefox webgl examples (as my own projects) are inverted.

OpenGL version string: 3.0 Mesa 10.2.5
Comment 4 FERLET Patrice 2014-08-28 12:19:11 UTC
Created attachment 105383 [details]
glxinfo on mesa 10.2.5 version

This is the glxinfo64 output with mesa 10.2.5 version
Comment 5 Andrés Gómez García 2014-11-04 12:39:00 UTC
Just now checked with mesa master branch and it is still reproducible.

I will take a look to this.
Comment 6 Andrés Gómez García 2014-11-04 12:48:01 UTC
Created attachment 108887 [details]
Sample simple application using three.js

To use this app you will need a local http server due to security restrictions for JS to access local files.

In a GNU/Linux box, something like this should work:

$ tar xzpf fd82991-test.tar.gz
$ cd fd82991-test
$ python3 -m http.server &
$ xdg-open http://localhost:8000/fd82991-test.html &
Comment 7 Andrés Gómez García 2014-11-04 12:50:10 UTC
Created attachment 108888 [details]
Screenshot of the attached application rendered with swrast on GNU/Linux

The same result can be obtained using the nouveau driver or the NVidia propritary one for GNU/Linux
Comment 8 Andrés Gómez García 2014-11-04 12:52:34 UTC
Created attachment 108889 [details]
Screenshot of the attached application rendered with i965 on GNU/Linux

This screenshot shows how the bumpmap is inverted when using the i965 driver
Comment 9 Andrés Gómez García 2014-11-04 13:02:27 UTC
Created attachment 108890 [details]
Trace execution file from the sample application using apitrace

This trace was created running the attached sample application with the apitrace  in WebKitGTK+'s MiniBrowser. Something like:

$ LD_PRELOAD=<path_to>/apitrace/wrappers/glxtrace.so <path_to>/MiniBrowser http://localhost:8000/fd82991-test.html &
Comment 10 Andrés Gómez García 2014-12-12 16:22:05 UTC
Proposed piglit patch which exposes this bug sent at:
http://lists.freedesktop.org/archives/piglit/2014-December/013648.html

Proposed patch for fixing this bug sent at:
http://lists.freedesktop.org/archives/mesa-dev/2014-December/072543.html
Comment 11 Ian Romanick 2014-12-17 05:16:52 UTC
*** Bug 87391 has been marked as a duplicate of this bug. ***
Comment 12 Andrés Gómez García 2014-12-17 11:24:41 UTC
This has been resolved, so closing.

There is a follow up at bug 87407.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.