Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Genrich <daniel.genrich@gmx.net>2008-08-17 21:08:00 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2008-08-17 21:08:00 +0400
commitfd0072e77cd28d52e00ea77542ba6d11018889b5 (patch)
tree6dc1858430424bac56898b0c6eaba05d062759ac /source/blender/render
parent68765dc94bbb1bf924caa753d62d3f6029c60db5 (diff)
Win64: please check my changes if you ran across them ;) But should be fine since no additional crashes were reported!
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/CMakeLists.txt2
-rw-r--r--source/blender/render/SConscript2
-rw-r--r--source/blender/render/intern/include/render_types.h8
-rw-r--r--source/blender/render/intern/source/occlusion.c2
-rw-r--r--source/blender/render/intern/source/pipeline.c2
-rw-r--r--source/blender/render/intern/source/rendercore.c22
-rw-r--r--source/blender/render/intern/source/shadbuf.c16
-rw-r--r--source/blender/render/intern/source/strand.c4
-rw-r--r--source/blender/render/intern/source/zbuf.c8
9 files changed, 34 insertions, 32 deletions
diff --git a/source/blender/render/CMakeLists.txt b/source/blender/render/CMakeLists.txt
index b543dff49ff..0b659554d1a 100644
--- a/source/blender/render/CMakeLists.txt
+++ b/source/blender/render/CMakeLists.txt
@@ -29,7 +29,7 @@ FILE(GLOB SRC intern/source/*.c)
SET(INC
intern/include ../../../intern/guardedalloc ../blenlib ../makesdna
extern/include ../blenkernel ../radiosity/extern/include ../imbuf
- ../quicktime ../include ../../kernel/gen_messaging ../yafray
+ ../quicktime ../include ../../kernel/gen_messaging ../yafray ../blenloader
)
IF(WITH_OPENEXR)
diff --git a/source/blender/render/SConscript b/source/blender/render/SConscript
index b1bc9673f23..f0d1353b0d3 100644
--- a/source/blender/render/SConscript
+++ b/source/blender/render/SConscript
@@ -6,7 +6,7 @@ sources = env.Glob('intern/source/*.c')
incs = 'intern/include #/intern/guardedalloc ../blenlib ../makesdna'
incs += ' extern/include ../blenkernel ../radiosity/extern/include ../imbuf'
-incs += ' ../quicktime ../include ../../kernel/gen_messaging'
+incs += ' ../quicktime ../include ../../kernel/gen_messaging ../blenloader'
defs = []
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h
index 2f97b19f75c..f83bbd7e8b2 100644
--- a/source/blender/render/intern/include/render_types.h
+++ b/source/blender/render/intern/include/render_types.h
@@ -44,6 +44,8 @@
#include "RE_shader_ext.h" /* TexResult, ShadeResult, ShadeInput */
#include "sunsky.h"
+#include "BLO_sys_types.h" // for intptr_t support
+
struct Object;
struct MemArena;
struct VertTableNode;
@@ -89,11 +91,11 @@ typedef struct RenderPart
int *rectp; /* polygon index table */
int *rectz; /* zbuffer */
int *rectmask; /* negative zmask */
- long *rectdaps; /* delta acum buffer for pixel structs */
+ intptr_t *rectdaps; /* delta acum buffer for pixel structs */
int *rectbacko; /* object table for backside sss */
int *rectbackp; /* polygon index table for backside sss */
int *rectbackz; /* zbuffer for backside sss */
- long *rectall; /* buffer for all faces for sss */
+ intptr_t *rectall; /* buffer for all faces for sss */
rcti disprect; /* part coordinates within total picture */
int rectx, recty; /* the size */
@@ -226,7 +228,7 @@ struct ISBData;
typedef struct ShadSampleBuf {
struct ShadSampleBuf *next, *prev;
- long *zbuf;
+ intptr_t *zbuf;
char *cbuf;
} ShadSampleBuf;
diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c
index d70c51b83bc..15c57eb9362 100644
--- a/source/blender/render/intern/source/occlusion.c
+++ b/source/blender/render/intern/source/occlusion.c
@@ -1670,7 +1670,7 @@ void cache_occ_samples(Render *re, RenderPart *pa, ShadeSample *ssamp)
OcclusionCacheSample *sample;
OccFace exclude;
ShadeInput *shi;
- long *rd=NULL;
+ intptr_t *rd=NULL;
int *ro=NULL, *rp=NULL, *rz=NULL, onlyshadow;
int x, y, step = CACHE_STEP;
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 6a0af82b4d7..3cd7bdc6772 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -138,7 +138,7 @@ static void print_error(char *str) {printf("ERROR: %s\n", str);}
static void stats_background(RenderStats *rs)
{
- extern unsigned long mem_in_use;
+ extern uintptr_t mem_in_use;
float megs_used_memory= mem_in_use/(1024.0*1024.0);
char str[400], *spos= str;
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index 4520e4c10bb..4a2ad995b39 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -243,7 +243,7 @@ static void halo_tile(RenderPart *pa, RenderLayer *rl)
rcti disprect= pa->disprect, testrect= pa->disprect;
float dist, xsq, ysq, xn, yn;
float col[4];
- long *rd= NULL;
+ intptr_t *rd= NULL;
int a, *rz, zz, y, sample, totsample, od;
short minx, maxx, miny, maxy, x;
unsigned int lay= rl->lay;
@@ -324,7 +324,7 @@ static void lamphalo_tile(RenderPart *pa, RenderLayer *rl)
ShadeInput shi;
float *pass;
float fac, col[4];
- long *rd= pa->rectdaps;
+ intptr_t *rd= pa->rectdaps;
int *rz= pa->rectz;
int x, y, sample, totsample, fullsample, od;
@@ -767,7 +767,7 @@ static void shadeDA_tile(RenderPart *pa, RenderLayer *rl)
{
RenderResult *rr= pa->result;
ShadeSample ssamp;
- long *rd, *rectdaps= pa->rectdaps;
+ intptr_t *rd, *rectdaps= pa->rectdaps;
int samp;
int x, y, seed, crop=0, offs=0, od;
@@ -874,7 +874,7 @@ static void freeps(ListBase *lb)
lb->first= lb->last= NULL;
}
-static void addps(ListBase *lb, long *rd, int obi, int facenr, int z, int maskz, unsigned short mask)
+static void addps(ListBase *lb, intptr_t *rd, int obi, int facenr, int z, int maskz, unsigned short mask)
{
PixStrMain *psm;
PixStr *ps, *last= NULL;
@@ -901,7 +901,7 @@ static void addps(ListBase *lb, long *rd, int obi, int facenr, int z, int maskz,
ps= psm->ps + psm->counter++;
if(last) last->next= ps;
- else *rd= (long)ps;
+ else *rd= (intptr_t)ps;
ps->next= NULL;
ps->obi= obi;
@@ -1027,7 +1027,7 @@ static void reset_sky_speed(RenderPart *pa, RenderLayer *rl)
static unsigned short *make_solid_mask(RenderPart *pa)
{
- long *rd= pa->rectdaps;
+ intptr_t *rd= pa->rectdaps;
unsigned short *solidmask, *sp;
int x;
@@ -1092,7 +1092,7 @@ void make_pixelstructs(RenderPart *pa, ZSpan *zspan, int sample, void *data)
{
ZbufSolidData *sdata= (ZbufSolidData*)data;
ListBase *lb= sdata->psmlist;
- long *rd= pa->rectdaps;
+ intptr_t *rd= pa->rectdaps;
int *ro= zspan->recto;
int *rp= zspan->rectp;
int *rz= zspan->rectz;
@@ -1133,7 +1133,7 @@ void zbufshadeDA_tile(RenderPart *pa)
/* initialize pixelstructs and edge buffer */
addpsmain(&psmlist);
- pa->rectdaps= MEM_callocN(sizeof(long)*pa->rectx*pa->recty+4, "zbufDArectd");
+ pa->rectdaps= MEM_callocN(sizeof(intptr_t)*pa->rectx*pa->recty+4, "zbufDArectd");
if(rl->layflag & SCE_LAY_EDGE)
if(R.r.mode & R_EDGE)
@@ -1433,7 +1433,7 @@ static void addps_sss(void *cb_handle, int obi, int facenr, int x, int y, int z)
return;
if(pa->rectall) {
- long *rs= pa->rectall + pa->rectx*y + x;
+ intptr_t *rs= pa->rectall + pa->rectx*y + x;
addps(&handle->psmlist, rs, obi, facenr, z, 0, 0);
handle->totps++;
@@ -1569,7 +1569,7 @@ void zbufshade_sss_tile(RenderPart *pa)
int *ro, *rz, *rp, *rbo, *rbz, *rbp, lay;
#if 0
PixStr *ps;
- long *rs;
+ intptr_t *rs;
int z;
#endif
@@ -1581,7 +1581,7 @@ void zbufshade_sss_tile(RenderPart *pa)
handle.psmlist.first= handle.psmlist.last= NULL;
addpsmain(&handle.psmlist);
- pa->rectall= MEM_callocN(sizeof(long)*pa->rectx*pa->recty+4, "rectall");
+ pa->rectall= MEM_callocN(sizeof(intptr_t)*pa->rectx*pa->recty+4, "rectall");
#else
pa->recto= MEM_mallocN(sizeof(int)*pa->rectx*pa->recty, "recto");
pa->rectp= MEM_mallocN(sizeof(int)*pa->rectx*pa->recty, "rectp");
diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c
index f3258b601de..f477df3ed8c 100644
--- a/source/blender/render/intern/source/shadbuf.c
+++ b/source/blender/render/intern/source/shadbuf.c
@@ -171,7 +171,7 @@ static void compress_shadowbuf(ShadBuf *shb, int *rectz, int square)
{
ShadSampleBuf *shsample;
float dist;
- unsigned long *ztile;
+ uintptr_t *ztile;
int *rz, *rz1, verg, verg1, size= shb->size;
int a, x, y, minx, miny, byt1, byt2;
char *rc, *rcline, *ctile, *zt;
@@ -179,10 +179,10 @@ static void compress_shadowbuf(ShadBuf *shb, int *rectz, int square)
shsample= MEM_mallocN( sizeof(ShadSampleBuf), "shad sample buf");
BLI_addtail(&shb->buffers, shsample);
- shsample->zbuf= MEM_mallocN( sizeof(unsigned long)*(size*size)/256, "initshadbuf2");
+ shsample->zbuf= MEM_mallocN( sizeof(uintptr_t)*(size*size)/256, "initshadbuf2");
shsample->cbuf= MEM_callocN( (size*size)/256, "initshadbuf3");
- ztile= (unsigned long *)shsample->zbuf;
+ ztile= (uintptr_t *)shsample->zbuf;
ctile= shsample->cbuf;
/* help buffer */
@@ -237,7 +237,7 @@ static void compress_shadowbuf(ShadBuf *shb, int *rectz, int square)
}
if(byt1 && byt2) { /* only store byte */
*ctile= 1;
- *ztile= (unsigned long)MEM_mallocN(256+4, "tile1");
+ *ztile= (uintptr_t)MEM_mallocN(256+4, "tile1");
rz= (int *)*ztile;
*rz= *rz1;
@@ -247,7 +247,7 @@ static void compress_shadowbuf(ShadBuf *shb, int *rectz, int square)
}
else if(byt1) { /* only store short */
*ctile= 2;
- *ztile= (unsigned long)MEM_mallocN(2*256+4,"Tile2");
+ *ztile= (uintptr_t)MEM_mallocN(2*256+4,"Tile2");
rz= (int *)*ztile;
*rz= *rz1;
@@ -260,7 +260,7 @@ static void compress_shadowbuf(ShadBuf *shb, int *rectz, int square)
}
else { /* store triple */
*ctile= 3;
- *ztile= (unsigned long)MEM_mallocN(3*256,"Tile3");
+ *ztile= (uintptr_t)MEM_mallocN(3*256,"Tile3");
zt= (char *)*ztile;
rc= rcline;
@@ -542,7 +542,7 @@ void freeshadowbuf(LampRen *lar)
v= (shb->size*shb->size)/256;
for(shsample= shb->buffers.first; shsample; shsample= shsample->next) {
- long *ztile= shsample->zbuf;
+ intptr_t *ztile= shsample->zbuf;
char *ctile= shsample->cbuf;
for(b=0; b<v; b++, ztile++, ctile++)
@@ -1752,7 +1752,7 @@ static void isb_make_buffer(RenderPart *pa, LampRen *lar)
ISBSample *samp, *samplebuf[16]; /* should be RE_MAX_OSA */
ISBBranch root;
MemArena *memarena;
- long *rd;
+ intptr_t *rd;
int *recto, *rectp, x, y, sindex, sample, bsp_err=0;
/* storage for shadow, per thread */
diff --git a/source/blender/render/intern/source/strand.c b/source/blender/render/intern/source/strand.c
index 591d51a969d..05e36160f0e 100644
--- a/source/blender/render/intern/source/strand.c
+++ b/source/blender/render/intern/source/strand.c
@@ -416,7 +416,7 @@ typedef struct StrandPart {
int *totapixbuf;
int *rectz;
int *rectmask;
- long *rectdaps;
+ intptr_t *rectdaps;
int rectx, recty;
int sample;
@@ -510,7 +510,7 @@ static void do_strand_fillac(void *handle, int x, int y, float u, float v, float
if(spart->rectdaps) {
/* find the z of the sample */
PixStr *ps;
- long *rd= spart->rectdaps + offset;
+ intptr_t *rd= spart->rectdaps + offset;
bufferz= 0x7FFFFFFF;
if(spart->rectmask) maskz= 0x7FFFFFFF;
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index c91c9e2f799..29aa6e3be29 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -2278,7 +2278,7 @@ static int hashlist_projectvert(float *v1, float winmat[][4], float *hoco)
return 0;
}
- buck= &bucket[ (((long)v1)/16) & 255 ];
+ buck= &bucket[ (((intptr_t)v1)/16) & 255 ];
if(buck->vert==v1) {
QUATCOPY(hoco, buck->hoco);
return buck->clip;
@@ -3263,7 +3263,7 @@ static void copyto_abufz(RenderPart *pa, int *arectz, int *rectmask, int sample)
{
PixStr *ps;
int x, y, *rza, *rma;
- long *rd;
+ intptr_t *rd;
if(R.osa==0) {
memcpy(arectz, pa->rectz, sizeof(int)*pa->rectx*pa->recty);
@@ -3484,7 +3484,7 @@ static int zbuffer_abuf(RenderPart *pa, APixstr *APixbuf, ListBase *apsmbase, Re
/* speed pointer NULL = sky, we clear */
/* else if either alpha is full or no solid was filled in: copy speed */
/* else fill in minimum speed */
-void add_transp_speed(RenderLayer *rl, int offset, float *speed, float alpha, long *rdrect)
+void add_transp_speed(RenderLayer *rl, int offset, float *speed, float alpha, intptr_t *rdrect)
{
RenderPass *rpass;
@@ -3958,7 +3958,7 @@ unsigned short *zbuffer_transp_shade(RenderPart *pa, RenderLayer *rl, float *pas
ZTranspRow zrow[MAX_ZROW];
StrandShadeCache *sscache= NULL;
float sampalpha, alpha, *passrect= pass;
- long *rdrect;
+ intptr_t *rdrect;
int x, y, crop=0, a, b, totface, totsample, doztra;
int addpassflag, offs= 0, od, addzbuf, osa = (R.osa? R.osa: 1);
unsigned short *ztramask= NULL, filled;