mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 15:48:36 +02:00
glthread: use autogenerated marshal structures for custom functions
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26548>
This commit is contained in:
parent
e9d08bb043
commit
162c890614
9 changed files with 27 additions and 124 deletions
|
|
@ -8,7 +8,8 @@
|
|||
|
||||
<category name="GL_ARB_base_instance" number="107">
|
||||
|
||||
<function name="DrawArraysInstancedBaseInstance" marshal="custom" exec="dlist">
|
||||
<function name="DrawArraysInstancedBaseInstance" marshal="custom" exec="dlist"
|
||||
marshal_struct="public">
|
||||
<param name="mode" type="GLenum"/>
|
||||
<param name="first" type="GLint"/>
|
||||
<param name="count" type="GLsizei"/>
|
||||
|
|
@ -25,7 +26,8 @@
|
|||
<param name="baseinstance" type="GLuint"/>
|
||||
</function>
|
||||
|
||||
<function name="DrawElementsInstancedBaseVertexBaseInstance" marshal="custom" exec="dlist">
|
||||
<function name="DrawElementsInstancedBaseVertexBaseInstance" marshal="custom" exec="dlist"
|
||||
marshal_struct="public">
|
||||
<param name="mode" type="GLenum"/>
|
||||
<param name="count" type="GLsizei"/>
|
||||
<param name="type" type="GLenum"/>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@
|
|||
|
||||
<category name="GL_ARB_draw_elements_base_vertex" number="62">
|
||||
|
||||
<function name="DrawElementsBaseVertex" es2="3.2" marshal="custom" exec="dlist">
|
||||
<function name="DrawElementsBaseVertex" es2="3.2" marshal="custom" exec="dlist"
|
||||
marshal_struct="public">
|
||||
<param name="mode" type="GLenum"/>
|
||||
<param name="count" type="GLsizei"/>
|
||||
<param name="type" type="GLenum"/>
|
||||
|
|
|
|||
|
|
@ -8,12 +8,14 @@
|
|||
<enum name="DRAW_INDIRECT_BUFFER" value="0x8F3F"/>
|
||||
<enum name="DRAW_INDIRECT_BUFFER_BINDING" value="0x8F43"/>
|
||||
|
||||
<function name="DrawArraysIndirect" es2="3.1" exec="dlist" marshal="custom">
|
||||
<function name="DrawArraysIndirect" es2="3.1" exec="dlist" marshal="custom"
|
||||
marshal_struct="public">
|
||||
<param name="mode" type="GLenum"/>
|
||||
<param name="indirect" type="const GLvoid *"/>
|
||||
</function>
|
||||
|
||||
<function name="DrawElementsIndirect" es2="3.1" exec="dlist" marshal="custom">
|
||||
<function name="DrawElementsIndirect" es2="3.1" exec="dlist" marshal="custom"
|
||||
marshal_struct="public">
|
||||
<param name="mode" type="GLenum"/>
|
||||
<param name="type" type="GLenum"/>
|
||||
<param name="indirect" type="const GLvoid *"/>
|
||||
|
|
@ -24,14 +26,16 @@
|
|||
|
||||
<category name="GL_ARB_multi_draw_indirect" number="133">
|
||||
|
||||
<function name="MultiDrawArraysIndirect" marshal="custom" exec="dlist">
|
||||
<function name="MultiDrawArraysIndirect" marshal="custom" exec="dlist"
|
||||
marshal_struct="public">
|
||||
<param name="mode" type="GLenum"/>
|
||||
<param name="indirect" type="const GLvoid *"/>
|
||||
<param name="primcount" type="GLsizei"/>
|
||||
<param name="stride" type="GLsizei"/>
|
||||
</function>
|
||||
|
||||
<function name="MultiDrawElementsIndirect" marshal="custom" exec="dlist">
|
||||
<function name="MultiDrawElementsIndirect" marshal="custom" exec="dlist"
|
||||
marshal_struct="public">
|
||||
<param name="mode" type="GLenum"/>
|
||||
<param name="type" type="GLenum"/>
|
||||
<param name="indirect" type="const GLvoid *"/>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@
|
|||
<param name="primcount" type="GLsizei"/>
|
||||
</function>
|
||||
|
||||
<function name="DrawElementsInstanced" marshal="custom" exec="dlist" es2="2.0">
|
||||
<function name="DrawElementsInstanced" marshal="custom" exec="dlist" es2="2.0"
|
||||
marshal_struct="public">
|
||||
<param name="mode" type="GLenum"/>
|
||||
<param name="count" type="GLsizei"/>
|
||||
<param name="type" type="GLenum"/>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@
|
|||
<enum name="PARAMETER_BUFFER_ARB" value="0x80EE"/>
|
||||
<enum name="PARAMETER_BUFFER_BINDING_ARB" value="0x80EF"/>
|
||||
|
||||
<function name="MultiDrawArraysIndirectCountARB" marshal="custom">
|
||||
<function name="MultiDrawArraysIndirectCountARB" marshal="custom"
|
||||
marshal_struct="public">
|
||||
<param name="mode" type="GLenum"/>
|
||||
<param name="indirect" type="GLintptr"/>
|
||||
<param name="drawcount" type="GLintptr"/>
|
||||
|
|
@ -17,7 +18,8 @@
|
|||
</function>
|
||||
|
||||
<!-- Use "...has_non_vbo_vertices", because indices always come from a buffer object. -->
|
||||
<function name="MultiDrawElementsIndirectCountARB" marshal="custom">
|
||||
<function name="MultiDrawElementsIndirectCountARB" marshal="custom"
|
||||
marshal_struct="public">
|
||||
<param name="mode" type="GLenum"/>
|
||||
<param name="type" type="GLenum"/>
|
||||
<param name="indirect" type="GLintptr"/>
|
||||
|
|
|
|||
|
|
@ -2959,7 +2959,7 @@
|
|||
</function>
|
||||
|
||||
<function name="PushMatrix" es1="1.0" deprecated="3.1" exec="dlist"
|
||||
marshal="custom">
|
||||
marshal="custom" marshal_struct="public">
|
||||
<glx rop="184"/>
|
||||
</function>
|
||||
|
||||
|
|
@ -3210,7 +3210,8 @@
|
|||
<glx handcode="true"/>
|
||||
</function>
|
||||
|
||||
<function name="DrawArrays" es1="1.0" es2="2.0" marshal="custom" exec="dlist">
|
||||
<function name="DrawArrays" es1="1.0" es2="2.0" marshal="custom" exec="dlist"
|
||||
marshal_struct="public">
|
||||
<param name="mode" type="GLenum"/>
|
||||
<param name="first" type="GLint"/>
|
||||
<param name="count" type="GLsizei"/>
|
||||
|
|
|
|||
|
|
@ -282,14 +282,6 @@ upload_vertices(struct gl_context *ctx, unsigned user_buffer_mask,
|
|||
}
|
||||
|
||||
/* DrawArrays without user buffers. */
|
||||
struct marshal_cmd_DrawArrays
|
||||
{
|
||||
struct marshal_cmd_base cmd_base;
|
||||
GLenum mode;
|
||||
GLint first;
|
||||
GLsizei count;
|
||||
};
|
||||
|
||||
uint32_t
|
||||
_mesa_unmarshal_DrawArrays(struct gl_context *ctx,
|
||||
const struct marshal_cmd_DrawArrays *restrict cmd)
|
||||
|
|
@ -305,16 +297,6 @@ _mesa_unmarshal_DrawArrays(struct gl_context *ctx,
|
|||
}
|
||||
|
||||
/* DrawArraysInstancedBaseInstance without user buffers. */
|
||||
struct marshal_cmd_DrawArraysInstancedBaseInstance
|
||||
{
|
||||
struct marshal_cmd_base cmd_base;
|
||||
GLenum mode;
|
||||
GLint first;
|
||||
GLsizei count;
|
||||
GLsizei instance_count;
|
||||
GLuint baseinstance;
|
||||
};
|
||||
|
||||
uint32_t
|
||||
_mesa_unmarshal_DrawArraysInstancedBaseInstance(struct gl_context *ctx,
|
||||
const struct marshal_cmd_DrawArraysInstancedBaseInstance *restrict cmd)
|
||||
|
|
@ -631,16 +613,6 @@ _mesa_marshal_MultiDrawArrays(GLenum mode, const GLint *first,
|
|||
}
|
||||
|
||||
/* DrawElementsInstanced without user buffers. */
|
||||
struct marshal_cmd_DrawElementsInstanced
|
||||
{
|
||||
struct marshal_cmd_base cmd_base;
|
||||
GLenum16 mode;
|
||||
GLenum16 type;
|
||||
GLsizei count;
|
||||
GLsizei instance_count;
|
||||
const GLvoid *indices;
|
||||
};
|
||||
|
||||
uint32_t
|
||||
_mesa_unmarshal_DrawElementsInstanced(struct gl_context *ctx,
|
||||
const struct marshal_cmd_DrawElementsInstanced *restrict cmd)
|
||||
|
|
@ -659,16 +631,6 @@ _mesa_unmarshal_DrawElementsInstanced(struct gl_context *ctx,
|
|||
}
|
||||
|
||||
/* DrawElementsBaseVertex without user buffers. */
|
||||
struct marshal_cmd_DrawElementsBaseVertex
|
||||
{
|
||||
struct marshal_cmd_base cmd_base;
|
||||
GLenum16 mode;
|
||||
GLenum16 type;
|
||||
GLsizei count;
|
||||
GLint basevertex;
|
||||
const GLvoid *indices;
|
||||
};
|
||||
|
||||
uint32_t
|
||||
_mesa_unmarshal_DrawElementsBaseVertex(struct gl_context *ctx,
|
||||
const struct marshal_cmd_DrawElementsBaseVertex *restrict cmd)
|
||||
|
|
@ -687,18 +649,6 @@ _mesa_unmarshal_DrawElementsBaseVertex(struct gl_context *ctx,
|
|||
}
|
||||
|
||||
/* DrawElementsInstancedBaseVertexBaseInstance without user buffers. */
|
||||
struct marshal_cmd_DrawElementsInstancedBaseVertexBaseInstance
|
||||
{
|
||||
struct marshal_cmd_base cmd_base;
|
||||
GLenum16 mode;
|
||||
GLenum16 type;
|
||||
GLsizei count;
|
||||
GLsizei instance_count;
|
||||
GLint basevertex;
|
||||
GLuint baseinstance;
|
||||
const GLvoid *indices;
|
||||
};
|
||||
|
||||
uint32_t
|
||||
_mesa_unmarshal_DrawElementsInstancedBaseVertexBaseInstance(struct gl_context *ctx,
|
||||
const struct marshal_cmd_DrawElementsInstancedBaseVertexBaseInstance *restrict cmd)
|
||||
|
|
@ -1383,13 +1333,6 @@ draw_indirect_async_allowed(struct gl_context *ctx, unsigned user_buffer_mask)
|
|||
(ctx->GLThread.CurrentDrawIndirectBufferName && !user_buffer_mask);
|
||||
}
|
||||
|
||||
struct marshal_cmd_DrawArraysIndirect
|
||||
{
|
||||
struct marshal_cmd_base cmd_base;
|
||||
GLenum16 mode;
|
||||
const GLvoid * indirect;
|
||||
};
|
||||
|
||||
uint32_t
|
||||
_mesa_unmarshal_DrawArraysIndirect(struct gl_context *ctx,
|
||||
const struct marshal_cmd_DrawArraysIndirect *cmd)
|
||||
|
|
@ -1427,14 +1370,6 @@ _mesa_marshal_DrawArraysIndirect(GLenum mode, const GLvoid *indirect)
|
|||
lower_draw_arrays_indirect(ctx, mode, (GLintptr)indirect, 0, 1);
|
||||
}
|
||||
|
||||
struct marshal_cmd_DrawElementsIndirect
|
||||
{
|
||||
struct marshal_cmd_base cmd_base;
|
||||
GLenum16 mode;
|
||||
GLenum16 type;
|
||||
const GLvoid * indirect;
|
||||
};
|
||||
|
||||
uint32_t
|
||||
_mesa_unmarshal_DrawElementsIndirect(struct gl_context *ctx,
|
||||
const struct marshal_cmd_DrawElementsIndirect *cmd)
|
||||
|
|
@ -1475,15 +1410,6 @@ _mesa_marshal_DrawElementsIndirect(GLenum mode, GLenum type, const GLvoid *indir
|
|||
lower_draw_elements_indirect(ctx, mode, type, (GLintptr)indirect, 0, 1);
|
||||
}
|
||||
|
||||
struct marshal_cmd_MultiDrawArraysIndirect
|
||||
{
|
||||
struct marshal_cmd_base cmd_base;
|
||||
GLenum16 mode;
|
||||
GLsizei primcount;
|
||||
GLsizei stride;
|
||||
const GLvoid * indirect;
|
||||
};
|
||||
|
||||
uint32_t
|
||||
_mesa_unmarshal_MultiDrawArraysIndirect(struct gl_context *ctx,
|
||||
const struct marshal_cmd_MultiDrawArraysIndirect *cmd)
|
||||
|
|
@ -1530,16 +1456,6 @@ _mesa_marshal_MultiDrawArraysIndirect(GLenum mode, const GLvoid *indirect,
|
|||
lower_draw_arrays_indirect(ctx, mode, (GLintptr)indirect, stride, primcount);
|
||||
}
|
||||
|
||||
struct marshal_cmd_MultiDrawElementsIndirect
|
||||
{
|
||||
struct marshal_cmd_base cmd_base;
|
||||
GLenum16 mode;
|
||||
GLenum16 type;
|
||||
GLsizei primcount;
|
||||
GLsizei stride;
|
||||
const GLvoid * indirect;
|
||||
};
|
||||
|
||||
uint32_t
|
||||
_mesa_unmarshal_MultiDrawElementsIndirect(struct gl_context *ctx,
|
||||
const struct marshal_cmd_MultiDrawElementsIndirect *cmd)
|
||||
|
|
@ -1591,16 +1507,6 @@ _mesa_marshal_MultiDrawElementsIndirect(GLenum mode, GLenum type,
|
|||
primcount);
|
||||
}
|
||||
|
||||
struct marshal_cmd_MultiDrawArraysIndirectCountARB
|
||||
{
|
||||
struct marshal_cmd_base cmd_base;
|
||||
GLenum16 mode;
|
||||
GLsizei maxdrawcount;
|
||||
GLsizei stride;
|
||||
GLintptr indirect;
|
||||
GLintptr drawcount;
|
||||
};
|
||||
|
||||
uint32_t
|
||||
_mesa_unmarshal_MultiDrawArraysIndirectCountARB(struct gl_context *ctx,
|
||||
const struct marshal_cmd_MultiDrawArraysIndirectCountARB *cmd)
|
||||
|
|
@ -1656,17 +1562,6 @@ _mesa_marshal_MultiDrawArraysIndirectCountARB(GLenum mode, GLintptr indirect,
|
|||
read_draw_indirect_count(ctx, drawcount));
|
||||
}
|
||||
|
||||
struct marshal_cmd_MultiDrawElementsIndirectCountARB
|
||||
{
|
||||
struct marshal_cmd_base cmd_base;
|
||||
GLenum16 mode;
|
||||
GLenum16 type;
|
||||
GLsizei maxdrawcount;
|
||||
GLsizei stride;
|
||||
GLintptr indirect;
|
||||
GLintptr drawcount;
|
||||
};
|
||||
|
||||
uint32_t
|
||||
_mesa_unmarshal_MultiDrawElementsIndirectCountARB(struct gl_context *ctx,
|
||||
const struct marshal_cmd_MultiDrawElementsIndirectCountARB *cmd)
|
||||
|
|
@ -1968,11 +1863,6 @@ _mesa_DrawElementsInstancedBaseVertexBaseInstanceDrawID(void)
|
|||
unreachable("should never end up here");
|
||||
}
|
||||
|
||||
struct marshal_cmd_PushMatrix
|
||||
{
|
||||
struct marshal_cmd_base cmd_base;
|
||||
};
|
||||
|
||||
uint32_t
|
||||
_mesa_unmarshal_PushMatrix(struct gl_context *ctx,
|
||||
const struct marshal_cmd_PushMatrix *restrict cmd)
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#include "context.h"
|
||||
#include "marshal_generated.h"
|
||||
#include "glthread_marshal.h"
|
||||
#include "vbo/vbo_util.h"
|
||||
#include "util/half_float.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
#include "main/context.h"
|
||||
#include "main/macros.h"
|
||||
#include "main/matrix.h"
|
||||
#include "marshal_generated.h"
|
||||
|
||||
struct marshal_cmd_base
|
||||
{
|
||||
|
|
@ -49,6 +48,9 @@ struct marshal_cmd_base
|
|||
uint16_t cmd_size;
|
||||
};
|
||||
|
||||
/* This must be included after "struct marshal_cmd_base" because it uses it. */
|
||||
#include "marshal_generated.h"
|
||||
|
||||
typedef uint32_t (*_mesa_unmarshal_func)(struct gl_context *ctx,
|
||||
const void *restrict cmd);
|
||||
extern const _mesa_unmarshal_func _mesa_unmarshal_dispatch[NUM_DISPATCH_CMD];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue