PDA

View Full Version : Strange Warning on ATI



SkySoldier
09-10-2014, 02:52 AM
Hello.

Today i tested one of my applications on an ati graphics card.
I get a strange warning which i never read on nvidia:

"WARNING: 0:5: warning(#239) Declaration should include a precision qualifier or the default precision should have been previously declared"

Im using glsl version 150 and opengl 3.1.

The shaders:


#version 150

in vec2 vin;
in vec2 vtc;

uniform mat4 camera;
uniform mat4 model;

out vec2 ftc;

void main(){
ftc = vtc;
gl_Position = camera * model * vec4(vin, 0, 1);
}

###

#version 150

in vec2 ftc;

uniform sampler2D tex;

out vec4 outColor;

void main(){
vec4 color = texture2D(tex, ftc);
outColor = color;
}


wheres the problem here?

SkySoldier
09-13-2014, 01:05 AM
Nobody of 146 people?... :(

Agent D
09-13-2014, 03:46 AM
Something you yourself could have tried in the mean time:

Read the compile log to determine what shader the warning is issued for (vertex shader, fragment shader or both)
Read the compile log to determine the exact line number it occours at
If you don't know alredy, find out what a precision qualifier is (http://www.opengl.org/wiki/Type_Qualifier_%28GLSL%29#Precision_qualifiers)
Go to that specific line, try adding a precison qualifier and look what happens
Alternatively: Not care about having that strange warning on an ATI GLSL compiler as long as it works

Nikki_k
09-13-2014, 09:43 AM
I once saw that, too, on an older AMD driver. The only remedy was to add the precision qualifier, redundant as it was...