mesa: add gl_constants::AllowMappedBuffersDuringExecution
authorMarek Olšák <marek.olsak@amd.com>
Mon, 15 May 2017 14:30:30 +0000 (16:30 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 17 May 2017 18:28:44 +0000 (20:28 +0200)
for skipping mapped-buffer checking in every GL draw call

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/main/mtypes.h
src/mesa/state_tracker/st_extensions.c

index 28d3d948fcdc6609f2f391e7b3e0f268c28df723..efc69202540772f69947ccd51d5332241221019c 100644 (file)
@@ -3908,6 +3908,9 @@ struct gl_constants
 
    /** Used as an input for sha1 generation in the on-disk shader cache */
    unsigned char *dri_config_options_sha1;
+
+   /** When drivers are OK with mapped buffers during draw and other calls. */
+   bool AllowMappedBuffersDuringExecution;
 };
 
 
index fffc0ef8ee3e3088e2018af0f6db9a9c5556aeb5..2fa7ba7797e8d4ef8f2b48aef1d79b458cc554fb 100644 (file)
@@ -463,6 +463,9 @@ void st_init_limits(struct pipe_screen *screen,
 
    c->SparseBufferPageSize =
       screen->get_param(screen, PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE);
+
+   c->AllowMappedBuffersDuringExecution =
+      screen->get_param(screen, PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION);
 }