If VRAM is expensive to store per-pixel then the cost you pay to do the blit(s) is dependent on the number of pixels.

If you are writing to the same VRAM pixels over and over because the sysmem images overlap then you pay the cost to access pixels that will later be overwritten.

By contrast if you blit all of the sysmem images to a temporary memory buffer then the redundant writes to the same pixels will be only at the cost of system memory access which tends to be much faster - later when you copy the temporary buffer to the screen then you only access each VRAM pixel once so there is no wasted or redundant effort with respect to any overlap.

What it comes down to is comparing the number of sysmem pixels written by each method and then comparing the costs of writing to VRAM vs. writing to sysmem. If there is little to no overlap in the sysmem images then the answer is a no-brainer since you will write the same or fewer pixels to blit the sysmem images directly to the VRAM than to blit them to a temporary sysmem buffer. If the total number of pixels in the sysmem images is less than the number of pixels in the temporary buffer, then again the cost of doing the blits directly to VRAM will be less because you have fewer pixels to write (even if there is overlap). If there is overlap and the total number of pixels in the sysmem images is larger than the total number of pixels in the temporary buffer, then it depends on the ratios above as to which will be faster...

            ...jim

[EMAIL PROTECTED] wrote:
The per-pixel overhead of accessing VRAM would
probably be more noticeable than the per-operation overhead of getting the pixels into the pipeline - unless there was a lot of overlap
between the sysmem images.

With little or no overlap then it might even be
faster to blit the component sysmem images rather than a single blit of the "framebuffer" image - depending on the difference in the number of
pixels touched...

How come overlapping sysmem images would descrease performance vs non 
overlapping sysmem images when doing per image blits?
[Message sent by forum member 'bitshit' (bitshit)]

http://forums.java.net/jive/thread.jspa?messageID=253855

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to