Re: [Mesa3d-dev] [PATCH] Fix compressed texture loads for non-minimal pitches again

2010-01-25 Thread Brian Paul
Luca Barbieri wrote: Signed-off-by: Brian Paul bri...@vmware.com Please push this as well. Done. -Brian -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the

Re: [Mesa3d-dev] [PATCH] Fix compressed texture loads for non-minimal pitches again

2010-01-24 Thread Luca Barbieri
Signed-off-by: Brian Paul bri...@vmware.com Please push this as well. Thanks. -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities

Re: [Mesa3d-dev] [PATCH] Fix compressed texture loads for non-minimal pitches again

2010-01-20 Thread Brian Paul
Luca Barbieri wrote: My commit eea6a7639f767b1d30b6ef1f91a9c49e3f3b78f0 does a memcpy of height lines, but that's wrong because the texture has a block layout and we must thus use the number of vertical blocks instead of the height. --- src/mesa/state_tracker/st_cb_texture.c |6 --

[Mesa3d-dev] [PATCH] Fix compressed texture loads for non-minimal pitches again

2010-01-19 Thread Luca Barbieri
My commit eea6a7639f767b1d30b6ef1f91a9c49e3f3b78f0 does a memcpy of height lines, but that's wrong because the texture has a block layout and we must thus use the number of vertical blocks instead of the height. --- src/mesa/state_tracker/st_cb_texture.c |6 -- 1 files changed, 4

Re: [Mesa3d-dev] [PATCH] Fix compressed texture loads for non-minimal pitches

2010-01-11 Thread Keith Whitwell
On Sun, 2010-01-10 at 12:04 -0800, Luca Barbieri wrote: + { + char* dst = texImage-Data; + char* src = pixels; + for(int i = 0; i height; ++i) + { +memcpy(dst, src, srcImageStride); +dst += dstRowStride; +src +=

Re: [Mesa3d-dev] [PATCH] Fix compressed texture loads for non-minimal pitches

2010-01-11 Thread Luca Barbieri
gcc -c -I../../include -I../../src/mesa -I../../src/gallium/include -I../../src/gallium/auxiliary -Wall -Wmissing-prototypes -Wdeclaration-after-statement -Wpointer-arith -g -fPIC  -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DPTHREADS -DUSE_XSHM

[Mesa3d-dev] [PATCH] Fix compressed texture loads for non-minimal pitches

2010-01-10 Thread Luca Barbieri
The current glCompressedTexImage support in the state tracker assumes that compressed textures have minimal pitch. However, in some cases this is not true, such as for mipmaps of non-POT compressed textures on nVidia hardware. This patch adds a check and does a memcpy for each line instead of