we are developping a video playback application and we are using the
OpenGL extensions :
- GL_APPLE_client_storage
- GL_APPLE_texture_range with GL_STORAGE_SHARED_APPLE
- GL_ARB_texture_rectangle
For some images width, the OpenGL driver/framework seems to make a
copy of the texture data.
My test machine :
- MacPro 2 x 2.66Ghz Dual-Core Intel Xeon
- 9 GB of RAM
- Leopard : 10.5.2 (9C7010)
- 4 nvidia Geforce 7300 GT cards (rom version : 3011)
- 2 displays on 2 physical cards (16x and 8x)
I create 1GB of images. I bind them using the following code :
If image width (kW) is a multiple of 8 (rows are 32-bytes aligned),
there is no copy (real memory = 1.01GB, virtual memory : 2.18GB)
If image width is not a multiple of 8, a copy is made for each new
context (ie if I move my window to another display attached to another
physical video card). Starting on main screen (real memory : 1.01GB,
virtual memory : 3.19GB), moving the window to a second screen (real
memory : 1.01GB, virtual memory : 3.97GB and some textures are not
created as memory is exhausted)
Concerning the observed bandwidth :
- on PCIe 16x : 1600MB/s with 32-byte aligned rows, 900MB/s with
unaligned rows
Does this 32-byte alignment of rows is a general constraint to avoid
OpenGL copying ? Or does it depend on hardware/driver/os combination ?
If so, how could I programmatically get this value ?
What I plan to do is to pad each rows with 0 at the end to get the
good alignment and then use :
unsigned int rowStride = (kW+7)&(~7);
glPixelStorei(GL_UNPACK_ALIGNMENT, 8);
glPixelStorei(GL_UNPACK_ROW_LENGTH, rowStride);
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden
This email sent to email@hidden