OSDN Git Service

llvmpipe: Remove redundant alignments.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 14 Jul 2010 13:53:35 +0000 (14:53 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 14 Jul 2010 13:53:35 +0000 (14:53 +0100)
The lp_rast_shader_inputs' alignment is irrelevant now that it contains
pointers instead of actual data.

Likewise, lp_rast_triangle's size alignment is meaningless.

src/gallium/drivers/llvmpipe/lp_rast.h
src/gallium/drivers/llvmpipe/lp_setup_tri.c

index 0991344..eaf2a6f 100644 (file)
@@ -117,7 +117,7 @@ struct lp_rast_plane {
  */
 struct lp_rast_triangle {
    /* inputs for the shader */
-   PIPE_ALIGN_VAR(16) struct lp_rast_shader_inputs inputs;
+   struct lp_rast_shader_inputs inputs;
 
    int step[3][16];
 
index 4ceb789..7e43250 100644 (file)
@@ -342,8 +342,6 @@ alloc_triangle(struct lp_scene *scene,
    unsigned tri_bytes, bytes;
    char *inputs;
 
-   assert(sizeof(*tri) % 16 == 0);
-
    tri_bytes = align(Offset(struct lp_rast_triangle, plane[nr_planes]), 16);
    bytes = tri_bytes + (3 * input_array_sz);