[Piglit] [PATCH] piglit/vbo: fix attribute size for doubles.

Ilia Mirkin imirkin at alum.mit.edu
Fri Feb 20 15:06:36 PST 2015


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

On Fri, Feb 20, 2015 at 5:46 PM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This is required for 64-bit attribs.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  tests/util/piglit-vbo.cpp | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tests/util/piglit-vbo.cpp b/tests/util/piglit-vbo.cpp
> index 506533a..6453d40 100644
> --- a/tests/util/piglit-vbo.cpp
> +++ b/tests/util/piglit-vbo.cpp
> @@ -290,6 +290,7 @@ vertex_attrib_description::parse_datum(const char **text, void *data) const
>  void
>  vertex_attrib_description::setup(size_t *offset, size_t stride) const
>  {
> +       int attribute_size = ATTRIBUTE_SIZE;
>         switch (this->data_type) {
>         case GL_FLOAT:
>                 glVertexAttribPointer(this->index, this->count,
> @@ -304,6 +305,7 @@ vertex_attrib_description::setup(size_t *offset, size_t stride) const
>                 glVertexAttribLPointer(this->index, this->count,
>                                       this->data_type, stride,
>                                       (void *) *offset);
> +               attribute_size *= 2;
>                 break;
>         default:
>                 if (piglit_is_gles() && piglit_get_gl_version() < 30) {
> @@ -316,7 +318,7 @@ vertex_attrib_description::setup(size_t *offset, size_t stride) const
>                 break;
>         }
>         glEnableVertexAttribArray(index);
> -       *offset += ATTRIBUTE_SIZE * this->count;
> +       *offset += attribute_size * this->count;
>  }
>
>
> --
> 1.9.3
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list