I'm not sure if I'm allowed to do this, but I'm hoping this is ok...

I have been able to compile blender on linux 64 without problems up to a
month ago, but a recent change is giving me problems, and probably others
as well (on linux 64 at least). But if not, this commit shouldn't change
anything.
The problem was an added pad variable to RenderData in DNA_scene_types.h,
in a somewhat problematic place, since it causes the compiler to pad the
struct at the 'ListBase layers' variable, a struct of two pointers,
which caused me all sorts of trouble, variables declared after this having
incorrect or incorrectly assigned values.
This commit fixes this.

In makesdna.c is a useful section which will write a c program called
'padding.c' which compares the actual size to the expected size, which
for the RenderData and Scene struct in this case had a difference of 8.
Also useful was the gcc -Wpadded warning flag.

Hopefully I don't get 'fired' for this... ;)
Now back to fixing the yafray bugs...
This commit is contained in:
Alfredo de Greef 2006-06-02 03:39:03 +00:00
parent 1d6e626073
commit 7df985be0a

@ -146,8 +146,9 @@ typedef struct RenderData {
int cfra, sfra, efra; /* fames as in 'images' */
int images, framapto;
int images, framapto, pad3;
short flag, pad1;
float ctime; /* use for calcutions */
float framelen, blurfac;
@ -260,7 +261,7 @@ typedef struct RenderData {
/* information on different layers to be rendered */
ListBase layers;
short actlay, pad;
int pad2,pad3;
int pad2;
/**
* The gamma for the normal rendering. Used when doing