(ctx->API == API_OPENGLES2 && ctx->Version >= 31);
}
-/**
- * Checks if the context supports shader subroutines.
- */
-static inline bool
-_mesa_has_shader_subroutine(const struct gl_context *ctx)
-{
- return ctx->API == API_OPENGL_CORE &&
- (ctx->Version >= 40 || ctx->Extensions.ARB_shader_subroutine);
-}
-
/**
* Checks if the context supports tessellation.
*/
case GL_FRAGMENT_SUBROUTINE:
case GL_VERTEX_SUBROUTINE_UNIFORM:
case GL_FRAGMENT_SUBROUTINE_UNIFORM:
- return _mesa_has_shader_subroutine(ctx);
+ return _mesa_has_ARB_shader_subroutine(ctx);
case GL_GEOMETRY_SUBROUTINE:
case GL_GEOMETRY_SUBROUTINE_UNIFORM:
- return _mesa_has_geometry_shaders(ctx) && _mesa_has_shader_subroutine(ctx);
+ return _mesa_has_geometry_shaders(ctx) && _mesa_has_ARB_shader_subroutine(ctx);
case GL_COMPUTE_SUBROUTINE:
case GL_COMPUTE_SUBROUTINE_UNIFORM:
- return _mesa_has_compute_shaders(ctx) && _mesa_has_shader_subroutine(ctx);
+ return _mesa_has_compute_shaders(ctx) && _mesa_has_ARB_shader_subroutine(ctx);
case GL_TESS_CONTROL_SUBROUTINE:
case GL_TESS_EVALUATION_SUBROUTINE:
case GL_TESS_CONTROL_SUBROUTINE_UNIFORM:
case GL_TESS_EVALUATION_SUBROUTINE_UNIFORM:
- return _mesa_has_tessellation(ctx) && _mesa_has_shader_subroutine(ctx);
+ return _mesa_has_tessellation(ctx) && _mesa_has_ARB_shader_subroutine(ctx);
default:
return false;
}
case GL_VERTEX_SUBROUTINE_UNIFORM:
case GL_FRAGMENT_SUBROUTINE_UNIFORM:
- if (!_mesa_has_shader_subroutine(ctx))
+ if (!_mesa_has_ARB_shader_subroutine(ctx))
goto fail;
break;
case GL_GEOMETRY_SUBROUTINE_UNIFORM:
- if (!_mesa_has_geometry_shaders(ctx) || !_mesa_has_shader_subroutine(ctx))
+ if (!_mesa_has_geometry_shaders(ctx) || !_mesa_has_ARB_shader_subroutine(ctx))
goto fail;
break;
case GL_COMPUTE_SUBROUTINE_UNIFORM:
- if (!_mesa_has_compute_shaders(ctx) || !_mesa_has_shader_subroutine(ctx))
+ if (!_mesa_has_compute_shaders(ctx) || !_mesa_has_ARB_shader_subroutine(ctx))
goto fail;
break;
case GL_TESS_CONTROL_SUBROUTINE_UNIFORM:
case GL_TESS_EVALUATION_SUBROUTINE_UNIFORM:
- if (!_mesa_has_tessellation(ctx) || !_mesa_has_shader_subroutine(ctx))
+ if (!_mesa_has_tessellation(ctx) || !_mesa_has_ARB_shader_subroutine(ctx))
goto fail;
break;
default:
GLenum resource_type;
gl_shader_stage stage;
- if (!_mesa_has_shader_subroutine(ctx)) {
+ if (!_mesa_has_ARB_shader_subroutine(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s", api_name);
return -1;
}
GLenum resource_type;
gl_shader_stage stage;
- if (!_mesa_has_shader_subroutine(ctx)) {
+ if (!_mesa_has_ARB_shader_subroutine(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s", api_name);
return -1;
}
GLenum resource_type;
int count, i, j;
- if (!_mesa_has_shader_subroutine(ctx)) {
+ if (!_mesa_has_ARB_shader_subroutine(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s", api_name);
return;
}
GLenum resource_type;
gl_shader_stage stage;
- if (!_mesa_has_shader_subroutine(ctx)) {
+ if (!_mesa_has_ARB_shader_subroutine(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s", api_name);
return;
}
GLenum resource_type;
gl_shader_stage stage;
- if (!_mesa_has_shader_subroutine(ctx)) {
+ if (!_mesa_has_ARB_shader_subroutine(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s", api_name);
return;
}
gl_shader_stage stage;
int i;
- if (!_mesa_has_shader_subroutine(ctx)) {
+ if (!_mesa_has_ARB_shader_subroutine(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s", api_name);
return;
}
struct gl_linked_shader *sh;
gl_shader_stage stage;
- if (!_mesa_has_shader_subroutine(ctx)) {
+ if (!_mesa_has_ARB_shader_subroutine(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s", api_name);
return;
}
struct gl_linked_shader *sh;
gl_shader_stage stage;
- if (!_mesa_has_shader_subroutine(ctx)) {
+ if (!_mesa_has_ARB_shader_subroutine(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s", api_name);
return;
}