*/
#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.
/** 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;
if (access & MESA_MAP_NOWAIT_BIT)
flags |= PIPE_TRANSFER_DONTBLOCK;
+ if (access & MESA_MAP_THREAD_SAFE_BIT)
+ flags |= PIPE_TRANSFER_THREAD_SAFE;
return flags;
}
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);