Lines Matching refs:bufObj
212 struct gl_buffer_object **bufObj = get_buffer_target(ctx, target); in get_buffer() local
214 if (!bufObj) { in get_buffer()
219 if (!*bufObj) { in get_buffer()
224 return *bufObj; in get_buffer()
315 const struct gl_buffer_object *bufObj, in buffer_object_subdata_range_good() argument
329 if (offset + size > bufObj->Size) { in buffer_object_subdata_range_good()
334 (unsigned long) bufObj->Size); in buffer_object_subdata_range_good()
338 if (bufObj->Mappings[MAP_USER].AccessFlags & GL_MAP_PERSISTENT_BIT) in buffer_object_subdata_range_good()
342 if (bufferobj_range_mapped(bufObj, offset, size)) { in buffer_object_subdata_range_good()
350 if (_mesa_bufferobj_mapped(bufObj, MAP_USER)) { in buffer_object_subdata_range_good()
480 struct gl_buffer_object *bufObj) in _mesa_delete_buffer_object() argument
484 vbo_delete_minmax_cache(bufObj); in _mesa_delete_buffer_object()
485 align_free(bufObj->Data); in _mesa_delete_buffer_object()
488 bufObj->RefCount = -1000; in _mesa_delete_buffer_object()
489 bufObj->Name = ~0; in _mesa_delete_buffer_object()
491 simple_mtx_destroy(&bufObj->MinMaxCacheMutex); in _mesa_delete_buffer_object()
492 free(bufObj->Label); in _mesa_delete_buffer_object()
493 free(bufObj); in _mesa_delete_buffer_object()
506 struct gl_buffer_object *bufObj) in _mesa_reference_buffer_object_() argument
521 if (bufObj) { in _mesa_reference_buffer_object_()
523 p_atomic_inc(&bufObj->RefCount); in _mesa_reference_buffer_object_()
524 *ptr = bufObj; in _mesa_reference_buffer_object_()
573 const struct gl_buffer_object *bufObj = in count_buffer_size() local
577 *total = *total + bufObj->Size; in count_buffer_size()
618 struct gl_buffer_object *bufObj) in buffer_data_fallback() argument
624 align_free( bufObj->Data ); in buffer_data_fallback()
628 bufObj->Data = (GLubyte *) new_data; in buffer_data_fallback()
629 bufObj->Size = size; in buffer_data_fallback()
630 bufObj->Usage = usage; in buffer_data_fallback()
631 bufObj->StorageFlags = storageFlags; in buffer_data_fallback()
634 memcpy( bufObj->Data, data, size ); in buffer_data_fallback()
664 struct gl_buffer_object *bufObj) in buffer_sub_data_fallback() argument
669 assert(size + offset <= bufObj->Size); in buffer_sub_data_fallback()
671 if (bufObj->Data) { in buffer_sub_data_fallback()
672 memcpy( (GLubyte *) bufObj->Data + offset, data, size ); in buffer_sub_data_fallback()
697 struct gl_buffer_object *bufObj ) in buffer_get_subdata() argument
701 if (bufObj->Data && ((GLsizeiptrARB) (size + offset) <= bufObj->Size)) { in buffer_get_subdata()
702 memcpy( data, (GLubyte *) bufObj->Data + offset, size ); in buffer_get_subdata()
729 struct gl_buffer_object *bufObj) in _mesa_ClearBufferSubData_sw() argument
738 bufObj, MAP_INTERNAL); in _mesa_ClearBufferSubData_sw()
748 ctx->Driver.UnmapBuffer(ctx, bufObj, MAP_INTERNAL); in _mesa_ClearBufferSubData_sw()
757 ctx->Driver.UnmapBuffer(ctx, bufObj, MAP_INTERNAL); in _mesa_ClearBufferSubData_sw()
768 struct gl_buffer_object *bufObj, in map_buffer_range_fallback() argument
772 assert(!_mesa_bufferobj_mapped(bufObj, index)); in map_buffer_range_fallback()
774 bufObj->Mappings[index].Pointer = bufObj->Data + offset; in map_buffer_range_fallback()
775 bufObj->Mappings[index].Length = length; in map_buffer_range_fallback()
776 bufObj->Mappings[index].Offset = offset; in map_buffer_range_fallback()
777 bufObj->Mappings[index].AccessFlags = access; in map_buffer_range_fallback()
778 return bufObj->Mappings[index].Pointer; in map_buffer_range_fallback()
809 unmap_buffer_fallback(struct gl_context *ctx, struct gl_buffer_object *bufObj, in unmap_buffer_fallback() argument
814 bufObj->Mappings[index].Pointer = NULL; in unmap_buffer_fallback()
815 bufObj->Mappings[index].Length = 0; in unmap_buffer_fallback()
816 bufObj->Mappings[index].Offset = 0; in unmap_buffer_fallback()
817 bufObj->Mappings[index].AccessFlags = 0x0; in unmap_buffer_fallback()
1069 struct gl_buffer_object *bufObj; in _mesa_lookup_bufferobj_err() local
1071 bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_lookup_bufferobj_err()
1072 if (!bufObj || bufObj == &DummyBufferObject) { in _mesa_lookup_bufferobj_err()
1078 return bufObj; in _mesa_lookup_bufferobj_err()
1104 struct gl_buffer_object *bufObj = NULL; in _mesa_multi_bind_lookup_bufferobj() local
1109 bufObj = _mesa_lookup_bufferobj_locked(ctx, buffers[index]); in _mesa_multi_bind_lookup_bufferobj()
1113 if (bufObj == &DummyBufferObject) in _mesa_multi_bind_lookup_bufferobj()
1114 bufObj = NULL; in _mesa_multi_bind_lookup_bufferobj()
1116 if (!bufObj) { in _mesa_multi_bind_lookup_bufferobj()
1131 return bufObj; in _mesa_multi_bind_lookup_bufferobj()
1183 struct gl_buffer_object *bufObj) in _mesa_buffer_unmap_all_mappings() argument
1186 if (_mesa_bufferobj_mapped(bufObj, i)) { in _mesa_buffer_unmap_all_mappings()
1187 ctx->Driver.UnmapBuffer(ctx, bufObj, i); in _mesa_buffer_unmap_all_mappings()
1188 assert(bufObj->Mappings[i].Pointer == NULL); in _mesa_buffer_unmap_all_mappings()
1189 bufObj->Mappings[i].AccessFlags = 0; in _mesa_buffer_unmap_all_mappings()
1251 struct gl_buffer_object *bufObj, in set_buffer_binding() argument
1256 _mesa_reference_buffer_object(ctx, &binding->BufferObject, bufObj); in set_buffer_binding()
1266 bufObj->UsageHistory |= usage; in set_buffer_binding()
1280 struct gl_buffer_object *bufObj; in set_buffer_multi_binding() local
1283 bufObj = binding->BufferObject; in set_buffer_multi_binding()
1286 bufObj = _mesa_multi_bind_lookup_bufferobj(ctx, buffers, idx, caller, in set_buffer_multi_binding()
1292 if (!bufObj) in set_buffer_multi_binding()
1293 set_buffer_binding(ctx, binding, bufObj, -1, -1, !range, usage); in set_buffer_multi_binding()
1295 set_buffer_binding(ctx, binding, bufObj, offset, size, !range, usage); in set_buffer_multi_binding()
1301 struct gl_buffer_object *bufObj, in bind_buffer() argument
1308 if (binding->BufferObject == bufObj && in bind_buffer()
1318 set_buffer_binding(ctx, binding, bufObj, offset, size, autoSize, usage); in bind_buffer()
1331 struct gl_buffer_object *bufObj, in bind_uniform_buffer() argument
1337 bufObj, offset, size, autoSize, in bind_uniform_buffer()
1352 struct gl_buffer_object *bufObj, in bind_shader_storage_buffer() argument
1358 bufObj, offset, size, autoSize, in bind_shader_storage_buffer()
1372 struct gl_buffer_object *bufObj, GLintptr offset, in bind_atomic_buffer() argument
1376 bufObj, offset, size, autoSize, in bind_atomic_buffer()
1388 struct gl_buffer_object *bufObj) in bind_buffer_base_uniform_buffer() argument
1395 _mesa_reference_buffer_object(ctx, &ctx->UniformBuffer, bufObj); in bind_buffer_base_uniform_buffer()
1397 if (!bufObj) in bind_buffer_base_uniform_buffer()
1398 bind_uniform_buffer(ctx, index, bufObj, -1, -1, GL_TRUE); in bind_buffer_base_uniform_buffer()
1400 bind_uniform_buffer(ctx, index, bufObj, 0, 0, GL_TRUE); in bind_buffer_base_uniform_buffer()
1410 struct gl_buffer_object *bufObj) in bind_buffer_base_shader_storage_buffer() argument
1417 _mesa_reference_buffer_object(ctx, &ctx->ShaderStorageBuffer, bufObj); in bind_buffer_base_shader_storage_buffer()
1419 if (!bufObj) in bind_buffer_base_shader_storage_buffer()
1420 bind_shader_storage_buffer(ctx, index, bufObj, -1, -1, GL_TRUE); in bind_buffer_base_shader_storage_buffer()
1422 bind_shader_storage_buffer(ctx, index, bufObj, 0, 0, GL_TRUE); in bind_buffer_base_shader_storage_buffer()
1432 struct gl_buffer_object *bufObj) in bind_buffer_base_atomic_buffer() argument
1439 _mesa_reference_buffer_object(ctx, &ctx->AtomicBuffer, bufObj); in bind_buffer_base_atomic_buffer()
1441 if (!bufObj) in bind_buffer_base_atomic_buffer()
1442 bind_atomic_buffer(ctx, index, bufObj, -1, -1, GL_TRUE); in bind_buffer_base_atomic_buffer()
1444 bind_atomic_buffer(ctx, index, bufObj, 0, 0, GL_TRUE); in bind_buffer_base_atomic_buffer()
1461 struct gl_buffer_object *bufObj = in delete_buffers() local
1463 if (bufObj) { in delete_buffers()
1467 assert(bufObj->Name == ids[i] || bufObj == &DummyBufferObject); in delete_buffers()
1469 _mesa_buffer_unmap_all_mappings(ctx, bufObj); in delete_buffers()
1473 unbind(ctx, vao, j, bufObj); in delete_buffers()
1476 if (ctx->Array.ArrayBufferObj == bufObj) { in delete_buffers()
1479 if (vao->IndexBufferObj == bufObj) { in delete_buffers()
1484 if (ctx->DrawIndirectBuffer == bufObj) { in delete_buffers()
1489 if (ctx->ParameterBuffer == bufObj) { in delete_buffers()
1494 if (ctx->DispatchIndirectBuffer == bufObj) { in delete_buffers()
1499 if (ctx->CopyReadBuffer == bufObj) { in delete_buffers()
1502 if (ctx->CopyWriteBuffer == bufObj) { in delete_buffers()
1507 if (ctx->TransformFeedback.CurrentBuffer == bufObj) { in delete_buffers()
1511 if (ctx->TransformFeedback.CurrentObject->Buffers[j] == bufObj) { in delete_buffers()
1520 if (ctx->UniformBufferBindings[j].BufferObject == bufObj) { in delete_buffers()
1525 if (ctx->UniformBuffer == bufObj) { in delete_buffers()
1531 if (ctx->ShaderStorageBufferBindings[j].BufferObject == bufObj) { in delete_buffers()
1536 if (ctx->ShaderStorageBuffer == bufObj) { in delete_buffers()
1542 if (ctx->AtomicBufferBindings[j].BufferObject == bufObj) { in delete_buffers()
1547 if (ctx->AtomicBuffer == bufObj) { in delete_buffers()
1552 if (ctx->Pack.BufferObj == bufObj) { in delete_buffers()
1555 if (ctx->Unpack.BufferObj == bufObj) { in delete_buffers()
1559 if (ctx->Texture.BufferObject == bufObj) { in delete_buffers()
1563 if (ctx->ExternalVirtualMemoryBuffer == bufObj) { in delete_buffers()
1568 if (ctx->QueryBuffer == bufObj) { in delete_buffers()
1584 bufObj->DeletePending = GL_TRUE; in delete_buffers()
1585 _mesa_reference_buffer_object(ctx, &bufObj, NULL); in delete_buffers()
1728 struct gl_buffer_object *bufObj; in _mesa_IsBuffer() local
1732 bufObj = _mesa_lookup_bufferobj(ctx, id); in _mesa_IsBuffer()
1734 return bufObj && bufObj != &DummyBufferObject; in _mesa_IsBuffer()
1740 struct gl_buffer_object *bufObj, GLsizeiptr size, in validate_buffer_storage() argument
1788 if (bufObj->Immutable || bufObj->HandleAllocated) { in validate_buffer_storage()
1798 buffer_storage(struct gl_context *ctx, struct gl_buffer_object *bufObj, in buffer_storage() argument
1806 _mesa_buffer_unmap_all_mappings(ctx, bufObj); in buffer_storage()
1810 bufObj->Written = GL_TRUE; in buffer_storage()
1811 bufObj->Immutable = GL_TRUE; in buffer_storage()
1812 bufObj->MinMaxCacheDirty = true; in buffer_storage()
1817 GL_DYNAMIC_DRAW, bufObj); in buffer_storage()
1822 flags, bufObj); in buffer_storage()
1847 struct gl_buffer_object *bufObj; in inlined_buffer_storage() local
1885 bufObj = _mesa_lookup_bufferobj(ctx, buffer); in inlined_buffer_storage()
1887 bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, func); in inlined_buffer_storage()
1888 if (!bufObj) in inlined_buffer_storage()
1894 bufObj = *bufObjPtr; in inlined_buffer_storage()
1896 bufObj = get_buffer(ctx, func, target, GL_INVALID_OPERATION); in inlined_buffer_storage()
1897 if (!bufObj) in inlined_buffer_storage()
1902 if (no_error || validate_buffer_storage(ctx, bufObj, size, flags, func)) in inlined_buffer_storage()
1903 buffer_storage(ctx, bufObj, memObj, target, size, data, flags, offset, func); in inlined_buffer_storage()
1930 struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_NamedBufferStorageEXT() local
1932 &bufObj, "glNamedBufferStorageEXT")) in _mesa_NamedBufferStorageEXT()
2000 buffer_data(struct gl_context *ctx, struct gl_buffer_object *bufObj, in buffer_data() argument
2047 if (bufObj->Immutable || bufObj->HandleAllocated) { in buffer_data()
2054 _mesa_buffer_unmap_all_mappings(ctx, bufObj); in buffer_data()
2058 bufObj->Written = GL_TRUE; in buffer_data()
2059 bufObj->MinMaxCacheDirty = true; in buffer_data()
2063 bufObj->Name, size, data, usage); in buffer_data()
2075 bufObj)) { in buffer_data()
2093 buffer_data_error(struct gl_context *ctx, struct gl_buffer_object *bufObj, in buffer_data_error() argument
2097 buffer_data(ctx, bufObj, target, size, data, usage, func, false); in buffer_data_error()
2101 buffer_data_no_error(struct gl_context *ctx, struct gl_buffer_object *bufObj, in buffer_data_no_error() argument
2105 buffer_data(ctx, bufObj, target, size, data, usage, func, true); in buffer_data_no_error()
2109 _mesa_buffer_data(struct gl_context *ctx, struct gl_buffer_object *bufObj, in _mesa_buffer_data() argument
2113 buffer_data_error(ctx, bufObj, target, size, data, usage, func); in _mesa_buffer_data()
2122 struct gl_buffer_object **bufObj = get_buffer_target(ctx, target); in _mesa_BufferData_no_error() local
2123 buffer_data_no_error(ctx, *bufObj, target, size, data, usage, in _mesa_BufferData_no_error()
2132 struct gl_buffer_object *bufObj; in _mesa_BufferData() local
2134 bufObj = get_buffer(ctx, "glBufferData", target, GL_INVALID_OPERATION); in _mesa_BufferData()
2135 if (!bufObj) in _mesa_BufferData()
2138 _mesa_buffer_data(ctx, bufObj, target, size, data, usage, in _mesa_BufferData()
2148 struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_NamedBufferData_no_error() local
2149 buffer_data_no_error(ctx, bufObj, GL_NONE, size, data, usage, in _mesa_NamedBufferData_no_error()
2158 struct gl_buffer_object *bufObj; in _mesa_NamedBufferData() local
2160 bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glNamedBufferData"); in _mesa_NamedBufferData()
2161 if (!bufObj) in _mesa_NamedBufferData()
2167 _mesa_buffer_data(ctx, bufObj, GL_NONE, size, data, usage, in _mesa_NamedBufferData()
2176 struct gl_buffer_object *bufObj; in _mesa_NamedBufferDataEXT() local
2184 bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_NamedBufferDataEXT()
2186 &bufObj, "glNamedBufferDataEXT")) in _mesa_NamedBufferDataEXT()
2189 _mesa_buffer_data(ctx, bufObj, GL_NONE, size, data, usage, in _mesa_NamedBufferDataEXT()
2195 struct gl_buffer_object *bufObj, in validate_buffer_sub_data() argument
2199 if (!buffer_object_subdata_range_good(ctx, bufObj, offset, size, in validate_buffer_sub_data()
2205 if (bufObj->Immutable && in validate_buffer_sub_data()
2206 !(bufObj->StorageFlags & GL_DYNAMIC_STORAGE_BIT)) { in validate_buffer_sub_data()
2211 if ((bufObj->Usage == GL_STATIC_DRAW || in validate_buffer_sub_data()
2212 bufObj->Usage == GL_STATIC_COPY) && in validate_buffer_sub_data()
2213 bufObj->NumSubDataCalls >= BUFFER_WARNING_CALL_COUNT - 1) { in validate_buffer_sub_data()
2220 func, bufObj->Name, offset, size, in validate_buffer_sub_data()
2221 _mesa_enum_to_string(bufObj->Usage)); in validate_buffer_sub_data()
2240 _mesa_buffer_sub_data(struct gl_context *ctx, struct gl_buffer_object *bufObj, in _mesa_buffer_sub_data() argument
2246 bufObj->NumSubDataCalls++; in _mesa_buffer_sub_data()
2247 bufObj->Written = GL_TRUE; in _mesa_buffer_sub_data()
2248 bufObj->MinMaxCacheDirty = true; in _mesa_buffer_sub_data()
2251 ctx->Driver.BufferSubData(ctx, offset, size, data, bufObj); in _mesa_buffer_sub_data()
2261 struct gl_buffer_object *bufObj; in buffer_sub_data() local
2265 bufObj = _mesa_lookup_bufferobj(ctx, buffer); in buffer_sub_data()
2267 bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, func); in buffer_sub_data()
2268 if (!bufObj) in buffer_sub_data()
2274 bufObj = *bufObjPtr; in buffer_sub_data()
2276 bufObj = get_buffer(ctx, func, target, GL_INVALID_OPERATION); in buffer_sub_data()
2277 if (!bufObj) in buffer_sub_data()
2282 if (no_error || validate_buffer_sub_data(ctx, bufObj, offset, size, func)) in buffer_sub_data()
2283 _mesa_buffer_sub_data(ctx, bufObj, offset, size, data); in buffer_sub_data()
2325 struct gl_buffer_object *bufObj; in _mesa_NamedBufferSubDataEXT() local
2333 bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_NamedBufferSubDataEXT()
2335 &bufObj, "glNamedBufferSubDataEXT")) in _mesa_NamedBufferSubDataEXT()
2338 if (validate_buffer_sub_data(ctx, bufObj, offset, size, in _mesa_NamedBufferSubDataEXT()
2340 _mesa_buffer_sub_data(ctx, bufObj, offset, size, data); in _mesa_NamedBufferSubDataEXT()
2350 struct gl_buffer_object *bufObj; in _mesa_GetBufferSubData() local
2352 bufObj = get_buffer(ctx, "glGetBufferSubData", target, in _mesa_GetBufferSubData()
2354 if (!bufObj) in _mesa_GetBufferSubData()
2357 if (!buffer_object_subdata_range_good(ctx, bufObj, offset, size, false, in _mesa_GetBufferSubData()
2363 ctx->Driver.GetBufferSubData(ctx, offset, size, data, bufObj); in _mesa_GetBufferSubData()
2371 struct gl_buffer_object *bufObj; in _mesa_GetNamedBufferSubData() local
2373 bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, in _mesa_GetNamedBufferSubData()
2375 if (!bufObj) in _mesa_GetNamedBufferSubData()
2378 if (!buffer_object_subdata_range_good(ctx, bufObj, offset, size, false, in _mesa_GetNamedBufferSubData()
2384 ctx->Driver.GetBufferSubData(ctx, offset, size, data, bufObj); in _mesa_GetNamedBufferSubData()
2393 struct gl_buffer_object *bufObj; in _mesa_GetNamedBufferSubDataEXT() local
2401 bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_GetNamedBufferSubDataEXT()
2403 &bufObj, "glGetNamedBufferSubDataEXT")) in _mesa_GetNamedBufferSubDataEXT()
2406 if (!buffer_object_subdata_range_good(ctx, bufObj, offset, size, false, in _mesa_GetNamedBufferSubDataEXT()
2412 ctx->Driver.GetBufferSubData(ctx, offset, size, data, bufObj); in _mesa_GetNamedBufferSubDataEXT()
2419 clear_buffer_sub_data(struct gl_context *ctx, struct gl_buffer_object *bufObj, in clear_buffer_sub_data() argument
2429 if (!no_error && !buffer_object_subdata_range_good(ctx, bufObj, offset, size, in clear_buffer_sub_data()
2457 bufObj->MinMaxCacheDirty = true; in clear_buffer_sub_data()
2462 NULL, clearValueSize, bufObj); in clear_buffer_sub_data()
2472 clearValue, clearValueSize, bufObj); in clear_buffer_sub_data()
2477 struct gl_buffer_object *bufObj, in clear_buffer_sub_data_error() argument
2482 clear_buffer_sub_data(ctx, bufObj, internalformat, offset, size, format, in clear_buffer_sub_data_error()
2489 struct gl_buffer_object *bufObj, in clear_buffer_sub_data_no_error() argument
2495 clear_buffer_sub_data(ctx, bufObj, internalformat, offset, size, format, in clear_buffer_sub_data_no_error()
2506 struct gl_buffer_object **bufObj = get_buffer_target(ctx, target); in _mesa_ClearBufferData_no_error() local
2507 clear_buffer_sub_data_no_error(ctx, *bufObj, internalformat, 0, in _mesa_ClearBufferData_no_error()
2508 (*bufObj)->Size, format, type, data, in _mesa_ClearBufferData_no_error()
2518 struct gl_buffer_object *bufObj; in _mesa_ClearBufferData() local
2520 bufObj = get_buffer(ctx, "glClearBufferData", target, GL_INVALID_VALUE); in _mesa_ClearBufferData()
2521 if (!bufObj) in _mesa_ClearBufferData()
2524 clear_buffer_sub_data_error(ctx, bufObj, internalformat, 0, bufObj->Size, in _mesa_ClearBufferData()
2536 struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_ClearNamedBufferData_no_error() local
2537 clear_buffer_sub_data_no_error(ctx, bufObj, internalformat, 0, bufObj->Size, in _mesa_ClearNamedBufferData_no_error()
2548 struct gl_buffer_object *bufObj; in _mesa_ClearNamedBufferData() local
2550 bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glClearNamedBufferData"); in _mesa_ClearNamedBufferData()
2551 if (!bufObj) in _mesa_ClearNamedBufferData()
2554 clear_buffer_sub_data_error(ctx, bufObj, internalformat, 0, bufObj->Size, in _mesa_ClearNamedBufferData()
2565 struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_ClearNamedBufferDataEXT() local
2567 &bufObj, "glClearNamedBufferDataEXT")) in _mesa_ClearNamedBufferDataEXT()
2570 clear_buffer_sub_data_error(ctx, bufObj, internalformat, 0, bufObj->Size, in _mesa_ClearNamedBufferDataEXT()
2584 struct gl_buffer_object **bufObj = get_buffer_target(ctx, target); in _mesa_ClearBufferSubData_no_error() local
2585 clear_buffer_sub_data_no_error(ctx, *bufObj, internalformat, offset, size, in _mesa_ClearBufferSubData_no_error()
2598 struct gl_buffer_object *bufObj; in _mesa_ClearBufferSubData() local
2600 bufObj = get_buffer(ctx, "glClearBufferSubData", target, GL_INVALID_VALUE); in _mesa_ClearBufferSubData()
2601 if (!bufObj) in _mesa_ClearBufferSubData()
2604 clear_buffer_sub_data_error(ctx, bufObj, internalformat, offset, size, in _mesa_ClearBufferSubData()
2618 struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_ClearNamedBufferSubData_no_error() local
2619 clear_buffer_sub_data_no_error(ctx, bufObj, internalformat, offset, size, in _mesa_ClearNamedBufferSubData_no_error()
2632 struct gl_buffer_object *bufObj; in _mesa_ClearNamedBufferSubData() local
2634 bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, in _mesa_ClearNamedBufferSubData()
2636 if (!bufObj) in _mesa_ClearNamedBufferSubData()
2639 clear_buffer_sub_data_error(ctx, bufObj, internalformat, offset, size, in _mesa_ClearNamedBufferSubData()
2651 struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_ClearNamedBufferSubDataEXT() local
2653 &bufObj, "glClearNamedBufferSubDataEXT")) in _mesa_ClearNamedBufferSubDataEXT()
2656 clear_buffer_sub_data_error(ctx, bufObj, internalformat, offset, size, in _mesa_ClearNamedBufferSubDataEXT()
2662 unmap_buffer(struct gl_context *ctx, struct gl_buffer_object *bufObj) in unmap_buffer() argument
2664 GLboolean status = ctx->Driver.UnmapBuffer(ctx, bufObj, MAP_USER); in unmap_buffer()
2665 bufObj->Mappings[MAP_USER].AccessFlags = 0; in unmap_buffer()
2666 assert(bufObj->Mappings[MAP_USER].Pointer == NULL); in unmap_buffer()
2667 assert(bufObj->Mappings[MAP_USER].Offset == 0); in unmap_buffer()
2668 assert(bufObj->Mappings[MAP_USER].Length == 0); in unmap_buffer()
2675 struct gl_buffer_object *bufObj, in validate_and_unmap_buffer() argument
2680 if (!_mesa_bufferobj_mapped(bufObj, MAP_USER)) { in validate_and_unmap_buffer()
2687 if (bufObj->Access != GL_READ_ONLY_ARB) { in validate_and_unmap_buffer()
2688 GLubyte *buf = (GLubyte *) bufObj->Pointer; in validate_and_unmap_buffer()
2692 GLuint pos = bufObj->Size - i - 1; in validate_and_unmap_buffer()
2703 if (bufObj->AccessFlags & GL_MAP_WRITE_BIT) { in validate_and_unmap_buffer()
2705 GLubyte *b = (GLubyte *) bufObj->Pointer; in validate_and_unmap_buffer()
2708 for (i = 0; i < bufObj->Size - 1; i++) { in validate_and_unmap_buffer()
2717 bufObj->Name, unchanged, bufObj->Size, pos); in validate_and_unmap_buffer()
2722 return unmap_buffer(ctx, bufObj); in validate_and_unmap_buffer()
2730 struct gl_buffer_object *bufObj = *bufObjPtr; in _mesa_UnmapBuffer_no_error() local
2732 return unmap_buffer(ctx, bufObj); in _mesa_UnmapBuffer_no_error()
2739 struct gl_buffer_object *bufObj; in _mesa_UnmapBuffer() local
2741 bufObj = get_buffer(ctx, "glUnmapBuffer", target, GL_INVALID_OPERATION); in _mesa_UnmapBuffer()
2742 if (!bufObj) in _mesa_UnmapBuffer()
2745 return validate_and_unmap_buffer(ctx, bufObj, "glUnmapBuffer"); in _mesa_UnmapBuffer()
2752 struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_UnmapNamedBufferEXT_no_error() local
2754 return unmap_buffer(ctx, bufObj); in _mesa_UnmapNamedBufferEXT_no_error()
2761 struct gl_buffer_object *bufObj; in _mesa_UnmapNamedBufferEXT() local
2769 bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glUnmapNamedBuffer"); in _mesa_UnmapNamedBufferEXT()
2770 if (!bufObj) in _mesa_UnmapNamedBufferEXT()
2773 return validate_and_unmap_buffer(ctx, bufObj, "glUnmapNamedBuffer"); in _mesa_UnmapNamedBufferEXT()
2779 struct gl_buffer_object *bufObj, GLenum pname, in get_buffer_parameter() argument
2784 *params = bufObj->Size; in get_buffer_parameter()
2787 *params = bufObj->Usage; in get_buffer_parameter()
2791 bufObj->Mappings[MAP_USER].AccessFlags); in get_buffer_parameter()
2794 *params = _mesa_bufferobj_mapped(bufObj, MAP_USER); in get_buffer_parameter()
2799 *params = bufObj->Mappings[MAP_USER].AccessFlags; in get_buffer_parameter()
2804 *params = bufObj->Mappings[MAP_USER].Offset; in get_buffer_parameter()
2809 *params = bufObj->Mappings[MAP_USER].Length; in get_buffer_parameter()
2814 *params = bufObj->Immutable; in get_buffer_parameter()
2819 *params = bufObj->StorageFlags; in get_buffer_parameter()
2837 struct gl_buffer_object *bufObj; in _mesa_GetBufferParameteriv() local
2840 bufObj = get_buffer(ctx, "glGetBufferParameteriv", target, in _mesa_GetBufferParameteriv()
2842 if (!bufObj) in _mesa_GetBufferParameteriv()
2845 if (!get_buffer_parameter(ctx, bufObj, pname, ¶meter, in _mesa_GetBufferParameteriv()
2856 struct gl_buffer_object *bufObj; in _mesa_GetBufferParameteri64v() local
2859 bufObj = get_buffer(ctx, "glGetBufferParameteri64v", target, in _mesa_GetBufferParameteri64v()
2861 if (!bufObj) in _mesa_GetBufferParameteri64v()
2864 if (!get_buffer_parameter(ctx, bufObj, pname, ¶meter, in _mesa_GetBufferParameteri64v()
2875 struct gl_buffer_object *bufObj; in _mesa_GetNamedBufferParameteriv() local
2878 bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, in _mesa_GetNamedBufferParameteriv()
2880 if (!bufObj) in _mesa_GetNamedBufferParameteriv()
2883 if (!get_buffer_parameter(ctx, bufObj, pname, ¶meter, in _mesa_GetNamedBufferParameteriv()
2894 struct gl_buffer_object *bufObj; in _mesa_GetNamedBufferParameterivEXT() local
2903 bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_GetNamedBufferParameterivEXT()
2905 &bufObj, "glGetNamedBufferParameterivEXT")) in _mesa_GetNamedBufferParameterivEXT()
2908 if (!get_buffer_parameter(ctx, bufObj, pname, ¶meter, in _mesa_GetNamedBufferParameterivEXT()
2920 struct gl_buffer_object *bufObj; in _mesa_GetNamedBufferParameteri64v() local
2923 bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, in _mesa_GetNamedBufferParameteri64v()
2925 if (!bufObj) in _mesa_GetNamedBufferParameteri64v()
2928 if (!get_buffer_parameter(ctx, bufObj, pname, ¶meter, in _mesa_GetNamedBufferParameteri64v()
2940 struct gl_buffer_object *bufObj; in _mesa_GetBufferPointerv() local
2948 bufObj = get_buffer(ctx, "glGetBufferPointerv", target, in _mesa_GetBufferPointerv()
2950 if (!bufObj) in _mesa_GetBufferPointerv()
2953 *params = bufObj->Mappings[MAP_USER].Pointer; in _mesa_GetBufferPointerv()
2960 struct gl_buffer_object *bufObj; in _mesa_GetNamedBufferPointerv() local
2968 bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, in _mesa_GetNamedBufferPointerv()
2970 if (!bufObj) in _mesa_GetNamedBufferPointerv()
2973 *params = bufObj->Mappings[MAP_USER].Pointer; in _mesa_GetNamedBufferPointerv()
2980 struct gl_buffer_object *bufObj; in _mesa_GetNamedBufferPointervEXT() local
2993 bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_GetNamedBufferPointervEXT()
2995 &bufObj, "glGetNamedBufferPointervEXT")) in _mesa_GetNamedBufferPointervEXT()
2998 *params = bufObj->Mappings[MAP_USER].Pointer; in _mesa_GetNamedBufferPointervEXT()
3214 struct gl_buffer_object *bufObj, GLintptr offset, in validate_map_buffer_range() argument
3292 !(bufObj->StorageFlags & GL_MAP_READ_BIT)) { in validate_map_buffer_range()
3299 !(bufObj->StorageFlags & GL_MAP_WRITE_BIT)) { in validate_map_buffer_range()
3306 !(bufObj->StorageFlags & GL_MAP_COHERENT_BIT)) { in validate_map_buffer_range()
3313 !(bufObj->StorageFlags & GL_MAP_PERSISTENT_BIT)) { in validate_map_buffer_range()
3319 if (offset + length > bufObj->Size) { in validate_map_buffer_range()
3323 (unsigned long) bufObj->Size); in validate_map_buffer_range()
3327 if (_mesa_bufferobj_mapped(bufObj, MAP_USER)) { in validate_map_buffer_range()
3334 bufObj->NumMapBufferWriteCalls++; in validate_map_buffer_range()
3335 if ((bufObj->Usage == GL_STATIC_DRAW || in validate_map_buffer_range()
3336 bufObj->Usage == GL_STATIC_COPY) && in validate_map_buffer_range()
3337 bufObj->NumMapBufferWriteCalls >= BUFFER_WARNING_CALL_COUNT) { in validate_map_buffer_range()
3341 func, bufObj->Name, offset, length, in validate_map_buffer_range()
3342 _mesa_enum_to_string(bufObj->Usage)); in validate_map_buffer_range()
3350 map_buffer_range(struct gl_context *ctx, struct gl_buffer_object *bufObj, in map_buffer_range() argument
3354 if (!bufObj->Size) { in map_buffer_range()
3360 void *map = ctx->Driver.MapBufferRange(ctx, offset, length, access, bufObj, in map_buffer_range()
3370 assert(bufObj->Mappings[MAP_USER].Pointer == map); in map_buffer_range()
3371 assert(bufObj->Mappings[MAP_USER].Length == length); in map_buffer_range()
3372 assert(bufObj->Mappings[MAP_USER].Offset == offset); in map_buffer_range()
3373 assert(bufObj->Mappings[MAP_USER].AccessFlags == access); in map_buffer_range()
3377 bufObj->Written = GL_TRUE; in map_buffer_range()
3378 bufObj->MinMaxCacheDirty = true; in map_buffer_range()
3384 bufObj->Name, bufObj->Size, access); in map_buffer_range()
3388 GLubyte *b = (GLubyte *) bufObj->Pointer; in map_buffer_range()
3389 for (i = 0; i < bufObj->Size; i++) in map_buffer_range()
3397 GLubyte *buf = (GLubyte *) bufObj->Pointer; in map_buffer_range()
3401 buf[bufObj->Size - i - 1] = 123; in map_buffer_range()
3416 struct gl_buffer_object *bufObj = *bufObjPtr; in _mesa_MapBufferRange_no_error() local
3418 return map_buffer_range(ctx, bufObj, offset, length, access, in _mesa_MapBufferRange_no_error()
3427 struct gl_buffer_object *bufObj; in _mesa_MapBufferRange() local
3435 bufObj = get_buffer(ctx, "glMapBufferRange", target, GL_INVALID_OPERATION); in _mesa_MapBufferRange()
3436 if (!bufObj) in _mesa_MapBufferRange()
3439 if (!validate_map_buffer_range(ctx, bufObj, offset, length, access, in _mesa_MapBufferRange()
3443 return map_buffer_range(ctx, bufObj, offset, length, access, in _mesa_MapBufferRange()
3452 struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_MapNamedBufferRange_no_error() local
3454 return map_buffer_range(ctx, bufObj, offset, length, access, in _mesa_MapNamedBufferRange_no_error()
3463 struct gl_buffer_object *bufObj = NULL; in map_named_buffer_range() local
3472 bufObj = _mesa_lookup_bufferobj(ctx, buffer); in map_named_buffer_range()
3473 if (!_mesa_handle_bind_buffer_gen(ctx, buffer, &bufObj, func)) in map_named_buffer_range()
3476 bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, func); in map_named_buffer_range()
3477 if (!bufObj) in map_named_buffer_range()
3481 if (!validate_map_buffer_range(ctx, bufObj, offset, length, access, func)) in map_named_buffer_range()
3484 return map_buffer_range(ctx, bufObj, offset, length, access, func); in map_named_buffer_range()
3544 struct gl_buffer_object *bufObj = *bufObjPtr; in _mesa_MapBuffer_no_error() local
3546 return map_buffer_range(ctx, bufObj, 0, bufObj->Size, accessFlags, in _mesa_MapBuffer_no_error()
3554 struct gl_buffer_object *bufObj; in _mesa_MapBuffer() local
3562 bufObj = get_buffer(ctx, "glMapBuffer", target, GL_INVALID_OPERATION); in _mesa_MapBuffer()
3563 if (!bufObj) in _mesa_MapBuffer()
3566 if (!validate_map_buffer_range(ctx, bufObj, 0, bufObj->Size, accessFlags, in _mesa_MapBuffer()
3570 return map_buffer_range(ctx, bufObj, 0, bufObj->Size, accessFlags, in _mesa_MapBuffer()
3582 struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_MapNamedBuffer_no_error() local
3584 return map_buffer_range(ctx, bufObj, 0, bufObj->Size, accessFlags, in _mesa_MapNamedBuffer_no_error()
3592 struct gl_buffer_object *bufObj; in _mesa_MapNamedBuffer() local
3600 bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glMapNamedBuffer"); in _mesa_MapNamedBuffer()
3601 if (!bufObj) in _mesa_MapNamedBuffer()
3604 if (!validate_map_buffer_range(ctx, bufObj, 0, bufObj->Size, accessFlags, in _mesa_MapNamedBuffer()
3608 return map_buffer_range(ctx, bufObj, 0, bufObj->Size, accessFlags, in _mesa_MapNamedBuffer()
3628 struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_MapNamedBufferEXT() local
3630 &bufObj, "glMapNamedBufferEXT")) in _mesa_MapNamedBufferEXT()
3633 if (!validate_map_buffer_range(ctx, bufObj, 0, bufObj->Size, accessFlags, in _mesa_MapNamedBufferEXT()
3637 return map_buffer_range(ctx, bufObj, 0, bufObj->Size, accessFlags, in _mesa_MapNamedBufferEXT()
3643 struct gl_buffer_object *bufObj, in flush_mapped_buffer_range() argument
3665 if (!_mesa_bufferobj_mapped(bufObj, MAP_USER)) { in flush_mapped_buffer_range()
3672 if ((bufObj->Mappings[MAP_USER].AccessFlags & in flush_mapped_buffer_range()
3679 if (offset + length > bufObj->Mappings[MAP_USER].Length) { in flush_mapped_buffer_range()
3683 (long) bufObj->Mappings[MAP_USER].Length); in flush_mapped_buffer_range()
3687 assert(bufObj->Mappings[MAP_USER].AccessFlags & GL_MAP_WRITE_BIT); in flush_mapped_buffer_range()
3690 ctx->Driver.FlushMappedBufferRange(ctx, offset, length, bufObj, in flush_mapped_buffer_range()
3700 struct gl_buffer_object *bufObj = *bufObjPtr; in _mesa_FlushMappedBufferRange_no_error() local
3703 ctx->Driver.FlushMappedBufferRange(ctx, offset, length, bufObj, in _mesa_FlushMappedBufferRange_no_error()
3712 struct gl_buffer_object *bufObj; in _mesa_FlushMappedBufferRange() local
3714 bufObj = get_buffer(ctx, "glFlushMappedBufferRange", target, in _mesa_FlushMappedBufferRange()
3716 if (!bufObj) in _mesa_FlushMappedBufferRange()
3719 flush_mapped_buffer_range(ctx, bufObj, offset, length, in _mesa_FlushMappedBufferRange()
3728 struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_FlushMappedNamedBufferRange_no_error() local
3731 ctx->Driver.FlushMappedBufferRange(ctx, offset, length, bufObj, in _mesa_FlushMappedNamedBufferRange_no_error()
3740 struct gl_buffer_object *bufObj; in _mesa_FlushMappedNamedBufferRange() local
3742 bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, in _mesa_FlushMappedNamedBufferRange()
3744 if (!bufObj) in _mesa_FlushMappedNamedBufferRange()
3747 flush_mapped_buffer_range(ctx, bufObj, offset, length, in _mesa_FlushMappedNamedBufferRange()
3756 struct gl_buffer_object *bufObj; in _mesa_FlushMappedNamedBufferRangeEXT() local
3764 bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_FlushMappedNamedBufferRangeEXT()
3766 &bufObj, "glFlushMappedNamedBufferRangeEXT")) in _mesa_FlushMappedNamedBufferRangeEXT()
3769 flush_mapped_buffer_range(ctx, bufObj, offset, length, in _mesa_FlushMappedNamedBufferRangeEXT()
3775 struct gl_buffer_object *bufObj, in bind_buffer_range_uniform_buffer() argument
3778 if (!bufObj) { in bind_buffer_range_uniform_buffer()
3783 _mesa_reference_buffer_object(ctx, &ctx->UniformBuffer, bufObj); in bind_buffer_range_uniform_buffer()
3784 bind_uniform_buffer(ctx, index, bufObj, offset, size, GL_FALSE); in bind_buffer_range_uniform_buffer()
3796 struct gl_buffer_object *bufObj, in bind_buffer_range_uniform_buffer_err() argument
3811 bind_buffer_range_uniform_buffer(ctx, index, bufObj, offset, size); in bind_buffer_range_uniform_buffer_err()
3817 struct gl_buffer_object *bufObj, in bind_buffer_range_shader_storage_buffer() argument
3821 if (!bufObj) { in bind_buffer_range_shader_storage_buffer()
3826 _mesa_reference_buffer_object(ctx, &ctx->ShaderStorageBuffer, bufObj); in bind_buffer_range_shader_storage_buffer()
3827 bind_shader_storage_buffer(ctx, index, bufObj, offset, size, GL_FALSE); in bind_buffer_range_shader_storage_buffer()
3840 struct gl_buffer_object *bufObj, in bind_buffer_range_shader_storage_buffer_err() argument
3855 bind_buffer_range_shader_storage_buffer(ctx, index, bufObj, offset, size); in bind_buffer_range_shader_storage_buffer_err()
3860 struct gl_buffer_object *bufObj, in bind_buffer_range_atomic_buffer() argument
3863 if (!bufObj) { in bind_buffer_range_atomic_buffer()
3868 _mesa_reference_buffer_object(ctx, &ctx->AtomicBuffer, bufObj); in bind_buffer_range_atomic_buffer()
3869 bind_atomic_buffer(ctx, index, bufObj, offset, size, GL_FALSE); in bind_buffer_range_atomic_buffer()
3882 struct gl_buffer_object *bufObj, in bind_buffer_range_atomic_buffer_err() argument
3897 bind_buffer_range_atomic_buffer(ctx, index, bufObj, offset, size); in bind_buffer_range_atomic_buffer_err()
4334 struct gl_buffer_object *bufObj; in bind_xfb_buffers() local
4383 bufObj = boundBufObj; in bind_xfb_buffers()
4386 bufObj = _mesa_multi_bind_lookup_bufferobj(ctx, buffers, i, caller, in bind_xfb_buffers()
4392 _mesa_set_transform_feedback_binding(ctx, tfObj, index, bufObj, in bind_xfb_buffers()
4544 struct gl_buffer_object *bufObj; in bind_buffer_range() local
4553 bufObj = NULL; in bind_buffer_range()
4555 bufObj = _mesa_lookup_bufferobj(ctx, buffer); in bind_buffer_range()
4557 &bufObj, "glBindBufferRange")) in bind_buffer_range()
4560 if (!no_error && !bufObj) { in bind_buffer_range()
4571 index, bufObj, offset, size); in bind_buffer_range()
4574 bind_buffer_range_uniform_buffer(ctx, index, bufObj, offset, size); in bind_buffer_range()
4577 bind_buffer_range_shader_storage_buffer(ctx, index, bufObj, offset, in bind_buffer_range()
4581 bind_buffer_range_atomic_buffer(ctx, index, bufObj, offset, size); in bind_buffer_range()
4599 index, bufObj, offset, size, in bind_buffer_range()
4604 index, bufObj, offset, size); in bind_buffer_range()
4607 bind_buffer_range_uniform_buffer_err(ctx, index, bufObj, offset, in bind_buffer_range()
4611 bind_buffer_range_shader_storage_buffer_err(ctx, index, bufObj, in bind_buffer_range()
4615 bind_buffer_range_atomic_buffer_err(ctx, index, bufObj, in bind_buffer_range()
4643 struct gl_buffer_object *bufObj; in _mesa_BindBufferBase() local
4651 bufObj = NULL; in _mesa_BindBufferBase()
4653 bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_BindBufferBase()
4655 &bufObj, "glBindBufferBase")) in _mesa_BindBufferBase()
4658 if (!bufObj) { in _mesa_BindBufferBase()
4695 index, bufObj, false); in _mesa_BindBufferBase()
4698 bind_buffer_base_uniform_buffer(ctx, index, bufObj); in _mesa_BindBufferBase()
4701 bind_buffer_base_shader_storage_buffer(ctx, index, bufObj); in _mesa_BindBufferBase()
4704 bind_buffer_base_atomic_buffer(ctx, index, bufObj); in _mesa_BindBufferBase()
4786 struct gl_buffer_object *bufObj, GLintptr offset, in invalidate_buffer_subdata() argument
4790 ctx->Driver.InvalidateBufferSubData(ctx, bufObj, offset, length); in invalidate_buffer_subdata()
4799 struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_InvalidateBufferSubData_no_error() local
4800 invalidate_buffer_subdata(ctx, bufObj, offset, length); in _mesa_InvalidateBufferSubData_no_error()
4808 struct gl_buffer_object *bufObj; in _mesa_InvalidateBufferSubData() local
4817 bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_InvalidateBufferSubData()
4818 if (!bufObj || bufObj == &DummyBufferObject) { in _mesa_InvalidateBufferSubData()
4831 if (offset < 0 || length < 0 || end > bufObj->Size) { in _mesa_InvalidateBufferSubData()
4844 if (!(bufObj->Mappings[MAP_USER].AccessFlags & GL_MAP_PERSISTENT_BIT) && in _mesa_InvalidateBufferSubData()
4845 bufferobj_range_mapped(bufObj, offset, length)) { in _mesa_InvalidateBufferSubData()
4852 invalidate_buffer_subdata(ctx, bufObj, offset, length); in _mesa_InvalidateBufferSubData()
4860 struct gl_buffer_object *bufObj =_mesa_lookup_bufferobj(ctx, buffer); in _mesa_InvalidateBufferData_no_error() local
4861 invalidate_buffer_subdata(ctx, bufObj, 0, bufObj->Size); in _mesa_InvalidateBufferData_no_error()
4868 struct gl_buffer_object *bufObj; in _mesa_InvalidateBufferData() local
4876 bufObj = _mesa_lookup_bufferobj(ctx, buffer); in _mesa_InvalidateBufferData()
4877 if (!bufObj || bufObj == &DummyBufferObject) { in _mesa_InvalidateBufferData()
4891 if (_mesa_check_disallowed_mapping(bufObj)) { in _mesa_InvalidateBufferData()
4898 invalidate_buffer_subdata(ctx, bufObj, 0, bufObj->Size); in _mesa_InvalidateBufferData()