croman102's picture

Strange result on Intel GPU

This is the same program running on different GPUs. It works normal (AMD-like :) ) on NVIDIA cards too.

Why is this happening and can I get better result on Intel GPU?

EDIT: the laptop is hp 6540b (with intel GPU), shader version in program is 1.1 (110).

Thank you


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
winterhell's picture

It looks like only some of your shaders (albedo pass for deferred rendering?) are being compiled. Often when a shader fails to compile the application would still work but skip all draw calls made with that shader attached.
"Use GL.GetShaderInfoLog() for each shader and GL.GetProgramInfoLog() for the program to retrieve information about the errors." to quote The Fiddler.

croman102's picture

Thank you

The problem was in shaders. I was adding two different types of data (float + int) and it looks like AMD cards "understood" what I wanted to do. It works now.

Thank you again

croman102's picture

Hello, I have a problem with Intel GPU, again.

This is the same program running on hd6970 (top picture), and on Intel GPU (the other picture). The problem is in circled area.
Basicly, I need 144 fields on the map. Every field can be visible or invisible. Since it is not very efficiant to draw (or not to draw) each seperatly, I use fragment shader for that job:

float dvisto = 200.0/12.0;
 
	   float e = float(position.x/dvisto);
	   float f = float(-position.z/dvisto);
 
	   float g = floor(e)/12.0;
 
	   float h = floor(f)/12.0;
 
	    float resX = float(g);
		float resZ = float(h);
 
		float a = float(1.0/12.0);
 
		float b = float(resZ/a);
 
		float c = float(resX/a);
 
		float d = float(b*12.0);
 
		float toRender = float(fieldsArr[int(d+c)]);
 
 
		vec2 ntre = trepeat;
	if (trepeat == vec2(0.0,0.0))
	{
		ntre = vec2(1.0,1.0);
	}
	gl_FragColor=vec4(texture2D(img,texcoord.rgb,toRender);

This is a simplefied version, but basicly I just pass fieldArr (array of floats (it won't work on Intel GPU if it is array of ints at all(don't know why)) that contains data about perticular field.

It looks like Intel GPU is not able to calculate the coordinates of certian field precisely enogh?

Thank you a lot.

Sorry for my bad english.

winterhell's picture

The performance of making 150 draw calls per frame is so little it would hardly be benchmarkable.
As a rule of a thumb you shouldn't optimize when your framerate is in the thousands.

croman102's picture

Thank you
but I have a plan of having a few thousends of those squares. And this is bodering me. Why are there so much problems with Intel?

the Fiddler's picture

Driver problems with Intel are a sad fact of life. The situation is much better now compared to a few years ago, but many issues remain. GLSL arrays are sadly one of these problematic areas.

Here is a good overview of driver quality on modern OpenGL.

Try sampling from a 1d texture instead of using a GLSL array. This works better in many cases.

croman102's picture

Thank you
I will see what I can do with 1D texture. I have a few other ideas that I will also try out.

Thank you both