struct gl_memory_object *memObj = NULL;
if (mem) {
- /* From the EXT_external_objects spec:
- *
- * "An INVALID_VALUE error is generated by BufferStorageMemEXT and
- * NamedBufferStorageMemEXT if <memory> is 0, or ..."
- */
- if (!no_error && memory == 0) {
- _mesa_error(ctx, GL_INVALID_VALUE, "%s(memory == 0)", func);
+ if (!no_error) {
+ if (!ctx->Extensions.EXT_memory_object) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func);
+ return;
+ }
+
+ /* From the EXT_external_objects spec:
+ *
+ * "An INVALID_VALUE error is generated by BufferStorageMemEXT and
+ * NamedBufferStorageMemEXT if <memory> is 0, or ..."
+ */
+ if (memory == 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(memory == 0)", func);
+ }
}
memObj = _mesa_lookup_memory_object(ctx, memory);
memoryObjects);
}
+ if (!ctx->Extensions.EXT_memory_object) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glDeleteMemoryObjectsEXT(unsupported)");
+ return;
+ }
+
if (n < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glDeleteMemoryObjectsEXT(n < 0)");
return;
_mesa_IsMemoryObjectEXT(GLuint memoryObject)
{
GET_CURRENT_CONTEXT(ctx);
+
+ if (!ctx->Extensions.EXT_memory_object) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glIsMemoryObjectEXT(unsupported)");
+ return GL_FALSE;
+ }
+
struct gl_memory_object *obj =
_mesa_lookup_memory_object(ctx, memoryObject);
if (MESA_VERBOSE & (VERBOSE_API))
_mesa_debug(ctx, "%s(%d, %p)", func, n, memoryObjects);
+ if (!ctx->Extensions.EXT_memory_object) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCreateMemoryObjectsEXT(unsupported)");
+ return;
+ }
+
if (n < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "%s(n < 0)", func);
return;
GET_CURRENT_CONTEXT(ctx);
struct gl_memory_object *memObj;
+ if (!ctx->Extensions.EXT_memory_object) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glMemoryObjectParameterivEXT(unsupported)");
+ return;
+ }
+
memObj = _mesa_lookup_memory_object(ctx, memoryObject);
if (!memObj)
return;
GET_CURRENT_CONTEXT(ctx);
struct gl_memory_object *memObj;
+ if (!ctx->Extensions.EXT_memory_object) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetMemoryObjectParameterivEXT(unsupported)");
+ return;
+ }
+
memObj = _mesa_lookup_memory_object(ctx, memoryObject);
if (!memObj)
return;
GET_CURRENT_CONTEXT(ctx);
+ if (!ctx->Extensions.EXT_memory_object) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func);
+ return;
+ }
+
texObj = _mesa_get_current_tex_object(ctx, target);
if (!texObj)
return;
GET_CURRENT_CONTEXT(ctx);
+ if (!ctx->Extensions.EXT_memory_object) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func);
+ return;
+ }
+
texObj = _mesa_get_current_tex_object(ctx, target);
if (!texObj)
return;
GET_CURRENT_CONTEXT(ctx);
+ if (!ctx->Extensions.EXT_memory_object) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func);
+ return;
+ }
+
texObj = _mesa_lookup_texture(ctx, texture);
if (!texObj)
return;
GET_CURRENT_CONTEXT(ctx);
+ if (!ctx->Extensions.EXT_memory_object) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func);
+ return;
+ }
+
texObj = _mesa_lookup_texture(ctx, texture);
if (!texObj)
return;
GET_CURRENT_CONTEXT(ctx);
+ if (!ctx->Extensions.EXT_memory_object) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func);
+ return;
+ }
+
d = find_value(func, pname, &p, &v);
size = get_value_size(d->type, &v);
if (size >= 0) {
GET_CURRENT_CONTEXT(ctx);
+ if (!ctx->Extensions.EXT_memory_object) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func);
+ return;
+ }
+
type = find_value_indexed(func, target, index, &v);
size = get_value_size(type, &v);
if (size <= 0) {