WineD3D: surface pitch fix

Roderick Colenbrander thunderbird2k at
Thu Aug 3 16:29:51 CDT 2006


This patch fixes a regression caused by setting an incorrect pitch value. The call glPixelStorei with GL_UNPACK_ROW_LENGTH expects the length of a row in memory excluding the bpp, so it wants a pitch without bpp. This patch fixes that and also replaces width with pitch in the memory allocation part of the code. We only need pitch*height*bpp whereas width*height*bpp can be greater or equal to pitch*height*bpp, so that we allocate too a little more memory than we actually need.
Further this patch clears the pitch at the end of the function which fixes Battlefield 1942.

Roderick Colenbrander


Echte DSL-Flatrate dauerhaft für 0,- Euro*. Nur noch kurze Zeit!
"Feel free" mit GMX DSL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wined3d_surface_pitch.patch
Type: text/x-diff
Size: 1594 bytes
Desc: not available
Url :

More information about the wine-patches mailing list