DirectDraw Surfaces... how much vid memory?

Started by
14 comments, last by Jello 22 years, 2 months ago
I wouldn''t have thought that the width of a surface affected the speed of blits at all. Remember all this is probably taking place in video memory, where there is no cache...

Steve
Advertisement
even the video card has a cache when it does stuff. they are pretty complicated now.
My comment about cache performance was specific to blitting smaller tiles out of a larger surface. If you're going to be blitting the whole surface then it doesn't matter what width it is. Sorry for the confusion.

Basically, the closer your blitting width is to the surface width the better the performance will be (this is why zipless had better performance with 64x64 tiles than 32x32 tiles). The ideal situation (cache-wise) is to have a surface that is the same width as your tiles and is very tall - that way each tile will be completely linear in memory and will give much better performance.

Iain Hutchison
Programmer, Silicon Dreams
The views expressed here are my own, not those of my employer.

Edited by - pieman on February 6, 2002 6:09:01 AM
Iain HutchisonProgrammer, Silicon DreamsThe views expressed here are my own, not those of my employer.
There is no problems width very wide surfaces unless you put them in video ram...
-------------Ban KalvinB !
Lots of small blits are slower than a few big ones, even if the big ones take care of the same area.
I''m making a game, so I''m gonna try putting the 1600x600 surface into video memory, cuz smooth scrolling is necessary. Since my screen resolution will be 800x600x24, and after reading your replies, I think I''ll blit 800x600 rectangles from the surface to the backbuffer.

So you think this is the best way to go about making a scroll engine with pre-made backgrounds?

_________________
MOV ax, bx
asm programming
written by Jello
_________________MOV ax, bxasm programming written by Jello

This topic is closed to new replies.

Advertisement