mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-21 02:10:17 +01:00
mesa: add function to check if shader subroutines are enabled.
This checks if core profile and shader subroutine extension is enabled. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
670b9e56da
commit
d8a250ce5e
1 changed files with 9 additions and 0 deletions
|
|
@ -343,6 +343,15 @@ _mesa_has_compute_shaders(const struct gl_context *ctx)
|
|||
(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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue