[2/2] WineD3D: Make the srgb write flag bigger

Vitaliy Margolen wine-devel at kievinfo.com
Wed Sep 3 13:10:07 CDT 2008


Stefan Dösinger wrote:
> 
> ------------------------------------------------------------------------
> 
> Apparently gcc pads the structure size to DWORD alignment, which
> leaves 3 padding bytes which trigger differences in the memset.
> This fixes memory "leaks" in the fragment pipeline replacement
> without needing a memset

You should add a note to the source about this. Or someone might change the
size of this structure and the old bug will return.

However the best way to fix this problem would be to pack this structure:

#include <pshpack1.h>
struct ffp_settings {
...
};
#include <poppack.h>


Vitaliy.



More information about the wine-devel mailing list