svga, glhd: Remove incorrect assert and add note
authorJakob Bornecrantz <jakob@vmware.com>
Wed, 15 Dec 2010 11:17:26 +0000 (12:17 +0100)
committerJakob Bornecrantz <jakob@vmware.com>
Thu, 16 Dec 2010 08:44:02 +0000 (09:44 +0100)
Stride can be lower then the size of the attribute.
But should probably be aligned to component size atleast for floats.

src/gallium/drivers/galahad/glhd_context.c
src/gallium/drivers/svga/svga_draw.c

index a572ad22bd01e0d77bf68c0485a5bf562ca7ac98..8cbf0b1de4a6507517d99cabbe329c77ab9c4bb5 100644 (file)
@@ -381,6 +381,8 @@ galahad_create_vertex_elements_state(struct pipe_context *_pipe,
    struct galahad_context *glhd_pipe = galahad_context(_pipe);
    struct pipe_context *pipe = glhd_pipe->pipe;
 
+   /* XXX check if stride lines up with element size, at least for floats */
+
    return pipe->create_vertex_elements_state(pipe,
                                              num_elements,
                                              vertex_elements);
index 81dd4778d0a7c5b0aaac4aee82419ad58a8cc740..97cbac447d6ba506667de84c1f950fb8374d0d8f 100644 (file)
@@ -315,7 +315,6 @@ enum pipe_error svga_hwtnl_prim( struct svga_hwtnl *hwtnl,
             break;
          }
 
-         assert(!stride || width <= stride);
          if (max_index != ~0) {
             assert(offset + (index_bias + max_index) * stride + width <= size);
          }