Re: [Mesa-dev] [PATCH] st/mesa: avoid integer overflows with buffers >= 512MB

2015-09-16 Thread Ilia Mirkin
On Wed, Sep 16, 2015 at 9:21 AM, Roland Scheidegger wrote: > Since there are no formats where block.bits isn't a multiple of 8 (and I > wouldn't expect that to change), you could theoretically fix that by > dividing by block.bits / 8 instead of multiplying base (or size) by 8. > Ought to be faster

Re: [Mesa-dev] [PATCH] st/mesa: avoid integer overflows with buffers >= 512MB

2015-09-16 Thread Roland Scheidegger
Since there are no formats where block.bits isn't a multiple of 8 (and I wouldn't expect that to change), you could theoretically fix that by dividing by block.bits / 8 instead of multiplying base (or size) by 8. Ought to be faster at least on 32bit systems... Unless you wanted to support >= 4GB bu

Re: [Mesa-dev] [PATCH] st/mesa: avoid integer overflows with buffers >= 512MB

2015-09-15 Thread Glenn Kennard
On Wed, 16 Sep 2015 01:32:10 +0200, Ilia Mirkin wrote: This fixes failures with the newly-submitted max-size texture buffer piglit test for GPUs exposing >= 128M max texels. Signed-off-by: Ilia Mirkin Cc: "10.6 11.0" --- src/mesa/state_tracker/st_atom_texture.c | 2 +- 1 file changed, 1 i

[Mesa-dev] [PATCH] st/mesa: avoid integer overflows with buffers >= 512MB

2015-09-15 Thread Ilia Mirkin
This fixes failures with the newly-submitted max-size texture buffer piglit test for GPUs exposing >= 128M max texels. Signed-off-by: Ilia Mirkin Cc: "10.6 11.0" --- src/mesa/state_tracker/st_atom_texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_track