From d02d8ea8b67f8499fe8f19b36d3aff5cd99c1885 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Mon, 15 May 2017 16:30:30 +0200 Subject: mesa: add gl_constants::AllowMappedBuffersDuringExecution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit for skipping mapped-buffer checking in every GL draw call Reviewed-by: Nicolai Hähnle --- src/mesa/main/mtypes.h | 3 +++ src/mesa/state_tracker/st_extensions.c | 3 +++ 2 files changed, 6 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 28d3d948fcd..efc69202540 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -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; }; diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index fffc0ef8ee3..2fa7ba7797e 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -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); } -- cgit v1.2.3