mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
mesa: add _mesa_is_desktop_gl_compat() and _mesa_is_desktop_gl_core() helpers
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21343>
This commit is contained in:
parent
8a4c18afff
commit
e8e17641c1
1 changed files with 19 additions and 1 deletions
|
|
@ -246,13 +246,31 @@ do { \
|
|||
/*@}*/
|
||||
|
||||
|
||||
/**
|
||||
* Checks if the context is for Desktop GL Compatibility
|
||||
*/
|
||||
static inline bool
|
||||
_mesa_is_desktop_gl_compat(const struct gl_context *ctx)
|
||||
{
|
||||
return ctx->API == API_OPENGL_COMPAT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the context is for Desktop GL Core
|
||||
*/
|
||||
static inline bool
|
||||
_mesa_is_desktop_gl_core(const struct gl_context *ctx)
|
||||
{
|
||||
return ctx->API == API_OPENGL_CORE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the context is for Desktop GL (Compatibility or Core)
|
||||
*/
|
||||
static inline bool
|
||||
_mesa_is_desktop_gl(const struct gl_context *ctx)
|
||||
{
|
||||
return ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGL_CORE;
|
||||
return _mesa_is_desktop_gl_compat(ctx) || _mesa_is_desktop_gl_core(ctx);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue