mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
mesa: Add ARB_direct_state_access checks in XFB functions
Signed-off-by: Fredrik Höglund <fredrik@kde.org> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
03420eac0c
commit
7d212765a4
1 changed files with 42 additions and 0 deletions
|
|
@ -706,6 +706,13 @@ _mesa_TransformFeedbackBufferBase(GLuint xfb, GLuint index, GLuint buffer)
|
|||
struct gl_transform_feedback_object *obj;
|
||||
struct gl_buffer_object *bufObj;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTransformFeedbackBufferBase(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
obj = lookup_transform_feedback_object_err(ctx, xfb,
|
||||
"glTransformFeedbackBufferBase");
|
||||
if(!obj) {
|
||||
|
|
@ -729,6 +736,13 @@ _mesa_TransformFeedbackBufferRange(GLuint xfb, GLuint index, GLuint buffer,
|
|||
struct gl_transform_feedback_object *obj;
|
||||
struct gl_buffer_object *bufObj;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTransformFeedbackBufferRange(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
obj = lookup_transform_feedback_object_err(ctx, xfb,
|
||||
"glTransformFeedbackBufferRange");
|
||||
if(!obj) {
|
||||
|
|
@ -1045,6 +1059,13 @@ _mesa_CreateTransformFeedbacks(GLsizei n, GLuint *names)
|
|||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCreateTransformFeedbacks(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
create_transform_feedbacks(ctx, n, names, true);
|
||||
}
|
||||
|
||||
|
|
@ -1215,6 +1236,13 @@ _mesa_GetTransformFeedbackiv(GLuint xfb, GLenum pname, GLint *param)
|
|||
struct gl_transform_feedback_object *obj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTransformFeedbackiv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
obj = lookup_transform_feedback_object_err(ctx, xfb,
|
||||
"glGetTransformFeedbackiv");
|
||||
if(!obj) {
|
||||
|
|
@ -1241,6 +1269,13 @@ _mesa_GetTransformFeedbacki_v(GLuint xfb, GLenum pname, GLuint index,
|
|||
struct gl_transform_feedback_object *obj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTransformFeedbacki_v(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
obj = lookup_transform_feedback_object_err(ctx, xfb,
|
||||
"glGetTransformFeedbacki_v");
|
||||
if(!obj) {
|
||||
|
|
@ -1270,6 +1305,13 @@ _mesa_GetTransformFeedbacki64_v(GLuint xfb, GLenum pname, GLuint index,
|
|||
struct gl_transform_feedback_object *obj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTransformFeedbacki64_v(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
obj = lookup_transform_feedback_object_err(ctx, xfb,
|
||||
"glGetTransformFeedbacki64_v");
|
||||
if(!obj) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue