Commit b8223244 authored by Marek Olšák's avatar Marek Olšák Committed by Marge Bot

mesa: add Const.BufferCreateMapUnsynchronizedThreadSafe & MESA_MAP_THREAD_SAFE

Acked-by: Pierre-Eric Pelloux-Prayer's avatarPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <!4758>
parent 19eb89b0
......@@ -70,6 +70,9 @@ struct _mesa_index_buffer;
*/
#define MESA_MAP_NOWAIT_BIT 0x4000
/* Mapping a buffer is allowed from any thread. */
#define MESA_MAP_THREAD_SAFE_BIT 0x8000
/**
* Device driver function table.
......
......@@ -4126,6 +4126,12 @@ struct gl_constants
/** When drivers are OK with mapped buffers during draw and other calls. */
bool AllowMappedBuffersDuringExecution;
/**
* Whether buffer creation, unsynchronized mapping, unmapping, and
* deletion is thread-safe.
*/
bool BufferCreateMapUnsynchronizedThreadSafe;
/** GL_ARB_get_program_binary */
GLuint NumProgramBinaryFormats;
......
......@@ -494,6 +494,8 @@ st_access_flags_to_transfer_flags(GLbitfield access, bool wholeBuffer)
if (access & MESA_MAP_NOWAIT_BIT)
flags |= PIPE_TRANSFER_DONTBLOCK;
if (access & MESA_MAP_THREAD_SAFE_BIT)
flags |= PIPE_TRANSFER_THREAD_SAFE;
return flags;
}
......
......@@ -556,6 +556,9 @@ void st_init_limits(struct pipe_screen *screen,
c->AllowMappedBuffersDuringExecution =
screen->get_param(screen, PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION);
c->BufferCreateMapUnsynchronizedThreadSafe =
screen->get_param(screen, PIPE_CAP_MAP_UNSYNCHRONIZED_THREAD_SAFE);
c->UseSTD430AsDefaultPacking =
screen->get_param(screen, PIPE_CAP_LOAD_CONSTBUF);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment