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.
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.
That's probably a good idea
However the best way to fix this problem would be to pack this structure:
#include <pshpack1.h> struct ffp_settings { ... }; #include <poppack.h>
Is this portable?
Stefan Dösinger wrote:
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.
That's probably a good idea
However the best way to fix this problem would be to pack this structure:
#include <pshpack1.h> struct ffp_settings { ... }; #include <poppack.h>
Is this portable?
That's Wine's header files. And AFAIK they should work on all platforms. If anything, number of structures in windows headers are packed...
Vitaliy.