Mesa (main): mesa/st: rename access flag to transfer flag function
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Dec 15 14:02:49 UTC 2021
Module: Mesa
Branch: main
Commit: a79f5d90162364818c8df8bca79185bea7461ef9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a79f5d90162364818c8df8bca79185bea7461ef9
Author: Dave Airlie <airlied at redhat.com>
Date: Thu Dec 9 13:55:32 2021 +1000
mesa/st: rename access flag to transfer flag function
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14133>
---
src/mesa/main/bufferobj.c | 6 +++---
src/mesa/main/bufferobj.h | 3 +++
src/mesa/state_tracker/st_cb_fbo.c | 3 ++-
src/mesa/state_tracker/st_cb_texture.c | 2 +-
4 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 5bd72fa9de1..89b158bfb51 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -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
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index 6357ff22d36..642e24237db 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -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,
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index 79fbe007764..01f6be88a45 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -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
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 8f75e8f971a..72d22ca0d7f 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -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);
More information about the mesa-commit
mailing list