diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 6ef81bcbd14..30b8b2196ae 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -2179,7 +2179,7 @@ inlined_buffer_storage(GLenum target, GLuint buffer, GLsizeiptr size, if (mem) { if (!no_error) { - if (!ctx->Extensions.EXT_memory_object) { + if (!_mesa_has_EXT_memory_object(ctx)) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func); return; } diff --git a/src/mesa/main/externalobjects.c b/src/mesa/main/externalobjects.c index 6c119694fac..750b333cfd4 100644 --- a/src/mesa/main/externalobjects.c +++ b/src/mesa/main/externalobjects.c @@ -134,7 +134,7 @@ _mesa_DeleteMemoryObjectsEXT(GLsizei n, const GLuint *memoryObjects) memoryObjects); } - if (!ctx->Extensions.EXT_memory_object) { + if (!_mesa_has_EXT_memory_object(ctx)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glDeleteMemoryObjectsEXT(unsupported)"); return; @@ -169,7 +169,7 @@ _mesa_IsMemoryObjectEXT(GLuint memoryObject) { GET_CURRENT_CONTEXT(ctx); - if (!ctx->Extensions.EXT_memory_object) { + if (!_mesa_has_EXT_memory_object(ctx)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glIsMemoryObjectEXT(unsupported)"); return GL_FALSE; @@ -191,7 +191,7 @@ _mesa_CreateMemoryObjectsEXT(GLsizei n, GLuint *memoryObjects) if (MESA_VERBOSE & (VERBOSE_API)) _mesa_debug(ctx, "%s(%d, %p)\n", func, n, memoryObjects); - if (!ctx->Extensions.EXT_memory_object) { + if (!_mesa_has_EXT_memory_object(ctx)) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func); return; } @@ -236,7 +236,7 @@ _mesa_MemoryObjectParameterivEXT(GLuint memoryObject, const char *func = "glMemoryObjectParameterivEXT"; - if (!ctx->Extensions.EXT_memory_object) { + if (!_mesa_has_EXT_memory_object(ctx)) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func); return; } @@ -276,7 +276,7 @@ _mesa_GetMemoryObjectParameterivEXT(GLuint memoryObject, const char *func = "glMemoryObjectParameterivEXT"; - if (!ctx->Extensions.EXT_memory_object) { + if (!_mesa_has_EXT_memory_object(ctx)) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func); return; } @@ -337,7 +337,7 @@ texstorage_memory(GLuint dims, GLenum target, GLsizei levels, GET_CURRENT_CONTEXT(ctx); - if (!ctx->Extensions.EXT_memory_object) { + if (!_mesa_has_EXT_memory_object(ctx)) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func); return; } @@ -381,7 +381,7 @@ texstorage_memory_ms(GLuint dims, GLenum target, GLsizei samples, GET_CURRENT_CONTEXT(ctx); - if (!ctx->Extensions.EXT_memory_object) { + if (!_mesa_has_EXT_memory_object(ctx)) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func); return; } @@ -413,7 +413,7 @@ texturestorage_memory(GLuint dims, GLuint texture, GLsizei levels, GET_CURRENT_CONTEXT(ctx); - if (!ctx->Extensions.EXT_memory_object) { + if (!_mesa_has_EXT_memory_object(ctx)) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func); return; } @@ -457,7 +457,7 @@ texturestorage_memory_ms(GLuint dims, GLuint texture, GLsizei samples, GET_CURRENT_CONTEXT(ctx); - if (!ctx->Extensions.EXT_memory_object) { + if (!_mesa_has_EXT_memory_object(ctx)) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func); return; } diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 35b79b35828..451a5e8da34 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -2414,7 +2414,7 @@ _mesa_GetUnsignedBytevEXT(GLenum pname, GLubyte *data) GET_CURRENT_CONTEXT(ctx); - if (!ctx->Extensions.EXT_memory_object) { + if (!_mesa_has_EXT_memory_object(ctx)) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func); return; } @@ -2909,19 +2909,19 @@ find_value_indexed(const char *func, GLenum pname, GLuint index, union value *v) /* GL_EXT_external_objects */ case GL_NUM_DEVICE_UUIDS_EXT: - if (!ctx->Extensions.EXT_memory_object && !ctx->Extensions.EXT_semaphore) + if (!_mesa_has_EXT_memory_object(ctx) && !ctx->Extensions.EXT_semaphore) goto invalid_enum; v->value_int = 1; return TYPE_INT; case GL_DRIVER_UUID_EXT: - if (!ctx->Extensions.EXT_memory_object && !ctx->Extensions.EXT_semaphore) + if (!_mesa_has_EXT_memory_object(ctx) && !ctx->Extensions.EXT_semaphore) goto invalid_enum; if (index >= 1) goto invalid_value; _mesa_get_driver_uuid(ctx, v->value_int_4); return TYPE_INT_4; case GL_DEVICE_UUID_EXT: - if (!ctx->Extensions.EXT_memory_object && !ctx->Extensions.EXT_semaphore) + if (!_mesa_has_EXT_memory_object(ctx) && !ctx->Extensions.EXT_semaphore) goto invalid_enum; if (index >= 1) goto invalid_value; @@ -3351,7 +3351,7 @@ _mesa_GetUnsignedBytei_vEXT(GLenum target, GLuint index, GLubyte *data) GET_CURRENT_CONTEXT(ctx); - if (!ctx->Extensions.EXT_memory_object) { + if (!_mesa_has_EXT_memory_object(ctx)) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func); return; } diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index aee3d94f16f..604e2113ec9 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -655,7 +655,7 @@ set_tex_parameteri(struct gl_context *ctx, goto invalid_pname; case GL_TEXTURE_TILING_EXT: - if (ctx->Extensions.EXT_memory_object && !texObj->Immutable) { + if (_mesa_has_EXT_memory_object(ctx) && !texObj->Immutable) { texObj->TextureTiling = params[0]; return GL_TRUE; @@ -875,7 +875,7 @@ set_tex_parameterf(struct gl_context *ctx, return GL_TRUE; case GL_TEXTURE_TILING_EXT: - if (ctx->Extensions.EXT_memory_object) { + if (_mesa_has_EXT_memory_object(ctx)) { texObj->TextureTiling = params[0]; return GL_TRUE; } @@ -2503,7 +2503,7 @@ get_tex_parameterfv(struct gl_context *ctx, break; case GL_TEXTURE_TILING_EXT: - if (!ctx->Extensions.EXT_memory_object) + if (!_mesa_has_EXT_memory_object(ctx)) goto invalid_pname; *params = ENUM_TO_FLOAT(obj->TextureTiling); break; @@ -2788,7 +2788,7 @@ get_tex_parameteriv(struct gl_context *ctx, break; case GL_TEXTURE_TILING_EXT: - if (!ctx->Extensions.EXT_memory_object) + if (!_mesa_has_EXT_memory_object(ctx)) goto invalid_pname; *params = (GLint) obj->TextureTiling; break;