I writing simple application which render a torus using geometry shader. Exactly, I wrote three shaders:
Program works correctly on Intel GPU (X3000 I believe) under MacOS X 10.5. Very slow, but it's Intel
On NVIDIA GeForce 9800 GT under Linux it works even more SLOW and eats CPU (Core 2 Duo E8500 3.16 GHz) very much.
More, GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT says that GS may generate 1024 vertices, but when I try to do that, only first 128 vertices are rendered without reporting any error.
Similar problem with GeForce 8700M GT.
I tried to move color calculation from fragment shader to geometry shader and completely disable fragment shader. Program works significantly better but still very slow. Although it renders just 1024 (or 128 ) triangles.
Other applications and games work very well, reaching 60 FPS even with 'maximum quality' settings. But they are not using GS, I suppose.
Is it a driver or GPU issue? Can I get better performance generating geometry on GPU instead of on CPU anyway with my videocard?
- vertex shader does just gl_Position = gl_Vertex
- geometry shader (POINTS in, TRIANGLE_STRIP out) takes a vertex and generates tesselated torus (center is given vertex, radii are in uniform variables)
- fragment shader performs per-pixel lighting
Program works correctly on Intel GPU (X3000 I believe) under MacOS X 10.5. Very slow, but it's Intel
On NVIDIA GeForce 9800 GT under Linux it works even more SLOW and eats CPU (Core 2 Duo E8500 3.16 GHz) very much.
More, GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT says that GS may generate 1024 vertices, but when I try to do that, only first 128 vertices are rendered without reporting any error.
Similar problem with GeForce 8700M GT.
I tried to move color calculation from fragment shader to geometry shader and completely disable fragment shader. Program works significantly better but still very slow. Although it renders just 1024 (or 128 ) triangles.
Other applications and games work very well, reaching 60 FPS even with 'maximum quality' settings. But they are not using GS, I suppose.
Is it a driver or GPU issue? Can I get better performance generating geometry on GPU instead of on CPU anyway with my videocard?