X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fbufferobj.c;h=9c4630bca12c5daa57c0da39bfba6b69631d33bf;hb=e630271e0ec3eee7d921d76d3924873f6ee6b59b;hp=dfeea94bd19d0aacba3dbd3445e1c160389a8720;hpb=11d688d9f0d2ee4d0178d1807c0075e5e8364b1d;p=mesa.git diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index dfeea94bd19..9c4630bca12 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -36,7 +36,7 @@ #include "glheader.h" #include "enums.h" #include "hash.h" -#include "imports.h" +#include "util/imports.h" #include "context.h" #include "bufferobj.h" #include "externalobjects.h" @@ -46,6 +46,7 @@ #include "texstore.h" #include "transformfeedback.h" #include "varray.h" +#include "util/u_atomic.h" /* Debug flags */ @@ -72,11 +73,11 @@ buffer_usage_warning(struct gl_context *ctx, GLuint *id, const char *fmt, ...) va_list args; va_start(args, fmt); - _mesa_gl_vdebug(ctx, id, - MESA_DEBUG_SOURCE_API, - MESA_DEBUG_TYPE_PERFORMANCE, - MESA_DEBUG_SEVERITY_MEDIUM, - fmt, args); + _mesa_gl_vdebugf(ctx, id, + MESA_DEBUG_SOURCE_API, + MESA_DEBUG_TYPE_PERFORMANCE, + MESA_DEBUG_SEVERITY_MEDIUM, + fmt, args); va_end(args); } @@ -112,8 +113,13 @@ get_buffer_target(struct gl_context *ctx, GLenum target) switch (target) { case GL_ARRAY_BUFFER_ARB: + if (ctx->Array.ArrayBufferObj) + ctx->Array.ArrayBufferObj->UsageHistory |= USAGE_ARRAY_BUFFER; return &ctx->Array.ArrayBufferObj; case GL_ELEMENT_ARRAY_BUFFER_ARB: + if (ctx->Array.VAO->IndexBufferObj) + ctx->Array.VAO->IndexBufferObj->UsageHistory + |= USAGE_ELEMENT_ARRAY_BUFFER; return &ctx->Array.VAO->IndexBufferObj; case GL_PIXEL_PACK_BUFFER_EXT: return &ctx->Pack.BufferObj; @@ -128,8 +134,7 @@ get_buffer_target(struct gl_context *ctx, GLenum target) return &ctx->QueryBuffer; break; case GL_DRAW_INDIRECT_BUFFER: - if ((ctx->API == API_OPENGL_CORE && - ctx->Extensions.ARB_draw_indirect) || + if ((_mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_draw_indirect) || _mesa_is_gles31(ctx)) { return &ctx->DrawIndirectBuffer; } @@ -346,7 +351,8 @@ buffer_object_subdata_range_good(struct gl_context *ctx, /** * Test the format and type parameters and set the GL error code for - * \c glClearBufferData and \c glClearBufferSubData. + * \c glClearBufferData, \c glClearNamedBufferData, \c glClearBufferSubData + * and \c glClearNamedBufferSubData. * * \param ctx GL context. * \param internalformat Format to which the data is to be converted. @@ -356,7 +362,8 @@ buffer_object_subdata_range_good(struct gl_context *ctx, * \return If internalformat, format and type are legal the mesa_format * corresponding to internalformat, otherwise MESA_FORMAT_NONE. * - * \sa glClearBufferData and glClearBufferSubData + * \sa glClearBufferData, glClearNamedBufferData, glClearBufferSubData and + * glClearNamedBufferSubData. */ static mesa_format validate_clear_buffer_format(struct gl_context *ctx, @@ -386,14 +393,14 @@ validate_clear_buffer_format(struct gl_context *ctx, } if (!_mesa_is_color_format(format)) { - _mesa_error(ctx, GL_INVALID_ENUM, + _mesa_error(ctx, GL_INVALID_VALUE, "%s(format is not a color format)", caller); return MESA_FORMAT_NONE; } errorFormatType = _mesa_error_check_format_and_type(ctx, format, type); if (errorFormatType != GL_NO_ERROR) { - _mesa_error(ctx, GL_INVALID_ENUM, + _mesa_error(ctx, GL_INVALID_VALUE, "%s(invalid format or type)", caller); return MESA_FORMAT_NONE; } @@ -471,7 +478,7 @@ _mesa_delete_buffer_object(struct gl_context *ctx, bufObj->RefCount = -1000; bufObj->Name = ~0; - mtx_destroy(&bufObj->Mutex); + simple_mtx_destroy(&bufObj->MinMaxCacheMutex); free(bufObj->Label); free(bufObj); } @@ -490,16 +497,9 @@ _mesa_reference_buffer_object_(struct gl_context *ctx, { if (*ptr) { /* Unreference the old buffer */ - GLboolean deleteFlag = GL_FALSE; struct gl_buffer_object *oldObj = *ptr; - mtx_lock(&oldObj->Mutex); - assert(oldObj->RefCount > 0); - oldObj->RefCount--; - deleteFlag = (oldObj->RefCount == 0); - mtx_unlock(&oldObj->Mutex); - - if (deleteFlag) { + if (p_atomic_dec_zero(&oldObj->RefCount)) { assert(ctx->Driver.DeleteBuffer); ctx->Driver.DeleteBuffer(ctx, oldObj); } @@ -510,12 +510,8 @@ _mesa_reference_buffer_object_(struct gl_context *ctx, if (bufObj) { /* reference new buffer */ - mtx_lock(&bufObj->Mutex); - assert(bufObj->RefCount > 0); - - bufObj->RefCount++; + p_atomic_inc(&bufObj->RefCount); *ptr = bufObj; - mtx_unlock(&bufObj->Mutex); } } @@ -547,11 +543,11 @@ _mesa_initialize_buffer_object(struct gl_context *ctx, GLuint name) { memset(obj, 0, sizeof(struct gl_buffer_object)); - mtx_init(&obj->Mutex, mtx_plain); obj->RefCount = 1; obj->Name = name; obj->Usage = GL_STATIC_DRAW_ARB; + simple_mtx_init(&obj->MinMaxCacheMutex, mtx_plain); if (get_no_minmax_cache()) obj->UsageHistory |= USAGE_DISABLE_MINMAX_CACHE; } @@ -608,7 +604,7 @@ _mesa_total_buffer_object_memory(struct gl_context *ctx) * \sa glBufferDataARB, dd_function_table::BufferData. */ static GLboolean -buffer_data_fallback(struct gl_context *ctx, GLenum target, GLsizeiptr size, +buffer_data_fallback(struct gl_context *ctx, GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage, GLenum storageFlags, struct gl_buffer_object *bufObj) { @@ -654,8 +650,8 @@ buffer_data_fallback(struct gl_context *ctx, GLenum target, GLsizeiptr size, * \sa glBufferSubDataARB, dd_function_table::BufferSubData. */ static void -buffer_sub_data_fallback(struct gl_context *ctx, GLintptr offset, - GLsizeiptr size, const GLvoid *data, +buffer_sub_data_fallback(struct gl_context *ctx, GLintptrARB offset, + GLsizeiptrARB size, const GLvoid *data, struct gl_buffer_object *bufObj) { (void) ctx; @@ -870,7 +866,7 @@ _mesa_init_buffer_objects( struct gl_context *ctx ) GLuint i; memset(&DummyBufferObject, 0, sizeof(DummyBufferObject)); - mtx_init(&DummyBufferObject.Mutex, mtx_plain); + simple_mtx_init(&DummyBufferObject.MinMaxCacheMutex, mtx_plain); DummyBufferObject.RefCount = 1000*1000*1000; /* never delete */ _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, @@ -1175,7 +1171,7 @@ unbind(struct gl_context *ctx, struct gl_buffer_object *obj) { if (vao->BufferBinding[index].BufferObj == obj) { - _mesa_bind_vertex_buffer(ctx, vao, index, ctx->Shared->NullBufferObj, + _mesa_bind_vertex_buffer(ctx, vao, index, NULL, vao->BufferBinding[index].Offset, vao->BufferBinding[index].Stride); } @@ -1941,6 +1937,21 @@ _mesa_BufferStorage(GLenum target, GLsizeiptr size, const GLvoid *data, false, false, false, "glBufferStorage"); } +void GLAPIENTRY +_mesa_NamedBufferStorageEXT(GLuint buffer, GLsizeiptr size, + const GLvoid *data, GLbitfield flags) +{ + GET_CURRENT_CONTEXT(ctx); + + struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); + if (!_mesa_handle_bind_buffer_gen(ctx, buffer, + &bufObj, "glNamedBufferStorageEXT")) + return; + + inlined_buffer_storage(GL_NONE, buffer, size, data, flags, GL_NONE, 0, + true, false, false, "glNamedBufferStorageEXT"); +} + void GLAPIENTRY _mesa_BufferStorageMemEXT(GLenum target, GLsizeiptr size, @@ -2173,6 +2184,27 @@ _mesa_NamedBufferData(GLuint buffer, GLsizeiptr size, const GLvoid *data, "glNamedBufferData"); } +void GLAPIENTRY +_mesa_NamedBufferDataEXT(GLuint buffer, GLsizeiptr size, const GLvoid *data, + GLenum usage) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_buffer_object *bufObj; + + if (!buffer) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glNamedBufferDataEXT(buffer=0)"); + return; + } + + bufObj = _mesa_lookup_bufferobj(ctx, buffer); + if (!_mesa_handle_bind_buffer_gen(ctx, buffer, + &bufObj, "glNamedBufferDataEXT")) + return; + + _mesa_buffer_data(ctx, bufObj, GL_NONE, size, data, usage, + "glNamedBufferDataEXT"); +} static bool validate_buffer_sub_data(struct gl_context *ctx, @@ -2301,6 +2333,30 @@ _mesa_NamedBufferSubData(GLuint buffer, GLintptr offset, "glNamedBufferSubData"); } +void GLAPIENTRY +_mesa_NamedBufferSubDataEXT(GLuint buffer, GLintptr offset, + GLsizeiptr size, const GLvoid *data) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_buffer_object *bufObj; + + if (!buffer) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glNamedBufferSubDataEXT(buffer=0)"); + return; + } + + bufObj = _mesa_lookup_bufferobj(ctx, buffer); + if (!_mesa_handle_bind_buffer_gen(ctx, buffer, + &bufObj, "glNamedBufferSubDataEXT")) + return; + + if (validate_buffer_sub_data(ctx, bufObj, offset, size, + "glNamedBufferSubDataEXT")) { + _mesa_buffer_sub_data(ctx, bufObj, offset, size, data); + } +} + void GLAPIENTRY _mesa_GetBufferSubData(GLenum target, GLintptr offset, @@ -2345,6 +2401,33 @@ _mesa_GetNamedBufferSubData(GLuint buffer, GLintptr offset, } +void GLAPIENTRY +_mesa_GetNamedBufferSubDataEXT(GLuint buffer, GLintptr offset, + GLsizeiptr size, GLvoid *data) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_buffer_object *bufObj; + + if (!buffer) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetNamedBufferSubDataEXT(buffer=0)"); + return; + } + + bufObj = _mesa_lookup_bufferobj(ctx, buffer); + if (!_mesa_handle_bind_buffer_gen(ctx, buffer, + &bufObj, "glGetNamedBufferSubDataEXT")) + return; + + if (!buffer_object_subdata_range_good(ctx, bufObj, offset, size, false, + "glGetNamedBufferSubDataEXT")) { + return; + } + + assert(ctx->Driver.GetBufferSubData); + ctx->Driver.GetBufferSubData(ctx, offset, size, data, bufObj); +} + /** * \param subdata true if caller is *SubData, false if *Data */ @@ -2490,6 +2573,22 @@ _mesa_ClearNamedBufferData(GLuint buffer, GLenum internalformat, } +void GLAPIENTRY +_mesa_ClearNamedBufferDataEXT(GLuint buffer, GLenum internalformat, + GLenum format, GLenum type, const GLvoid *data) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); + if (!_mesa_handle_bind_buffer_gen(ctx, buffer, + &bufObj, "glClearNamedBufferDataEXT")) + return; + + clear_buffer_sub_data_error(ctx, bufObj, internalformat, 0, bufObj->Size, + format, type, data, "glClearNamedBufferDataEXT", + false); +} + + void GLAPIENTRY _mesa_ClearBufferSubData_no_error(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, @@ -2558,6 +2657,23 @@ _mesa_ClearNamedBufferSubData(GLuint buffer, GLenum internalformat, true); } +void GLAPIENTRY +_mesa_ClearNamedBufferSubDataEXT(GLuint buffer, GLenum internalformat, + GLintptr offset, GLsizeiptr size, + GLenum format, GLenum type, + const GLvoid *data) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); + if (!_mesa_handle_bind_buffer_gen(ctx, buffer, + &bufObj, "glClearNamedBufferSubDataEXT")) + return; + + clear_buffer_sub_data_error(ctx, bufObj, internalformat, offset, size, + format, type, data, "glClearNamedBufferSubDataEXT", + true); +} + static GLboolean unmap_buffer(struct gl_context *ctx, struct gl_buffer_object *bufObj) { @@ -2646,7 +2762,7 @@ _mesa_UnmapBuffer(GLenum target) } GLboolean GLAPIENTRY -_mesa_UnmapNamedBuffer_no_error(GLuint buffer) +_mesa_UnmapNamedBufferEXT_no_error(GLuint buffer) { GET_CURRENT_CONTEXT(ctx); struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); @@ -2655,11 +2771,17 @@ _mesa_UnmapNamedBuffer_no_error(GLuint buffer) } GLboolean GLAPIENTRY -_mesa_UnmapNamedBuffer(GLuint buffer) +_mesa_UnmapNamedBufferEXT(GLuint buffer) { GET_CURRENT_CONTEXT(ctx); struct gl_buffer_object *bufObj; + if (!buffer) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glUnmapNamedBufferEXT(buffer=0)"); + return GL_FALSE; + } + bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glUnmapNamedBuffer"); if (!bufObj) return GL_FALSE; @@ -2781,6 +2903,31 @@ _mesa_GetNamedBufferParameteriv(GLuint buffer, GLenum pname, GLint *params) *params = (GLint) parameter; } +void GLAPIENTRY +_mesa_GetNamedBufferParameterivEXT(GLuint buffer, GLenum pname, GLint *params) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_buffer_object *bufObj; + GLint64 parameter; + + if (!buffer) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetNamedBufferParameterivEXT: buffer=0"); + return; + } + + bufObj = _mesa_lookup_bufferobj(ctx, buffer); + if (!_mesa_handle_bind_buffer_gen(ctx, buffer, + &bufObj, "glGetNamedBufferParameterivEXT")) + return; + + if (!get_buffer_parameter(ctx, bufObj, pname, ¶meter, + "glGetNamedBufferParameterivEXT")) + return; /* Error already recorded. */ + + *params = (GLint) parameter; +} + void GLAPIENTRY _mesa_GetNamedBufferParameteri64v(GLuint buffer, GLenum pname, GLint64 *params) @@ -2842,6 +2989,30 @@ _mesa_GetNamedBufferPointerv(GLuint buffer, GLenum pname, GLvoid **params) *params = bufObj->Mappings[MAP_USER].Pointer; } +void GLAPIENTRY +_mesa_GetNamedBufferPointervEXT(GLuint buffer, GLenum pname, GLvoid **params) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_buffer_object *bufObj; + + if (!buffer) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetNamedBufferPointervEXT(buffer=0)"); + return; + } + if (pname != GL_BUFFER_MAP_POINTER) { + _mesa_error(ctx, GL_INVALID_ENUM, "glGetNamedBufferPointervEXT(pname != " + "GL_BUFFER_MAP_POINTER)"); + return; + } + + bufObj = _mesa_lookup_bufferobj(ctx, buffer); + if (!_mesa_handle_bind_buffer_gen(ctx, buffer, + &bufObj, "glGetNamedBufferPointervEXT")) + return; + + *params = bufObj->Mappings[MAP_USER].Pointer; +} static void copy_buffer_sub_data(struct gl_context *ctx, struct gl_buffer_object *src, @@ -2952,6 +3123,30 @@ _mesa_CopyBufferSubData(GLenum readTarget, GLenum writeTarget, "glCopyBufferSubData"); } +void GLAPIENTRY +_mesa_NamedCopyBufferSubDataEXT(GLuint readBuffer, GLuint writeBuffer, + GLintptr readOffset, GLintptr writeOffset, + GLsizeiptr size) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_buffer_object *src, *dst; + + src = _mesa_lookup_bufferobj(ctx, readBuffer); + if (!_mesa_handle_bind_buffer_gen(ctx, readBuffer, + &src, + "glNamedCopyBufferSubDataEXT")) + return; + + dst = _mesa_lookup_bufferobj(ctx, writeBuffer); + if (!_mesa_handle_bind_buffer_gen(ctx, writeBuffer, + &dst, + "glNamedCopyBufferSubDataEXT")) + return; + + copy_buffer_sub_data(ctx, src, dst, readOffset, writeOffset, size, + "glNamedCopyBufferSubDataEXT"); +} + void GLAPIENTRY _mesa_CopyNamedBufferSubData_no_error(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, @@ -3235,30 +3430,55 @@ _mesa_MapNamedBufferRange_no_error(GLuint buffer, GLintptr offset, "glMapNamedBufferRange"); } -void * GLAPIENTRY -_mesa_MapNamedBufferRange(GLuint buffer, GLintptr offset, GLsizeiptr length, - GLbitfield access) +static void * +map_named_buffer_range(GLuint buffer, GLintptr offset, GLsizeiptr length, + GLbitfield access, bool dsa_ext, const char *func) { GET_CURRENT_CONTEXT(ctx); - struct gl_buffer_object *bufObj; + struct gl_buffer_object *bufObj = NULL; if (!ctx->Extensions.ARB_map_buffer_range) { _mesa_error(ctx, GL_INVALID_OPERATION, - "glMapNamedBufferRange(" - "ARB_map_buffer_range not supported)"); + "%s(ARB_map_buffer_range not supported)", func); return NULL; } - bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glMapNamedBufferRange"); - if (!bufObj) + if (dsa_ext) { + bufObj = _mesa_lookup_bufferobj(ctx, buffer); + if (!_mesa_handle_bind_buffer_gen(ctx, buffer, &bufObj, func)) + return NULL; + } else { + bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, func); + if (!bufObj) + return NULL; + } + + if (!validate_map_buffer_range(ctx, bufObj, offset, length, access, func)) return NULL; - if (!validate_map_buffer_range(ctx, bufObj, offset, length, access, - "glMapNamedBufferRange")) + return map_buffer_range(ctx, bufObj, offset, length, access, func); +} + +void * GLAPIENTRY +_mesa_MapNamedBufferRangeEXT(GLuint buffer, GLintptr offset, GLsizeiptr length, + GLbitfield access) +{ + GET_CURRENT_CONTEXT(ctx); + if (!buffer) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glMapNamedBufferRangeEXT(buffer=0)"); return NULL; + } + return map_named_buffer_range(buffer, offset, length, access, true, + "glMapNamedBufferRangeEXT"); +} - return map_buffer_range(ctx, bufObj, offset, length, access, - "glMapNamedBufferRange"); +void * GLAPIENTRY +_mesa_MapNamedBufferRange(GLuint buffer, GLintptr offset, GLsizeiptr length, + GLbitfield access) +{ + return map_named_buffer_range(buffer, offset, length, access, false, + "glMapNamedBufferRange"); } /** @@ -3364,6 +3584,34 @@ _mesa_MapNamedBuffer(GLuint buffer, GLenum access) "glMapNamedBuffer"); } +void * GLAPIENTRY +_mesa_MapNamedBufferEXT(GLuint buffer, GLenum access) +{ + GET_CURRENT_CONTEXT(ctx); + + GLbitfield accessFlags; + if (!buffer) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glMapNamedBufferEXT(buffer=0)"); + return NULL; + } + if (!get_map_buffer_access_flags(ctx, access, &accessFlags)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glMapNamedBufferEXT(invalid access)"); + return NULL; + } + + struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); + if (!_mesa_handle_bind_buffer_gen(ctx, buffer, + &bufObj, "glMapNamedBufferEXT")) + return NULL; + + if (!validate_map_buffer_range(ctx, bufObj, 0, bufObj->Size, accessFlags, + "glMapNamedBufferEXT")) + return NULL; + + return map_buffer_range(ctx, bufObj, 0, bufObj->Size, accessFlags, + "glMapNamedBufferEXT"); +} static void flush_mapped_buffer_range(struct gl_context *ctx, @@ -3475,6 +3723,28 @@ _mesa_FlushMappedNamedBufferRange(GLuint buffer, GLintptr offset, "glFlushMappedNamedBufferRange"); } +void GLAPIENTRY +_mesa_FlushMappedNamedBufferRangeEXT(GLuint buffer, GLintptr offset, + GLsizeiptr length) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_buffer_object *bufObj; + + if (!buffer) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glFlushMappedNamedBufferRangeEXT(buffer=0)"); + return; + } + + bufObj = _mesa_lookup_bufferobj(ctx, buffer); + if (!_mesa_handle_bind_buffer_gen(ctx, buffer, + &bufObj, "glFlushMappedNamedBufferRangeEXT")) + return; + + flush_mapped_buffer_range(ctx, bufObj, offset, length, + "glFlushMappedNamedBufferRangeEXT"); +} + static void bind_buffer_range_uniform_buffer(struct gl_context *ctx, GLuint index, struct gl_buffer_object *bufObj, @@ -4684,3 +4954,23 @@ _mesa_NamedBufferPageCommitmentARB(GLuint buffer, GLintptr offset, buffer_page_commitment(ctx, bufferObj, offset, size, commit, "glNamedBufferPageCommitmentARB"); } + +void GLAPIENTRY +_mesa_NamedBufferPageCommitmentEXT(GLuint buffer, GLintptr offset, + GLsizeiptr size, GLboolean commit) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_buffer_object *bufferObj; + + /* Use NamedBuffer* functions logic from EXT_direct_state_access */ + if (buffer != 0) { + bufferObj = _mesa_lookup_bufferobj(ctx, buffer); + if (!_mesa_handle_bind_buffer_gen(ctx, buffer, &bufferObj, + "glNamedBufferPageCommitmentEXT")) + return; + } else { + bufferObj = ctx->Shared->NullBufferObj; + } + buffer_page_commitment(ctx, bufferObj, offset, size, commit, + "glNamedBufferPageCommitmentEXT"); +}