<param name="pname" type="GLenum"/>
<vector name="params" type="GLtype *" size="dynamic"/>
</proto>
-
- <desc name="pname">
- <value name="GL_DELETE_STATUS"/>
- <value name="GL_LINK_STATUS"/>
- <value name="GL_VALIDATE_STATUS"/>
- <value name="GL_INFO_LOG_LENGTH"/>
- <value name="GL_ATTACHED_SHADERS"/>
- <value name="GL_ACTIVE_ATTRIBUTES"/>
- <value name="GL_ACTIVE_ATTRIBUTE_MAX_LENGTH"/>
- <value name="GL_ACTIVE_UNIFORMS"/>
- <value name="GL_ACTIVE_UNIFORM_MAX_LENGTH"/>
- <value name="GL_PROGRAM_BINARY_LENGTH_OES" category="OES_get_program_binary"/>
-
- <desc name="params" convert="false"/>
- </desc>
</template>
<template name="GetVertexAttrib" direction="get">
struct gl_shader_program *shProg
= _mesa_lookup_shader_program(ctx, program);
+#if FEATURE_EXT_transform_feedback
+ /* Is transform feedback available in this context?
+ */
+ const bool has_xfb =
+ (ctx->API == API_OPENGL && ctx->Extensions.EXT_transform_feedback)
+ || ctx->API == API_OPENGL_CORE
+ || _mesa_is_gles3(ctx);
+#endif
+
+#if FEATURE_ARB_geometry_shader4
+ /* Are geometry shaders available in this context?
+ */
+ const bool has_gs =
+ _mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_geometry_shader4;
+#endif
+
+ /* Are uniform buffer objects available in this context?
+ */
+ const bool has_ubo =
+ (ctx->API == API_OPENGL && ctx->Extensions.ARB_uniform_buffer_object)
+ || ctx->API == API_OPENGL_CORE
+ || _mesa_is_gles3(ctx);
+
if (!shProg) {
_mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramiv(program)");
return;
}
#if FEATURE_EXT_transform_feedback
case GL_TRANSFORM_FEEDBACK_VARYINGS:
- if (!ctx->Extensions.EXT_transform_feedback)
+ if (!has_xfb)
break;
*params = shProg->TransformFeedback.NumVarying;
return;
case GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH:
- if (!ctx->Extensions.EXT_transform_feedback)
+ if (!has_xfb)
break;
*params = longest_feedback_varying_name(shProg) + 1;
return;
case GL_TRANSFORM_FEEDBACK_BUFFER_MODE:
- if (!ctx->Extensions.EXT_transform_feedback)
+ if (!has_xfb)
break;
*params = shProg->TransformFeedback.BufferMode;
return;
#endif
#if FEATURE_ARB_geometry_shader4
case GL_GEOMETRY_VERTICES_OUT_ARB:
- if (!ctx->Extensions.ARB_geometry_shader4)
+ if (!has_gs)
break;
*params = shProg->Geom.VerticesOut;
return;
case GL_GEOMETRY_INPUT_TYPE_ARB:
- if (!ctx->Extensions.ARB_geometry_shader4)
+ if (!has_gs)
break;
*params = shProg->Geom.InputType;
return;
case GL_GEOMETRY_OUTPUT_TYPE_ARB:
- if (!ctx->Extensions.ARB_geometry_shader4)
+ if (!has_gs)
break;
*params = shProg->Geom.OutputType;
return;
unsigned i;
GLint max_len = 0;
- if (!ctx->Extensions.ARB_uniform_buffer_object)
+ if (!has_ubo)
break;
for (i = 0; i < shProg->NumUniformBlocks; i++) {
return;
}
case GL_ACTIVE_UNIFORM_BLOCKS:
- if (!ctx->Extensions.ARB_uniform_buffer_object)
+ if (!has_ubo)
break;
*params = shProg->NumUniformBlocks;