nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Strange assembly shader code produced from GLSL (http://www.nvnews.net/vbulletin/showthread.php?t=62978)

dhenry 01-07-06 01:44 PM

Strange assembly shader code produced from GLSL
 
5 Attachment(s)
Hello,

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 (http://nifelheim.dyndns.org/~cocidius/normalmap/)
* 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.

netllama 01-10-06 05:32 PM

Re: Strange assembly shader code produced from GLSL
 
1 Attachment(s)
I'm afraid that I'm not able to reproduce this problem (see attached screenshot) with 1.0-8178 (I didn't test 1.0-7676). When I follow your steps, I get the 3D Preview window, not an error log window.

I notice that you have both Composite and RenderAccel turned on. Does this only reproduce with them turned on?

Thanks,
Lonni

dhenry 01-13-06 06:21 AM

Re: Strange assembly shader code produced from GLSL
 
I still have troubles with Composite and RenderAccel turned off.

If you can have the 3D Preview window without errors, you should be able to select one of the four bump mapping methods. But the plugin also checks if the CG can handle more than 200 instructions in a shader for the last two methods... (if not, they aren't compiled).

netllama 01-13-06 02:15 PM

Re: Strange assembly shader code produced from GLSL
 
Yes, I can select any of the four Bump mapping methods. I'm wondering if this problem is something specific to your environment (and not a driver bug), since its certainly working fine for me.

Thanks,
Lonni


All times are GMT -5. The time now is 08:07 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.