[Mesa-dev] [PATCH] r300/compiler: align memory allocations to 8-bytes

Marek Olšák maraeo at gmail.com
Mon May 9 11:04:32 PDT 2011


On Mon, May 9, 2011 at 6:28 PM, Matt Turner <mattst88 at gmail.com> wrote:
> On Mon, May 9, 2011 at 12:17 AM, Matt Turner <mattst88 at gmail.com> wrote:
>> Eliminates unaligned accesses on strict architectures. Spotted by Jay
>> Estabrook.
>>
>> Signed-off-by: Matt Turner <mattst88 at gmail.com>
>> ---
>>  src/mesa/drivers/dri/r300/compiler/memory_pool.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/r300/compiler/memory_pool.c b/src/mesa/drivers/dri/r300/compiler/memory_pool.c
>> index 76c7c60..ddcdddf 100644
>> --- a/src/mesa/drivers/dri/r300/compiler/memory_pool.c
>> +++ b/src/mesa/drivers/dri/r300/compiler/memory_pool.c
>> @@ -28,7 +28,7 @@
>>
>>
>>  #define POOL_LARGE_ALLOC 4096
>> -#define POOL_ALIGN 4
>> +#define POOL_ALIGN 8
>
> Maybe instead of a constant, this should be something like sizeof(void *)?

8 is fine. Pushed, thanks.

Marek


More information about the mesa-dev mailing list