switch (pname) {
case GL_GEOMETRY_VERTICES_OUT_ARB:
+ if (!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_geometry_shader4)
+ break;
+
if (value < 1 ||
(unsigned) value > ctx->Const.MaxGeometryOutputVertices) {
_mesa_error(ctx, GL_INVALID_VALUE,
return;
}
shProg->Geom.VerticesOut = value;
- break;
+ return;
case GL_GEOMETRY_INPUT_TYPE_ARB:
+ if (!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_geometry_shader4)
+ break;
+
switch (value) {
case GL_POINTS:
case GL_LINES:
_mesa_lookup_enum_by_nr(value));
return;
}
- break;
+ return;
case GL_GEOMETRY_OUTPUT_TYPE_ARB:
+ if (!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_geometry_shader4)
+ break;
+
switch (value) {
case GL_POINTS:
case GL_LINE_STRIP:
_mesa_lookup_enum_by_nr(value));
return;
}
- break;
+ return;
default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glProgramParameteri(pname=%s)",
- _mesa_lookup_enum_by_nr(pname));
break;
}
+
+ _mesa_error(ctx, GL_INVALID_ENUM, "glProgramParameteri(pname=%s)",
+ _mesa_lookup_enum_by_nr(pname));
}
void