> please view http://www.erikyyy.de/noshine/ggi/

Here we go ...:

: do not do anything with directbuffers, it's useless.

Well - for your exact problem, you are right. Directbuffer is for apps that
update only small portions of the screen. Full screen changes are slow on
some targets, due to the reasons you outline very nicely.

Also note, that for the X target, the directbuffer _is_ in main memory, so
that you could as well use it. (However as you can't probe, if you are in X,

: - if you do 32bit or 16bit access, some hardware cannot do this. 

Note, that this also applies to most host memories. If I do _unaligned_
accesses on Alpha or Sparc, I get SIGBUS. x86 is the only architecture that
goes to excessive complications in the PCI and memory interface of the
CPU to work around such misconcepted software.

Linux/Alpha will work around on demand using a CPU exception, but this will
be _very_ slow. So the message is: Don't do unaligned accesses. Never.

AFAIK there is no hardware that cannot do a given width (of the form 8^n), 
as long as it it is aligned. This is due to the simplicity of splitting
larger transfers and the commonness of having byte-accesses.

: why not use a mem-target instead of the mainmem buffer and
: do a ggiCrossBlit with it ?
:   because this is exactly the same thing. it is exactly the same speed.
:   but it is more complicated to code, so why should you do it.

This depends on how your code is organized. It sometimes is convenient to
have the highlevel functions available, if the code is structured to make
use of them (then it is simpler to code using the memtarget), but for many 
games codes, you have code that uses direct access to a membuffer for 
everything anyway, so then it would be more complicated to code as you say.

: why use palemu target if visual is not 8 bit, why not use
: the not 8 bit visual and do a ggiCrossBlit from my 8bit mem-target visual
: to the not 8 bit visual ?
:   because palemu is faster.

Is it ? It shouldn't make much difference actually, but maybe. Got to check
the sources on that one ... Is the difference significant ?

CU, ANdy

= Andreas Beck                    |  Email :  <[EMAIL PROTECTED]> =

Reply via email to