[Mesa-stable] [Mesa-dev] [PATCH] mesa: fix glMultiDrawArrays inside a display list
Jose Fonseca
jfonseca at vmware.com
Thu Mar 27 08:24:13 PDT 2014
LGTM.
Jose
----- Original Message -----
> The underlying glDrawArrays() calls weren't getting compiled into
> the display list. We simply need to use the current dispatch table
> so the CALL_DrawArrays() is routed to the display list save function.
>
> This patch also fixes glMultiModeDrawArraysIBM and
> glMultiModeDrawElementsIBM.
>
> Fixes the new piglit gl-1.4-dlist-multidrawarrays test.
>
> Cc: "10.0" "10.1" <mesa-stable at lists.freedesktop.org>
> ---
> src/mesa/main/varray.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
> index b4b6fa9..b88d700 100644
> --- a/src/mesa/main/varray.c
> +++ b/src/mesa/main/varray.c
> @@ -1223,7 +1223,7 @@ _mesa_MultiDrawArrays( GLenum mode, const GLint *first,
>
> for (i = 0; i < primcount; i++) {
> if (count[i] > 0) {
> - CALL_DrawArrays(ctx->Exec, (mode, first[i], count[i]));
> + CALL_DrawArrays(ctx->CurrentDispatch, (mode, first[i], count[i]));
> }
> }
> }
> @@ -1243,7 +1243,7 @@ _mesa_MultiModeDrawArraysIBM( const GLenum * mode,
> const GLint * first,
> for ( i = 0 ; i < primcount ; i++ ) {
> if ( count[i] > 0 ) {
> GLenum m = *((GLenum *) ((GLubyte *) mode + i * modestride));
> - CALL_DrawArrays(ctx->Exec, ( m, first[i], count[i] ));
> + CALL_DrawArrays(ctx->CurrentDispatch, ( m, first[i], count[i] ));
> }
> }
> }
> @@ -1265,7 +1265,8 @@ _mesa_MultiModeDrawElementsIBM( const GLenum * mode,
> const GLsizei * count,
> for ( i = 0 ; i < primcount ; i++ ) {
> if ( count[i] > 0 ) {
> GLenum m = *((GLenum *) ((GLubyte *) mode + i * modestride));
> - CALL_DrawElements(ctx->Exec, ( m, count[i], type, indices[i] ));
> + CALL_DrawElements(ctx->CurrentDispatch, ( m, count[i], type,
> + indices[i] ));
> }
> }
> }
> --
> 1.7.10.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://urldefense.proofpoint.com/v1/url?u=http://lists.freedesktop.org/mailman/listinfo/mesa-dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=NMr9uy2iTjWVixC0wOcYCWEIYhfo80qKwRgdodpoDzA%3D%0A&m=KD8FEffFCw272%2BgqujS4F038UXKfmQfd7DpvE71eqsQ%3D%0A&s=b495ce85bee5e1bf166c868dbcf18ad8e9f3a1815448a1c5e65e8b2ac7b33ad9
>
More information about the mesa-stable
mailing list