st/mesa: Treat vertex outputs absent in outputMapping as zero in mesa_to_tgsi
[mesa.git] / src / mesa / state_tracker / st_cb_bufferobjects.c
index ea0861d340cba8b29c8218058542ce3aaf81f902..01422bb7908fc5b1cbdea592540fb79a2edb179c 100644 (file)
@@ -34,7 +34,7 @@
 #include <inttypes.h>  /* for PRId64 macro */
 
 #include "main/errors.h"
-#include "util/imports.h"
+
 #include "main/mtypes.h"
 #include "main/arrayobj.h"
 #include "main/bufferobj.h"
@@ -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;
 }
@@ -603,7 +605,7 @@ st_copy_buffer_subdata(struct gl_context *ctx,
 
    /* buffer should not already be mapped */
    assert(!_mesa_check_disallowed_mapping(src));
-   assert(!_mesa_check_disallowed_mapping(dst));
+   /* dst can be mapped, just not the same range as the target range */
 
    u_box_1d(readOffset, size, &box);