i965: Always use CPU mappings for BOs on LLC platforms.
[mesa.git] / src / mesa / drivers / dri / i965 / intel_buffer_objects.c
1 /**************************************************************************
2 *
3 * Copyright 2003 VMware, Inc.
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
16 * of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 *
26 **************************************************************************/
27
28 /**
29 * @file intel_buffer_objects.c
30 *
31 * This provides core GL buffer object functionality.
32 */
33
34 #include "main/imports.h"
35 #include "main/mtypes.h"
36 #include "main/macros.h"
37 #include "main/bufferobj.h"
38
39 #include "brw_context.h"
40 #include "intel_blit.h"
41 #include "intel_buffer_objects.h"
42 #include "intel_batchbuffer.h"
43
44 /**
45 * Map a buffer object; issue performance warnings if mapping causes stalls.
46 *
47 * This matches the drm_intel_bo_map API, but takes an additional human-readable
48 * name for the buffer object to use in the performance debug message.
49 */
50 int
51 brw_bo_map(struct brw_context *brw,
52 drm_intel_bo *bo, int write_enable,
53 const char *bo_name)
54 {
55 if (likely(!brw->perf_debug) || !drm_intel_bo_busy(bo))
56 return drm_intel_bo_map(bo, write_enable);
57
58 double start_time = get_time();
59
60 int ret = drm_intel_bo_map(bo, write_enable);
61
62 perf_debug("CPU mapping a busy %s BO stalled and took %.03f ms.\n",
63 bo_name, (get_time() - start_time) * 1000);
64
65 return ret;
66 }
67
68 int
69 brw_bo_map_gtt(struct brw_context *brw, drm_intel_bo *bo, const char *bo_name)
70 {
71 if (likely(!brw->perf_debug) || !drm_intel_bo_busy(bo))
72 return drm_intel_gem_bo_map_gtt(bo);
73
74 double start_time = get_time();
75
76 int ret = drm_intel_gem_bo_map_gtt(bo);
77
78 perf_debug("GTT mapping a busy %s BO stalled and took %.03f ms.\n",
79 bo_name, (get_time() - start_time) * 1000);
80
81 return ret;
82 }
83
84 static GLboolean
85 intel_bufferobj_unmap(struct gl_context * ctx, struct gl_buffer_object *obj,
86 gl_map_buffer_index index);
87
88 static void
89 intel_bufferobj_mark_gpu_usage(struct intel_buffer_object *intel_obj,
90 uint32_t offset, uint32_t size)
91 {
92 intel_obj->gpu_active_start = MIN2(intel_obj->gpu_active_start, offset);
93 intel_obj->gpu_active_end = MAX2(intel_obj->gpu_active_end, offset + size);
94 }
95
96 static void
97 intel_bufferobj_mark_inactive(struct intel_buffer_object *intel_obj)
98 {
99 intel_obj->gpu_active_start = ~0;
100 intel_obj->gpu_active_end = 0;
101 }
102
103 /** Allocates a new drm_intel_bo to store the data for the buffer object. */
104 static void
105 intel_bufferobj_alloc_buffer(struct brw_context *brw,
106 struct intel_buffer_object *intel_obj)
107 {
108 intel_obj->buffer = drm_intel_bo_alloc(brw->bufmgr, "bufferobj",
109 intel_obj->Base.Size, 64);
110
111 /* the buffer might be bound as a uniform buffer, need to update it
112 */
113 brw->state.dirty.brw |= BRW_NEW_UNIFORM_BUFFER;
114
115 intel_bufferobj_mark_inactive(intel_obj);
116 }
117
118 static void
119 release_buffer(struct intel_buffer_object *intel_obj)
120 {
121 drm_intel_bo_unreference(intel_obj->buffer);
122 intel_obj->buffer = NULL;
123 }
124
125 /**
126 * The NewBufferObject() driver hook.
127 *
128 * Allocates a new intel_buffer_object structure and initializes it.
129 *
130 * There is some duplication between mesa's bufferobjects and our
131 * bufmgr buffers. Both have an integer handle and a hashtable to
132 * lookup an opaque structure. It would be nice if the handles and
133 * internal structure where somehow shared.
134 */
135 static struct gl_buffer_object *
136 intel_bufferobj_alloc(struct gl_context * ctx, GLuint name, GLenum target)
137 {
138 struct intel_buffer_object *obj = CALLOC_STRUCT(intel_buffer_object);
139
140 _mesa_initialize_buffer_object(ctx, &obj->Base, name, target);
141
142 obj->buffer = NULL;
143
144 return &obj->Base;
145 }
146
147 /**
148 * The DeleteBuffer() driver hook.
149 *
150 * Deletes a single OpenGL buffer object. Used by glDeleteBuffers().
151 */
152 static void
153 intel_bufferobj_free(struct gl_context * ctx, struct gl_buffer_object *obj)
154 {
155 struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
156
157 assert(intel_obj);
158
159 /* Buffer objects are automatically unmapped when deleting according
160 * to the spec, but Mesa doesn't do UnmapBuffer for us at context destroy
161 * (though it does if you call glDeleteBuffers)
162 */
163 _mesa_buffer_unmap_all_mappings(ctx, obj);
164
165 drm_intel_bo_unreference(intel_obj->buffer);
166 free(intel_obj);
167 }
168
169
170 /**
171 * The BufferData() driver hook.
172 *
173 * Implements glBufferData(), which recreates a buffer object's data store
174 * and populates it with the given data, if present.
175 *
176 * Any data that was previously stored in the buffer object is lost.
177 *
178 * \return true for success, false if out of memory
179 */
180 static GLboolean
181 intel_bufferobj_data(struct gl_context * ctx,
182 GLenum target,
183 GLsizeiptrARB size,
184 const GLvoid * data,
185 GLenum usage,
186 GLbitfield storageFlags,
187 struct gl_buffer_object *obj)
188 {
189 struct brw_context *brw = brw_context(ctx);
190 struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
191
192 /* Part of the ABI, but this function doesn't use it.
193 */
194 (void) target;
195
196 intel_obj->Base.Size = size;
197 intel_obj->Base.Usage = usage;
198 intel_obj->Base.StorageFlags = storageFlags;
199
200 assert(!obj->Mappings[MAP_USER].Pointer); /* Mesa should have unmapped it */
201 assert(!obj->Mappings[MAP_INTERNAL].Pointer);
202
203 if (intel_obj->buffer != NULL)
204 release_buffer(intel_obj);
205
206 if (size != 0) {
207 intel_bufferobj_alloc_buffer(brw, intel_obj);
208 if (!intel_obj->buffer)
209 return false;
210
211 if (data != NULL)
212 drm_intel_bo_subdata(intel_obj->buffer, 0, size, data);
213 }
214
215 return true;
216 }
217
218
219 /**
220 * The BufferSubData() driver hook.
221 *
222 * Implements glBufferSubData(), which replaces a portion of the data in a
223 * buffer object.
224 *
225 * If the data range specified by (size + offset) extends beyond the end of
226 * the buffer or if data is NULL, no copy is performed.
227 */
228 static void
229 intel_bufferobj_subdata(struct gl_context * ctx,
230 GLintptrARB offset,
231 GLsizeiptrARB size,
232 const GLvoid * data, struct gl_buffer_object *obj)
233 {
234 struct brw_context *brw = brw_context(ctx);
235 struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
236 bool busy;
237
238 if (size == 0)
239 return;
240
241 assert(intel_obj);
242
243 /* See if we can unsynchronized write the data into the user's BO. This
244 * avoids GPU stalls in unfortunately common user patterns (uploading
245 * sequentially into a BO, with draw calls in between each upload).
246 *
247 * Once we've hit this path, we mark this GL BO as preferring stalling to
248 * blits, so that we can hopefully hit this path again in the future
249 * (otherwise, an app that might occasionally stall but mostly not will end
250 * up with blitting all the time, at the cost of bandwidth)
251 */
252 if (brw->has_llc) {
253 if (offset + size <= intel_obj->gpu_active_start ||
254 intel_obj->gpu_active_end <= offset) {
255 drm_intel_gem_bo_map_unsynchronized(intel_obj->buffer);
256 memcpy(intel_obj->buffer->virtual + offset, data, size);
257 drm_intel_bo_unmap(intel_obj->buffer);
258
259 if (intel_obj->gpu_active_end > intel_obj->gpu_active_start)
260 intel_obj->prefer_stall_to_blit = true;
261 return;
262 }
263 }
264
265 busy =
266 drm_intel_bo_busy(intel_obj->buffer) ||
267 drm_intel_bo_references(brw->batch.bo, intel_obj->buffer);
268
269 if (busy) {
270 if (size == intel_obj->Base.Size) {
271 /* Replace the current busy bo so the subdata doesn't stall. */
272 drm_intel_bo_unreference(intel_obj->buffer);
273 intel_bufferobj_alloc_buffer(brw, intel_obj);
274 } else if (!intel_obj->prefer_stall_to_blit) {
275 perf_debug("Using a blit copy to avoid stalling on "
276 "glBufferSubData(%ld, %ld) (%ldkb) to a busy "
277 "(%d-%d) buffer object.\n",
278 (long)offset, (long)offset + size, (long)(size/1024),
279 intel_obj->gpu_active_start,
280 intel_obj->gpu_active_end);
281 drm_intel_bo *temp_bo =
282 drm_intel_bo_alloc(brw->bufmgr, "subdata temp", size, 64);
283
284 drm_intel_bo_subdata(temp_bo, 0, size, data);
285
286 intel_emit_linear_blit(brw,
287 intel_obj->buffer, offset,
288 temp_bo, 0,
289 size);
290
291 drm_intel_bo_unreference(temp_bo);
292 return;
293 } else {
294 perf_debug("Stalling on glBufferSubData(%ld, %ld) (%ldkb) to a busy "
295 "(%d-%d) buffer object. Use glMapBufferRange() to "
296 "avoid this.\n",
297 (long)offset, (long)offset + size, (long)(size/1024),
298 intel_obj->gpu_active_start,
299 intel_obj->gpu_active_end);
300 intel_batchbuffer_flush(brw);
301 }
302 }
303
304 drm_intel_bo_subdata(intel_obj->buffer, offset, size, data);
305 intel_bufferobj_mark_inactive(intel_obj);
306 }
307
308
309 /**
310 * The GetBufferSubData() driver hook.
311 *
312 * Implements glGetBufferSubData(), which copies a subrange of a buffer
313 * object into user memory.
314 */
315 static void
316 intel_bufferobj_get_subdata(struct gl_context * ctx,
317 GLintptrARB offset,
318 GLsizeiptrARB size,
319 GLvoid * data, struct gl_buffer_object *obj)
320 {
321 struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
322 struct brw_context *brw = brw_context(ctx);
323
324 assert(intel_obj);
325 if (drm_intel_bo_references(brw->batch.bo, intel_obj->buffer)) {
326 intel_batchbuffer_flush(brw);
327 }
328 drm_intel_bo_get_subdata(intel_obj->buffer, offset, size, data);
329
330 intel_bufferobj_mark_inactive(intel_obj);
331 }
332
333
334 /**
335 * The MapBufferRange() driver hook.
336 *
337 * This implements both glMapBufferRange() and glMapBuffer().
338 *
339 * The goal of this extension is to allow apps to accumulate their rendering
340 * at the same time as they accumulate their buffer object. Without it,
341 * you'd end up blocking on execution of rendering every time you mapped
342 * the buffer to put new data in.
343 *
344 * We support it in 3 ways: If unsynchronized, then don't bother
345 * flushing the batchbuffer before mapping the buffer, which can save blocking
346 * in many cases. If we would still block, and they allow the whole buffer
347 * to be invalidated, then just allocate a new buffer to replace the old one.
348 * If not, and we'd block, and they allow the subrange of the buffer to be
349 * invalidated, then we can make a new little BO, let them write into that,
350 * and blit it into the real BO at unmap time.
351 */
352 static void *
353 intel_bufferobj_map_range(struct gl_context * ctx,
354 GLintptr offset, GLsizeiptr length,
355 GLbitfield access, struct gl_buffer_object *obj,
356 gl_map_buffer_index index)
357 {
358 struct brw_context *brw = brw_context(ctx);
359 struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
360
361 assert(intel_obj);
362
363 /* _mesa_MapBufferRange (GL entrypoint) sets these, but the vbo module also
364 * internally uses our functions directly.
365 */
366 obj->Mappings[index].Offset = offset;
367 obj->Mappings[index].Length = length;
368 obj->Mappings[index].AccessFlags = access;
369
370 if (intel_obj->buffer == NULL) {
371 obj->Mappings[index].Pointer = NULL;
372 return NULL;
373 }
374
375 /* If the access is synchronized (like a normal buffer mapping), then get
376 * things flushed out so the later mapping syncs appropriately through GEM.
377 * If the user doesn't care about existing buffer contents and mapping would
378 * cause us to block, then throw out the old buffer.
379 *
380 * If they set INVALIDATE_BUFFER, we can pitch the current contents to
381 * achieve the required synchronization.
382 */
383 if (!(access & GL_MAP_UNSYNCHRONIZED_BIT)) {
384 if (drm_intel_bo_references(brw->batch.bo, intel_obj->buffer)) {
385 if (access & GL_MAP_INVALIDATE_BUFFER_BIT) {
386 drm_intel_bo_unreference(intel_obj->buffer);
387 intel_bufferobj_alloc_buffer(brw, intel_obj);
388 } else {
389 perf_debug("Stalling on the GPU for mapping a busy buffer "
390 "object\n");
391 intel_batchbuffer_flush(brw);
392 }
393 } else if (drm_intel_bo_busy(intel_obj->buffer) &&
394 (access & GL_MAP_INVALIDATE_BUFFER_BIT)) {
395 drm_intel_bo_unreference(intel_obj->buffer);
396 intel_bufferobj_alloc_buffer(brw, intel_obj);
397 }
398 }
399
400 /* If the user is mapping a range of an active buffer object but
401 * doesn't require the current contents of that range, make a new
402 * BO, and we'll copy what they put in there out at unmap or
403 * FlushRange time.
404 */
405 if (!(access & GL_MAP_UNSYNCHRONIZED_BIT) &&
406 (access & GL_MAP_INVALIDATE_RANGE_BIT) &&
407 drm_intel_bo_busy(intel_obj->buffer)) {
408 /* Ensure that the base alignment of the allocation meets the alignment
409 * guarantees the driver has advertised to the application.
410 */
411 const unsigned alignment = ctx->Const.MinMapBufferAlignment;
412
413 intel_obj->map_extra[index] = (uintptr_t) offset % alignment;
414 intel_obj->range_map_bo[index] = drm_intel_bo_alloc(brw->bufmgr,
415 "BO blit temp",
416 length +
417 intel_obj->map_extra[index],
418 alignment);
419 if (brw->has_llc) {
420 drm_intel_bo_map(intel_obj->range_map_bo[index],
421 (access & GL_MAP_WRITE_BIT) != 0);
422 } else {
423 drm_intel_gem_bo_map_gtt(intel_obj->range_map_bo[index]);
424 }
425 obj->Mappings[index].Pointer =
426 intel_obj->range_map_bo[index]->virtual + intel_obj->map_extra[index];
427 return obj->Mappings[index].Pointer;
428 }
429
430 if (access & GL_MAP_UNSYNCHRONIZED_BIT)
431 drm_intel_gem_bo_map_unsynchronized(intel_obj->buffer);
432 else if (!brw->has_llc && !(access & GL_MAP_READ_BIT)) {
433 drm_intel_gem_bo_map_gtt(intel_obj->buffer);
434 intel_bufferobj_mark_inactive(intel_obj);
435 } else {
436 drm_intel_bo_map(intel_obj->buffer, (access & GL_MAP_WRITE_BIT) != 0);
437 intel_bufferobj_mark_inactive(intel_obj);
438 }
439
440 obj->Mappings[index].Pointer = intel_obj->buffer->virtual + offset;
441 return obj->Mappings[index].Pointer;
442 }
443
444 /**
445 * The FlushMappedBufferRange() driver hook.
446 *
447 * Implements glFlushMappedBufferRange(), which signifies that modifications
448 * have been made to a range of a mapped buffer, and it should be flushed.
449 *
450 * This is only used for buffers mapped with GL_MAP_FLUSH_EXPLICIT_BIT.
451 *
452 * Ideally we'd use a BO to avoid taking up cache space for the temporary
453 * data, but FlushMappedBufferRange may be followed by further writes to
454 * the pointer, so we would have to re-map after emitting our blit, which
455 * would defeat the point.
456 */
457 static void
458 intel_bufferobj_flush_mapped_range(struct gl_context *ctx,
459 GLintptr offset, GLsizeiptr length,
460 struct gl_buffer_object *obj,
461 gl_map_buffer_index index)
462 {
463 struct brw_context *brw = brw_context(ctx);
464 struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
465 GLbitfield access = obj->Mappings[index].AccessFlags;
466
467 assert(access & GL_MAP_FLUSH_EXPLICIT_BIT);
468
469 /* If we gave a direct mapping of the buffer instead of using a temporary,
470 * then there's nothing to do.
471 */
472 if (intel_obj->range_map_bo[index] == NULL)
473 return;
474
475 if (length == 0)
476 return;
477
478 /* Note that we're not unmapping our buffer while executing the blit. We
479 * need to have a mapping still at the end of this call, since the user
480 * gets to make further modifications and glFlushMappedBufferRange() calls.
481 * This is safe, because:
482 *
483 * - On LLC platforms, we're using a CPU mapping that's coherent with the
484 * GPU (except for the render caches), so the kernel doesn't need to do
485 * any flushing work for us except for what happens at batch exec time
486 * anyway.
487 *
488 * - On non-LLC platforms, we're using a GTT mapping that writes directly
489 * to system memory (except for the chipset cache that gets flushed at
490 * batch exec time).
491 *
492 * In both cases we don't need to stall for the previous blit to complete
493 * so we can re-map (and we definitely don't want to, since that would be
494 * slow): If the user edits a part of their buffer that's previously been
495 * blitted, then our lack of synchoronization is fine, because either
496 * they'll get some too-new data in the first blit and not do another blit
497 * of that area (but in that case the results are undefined), or they'll do
498 * another blit of that area and the complete newer data will land the
499 * second time.
500 */
501 intel_emit_linear_blit(brw,
502 intel_obj->buffer,
503 obj->Mappings[index].Offset + offset,
504 intel_obj->range_map_bo[index],
505 intel_obj->map_extra[index] + offset,
506 length);
507 intel_bufferobj_mark_gpu_usage(intel_obj,
508 obj->Mappings[index].Offset + offset,
509 length);
510 }
511
512
513 /**
514 * The UnmapBuffer() driver hook.
515 *
516 * Implements glUnmapBuffer().
517 */
518 static GLboolean
519 intel_bufferobj_unmap(struct gl_context * ctx, struct gl_buffer_object *obj,
520 gl_map_buffer_index index)
521 {
522 struct brw_context *brw = brw_context(ctx);
523 struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
524
525 assert(intel_obj);
526 assert(obj->Mappings[index].Pointer);
527 if (intel_obj->range_map_bo[index] != NULL) {
528 drm_intel_bo_unmap(intel_obj->range_map_bo[index]);
529
530 if (!(obj->Mappings[index].AccessFlags & GL_MAP_FLUSH_EXPLICIT_BIT)) {
531 intel_emit_linear_blit(brw,
532 intel_obj->buffer, obj->Mappings[index].Offset,
533 intel_obj->range_map_bo[index],
534 intel_obj->map_extra[index],
535 obj->Mappings[index].Length);
536 intel_bufferobj_mark_gpu_usage(intel_obj, obj->Mappings[index].Offset,
537 obj->Mappings[index].Length);
538 }
539
540 /* Since we've emitted some blits to buffers that will (likely) be used
541 * in rendering operations in other cache domains in this batch, emit a
542 * flush. Once again, we wish for a domain tracker in libdrm to cover
543 * usage inside of a batchbuffer.
544 */
545 intel_batchbuffer_emit_mi_flush(brw);
546
547 drm_intel_bo_unreference(intel_obj->range_map_bo[index]);
548 intel_obj->range_map_bo[index] = NULL;
549 } else if (intel_obj->buffer != NULL) {
550 drm_intel_bo_unmap(intel_obj->buffer);
551 }
552 obj->Mappings[index].Pointer = NULL;
553 obj->Mappings[index].Offset = 0;
554 obj->Mappings[index].Length = 0;
555
556 return true;
557 }
558
559 /**
560 * Gets a pointer to the object's BO, and marks the given range as being used
561 * on the GPU.
562 *
563 * Anywhere that uses buffer objects in the pipeline should be using this to
564 * mark the range of the buffer that is being accessed by the pipeline.
565 */
566 drm_intel_bo *
567 intel_bufferobj_buffer(struct brw_context *brw,
568 struct intel_buffer_object *intel_obj,
569 uint32_t offset, uint32_t size)
570 {
571 /* This is needed so that things like transform feedback and texture buffer
572 * objects that need a BO but don't want to check that they exist for
573 * draw-time validation can just always get a BO from a GL buffer object.
574 */
575 if (intel_obj->buffer == NULL)
576 intel_bufferobj_alloc_buffer(brw, intel_obj);
577
578 intel_bufferobj_mark_gpu_usage(intel_obj, offset, size);
579
580 return intel_obj->buffer;
581 }
582
583 /**
584 * The CopyBufferSubData() driver hook.
585 *
586 * Implements glCopyBufferSubData(), which copies a portion of one buffer
587 * object's data to another. Independent source and destination offsets
588 * are allowed.
589 */
590 static void
591 intel_bufferobj_copy_subdata(struct gl_context *ctx,
592 struct gl_buffer_object *src,
593 struct gl_buffer_object *dst,
594 GLintptr read_offset, GLintptr write_offset,
595 GLsizeiptr size)
596 {
597 struct brw_context *brw = brw_context(ctx);
598 struct intel_buffer_object *intel_src = intel_buffer_object(src);
599 struct intel_buffer_object *intel_dst = intel_buffer_object(dst);
600 drm_intel_bo *src_bo, *dst_bo;
601
602 if (size == 0)
603 return;
604
605 dst_bo = intel_bufferobj_buffer(brw, intel_dst, write_offset, size);
606 src_bo = intel_bufferobj_buffer(brw, intel_src, read_offset, size);
607
608 intel_emit_linear_blit(brw,
609 dst_bo, write_offset,
610 src_bo, read_offset, size);
611
612 /* Since we've emitted some blits to buffers that will (likely) be used
613 * in rendering operations in other cache domains in this batch, emit a
614 * flush. Once again, we wish for a domain tracker in libdrm to cover
615 * usage inside of a batchbuffer.
616 */
617 intel_batchbuffer_emit_mi_flush(brw);
618 }
619
620 void
621 intelInitBufferObjectFuncs(struct dd_function_table *functions)
622 {
623 functions->NewBufferObject = intel_bufferobj_alloc;
624 functions->DeleteBuffer = intel_bufferobj_free;
625 functions->BufferData = intel_bufferobj_data;
626 functions->BufferSubData = intel_bufferobj_subdata;
627 functions->GetBufferSubData = intel_bufferobj_get_subdata;
628 functions->MapBufferRange = intel_bufferobj_map_range;
629 functions->FlushMappedBufferRange = intel_bufferobj_flush_mapped_range;
630 functions->UnmapBuffer = intel_bufferobj_unmap;
631 functions->CopyBufferSubData = intel_bufferobj_copy_subdata;
632 }