views:

209

answers:

3

I am trying to use a trivial geometry shader but when run in Shader Builder on a laptop with a GMA X3100 it falls back and uses the software render. According this document the GMA X3100 does support EXT_geometry_shader4.

The input is POINTS and the output is LINE_STRIP.

What would be required to get it to run on the GPU (if possible)

uniform vec2 offset;

void main()
{
    gl_Position = gl_PositionIn[0];
    EmitVertex();
    gl_Position = gl_PositionIn[0] + vec4(offset.x,offset.y,0,0);
    EmitVertex();
    EndPrimitive();
}
A: 

I've found this OpenGL Extensions Viewer tool really helpful in tracking down these sorts of issues. It will certainly allow you to confirm Apple's claims. That said, wikipedia states that official GLSL support for geometry shaders is technically an OpenGL 3.2 feature.

Does anyone know if the EXT_geometry_shader4 implementation supports the GLSL syntax, or does it require some hardware or driver specific format?

Simeon Fitch
A: 

Interestingly enough, I've heard that the compatibility claims of Intel regarding these integrated GPUs are sometimes overstated or just false. Apparently the X3100 only supports OpenGL 1.4 and below (or so I've heard, take this with a grain of salt, as I can't confirm this).

adam_0
A: 

From the docs you link to it certainly appears it should be supported.

You could try

int hasGEOM = isExtensionSupported("EXT_geometry_shader4");

If it returns in the affirmative you may have another problem stopping it from working.

Also according to the GLSL Spec (1.20.8) "Any extended behavior must first be enabled. Directives to control the behavior of the compiler with respect to extensions are declared with the #extension directive"

I didn't see you use this directive in your code so I can suggest

#extension GL_EXT_geometry_shader4 : enable

At the top of your shader code block.

Montdidier