The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 752 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 752 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 34 - File: global.php(959) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(959) : eval()'d code 34 errorHandler->error
/global.php 959 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 1024 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 1024 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5308 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5308 errorHandler->error
/global.php 1024 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1474 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1474 errorHandler->error
/inc/functions.php 1429 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Forums
Vertex shader compilation failure. - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Community (https://www.vdrift.net/Forum/forumdisplay.php?fid=3)
+--- Forum: Bugs (https://www.vdrift.net/Forum/forumdisplay.php?fid=7)
+--- Thread: Vertex shader compilation failure. (/showthread.php?tid=1491)



Vertex shader compilation failure. - antoniovazquez - 05-30-2011

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.


- joevenzon - 05-31-2011

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:
http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.20.8.pdf

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.


- antoniovazquez - 05-31-2011

Ok thanks for your fast reply I'll report to Ubuntu.


- NaN - 10-22-2011

A member at phoronix has pointed out that following the spec Lod suffixed built-ins are vertex shader only: http://phoronix.com/forums/showthread.php?63265-GCC-4.5-vs.-4.6-On-AMD-s-FX-4100-Bulldozer&p=234501#post234501


- abs1nth - 10-22-2011

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:
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=227757


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


- NaN - 10-22-2011

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.


- joevenzon - 10-22-2011

This old thread is moot now anyway since we no longer use textureLOD in any GL2 fragment shaders.


- NaN - 10-22-2011

The problematic shader is data/shaders/logluminance/fragment.glsl. It is not used in the GL2 path right? Should have checked the data commits.


- joevenzon - 10-23-2011

Correct, it's no longer used or loaded, although I haven't bothered to delete it from the repo.