Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Vertex shader compilation failure.
05-30-2011, 02:56 PM
Post: #1
Vertex shader compilation failure.
Code:
INFO: Multi-processor system detected.  Run with -multithreaded argument to enable multithreading (EXPERIMENTAL).
INFO: Starting VDrift: development-full, Version: exportado, O/S: Unix-like
INFO: Home directory: /home/antonio
INFO: Settings file: /home/antonio/.vdrift/VDrift.config
INFO: Data directory: data
      DATA_DIR: /usr/local/share/games/vdrift/data
INFO: Log file: /home/antonio/.vdrift/log.txt
INFO: SDL initialization successful
INFO: Automatictally setting depth buffer to 24-bit because shadows are enabled
INFO: SDL video query was successful
INFO: Disabling antialiasing
INFO: Display change was successful: 1024x768x32 24z fullscreen=0
ERROR: You don't have an NVIDIA or ATI/AMD card.  This game may not run correctly or at all.
INFO: Video card information:
      Vendor: nouveau
      Renderer: Gallium 0.4 on NV94
      Version: 2.1 Mesa 7.10.2
      Maximum texture size: 4096
      Maximum varying floats: 56
      Using GLEW 1.5.2
INFO: Maximum color attachments: 8
INFO: Maximum draw buffers (1 required): 8
INFO: Texture units: 8 full, 16 partial
INFO: Loaded shader package simple
INFO: Loaded shader package simple, variant simple_premult
INFO: Loaded shader package simple, variant simple_gamma_premult
INFO: Loaded shader package simple, variant simple_gamma
INFO: Loaded shader package simple, variant simplecar
INFO: Loaded shader package logluminance
INFO: ----- Start Shader Compile Log for data/shaders/logluminance/fragment.glsl -----
INFO: 0:0(0): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'
      0:34(73): error: type mismatch
      0:34(73): error: Operands to arithmetic operators must be numeric
      
INFO: ----- End Shader Compile Log -----
INFO: ----- Start Shader Link Log for data/shaders/logluminance/vertex.glsl and data/shaders/logluminance/fragment.glsl -----
INFO: linking with uncompiled shader
INFO: ----- End Shader Link Log -----
ERROR: Shader compilation failure: data/shaders/logluminance/vertex.glsl and data/shaders/logluminance/fragment.glsl
ERROR:
ERROR: Vertex shader:
ERROR: 1    : #version 120
ERROR: 2    : #define _TINY_
ERROR: 3    : #define _SSAO_HIGH_
ERROR: 4    : #define _NORMALMAPS_
ERROR: 5    : #define _SHADOWSHIGH_
ERROR: 6    : #define _CSM2_
ERROR: 7    : #define _SHADOWS_
ERROR: 8    : #define _REFLECTIONDYNAMIC_
ERROR: 9    : #define SCREENRESY 768
ERROR: 10   : #define SCREENRESX 1024
ERROR: 11   : varying vec2 tu0coord;
ERROR: 12   :
ERROR: 13   : void main()
ERROR: 14   : {
ERROR: 15   :     // Transforming the vertex
ERROR: 16   :     gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;
ERROR: 17   :     
ERROR: 18   :     tu0coord = vec2(gl_MultiTexCoord0);
ERROR: 19   : }
ERROR: 20   :
ERROR:
ERROR: Fragment shader:
ERROR: 1    : #version 120
ERROR: 2    : #define _TINY_
ERROR: 3    : #define _SSAO_HIGH_
ERROR: 4    : #define _NORMALMAPS_
ERROR: 5    : #define _SHADOWSHIGH_
ERROR: 6    : #define _CSM2_
ERROR: 7    : #define _SHADOWS_
ERROR: 8    : #define _REFLECTIONDYNAMIC_
ERROR: 9    : #define SCREENRESY 768
ERROR: 10   : #define SCREENRESX 1024
ERROR: 11   : varying vec2 tu0coord;
ERROR: 12   :
ERROR: 13   : uniform sampler2D tu0_2D;
ERROR: 14   :
ERROR: 15   : const vec3 LUMINANCE = vec3(0.2125, 0.7154, 0.0721);
ERROR: 16   : const float DELTA = 0.0001;
ERROR: 17   :
ERROR: 18   : /*const float scale = 0.1;
ERROR: 19   : const float offset = 5.;
ERROR: 20   : const float timefactor = 0.1;
ERROR: 21   : const float scale_tiny = 3.0;
ERROR: 22   : const float offset_tiny = -0.12;*/
ERROR: 23   :
ERROR: 24   : const float scale = 0.25;
ERROR: 25   : const float offset = 2.0;
ERROR: 26   : const float timefactor = 0.1;
ERROR: 27   : //const float timefactor = 1.0;
ERROR: 28   :
ERROR: 29   : void main()
ERROR: 30   : {
ERROR: 31   :     #ifdef _TINY_
ERROR: 32   :     float lod = 9;
ERROR: 33   :     //gl_FragColor.rgb = vec3(1.,1.,1.)*(texture2DLod(tu0_2D, tu0coord, lod).r+offset_tiny)*scale_tiny;
ERROR: 34   :     gl_FragColor.rgb = vec3(1.,1.,1.)*texture2DLod(tu0_2D, tu0coord, lod).r;
ERROR: 35   :     gl_FragColor.a = timefactor;
ERROR: 36   :     #else
ERROR: 37   :     float luminance = dot(LUMINANCE,texture2D(tu0_2D, tu0coord).rgb);
ERROR: 38   :     float logluminance = log(luminance+DELTA);
ERROR: 39   :     gl_FragColor.rgb = vec3(1.,1.,1.)*(logluminance+offset)*scale;
ERROR: 40   :     #endif
ERROR: 41   : }
ERROR: 42   :
ERROR:
ERROR: Disabling shaders due to shader loading error
INFO: Maximum anisotropy: 16
INFO: 0 joysticks found.
INFO: Loading car controls from: /home/antonio/.vdrift/controls.config
INFO: Sound initialization information:
INFO: Obtained audio device:
      Frequency: 44100
      Format: 32784
      Bits per sample: 16
      Channels: 2
      Silence: 0
      Samples: 1024
      Size: 4096
      Sound initialization successful
INFO: Loaded fonts successfully
INFO: Loaded GUI successfully
ERROR: Error loading texture file: data/cars/LE/textures/brake.png
ERROR: Error loading texture file: data/cars/LE/textures/reverse.png
ERROR: Error loading texture file: data/cars/MI/textures/reverse.png
ERROR: Error loading texture file: data/cars/T73/textures/brake.png
ERROR: Error loading texture file: data/cars/T73/textures/reverse.png
ERROR: Error loading texture file: data/cars/350Z/textures/brake.png
INFO: Loading track from path: data/tracks/paulricard88
INFO: Can't find surfaces configfile: data/tracks/paulricard88/surfaces.txt
INFO: No Surfaces File. Continuing with standard surfaces
INFO: Track timing sectors: 2
INFO: Track object list has 16 params per object, expected 17, this is fine, continuing
INFO: Collision objects: 1
INFO: No car brake texture exists, continuing without one
INFO: Car loading was successful: 350Z
INFO: Got quit message from GUI.  Shutting down...
INFO: Shutting down...
INFO: Exiting

This is the output of a gameplay.

PD: My graphic card is a Club 3D 9600GT as nvidias one if I remember.
Find all posts by this user
Quote this message in a reply
05-31-2011, 10:36 AM
Post: #2
 
It looks like you're using the nouveau open-source nvidia drivers. The shader declares it's using #version 120 of the GLSL, and calls texture2DLod(sampler2D sampler, vec2 coord, float lod) which is the correct function call per the specification:
In order to view links, you must have to reply to this thread.

The driver reports:
Quote:0:0(0): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'

This is probably a bug in the nouveau driver.
Find all posts by this user
Quote this message in a reply
05-31-2011, 01:45 PM
Post: #3
 
Ok thanks for your fast reply I'll report to Ubuntu.
Find all posts by this user
Quote this message in a reply
10-22-2011, 08:14 AM
Post: #4
 
A member at phoronix has pointed out that following the spec Lod suffixed built-ins are vertex shader only: In order to view links, you must have to reply to this thread.
Find all posts by this user
Quote this message in a reply
10-22-2011, 08:55 AM
Post: #5
 
interesting.

it is true that the spec says this, but actually it may be a bug and not what they intended to say.

they probably meant to say
Only the built-ins suffixed with “Lod” are allowed in a vertex shader.
instead of
The built-ins suffixed with “Lod” are allowed only in a vertex shader.


refer here:
In order to view links, you must have to reply to this thread.


so 1.) noveau should fix their crap since every other driver gets what was intended and supports it 2.) its fixed in the glsl 1.3 spec
Find all posts by this user
Quote this message in a reply
10-22-2011, 10:38 AM
Post: #6
 
AFAIK the compiler is the same for all mesa drivers and written from the Spec as they don't have to implement fixes and workarounds for commercial software.

From my personal experience only the Intel windows driver comes close in strictness, the proprietary ATI driver being more forgiving and the NVIDIA driver compiling almost anything.
Find all posts by this user
Quote this message in a reply
10-22-2011, 02:03 PM
Post: #7
 
This old thread is moot now anyway since we no longer use textureLOD in any GL2 fragment shaders.
Find all posts by this user
Quote this message in a reply
10-22-2011, 02:11 PM
Post: #8
 
The problematic shader is data/shaders/logluminance/fragment.glsl. It is not used in the GL2 path right? Should have checked the data commits.
Find all posts by this user
Quote this message in a reply
10-23-2011, 02:58 PM
Post: #9
 
Correct, it's no longer used or loaded, although I haven't bothered to delete it from the repo.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)