aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/marshal.h
diff options
context:
space:
mode:
authorGrigori Goronzy <[email protected]>2017-06-24 18:59:55 +0200
committerTimothy Arceri <[email protected]>2017-06-26 09:06:23 +1000
commit95fb1c187a0ea8d13f401145282363228b91b246 (patch)
treef20a58cb521d1b48ddf8b522c2820b9a518597d4 /src/mesa/main/marshal.h
parent6a68170c8360d702a25e59740d04f79a4f8323a7 (diff)
mesa/marshal: add custom marshalling for glNamedBuffer(Sub)Data
These entry points are used by Alien Isolation and caused synchronization with glthread. The async marshalling implementation is similar to glBuffer(Sub)Data. However unlike Buffer(Sub)Data we don't need to worry about EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, as this isn't applicable to these DSA variants. Results in an approximately 6x drop in glthread synchronizations and a ~30% FPS jump in Alien Isolation (Medium preset, Athlon 860K, RX 480). Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/marshal.h')
-rw-r--r--src/mesa/main/marshal.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/main/marshal.h b/src/mesa/main/marshal.h
index 4842d27eebf..46f76634fb6 100644
--- a/src/mesa/main/marshal.h
+++ b/src/mesa/main/marshal.h
@@ -205,6 +205,8 @@ struct marshal_cmd_Flush;
struct marshal_cmd_BindBuffer;
struct marshal_cmd_BufferData;
struct marshal_cmd_BufferSubData;
+struct marshal_cmd_NamedBufferData;
+struct marshal_cmd_NamedBufferSubData;
struct marshal_cmd_ClearBufferfv;
void
@@ -253,6 +255,22 @@ _mesa_marshal_BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size,
const GLvoid * data);
void
+_mesa_unmarshal_NamedBufferData(struct gl_context *ctx,
+ const struct marshal_cmd_NamedBufferData *cmd);
+
+void GLAPIENTRY
+_mesa_marshal_NamedBufferData(GLuint buffer, GLsizeiptr size,
+ const GLvoid * data, GLenum usage);
+
+void
+_mesa_unmarshal_NamedBufferSubData(struct gl_context *ctx,
+ const struct marshal_cmd_NamedBufferSubData *cmd);
+
+void GLAPIENTRY
+_mesa_marshal_NamedBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr size,
+ const GLvoid * data);
+
+void
_mesa_unmarshal_ClearBufferfv(struct gl_context *ctx,
const struct marshal_cmd_ClearBufferfv *cmd);