[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: X apparently not releases memory



>
> Why not use depth 16?
>
> AFAIK depth 16 is a 2 bytes not much difference from 15 (almost 2 bytes)
> what makes it worth over depth 16?

In memory if you want to write bits that don't fit nice on a byte, you
have to,

y = 10101b; /* or however you specify 5 bits you want to go at the
begining of the next byte */
y << 3;

x = curent_destination_byte;
z = x & 00000111b
x = z | y

You have to do this to do every single pixel write with 15bit color. With
16bit color all the bytes are even so it's just

dest = val;

But I might be completly wrong with this, as I'm not sure you can writing
anything other 32bits anyways anymore. And it might even be 128bits. I
havn't done much with asm on anything newer than 8086.

So my question is, Does the processor have to do the & | = bit on every
byte right so it's just optimized the point that it's a non issue? Or
from a speed standpoint is it still more optimal to use 8,16, or 32 bit
color because you can just assign the bytes.

Another possiblity is that the memory write call takes 100x longer than
the | and & because it has to use the bus for video (or even if it's in
cache it's still slower than registers) so that makes it a non issue.

Thanks,

Josie Imlay


>
> --
> Carlos Barros.
>
>
> --
> To UNSUBSCRIBE, email to debian-x-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>



Reply to: