[Mesa-dev] [PATCH] mesa: Set gl_constants::MinMapBufferAlignment

Kenneth Graunke kenneth at whitecape.org
Wed Jan 22 08:38:43 PST 2014


On 01/22/2014 08:31 AM, Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
> 
> Leaving it set to zero isn't really correct since every allocation has
> at least an alignment of 1 byte.  It also caused a problem in the i965
> driver after I removed the MAX(64, ...) from the alignment calculation.
> That's what I get for changing a patch without retesting it. :(
> 
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73907
> Cc: Kenneth Graunke <kenneth at whitecape.org>
> Cc: Lu Ha <huax.lu at intel.com>
> ---
>  src/mesa/main/context.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
> index 7c3b2d7..b7cd568 100644
> --- a/src/mesa/main/context.c
> +++ b/src/mesa/main/context.c
> @@ -587,6 +587,7 @@ _mesa_init_constants(struct gl_context *ctx)
>     ctx->Const.MaxSpotExponent = 128.0;
>     ctx->Const.MaxViewportWidth = MAX_VIEWPORT_WIDTH;
>     ctx->Const.MaxViewportHeight = MAX_VIEWPORT_HEIGHT;
> +   ctx->Const.MinMapBufferAlignment = 1;
>  
>     /* Driver must override these values if ARB_viewport_array is supported. */
>     ctx->Const.MaxViewports = 1;
> 

Ah, thanks for fixing this!
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140122/3ef81486/attachment.pgp>


More information about the mesa-dev mailing list