mesa: allow buffers mapped with the persistent flag to be used by the GPU
[mesa.git] / src / mesa / main / pbo.c
index 400cec3f0e2fcfd325c98211858386fe0b3b5bac..4a39404177858309cbd78a1f5194560c184ad530 100644 (file)
@@ -201,7 +201,7 @@ _mesa_map_validate_pbo_source(struct gl_context *ctx,
       return ptr;
    }
 
-   if (_mesa_bufferobj_mapped(unpack->BufferObj)) {
+   if (_mesa_check_disallowed_mapping(unpack->BufferObj)) {
       /* buffer is already mapped - that's an error */
       _mesa_error(ctx, GL_INVALID_OPERATION, "%s(PBO is mapped)", where);
       return NULL;
@@ -297,7 +297,7 @@ _mesa_map_validate_pbo_dest(struct gl_context *ctx,
       return ptr;
    }
 
-   if (_mesa_bufferobj_mapped(unpack->BufferObj)) {
+   if (_mesa_check_disallowed_mapping(unpack->BufferObj)) {
       /* buffer is already mapped - that's an error */
       _mesa_error(ctx, GL_INVALID_OPERATION, "%s(PBO is mapped)", where);
       return NULL;