diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 07589bca753..db2c44553ab 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -10974,8 +10974,7 @@ - + @@ -10984,8 +10983,7 @@ - + diff --git a/src/mesa/main/glthread_draw.c b/src/mesa/main/glthread_draw.c index 3d2b7f9f03c..dade489fd53 100644 --- a/src/mesa/main/glthread_draw.c +++ b/src/mesa/main/glthread_draw.c @@ -1202,6 +1202,33 @@ _mesa_marshal_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, buffers); } +void GLAPIENTRY +_mesa_marshal_MultiModeDrawArraysIBM(const GLenum *mode, const GLint *first, + const GLsizei *count, GLsizei primcount, + GLint modestride) +{ + for (int i = 0 ; i < primcount; i++) { + if (count[i] > 0) { + GLenum m = *((GLenum *)((GLubyte *)mode + i * modestride)); + _mesa_marshal_DrawArrays(m, first[i], count[i]); + } + } +} + +void GLAPIENTRY +_mesa_marshal_MultiModeDrawElementsIBM(const GLenum *mode, + const GLsizei *count, GLenum type, + const GLvoid * const *indices, + GLsizei primcount, GLint modestride) +{ + for (int i = 0 ; i < primcount; i++) { + if (count[i] > 0) { + GLenum m = *((GLenum *)((GLubyte *)mode + i * modestride)); + _mesa_marshal_DrawElements(m, count[i], type, indices[i]); + } + } +} + void GLAPIENTRY _mesa_marshal_DrawArrays(GLenum mode, GLint first, GLsizei count) { @@ -1366,6 +1393,22 @@ _mesa_unmarshal_MultiDrawElementsBaseVertex(struct gl_context *ctx, return 0; } +uint32_t +_mesa_unmarshal_MultiModeDrawArraysIBM(struct gl_context *ctx, + const struct marshal_cmd_MultiModeDrawArraysIBM *cmd) +{ + unreachable("should never end up here"); + return 0; +} + +uint32_t +_mesa_unmarshal_MultiModeDrawElementsIBM(struct gl_context *ctx, + const struct marshal_cmd_MultiModeDrawElementsIBM *cmd) +{ + unreachable("should never end up here"); + return 0; +} + void GLAPIENTRY _mesa_marshal_DrawArraysUserBuf(void) { diff --git a/src/mesa/main/glthread_marshal.h b/src/mesa/main/glthread_marshal.h index 6e8ec0e5756..25c6641f5c9 100644 --- a/src/mesa/main/glthread_marshal.h +++ b/src/mesa/main/glthread_marshal.h @@ -94,21 +94,6 @@ _mesa_glthread_has_no_unpack_buffer(const struct gl_context *ctx) return ctx->GLThread.CurrentPixelUnpackBufferName == 0; } -/** - * Instead of conditionally handling marshaling immediate index data in draw - * calls (deprecated and removed in GL core), we just disable threading. - */ -static inline bool -_mesa_glthread_has_non_vbo_vertices_or_indices(const struct gl_context *ctx) -{ - const struct glthread_state *glthread = &ctx->GLThread; - struct glthread_vao *vao = glthread->CurrentVAO; - - return ctx->API != API_OPENGL_CORE && - (vao->CurrentElementBufferName == 0 || - (vao->UserPointerMask & vao->BufferEnabled)); -} - static inline bool _mesa_glthread_has_non_vbo_vertices(const struct gl_context *ctx) {