wined3d: universal surface convertor function for unsigned integer color formats(3rd attempt)

Victor ErV2005 at rambler.ru
Wed Jul 23 18:44:45 CDT 2008


On Wednesday 23 July 2008 21:48:59 Chris Robinson wrote:
> But extracting the mask offset and size from the actual mask takes a bit of
> time, 
Extracting mask is called once or twice per channel conversion. I.e. in case 
of converting a8r8g8b8->a1r5g5b5 mask should be calculated only 8 times, no 
matter how big surface is. check mask_copy() routine for details. Optimizing 
this is pointless - converter performs much more per pixel operations - 
shifts, bitwise operations, etc, so you won't notice any difference.

> and as it is, the table can't currently set a proper mask for 
> anything over 32 bits (including the 16-bit-per-component unsigned integer
> types).
Yes, this isn't supported. But with current scheme of conversion, adding 
support for 16-bit-per-component surfaces would require operating on 64bit 
numbers or increasing number of per-pixel operations. I think per-pixel 64bit 
shifts on 32bit CPUs will be slower. 

replacing masks with number of bits and shift will need additional work, since 
masks are probably used in other places. There will be also high chance of 
breaking entire table accidentally because of misprint. 

If you don't like current functionality, to my opinion the best approach would 
be to modify it once my patch made it in repository. 

-- 
Victor Eremin (ErV2005 at rambler.ru)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: This is a digitally signed message part.
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20080724/66fd4527/attachment.pgp 


More information about the wine-devel mailing list