<glx rop="3"/>
</function>
- <function name="Begin" deprecated="3.1" exec="vtxfmt">
+ <function name="Begin" deprecated="3.1" exec="vtxfmt"
+ marshal_call_after="ctx->GLThread.inside_begin_end = true;">
<param name="mode" type="GLenum"/>
<glx rop="4"/>
</function>
<glx rop="22"/>
</function>
- <function name="End" deprecated="3.1" exec="vtxfmt">
+ <function name="End" deprecated="3.1" exec="vtxfmt"
+ marshal_call_after="ctx->GLThread.inside_begin_end = false;">
<glx rop="23"/>
</function>
{
GET_CURRENT_CONTEXT(ctx);
+ /* This will generate GL_INVALID_OPERATION, as it should. */
+ if (ctx->GLThread.inside_begin_end)
+ goto sync;
+
/* TODO: Use get_hash_params.py to return values for items containing:
* - CONST(
* - CONTEXT_[A-Z]*(Const
return;
}
+sync:
_mesa_glthread_finish_before(ctx, "GetIntegerv");
CALL_GetIntegerv(ctx->CurrentServerDispatch, (pname, p));
}
static inline int
_mesa_glthread_IsEnabled(struct gl_context *ctx, GLenum cap)
{
+ /* This will generate GL_INVALID_OPERATION, as it should. */
+ if (ctx->GLThread.inside_begin_end)
+ return -1;
+
switch (cap) {
case GL_CULL_FACE:
return ctx->GLThread.CullFace;
{
GET_CURRENT_CONTEXT(ctx);
+ /* This will generate GL_INVALID_OPERATION, as it should. */
+ if (ctx->GLThread.inside_begin_end) {
+ _mesa_glthread_finish_before(ctx, "GetActiveUniform");
+ CALL_GetActiveUniform(ctx->CurrentServerDispatch,
+ (program, index, bufSize, length, size, type,
+ name));
+ return;
+ }
+
wait_for_glLinkProgram(ctx);
/* We can execute glGetActiveUniform without syncing if we are sync'd to
{
GET_CURRENT_CONTEXT(ctx);
+ /* This will generate GL_INVALID_OPERATION, as it should. */
+ if (ctx->GLThread.inside_begin_end) {
+ _mesa_glthread_finish_before(ctx, "GetUniformLocation");
+ return CALL_GetUniformLocation(ctx->CurrentServerDispatch, (program, name));
+ }
+
wait_for_glLinkProgram(ctx);
/* This is thread-safe. See the comment in _mesa_marshal_GetActiveUniform. */