mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
mesa: add GL 3.2 GL_CONTEXT_PROFILE_MASK query
This commit is contained in:
parent
d3e2f4fa18
commit
bd1d35fb5d
4 changed files with 27 additions and 5 deletions
|
|
@ -566,6 +566,9 @@ _mesa_init_constants(GLcontext *ctx)
|
|||
ctx->Const.MaxTransformFeedbackSeparateAttribs = MAX_FEEDBACK_ATTRIBS;
|
||||
ctx->Const.MaxTransformFeedbackSeparateComponents = 4 * MAX_FEEDBACK_ATTRIBS;
|
||||
ctx->Const.MaxTransformFeedbackInterleavedComponents = 4 * MAX_FEEDBACK_ATTRIBS;
|
||||
|
||||
/* GL 3.2: hard-coded for now: */
|
||||
ctx->Const.ProfileMask = GL_CONTEXT_COMPATIBILITY_PROFILE_BIT;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1954,6 +1954,9 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
|
|||
case GL_CONTEXT_FLAGS:
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Const.ContextFlags);
|
||||
break;
|
||||
case GL_CONTEXT_PROFILE_MASK:
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Const.ProfileMask);
|
||||
break;
|
||||
default:
|
||||
goto invalid_enum_error;
|
||||
}
|
||||
|
|
@ -3853,6 +3856,9 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
|
|||
case GL_CONTEXT_FLAGS:
|
||||
params[0] = (GLfloat)(ctx->Const.ContextFlags);
|
||||
break;
|
||||
case GL_CONTEXT_PROFILE_MASK:
|
||||
params[0] = (GLfloat)(ctx->Const.ProfileMask);
|
||||
break;
|
||||
default:
|
||||
goto invalid_enum_error;
|
||||
}
|
||||
|
|
@ -5752,6 +5758,9 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
|
|||
case GL_CONTEXT_FLAGS:
|
||||
params[0] = ctx->Const.ContextFlags;
|
||||
break;
|
||||
case GL_CONTEXT_PROFILE_MASK:
|
||||
params[0] = ctx->Const.ProfileMask;
|
||||
break;
|
||||
default:
|
||||
goto invalid_enum_error;
|
||||
}
|
||||
|
|
@ -7652,6 +7661,9 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
|
|||
case GL_CONTEXT_FLAGS:
|
||||
params[0] = (GLint64)(ctx->Const.ContextFlags);
|
||||
break;
|
||||
case GL_CONTEXT_PROFILE_MASK:
|
||||
params[0] = (GLint64)(ctx->Const.ProfileMask);
|
||||
break;
|
||||
default:
|
||||
goto invalid_enum_error;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1139,11 +1139,16 @@ StateVars = [
|
|||
["ctx->Const.MaxTransformFeedbackSeparateComponents"], "",
|
||||
NoState, ["EXT_transform_feedback"] ),
|
||||
|
||||
# GL3
|
||||
# GL 3.0
|
||||
( "GL_NUM_EXTENSIONS", GLint, ["_mesa_get_extension_count(ctx)"], "", NoState, NoExt ),
|
||||
( "GL_MAJOR_VERSION", GLint, ["ctx->VersionMajor"], "", NoState, NoExt ),
|
||||
( "GL_MINOR_VERSION", GLint, ["ctx->VersionMinor"], "", NoState, NoExt ),
|
||||
( "GL_CONTEXT_FLAGS", GLint, ["ctx->Const.ContextFlags"], "", NoState, NoExt )
|
||||
( "GL_CONTEXT_FLAGS", GLint, ["ctx->Const.ContextFlags"], "", NoState, NoExt ),
|
||||
|
||||
# GL 3.2
|
||||
( "GL_CONTEXT_PROFILE_MASK", GLint, ["ctx->Const.ProfileMask"], "",
|
||||
NoState, NoExt )
|
||||
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2417,13 +2417,15 @@ struct gl_constants
|
|||
*/
|
||||
GLuint64 MaxServerWaitTimeout;
|
||||
|
||||
|
||||
/**< GL_EXT_provoking_vertex */
|
||||
/** GL_EXT_provoking_vertex */
|
||||
GLboolean QuadsFollowProvokingVertexConvention;
|
||||
|
||||
/**< OpenGL version 3.x */
|
||||
/** OpenGL version 3.0 */
|
||||
GLbitfield ContextFlags; /**< Ex: GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT */
|
||||
|
||||
/** OpenGL version 3.2 */
|
||||
GLbitfield ProfileMask; /**< Mask of CONTEXT_x_PROFILE_BIT */
|
||||
|
||||
/** GL_EXT_transform_feedback */
|
||||
GLuint MaxTransformFeedbackSeparateAttribs;
|
||||
GLuint MaxTransformFeedbackSeparateComponents;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue