WineD3D patch submission

Stefan Dösinger stefandoesinger at
Sat Sep 22 14:35:09 CDT 2007

Hello Mitchell,

First of all, thank you for your effort in improving Wine. People who pick 
their favorite game(s) and fix bugs is exactly what we need these days :-)

You should really get used to git for submitting patches. It requires a tiny 
bit of learning effort in the beginning, but it pays off very soon because it 
makes handling patches much easier.

> Anyways, in my attempt to get it working I fixed up some issues w/
> "IWineD3DDeviceImpl_UpdateSurface.c" in dlls/wined3d, not entirely sure
> how you guys do things around here so I thought i'd just post my changes
> to the function in this mailing list and you can do with it what you
> want.  (Note: it actually has a few different methods of doing one
> thing, enclosed in macro blocks to toggle between them.  Technically the
> first one should work (i think :\) once you guys properly implement
> surface locking/unlocking, and it's 'simplest', but the last one is the
> only one that actually works properly (using standard OpenGL calls).
I looked at the diff Mirek supplied. You should add an exact description what 
your modifications do because "i also fixed the existing code that didn't 
actually do what it was supposed to, heh" does not say much. From reading the 
code it seems that you implement support for the source rectangle. Your patch 
is mixed with formatting changes, which is not good. Formatting changes 
should be separate patches, if really needed.

As for the code, the memcpy codepath should not be in UpdateSurface. If a 
system memory copy is needed, IWineGDISurface_Blt should be called, and the 
support for partial rectangles of compressed surfaces added there. Otherwise, 
gl(Compressed)TexSubImage2D should be used for performance reasons.

As for your memcpy() codepath where you said lockrect is broken: What you are 
trying here will not work. You have to take the pitch into account when 
accessing the data returned from lockrect, the data is not in one continuous 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : 

More information about the wine-devel mailing list