on 5/29/05 10:07 AM, brad gianulis at email@hidden wrote:
> Looks like my real problem here is that I'm trying to load too much into
> VRAM.
>
> In my first test, I loaded 27 M of texture memory, displaying effectively
> 3.2 million pixels on screen at once. Frame rate: 20
>
> In my second test, I loaded only 17 M of texture memory, displaying 2.7
> million pixels. Frame rate: 50
>
> The Mac Mini has 32 M of VRAM on the ATI Radeon chip, so with the double
> buffers and Mac screen display and depth buffer, I'm maxing out. Renderer
> has no choice but to go to system memory, thus slowing things down.
>
> Also, in my tests, I switched between:
> glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_STORAGE_HINT_APPLE,
> GL_STORAGE_CACHED_APPLE);
> and
> glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_STORAGE_HINT_APPLE,
> GL_STORAGE_SHARED_APPLE);
When the textures are cached, if they fit in the VRAM, they stay resident.
Otherwise they will be swapped. This is much the same as making them SHARED.
The trick to SHARED is that you have to get your textures on the fast path;
e.g. you need to set the texture range, and you need to ensure that you are
using a pixel format that is native to the card, and you need to observe
certain alignment requirements for the pixel rows. If you do this, the
texture uploads will be done via DMA, and things will be pretty speedy
(maybe not as good if it is all cached, but a lot closer). This stuff will
also accelrate the texture uploads when you cache them as well.
Check out the Apple TextureRange sample for more info.
You can see if your texture uploads are DMA or done with the CPU by running
Shark on your app. If OpenGL is doing a bunch of memcpy, the the driver is
copying the textures up. When you hit the magic combination, all that CPU
time evaporates, and the GPU just DMA's the textures as required.
> SHARED seemed to do better, but not by much. Maybe 1 FPS.
Probably because you were short-circuiting the Driver texture swapping
logic, but not avoiding the overhead of the upload.
BR,
B.J. Buchalter
Metric Halo
5 Donovan Drive
Hopewell Junction, NY 12533 USA
tel +1 845 223-6112
fax +1 603 250-2451
_______________________________________________
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