Lines Matching defs:access
420 _mesa_access_flags_to_transfer_flags(GLbitfield access, bool wholeBuffer)
424 if (access & GL_MAP_WRITE_BIT)
427 if (access & GL_MAP_READ_BIT)
430 if (access & GL_MAP_FLUSH_EXPLICIT_BIT)
433 if (access & GL_MAP_INVALIDATE_BUFFER_BIT) {
436 else if (access & GL_MAP_INVALIDATE_RANGE_BIT) {
443 if (access & GL_MAP_UNSYNCHRONIZED_BIT)
446 if (access & GL_MAP_PERSISTENT_BIT)
449 if (access & GL_MAP_COHERENT_BIT)
455 if (access & MESA_MAP_NOWAIT_BIT)
457 if (access & MESA_MAP_THREAD_SAFE_BIT)
459 if (access & MESA_MAP_ONCE)
471 GLintptr offset, GLsizeiptr length, GLbitfield access,
483 _mesa_access_flags_to_transfer_flags(access,
507 obj->Mappings[index].AccessFlags = access;
784 * Convert a GLbitfield describing the mapped buffer access flags
788 simplified_access_mode(struct gl_context *ctx, GLbitfield access)
791 if ((access & rwFlags) == rwFlags)
793 if ((access & GL_MAP_READ_BIT) == GL_MAP_READ_BIT)
795 if ((access & GL_MAP_WRITE_BIT) == GL_MAP_WRITE_BIT)
816 assert(access == 0);
1461 * A convenience function for direct state access functions that throws
2357 /* In direct state access, buffer objects have an unspecified target
2369 /* In direct state access, buffer objects have an unspecified target
2558 /* In direct state access, buffer objects have an unspecified target since
3601 GLsizeiptr length, GLbitfield access,
3648 if (access & ~allowed_access) {
3651 "%s(access has undefined bits set)", func);
3655 if ((access & (GL_MAP_READ_BIT | GL_MAP_WRITE_BIT)) == 0) {
3657 "%s(access indicates neither read or write)", func);
3661 if ((access & GL_MAP_READ_BIT) &&
3662 (access & (GL_MAP_INVALIDATE_RANGE_BIT |
3666 "%s(read access with disallowed bits)", func);
3670 if ((access & GL_MAP_FLUSH_EXPLICIT_BIT) &&
3671 ((access & GL_MAP_WRITE_BIT) == 0)) {
3673 "%s(access has flush explicit without write)", func);
3677 if (access & GL_MAP_READ_BIT &&
3680 "%s(buffer does not allow read access)", func);
3684 if (access & GL_MAP_WRITE_BIT &&
3687 "%s(buffer does not allow write access)", func);
3691 if (access & GL_MAP_COHERENT_BIT &&
3694 "%s(buffer does not allow coherent access)", func);
3698 if (access & GL_MAP_PERSISTENT_BIT &&
3701 "%s(buffer does not allow persistent access)", func);
3719 if (access & GL_MAP_WRITE_BIT) {
3737 GLintptr offset, GLsizeiptr length, GLbitfield access,
3745 void *map = _mesa_bufferobj_map_range(ctx, offset, length, access, bufObj,
3758 assert(bufObj->Mappings[MAP_USER].AccessFlags == access);
3761 if (access & GL_MAP_WRITE_BIT) {
3768 printf("glMapBuffer(%u, sz %ld, access 0x%x)\n",
3769 bufObj->Name, bufObj->Size, access);
3771 if ((access & GL_MAP_WRITE_BIT) && (!(access & ~GL_MAP_WRITE_BIT))) {
3796 GLsizeiptr length, GLbitfield access)
3803 return map_buffer_range(ctx, bufObj, offset, length, access,
3809 GLbitfield access)
3824 if (!validate_map_buffer_range(ctx, bufObj, offset, length, access,
3828 return map_buffer_range(ctx, bufObj, offset, length, access,
3834 GLsizeiptr length, GLbitfield access)
3839 return map_buffer_range(ctx, bufObj, offset, length, access,
3845 GLbitfield access, bool dsa_ext, const char *func)
3866 if (!validate_map_buffer_range(ctx, bufObj, offset, length, access, func))
3869 return map_buffer_range(ctx, bufObj, offset, length, access, func);
3874 GLbitfield access)
3882 return map_named_buffer_range(buffer, offset, length, access, true,
3888 GLbitfield access)
3890 return map_named_buffer_range(buffer, offset, length, access, false,
3895 * Converts GLenum access from MapBuffer and MapNamedBuffer into
3898 * \return true if the type of requested access is permissible.
3901 get_map_buffer_access_flags(struct gl_context *ctx, GLenum access,
3904 switch (access) {
3921 _mesa_MapBuffer_no_error(GLenum target, GLenum access)
3926 get_map_buffer_access_flags(ctx, access, &accessFlags);
3936 _mesa_MapBuffer(GLenum target, GLenum access)
3942 if (!get_map_buffer_access_flags(ctx, access, &accessFlags)) {
3943 _mesa_error(ctx, GL_INVALID_ENUM, "glMapBuffer(invalid access)");
3960 _mesa_MapNamedBuffer_no_error(GLuint buffer, GLenum access)
3965 get_map_buffer_access_flags(ctx, access, &accessFlags);
3974 _mesa_MapNamedBuffer(GLuint buffer, GLenum access)
3980 if (!get_map_buffer_access_flags(ctx, access, &accessFlags)) {
3981 _mesa_error(ctx, GL_INVALID_ENUM, "glMapNamedBuffer(invalid access)");
3998 _mesa_MapNamedBufferEXT(GLuint buffer, GLenum access)
4008 if (!get_map_buffer_access_flags(ctx, access, &accessFlags)) {
4009 _mesa_error(ctx, GL_INVALID_ENUM, "glMapNamedBufferEXT(invalid access)");
5253 * with MAP_PERSISTENT_BIT set in the MapBufferRange access flags."
5300 * with MAP_PERSISTENT_BIT set in the MapBufferRange access flags."