[Mesa-dev] [PATCH] llvmpipe: remove the power of two sizeof(struct cmd_block) assertion

Brian Paul brianp at vmware.com
Wed Mar 6 15:59:22 PST 2013


It fails on 32-bit systems (I only tested on 64-bit).  Power of two
size isn't required, so just remove the assertion.
---
 src/gallium/drivers/llvmpipe/lp_scene.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c
index dd0943e..a0912eb 100644
--- a/src/gallium/drivers/llvmpipe/lp_scene.c
+++ b/src/gallium/drivers/llvmpipe/lp_scene.c
@@ -76,13 +76,6 @@ lp_scene_create( struct pipe_context *pipe )
       assert(maxCommandBytes < LP_SCENE_MAX_SIZE);
       /* We'll also need space for at least one other data block */
       assert(maxCommandPlusData <= LP_SCENE_MAX_SIZE);
-
-      /* Ideally, the size of a cmd_block object will be a power of two
-       * in order to avoid wasting space when we allocation them from
-       * data blocks (which are power of two also).
-       */
-      assert(sizeof(struct cmd_block) ==
-             util_next_power_of_two(sizeof(struct cmd_block)));
    }
 #endif
 
-- 
1.7.3.4



More information about the mesa-dev mailing list