View Single Post
Old 01-07-06, 01:44 PM   #1
Registered User
Join Date: Dec 2005
Posts: 7
Exclamation Strange assembly shader code produced from GLSL


I've got strange GLSL linkage error with shaders from a GIMP's plugin (NormalMap plugin). The plugin uses four shader programs (dot3 normal mapping, parallax mapping, parallax occlusion mapping and relief mapping), but only one is successfully compiled and linked (the first). For the three others, vertex and fragment shaders compile but fail at link stage.

The info log message gives the full fragment shader code in assembly generated by the driver, and points at lines which look like this one:

MADR R0.w, R0, {0,050000001, -0,025, 0, 0}.x, {0,050000001, -0,025, 0, 0}.y;

I don't know shader programming in assembly, but I think that some commas should be replaced with dots, shouldn't they? (0.050000001 and -0.025).

I've extracted the shaders and tested them in another program, and it compiled and linked with no error. The source code from the plugin seems correct (I don't think the author would have been released a so buggy plugin).

I've been able to reproduce the bug on two computers, with 8178 and 7676 drivers. Steps to reproduce it:

* Download and install the GIMP plugin (
* Run GIMP, open an image, Right-click on the image, "Filters->Map->Normalmap"
* Click on "3D Preview", and a (huge) dialog box should appear with the error logs of the three shaders.

I've attached the three info logs for the three faulty shaders, and two bug repports for the two computers I've used for testing. It seems that the generated assembly code is wrong.
Attached Files
File Type: log parallax_link.log (2.3 KB, 159 views)
File Type: log pom_link.log (5.2 KB, 157 views)
File Type: log relief_link.log (11.1 KB, 150 views)
File Type: log nvidia-bug-report_A.log (88.8 KB, 145 views)
File Type: log nvidia-bug-report_B.log (96.8 KB, 139 views)
dhenry is offline   Reply With Quote