radeonsi: fix bounds check in si_create_vertex_elements
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 12 Apr 2016 17:23:31 +0000 (12:23 -0500)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 12 Apr 2016 21:32:46 +0000 (16:32 -0500)
This was triggered by
dEQP-GLES3.functional.vertex_array_objects.all_attributes

Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_state.c

index 85ee1c4701b8372d2bb8e2627c2965af3f45ec62..664506e85d4dd702771ef43e0850ef7c7574bde1 100644 (file)
@@ -3278,7 +3278,7 @@ static void *si_create_vertex_elements(struct pipe_context *ctx,
        struct si_vertex_element *v = CALLOC_STRUCT(si_vertex_element);
        int i;
 
-       assert(count < SI_MAX_ATTRIBS);
+       assert(count <= SI_MAX_ATTRIBS);
        if (!v)
                return NULL;