mesa/st: rename access flag to transfer flag function

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14133>
This commit is contained in:
Dave Airlie 2021-12-09 13:55:32 +10:00 committed by Marge Bot
parent fdd31298d3
commit a79f5d9016
4 changed files with 9 additions and 5 deletions

View file

@ -413,7 +413,7 @@ bufferobj_data_mem(struct gl_context *ctx,
* \param wholeBuffer is the whole buffer being mapped?
*/
enum pipe_map_flags
st_access_flags_to_transfer_flags(GLbitfield access, bool wholeBuffer)
_mesa_access_flags_to_transfer_flags(GLbitfield access, bool wholeBuffer)
{
enum pipe_map_flags flags = 0;
@ -476,8 +476,8 @@ _mesa_bufferobj_map_range(struct gl_context *ctx,
assert(offset + length <= obj->Size);
enum pipe_map_flags transfer_flags =
st_access_flags_to_transfer_flags(access,
offset == 0 && length == obj->Size);
_mesa_access_flags_to_transfer_flags(access,
offset == 0 && length == obj->Size);
/* Sometimes games do silly things like MapBufferRange(UNSYNC|DISCARD_RANGE)
* In this case, the the UNSYNC is a bit redundant, but the games rely

View file

@ -97,6 +97,9 @@ _mesa_bufferobj_alloc(struct gl_context *ctx, GLuint id);
void
_mesa_bufferobj_release_buffer(struct gl_buffer_object *obj);
enum pipe_map_flags
_mesa_access_flags_to_transfer_flags(GLbitfield access, bool wholeBuffer);
/** Is the given buffer object currently mapped by the GL user? */
static inline GLboolean
_mesa_bufferobj_mapped(const struct gl_buffer_object *obj,

View file

@ -35,6 +35,7 @@
#include "main/context.h"
#include "main/bufferobj.h"
#include "main/fbobject.h"
#include "main/framebuffer.h"
#include "main/glformats.h"
@ -922,7 +923,7 @@ st_MapRenderbuffer(struct gl_context *ctx,
GL_MAP_INVALIDATE_RANGE_BIT)) == 0);
const enum pipe_map_flags transfer_flags =
st_access_flags_to_transfer_flags(mode, false);
_mesa_access_flags_to_transfer_flags(mode, false);
/* Note: y=0=bottom of buffer while y2=0=top of buffer.
* 'invert' will be true for window-system buffers and false for

View file

@ -569,7 +569,7 @@ st_MapTextureImage(struct gl_context *ctx,
GL_MAP_INVALIDATE_RANGE_BIT)) == 0);
const enum pipe_map_flags transfer_flags =
st_access_flags_to_transfer_flags(mode, false);
_mesa_access_flags_to_transfer_flags(mode, false);
map = st_texture_image_map(st, stImage, transfer_flags, x, y, slice, w, h, 1,
&transfer);