[2/8] d3dx9: Check the size of a DDS file in D3DXGetImageInfoFromFileInMemory.

Stefan Dösinger stefandoesinger at gmx.at
Thu May 10 03:32:36 CDT 2012

Am Mittwoch, 9. Mai 2012, 23:32:05 schrieb Józef Kucia:
> +        *pitch = width * format_desc->bytes_per_pixel;
> +        *size = *pitch * height;
Usually surface pitches are either 4 or 8 byte aligned(depending on the API 
and pool). I recommend to write some tests for this. The most likely 
problematic formats are D3DFMT_P8, any 16 bit format like R5G6B5 and 24 bit 
R8G8B8. Maybe you're supposed to honor the pitch_or_linear_size member of the 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20120510/e0fd6456/attachment.pgp>

More information about the wine-devel mailing list