[Mesa-dev] [PATCH] draw: fix assertion failure in draw_emit_vertex_attr
Andreas Boll
andreas.boll.dev at gmail.com
Tue Oct 30 07:37:44 PDT 2012
2012/10/30 Marek Olšák <maraeo at gmail.com>:
> This is a regression since b3921e1f53833420e0a0fd581f7417.
>
> The array stores VS outputs, not FS inputs.
> Now llvmpipe can do 32 varyings too.
>
> NOTE: This is a candidate for the stable branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56552
I can confirm that this patch fixes the regressed piglit test:
./bin/glsl-max-varyings -auto
But I noticed that this test takes much longer on my system now.
llvmpipe on mesa-9.1-master before b3921e1
Vertical axis: Increasing numbers of varyings.
Horizontal axis: Which of the varyings contains the color.
GL_MAX_VARYING_FLOATS = 64
PIGLIT: {'result': 'pass' }
real 0m8.991s
user 0m8.949s
sys 0m0.032s
llvmpipe on mesa-9.1-master after b3921e1 + draw fix
Vertical axis: Increasing numbers of varyings.
Horizontal axis: Which of the varyings contains the color.
GL_MAX_VARYING_FLOATS = 128
PIGLIT: {'result': 'pass' }
real 1m1.298s
user 1m1.160s
sys 0m0.072s
Could we accelerate this test somehow?
Andreas.
> ---
> src/gallium/auxiliary/draw/draw_vertex.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/auxiliary/draw/draw_vertex.h b/src/gallium/auxiliary/draw/draw_vertex.h
> index e63cf5f..c87c3d8 100644
> --- a/src/gallium/auxiliary/draw/draw_vertex.h
> +++ b/src/gallium/auxiliary/draw/draw_vertex.h
> @@ -42,6 +42,7 @@
> #include "pipe/p_compiler.h"
> #include "pipe/p_state.h"
> #include "util/u_debug.h"
> +#include "util/u_memory.h"
>
>
> /**
> @@ -87,7 +88,7 @@ struct vertex_info
> unsigned interp_mode:4; /**< INTERP_x */
> unsigned emit:4; /**< EMIT_x */
> unsigned src_index:8; /**< map to post-xform attribs */
> - } attrib[PIPE_MAX_SHADER_INPUTS];
> + } attrib[PIPE_MAX_SHADER_OUTPUTS];
> };
>
> static INLINE size_t
> @@ -127,7 +128,7 @@ draw_emit_vertex_attr(struct vertex_info *vinfo,
> uint src_index)
> {
> const uint n = vinfo->num_attribs;
> - assert(n < PIPE_MAX_SHADER_INPUTS);
> + assert(n < Elements(vinfo->attrib));
> vinfo->attrib[n].emit = emit;
> vinfo->attrib[n].interp_mode = interp;
> vinfo->attrib[n].src_index = src_index;
> --
> 1.7.9.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list