Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do GLSL geometry shaders work on the GMA X3100 under OSX

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();
}
like image 539
GameFreak Avatar asked Nov 14 '22 11:11

GameFreak


1 Answers

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.

like image 109
Montdidier Avatar answered Dec 26 '22 13:12

Montdidier