mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
mesa: add glInternalSetError for glthread
glthread wants to set GL errors, but has to do it by adding the SetError call into the queue for it to be thread-safe. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7053>
This commit is contained in:
parent
347a3d68cd
commit
ac4dc6e139
5 changed files with 20 additions and 0 deletions
|
|
@ -13305,6 +13305,11 @@
|
|||
<param name="named" type="GLboolean"/>
|
||||
<param name="ext_dsa" type="GLboolean"/>
|
||||
</function>
|
||||
|
||||
<!-- Set a GL error. Used by glthread to set errors without syncing. -->
|
||||
<function name="InternalSetError" es2="2.0">
|
||||
<param name="error" type="GLenum"/>
|
||||
</function>
|
||||
</category>
|
||||
|
||||
<xi:include href="OES_EGL_image.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
|
|
|
|||
|
|
@ -1676,6 +1676,7 @@ offsets = {
|
|||
"FogCoordhvNV": 1640,
|
||||
"SecondaryColor3hNV": 1641,
|
||||
"SecondaryColor3hvNV": 1642,
|
||||
"InternalSetError": 1643,
|
||||
}
|
||||
|
||||
functions = [
|
||||
|
|
|
|||
|
|
@ -432,3 +432,13 @@ _mesa_shader_debug(struct gl_context *ctx, GLenum type, GLuint *id,
|
|||
|
||||
_mesa_log_msg(ctx, source, type, *id, severity, len, msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the parameter as the current GL error. Used by glthread.
|
||||
*/
|
||||
void GLAPIENTRY
|
||||
_mesa_InternalSetError(GLenum error)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_error(ctx, error, "glthread");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,6 +109,8 @@ _mesa_gl_debug(struct gl_context *ctx,
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_InternalSetError(GLenum error);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1443,6 +1443,7 @@ const struct function common_desktop_functions_possible[] = {
|
|||
{ "glViewportSwizzleNV", 11, -1 },
|
||||
|
||||
{ "glInternalBufferSubDataCopyMESA", 11, -1 },
|
||||
{ "glInternalSetError", 20, -1 },
|
||||
|
||||
{ NULL, 0, -1 }
|
||||
};
|
||||
|
|
@ -2494,6 +2495,7 @@ const struct function gles2_functions_possible[] = {
|
|||
{ "glMaxShaderCompilerThreadsKHR", 20, -1 },
|
||||
|
||||
{ "glInternalBufferSubDataCopyMESA", 20, -1 },
|
||||
{ "glInternalSetError", 20, -1 },
|
||||
|
||||
{ NULL, 0, -1 }
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue