summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/context.c3
-rw-r--r--src/mesa/main/get.c12
-rw-r--r--src/mesa/main/get_gen.py9
-rw-r--r--src/mesa/main/mtypes.h8
4 files changed, 27 insertions, 5 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 2074b32b25..1707e229c9 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -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;
}
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index e9ccbdab0b..cb12737bd7 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -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;
}
diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py
index e6245e4bd8..63b64a97a9 100644
--- a/src/mesa/main/get_gen.py
+++ b/src/mesa/main/get_gen.py
@@ -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 )
+
]
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 688172a2c0..a980405f01 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -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;