i965: Mark upload buffers with MAP_ASYNC and MAP_PERSISTENT.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 27 Feb 2018 07:41:33 +0000 (23:41 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 2 Mar 2018 22:19:33 +0000 (14:19 -0800)
This should have no practical impact.  For the default uploader, we
don't really care, but for others, we may want to append more data
as the GPU is reading existing data, which means we need async and
persistent flags.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
src/mesa/drivers/dri/i965/intel_upload.c

index 53dff55687321624d1a09b92cfc89ef167295fa6..e4297bf22b41c4615d69fe6307f3deb984d43ad7 100644 (file)
@@ -87,7 +87,9 @@ brw_upload_space(struct brw_uploader *upload,
    if (!upload->bo) {
       upload->bo = brw_bo_alloc(upload->bufmgr, "streamed data",
                                 MAX2(upload->default_size, size), 4096);
-      upload->map = brw_bo_map(NULL, upload->bo, MAP_READ | MAP_WRITE);
+      upload->map = brw_bo_map(NULL, upload->bo,
+                               MAP_READ | MAP_WRITE |
+                               MAP_PERSISTENT | MAP_ASYNC);
    }
 
    upload->next_offset = offset + size;