https://bugs.winehq.org/show_bug.cgi?id=36090
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |matteo.mystral@gmail.com
--- Comment #8 from Matteo Bruni matteo.mystral@gmail.com --- Created attachment 49781 --> https://bugs.winehq.org/attachment.cgi?id=49781 Patch
The game fills a 1024x1024 D3DFMT_A4R4G4B4 texture with 65x65 tiles by creating user-memory textures and then invoking UpdateSurface on them. The patch fixes the pitch used there and thus the texture upload.
There are two separate changes in the patch. The wined3d_surface_update_desc() part should be quite obvious. More interesting is the GL_UNPACK_ALIGNMENT part. Right now that is set once and for all at context creation time to the "native" alignment of the graphic API (which is generally wrong with user-memory surfaces). Ideally we could set it to 1 there, any codepath uploading texture data should arguably take the alignment into account already in the source pitch anyway. Does it sound reasonable?