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:
authorTon Roosendaal <ton@blender.org>2006-02-11 18:55:00 +0300
committerTon Roosendaal <ton@blender.org>2006-02-11 18:55:00 +0300
commitf4e491e2f462618b039d31e0d39f2c0f37be1b17 (patch)
treec6cef3c018bfbc5bf0879f5502c7699ea2b5d4fc /source/blender/render
parent05166d0a35d99a7731a70710a893818708d029d1 (diff)
Thread rendering stability commit.
I noticed still several cases where the Imbuf library was called within a thread... and that whilst the Imbuf itself isn't threadsafe. Also the thread lock I added in rendering for loading images actually didn't work, because then it was still possible both threads were accessing the MEM_malloc function at same time. This commit nearly fully replaces ImBuf calls in compositor (giving another nice speedup btw, the way preview images in Nodes were calculated used clumsy imbuf scaling code). I've also centralized the 'mutex' locking for threading, which now only resides in BLI_threads.h. This is used to secure the last ImBuf calls I cannot replace, which is loading images and creating mipmaps. Really hope we get something more stable now!
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/include/renderpipeline.h4
-rw-r--r--source/blender/render/intern/source/envmap.c13
-rw-r--r--source/blender/render/intern/source/imagetexture.c17
-rw-r--r--source/blender/render/intern/source/pipeline.c75
-rw-r--r--source/blender/render/intern/source/rendercore.c44
-rw-r--r--source/blender/render/intern/source/zbuf.c26
6 files changed, 69 insertions, 110 deletions
diff --git a/source/blender/render/intern/include/renderpipeline.h b/source/blender/render/intern/include/renderpipeline.h
index 400420c7081..b6fc3b41703 100644
--- a/source/blender/render/intern/include/renderpipeline.h
+++ b/source/blender/render/intern/include/renderpipeline.h
@@ -32,10 +32,6 @@
struct Render;
-void *RE_mallocN(int len, char *name);
-void *RE_callocN(int len, char *name);
-void RE_freeN(void *poin);
-
#define PASS_VECTOR_MAX 10000.0f
#endif /* PIPELINE_H */
diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c
index 80e902e2a45..65ec49e5873 100644
--- a/source/blender/render/intern/source/envmap.c
+++ b/source/blender/render/intern/source/envmap.c
@@ -30,9 +30,10 @@
/* external modules: */
#include "MEM_guardedalloc.h"
+
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
-#include "BKE_utildefines.h"
+#include "BLI_threads.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h" /* for rectcpy */
@@ -48,13 +49,10 @@
#include "BKE_global.h"
#include "BKE_image.h" // BKE_write_ibuf
#include "BKE_texture.h"
+#include "BKE_utildefines.h"
#include "MTC_matrixops.h"
-#include "SDL_thread.h"
-#undef main
-#define main main /* stupid SDL_main redefines main as SDL_main */
-
/* this module */
#include "render_types.h"
#include "renderpipeline.h"
@@ -574,7 +572,6 @@ static void set_dxtdyt(float *dxts, float *dyts, float *dxt, float *dyt, int fac
int envmaptex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, TexResult *texres)
{
- extern SDL_mutex *load_ibuf_lock; // initrender.c
extern Render R; /* only in this call */
/* texvec should be the already reflected normal */
EnvMap *env;
@@ -591,10 +588,10 @@ int envmaptex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, TexRe
env->ima= tex->ima;
if(env->ima && env->ima->ok) {
// Now thread safe
- if(load_ibuf_lock) SDL_mutexP(load_ibuf_lock);
+ BLI_lock_thread();
if(env->ima->ibuf==NULL) ima_ibuf_is_nul(tex, tex->ima);
if(env->ima->ok && env->ok==0) envmap_split_ima(env);
- if(load_ibuf_lock) SDL_mutexV(load_ibuf_lock);
+ BLI_unlock_thread();
}
}
diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c
index e1868eda917..4552aba421a 100644
--- a/source/blender/render/intern/source/imagetexture.c
+++ b/source/blender/render/intern/source/imagetexture.c
@@ -48,6 +48,7 @@
#include "DNA_texture_types.h"
#include "BLI_blenlib.h"
+#include "BLI_threads.h"
#include "BKE_utildefines.h"
#include "BKE_global.h"
@@ -56,8 +57,6 @@
#include "BKE_texture.h"
#include "BKE_library.h"
-#include "SDL_thread.h"
-
#include "renderpipeline.h"
#include "render_types.h"
#include "texture.h"
@@ -106,10 +105,9 @@ int imagewrap(Tex *tex, Image *ima, float *texvec, TexResult *texres)
}
if(ima->ibuf==NULL) {
- extern SDL_mutex *load_ibuf_lock; // initrender.c
- if(load_ibuf_lock) SDL_mutexP(load_ibuf_lock);
+ BLI_lock_thread();
if(ima->ibuf==NULL) ima_ibuf_is_nul(tex, ima);
- if(load_ibuf_lock) SDL_mutexV(load_ibuf_lock);
+ BLI_unlock_thread();
}
if (ima->ok) {
@@ -594,7 +592,6 @@ static void makemipmap(Tex *tex, Image *ima)
int imagewraposa(Tex *tex, Image *ima, float *texvec, float *dxt, float *dyt, TexResult *texres)
{
- extern SDL_mutex *load_ibuf_lock; // initrender.c
TexResult texr;
ImBuf *ibuf, *previbuf;
float fx, fy, minx, maxx, miny, maxy, dx, dy;
@@ -611,18 +608,18 @@ int imagewraposa(Tex *tex, Image *ima, float *texvec, float *dxt, float *dyt, Te
}
if(ima->ibuf==NULL) {
- if(load_ibuf_lock) SDL_mutexP(load_ibuf_lock);
+ BLI_lock_thread();
if(ima->ibuf==NULL) ima_ibuf_is_nul(tex, ima);
- if(load_ibuf_lock) SDL_mutexV(load_ibuf_lock);
+ BLI_unlock_thread();
}
if (ima->ok) {
if(tex->imaflag & TEX_MIPMAP) {
if(ima->mipmap[0]==NULL) {
- if(load_ibuf_lock) SDL_mutexP(load_ibuf_lock);
+ BLI_lock_thread();
if(ima->mipmap[0]==NULL) makemipmap(tex, ima);
- if(load_ibuf_lock) SDL_mutexV(load_ibuf_lock);
+ BLI_unlock_thread();
}
}
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 2d14c15c6c8..43ca42a390b 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -107,33 +107,6 @@ Render R;
/* ********* alloc and free ******** */
-SDL_mutex *malloc_lock= NULL, *load_ibuf_lock=NULL;
-
-void *RE_mallocN(int len, char *name)
-{
- void *mem;
- if(malloc_lock) SDL_mutexP(malloc_lock);
- mem= MEM_mallocN(len, name);
- if(malloc_lock) SDL_mutexV(malloc_lock);
- return mem;
-}
-void *RE_callocN(int len, char *name)
-{
- void *mem;
- if(malloc_lock) SDL_mutexP(malloc_lock);
- mem= MEM_callocN(len, name);
- if(malloc_lock) SDL_mutexV(malloc_lock);
- return mem;
-}
-void RE_freeN(void *poin)
-{
- if(malloc_lock) SDL_mutexP(malloc_lock);
- MEM_freeN(poin);
- if(malloc_lock) SDL_mutexV(malloc_lock);
-}
-
-/* ********************** */
-
static int g_break= 0;
static int thread_break(void)
{
@@ -155,30 +128,30 @@ static void free_render_result(RenderResult *res)
while(res->layers.first) {
RenderLayer *rl= res->layers.first;
- if(rl->rectf) RE_freeN(rl->rectf);
+ if(rl->rectf) MEM_freeT(rl->rectf);
while(rl->passes.first) {
RenderPass *rpass= rl->passes.first;
- RE_freeN(rpass->rect);
+ MEM_freeT(rpass->rect);
BLI_remlink(&rl->passes, rpass);
- RE_freeN(rpass);
+ MEM_freeT(rpass);
}
BLI_remlink(&res->layers, rl);
- RE_freeN(rl);
+ MEM_freeT(rl);
}
if(res->rect32)
- RE_freeN(res->rect32);
+ MEM_freeT(res->rect32);
if(res->rectz)
- RE_freeN(res->rectz);
+ MEM_freeT(res->rectz);
if(res->rectf)
- RE_freeN(res->rectf);
+ MEM_freeT(res->rectf);
- RE_freeN(res);
+ MEM_freeT(res);
}
static void render_layer_add_pass(RenderLayer *rl, int rectsize, int passtype, char *mallocstr)
{
- RenderPass *rpass= RE_mallocN(sizeof(RenderPass), mallocstr);
+ RenderPass *rpass= MEM_mallocT(sizeof(RenderPass), mallocstr);
BLI_addtail(&rl->passes, rpass);
rpass->passtype= passtype;
@@ -187,12 +160,12 @@ static void render_layer_add_pass(RenderLayer *rl, int rectsize, int passtype, c
int x;
/* initialize to max speed */
- rect= rpass->rect= RE_mallocN(sizeof(float)*rectsize, mallocstr);
+ rect= rpass->rect= MEM_mallocT(sizeof(float)*rectsize, mallocstr);
for(x= rectsize-1; x>=0; x--)
rect[x]= PASS_VECTOR_MAX;
}
else
- rpass->rect= RE_callocN(sizeof(float)*rectsize, mallocstr);
+ rpass->rect= MEM_callocT(sizeof(float)*rectsize, mallocstr);
}
float *RE_RenderLayerGetPass(RenderLayer *rl, int passtype)
@@ -222,7 +195,7 @@ static RenderResult *new_render_result(Render *re, rcti *partrct, int crop)
if(rectx<=0 || recty<=0)
return NULL;
- rr= RE_callocN(sizeof(RenderResult), "new render result");
+ rr= MEM_callocT(sizeof(RenderResult), "new render result");
rr->rectx= rectx;
rr->recty= recty;
/* crop is one or two extra pixels rendered for filtering, is used for merging and display too */
@@ -237,7 +210,7 @@ static RenderResult *new_render_result(Render *re, rcti *partrct, int crop)
/* check renderdata for amount of layers */
for(srl= re->r.layers.first; srl; srl= srl->next) {
- rl= RE_callocN(sizeof(RenderLayer), "new render layer");
+ rl= MEM_callocT(sizeof(RenderLayer), "new render layer");
BLI_addtail(&rr->layers, rl);
strcpy(rl->name, srl->name);
@@ -245,7 +218,7 @@ static RenderResult *new_render_result(Render *re, rcti *partrct, int crop)
rl->layflag= srl->layflag;
rl->passflag= srl->passflag;
- rl->rectf= RE_callocN(rectx*recty*sizeof(float)*4, "layer float rgba");
+ rl->rectf= MEM_callocT(rectx*recty*sizeof(float)*4, "layer float rgba");
if(srl->passflag & SCE_PASS_Z)
render_layer_add_pass(rl, rectx*recty, SCE_PASS_Z, "Layer float Z");
@@ -269,10 +242,10 @@ static RenderResult *new_render_result(Render *re, rcti *partrct, int crop)
}
/* previewrender and envmap don't do layers, so we make a default one */
if(rr->layers.first==NULL) {
- rl= RE_callocN(sizeof(RenderLayer), "new render layer");
+ rl= MEM_callocT(sizeof(RenderLayer), "new render layer");
BLI_addtail(&rr->layers, rl);
- rl->rectf= RE_callocN(rectx*recty*sizeof(float)*4, "prev/env float rgba");
+ rl->rectf= MEM_callocT(rectx*recty*sizeof(float)*4, "prev/env float rgba");
/* note, this has to be in sync with scene.c */
rl->lay= (1<<20) -1;
@@ -457,7 +430,7 @@ Render *RE_NewRender(const char *name)
}
/* new render data struct */
- re= RE_callocN(sizeof(Render), "new render");
+ re= MEM_callocT(sizeof(Render), "new render");
BLI_addtail(&RenderList, re);
strncpy(re->name, name, RE_MAXNAME);
@@ -487,7 +460,7 @@ void RE_FreeRender(Render *re)
free_render_result(re->result);
BLI_remlink(&RenderList, re);
- RE_freeN(re);
+ MEM_freeT(re);
}
/* exit blender */
@@ -754,10 +727,8 @@ static void threaded_tile_processor(Render *re)
/* assuming no new data gets added to dbase... */
R= *re;
- /* set threadsafety */
+ /* set threadsafe break */
R.test_break= thread_break;
- malloc_lock= SDL_CreateMutex();
- load_ibuf_lock= SDL_CreateMutex();
/* timer loop demands to sleep when no parts are left */
nextpa= find_next_part(re);
@@ -809,8 +780,6 @@ static void threaded_tile_processor(Render *re)
}
/* restore threadsafety */
- if(malloc_lock) SDL_DestroyMutex(malloc_lock); malloc_lock= NULL;
- if(load_ibuf_lock) SDL_DestroyMutex(load_ibuf_lock); load_ibuf_lock= NULL;
g_break= 0;
BLI_end_threads(&threads);
@@ -948,7 +917,7 @@ static void do_render_final(Render *re)
if(re->r.scemode & R_DOSEQ) {
if (!re->result->rect32) {
- re->result->rect32= RE_callocN(sizeof(int)*re->rectx*re->recty, "do_render_final rectot");
+ re->result->rect32= MEM_callocT(sizeof(int)*re->rectx*re->recty, "do_render_final rectot");
}
if(!re->test_break())
do_render_seq(re->result, re->r.cfra);
@@ -1110,13 +1079,13 @@ static void do_write_image_or_movie(Render *re, Scene *scene, bMovieHandle *mh)
int dofree = 0;
/* note; the way it gets 32 bits rects is weak... */
if(rres.rect32==NULL) {
- rres.rect32= RE_mallocN(sizeof(int)*rres.rectx*rres.recty, "temp 32 bits rect");
+ rres.rect32= MEM_mallocT(sizeof(int)*rres.rectx*rres.recty, "temp 32 bits rect");
dofree = 1;
}
RE_ResultGet32(re, rres.rect32);
mh->append_movie(scene->r.cfra, rres.rect32, rres.rectx, rres.recty);
if(dofree) {
- RE_freeN(rres.rect32);
+ MEM_freeT(rres.rect32);
}
printf("Append frame %d", scene->r.cfra);
} else {
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index 65447aca4b4..063e225d08f 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -34,10 +34,12 @@
/* External modules: */
#include "MTC_matrixops.h"
+
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
-#include "BLI_rand.h"
#include "BLI_jitter.h"
+#include "BLI_rand.h"
+#include "BLI_threads.h"
#include "BKE_utildefines.h"
@@ -3010,10 +3012,10 @@ static PixStrMain *addpsmain(ListBase *lb)
{
PixStrMain *psm;
- psm= (PixStrMain *)RE_mallocN(sizeof(PixStrMain),"pixstrMain");
+ psm= (PixStrMain *)MEM_mallocT(sizeof(PixStrMain),"pixstrMain");
BLI_addtail(lb, psm);
- psm->ps= (PixStr *)RE_mallocN(4096*sizeof(PixStr),"pixstr");
+ psm->ps= (PixStr *)MEM_mallocT(4096*sizeof(PixStr),"pixstr");
psm->counter= 0;
return psm;
@@ -3026,8 +3028,8 @@ static void freeps(ListBase *lb)
for(psm= lb->first; psm; psm= psmnext) {
psmnext= psm->next;
if(psm->ps)
- RE_freeN(psm->ps);
- RE_freeN(psm);
+ MEM_freeT(psm->ps);
+ MEM_freeT(psm);
}
lb->first= lb->last= NULL;
}
@@ -3097,9 +3099,9 @@ void zbufshadeDA_tile(RenderPart *pa)
/* allocate the necessary buffers */
/* zbuffer inits these rects */
- pa->rectp= RE_mallocN(sizeof(int)*pa->rectx*pa->recty, "rectp");
- pa->rectz= RE_mallocN(sizeof(int)*pa->rectx*pa->recty, "rectz");
- if(R.r.mode & R_EDGE) edgerect= RE_callocN(sizeof(float)*pa->rectx*pa->recty, "rectedge");
+ pa->rectp= MEM_mallocT(sizeof(int)*pa->rectx*pa->recty, "rectp");
+ pa->rectz= MEM_mallocT(sizeof(int)*pa->rectx*pa->recty, "rectz");
+ if(R.r.mode & R_EDGE) edgerect= MEM_callocT(sizeof(float)*pa->rectx*pa->recty, "rectedge");
for(rl= rr->layers.first; rl; rl= rl->next) {
/* indication for scanline updates */
@@ -3107,7 +3109,7 @@ void zbufshadeDA_tile(RenderPart *pa)
/* initialize pixelstructs */
addpsmain(&psmlist);
- pa->rectdaps= RE_callocN(sizeof(long)*pa->rectx*pa->recty+4, "zbufDArectd");
+ pa->rectdaps= MEM_callocT(sizeof(long)*pa->rectx*pa->recty+4, "zbufDArectd");
/* always fill visibility */
for(pa->sample=0; pa->sample<R.osa; pa->sample++) {
@@ -3131,7 +3133,7 @@ void zbufshadeDA_tile(RenderPart *pa)
/* transp layer */
if(R.flag & R_ZTRA) {
if(rl->layflag & SCE_LAY_ZTRA) {
- float *acolrect= RE_callocN(4*sizeof(float)*pa->rectx*pa->recty, "alpha layer");
+ float *acolrect= MEM_callocT(4*sizeof(float)*pa->rectx*pa->recty, "alpha layer");
float *fcol= rl->rectf, *acol= acolrect;
int x;
@@ -3146,7 +3148,7 @@ void zbufshadeDA_tile(RenderPart *pa)
for(x=pa->rectx*pa->recty; x>0; x--, acol+=4, fcol+=4) {
addAlphaOverFloat(fcol, acol);
}
- RE_freeN(acolrect);
+ MEM_freeT(acolrect);
}
}
@@ -3161,15 +3163,15 @@ void zbufshadeDA_tile(RenderPart *pa)
convert_zbuf_to_distbuf(pa, rl);
/* free stuff within loop! */
- RE_freeN(pa->rectdaps); pa->rectdaps= NULL;
+ MEM_freeT(pa->rectdaps); pa->rectdaps= NULL;
freeps(&psmlist);
}
/* free all */
- RE_freeN(pa->rectp); pa->rectp= NULL;
- RE_freeN(pa->rectz); pa->rectz= NULL;
+ MEM_freeT(pa->rectp); pa->rectp= NULL;
+ MEM_freeT(pa->rectz); pa->rectz= NULL;
- if(edgerect) RE_freeN(edgerect);
+ if(edgerect) MEM_freeT(edgerect);
/* display active layer */
rr->renlay= BLI_findlink(&rr->layers, R.r.actlay);
@@ -3190,8 +3192,8 @@ void zbufshade_tile(RenderPart *pa)
set_part_zbuf_clipflag(pa);
/* zbuffer code clears/inits rects */
- pa->rectp= RE_mallocN(sizeof(int)*pa->rectx*pa->recty, "rectp");
- pa->rectz= RE_mallocN(sizeof(int)*pa->rectx*pa->recty, "rectz");
+ pa->rectp= MEM_mallocT(sizeof(int)*pa->rectx*pa->recty, "rectp");
+ pa->rectz= MEM_mallocT(sizeof(int)*pa->rectx*pa->recty, "rectz");
shpi.thread= pa->thread;
@@ -3241,7 +3243,7 @@ void zbufshade_tile(RenderPart *pa)
if(R.flag & R_ZTRA) {
if(rl->layflag & SCE_LAY_ZTRA) {
- float *acolrect= RE_callocN(4*sizeof(float)*pa->rectx*pa->recty, "alpha layer");
+ float *acolrect= MEM_callocT(4*sizeof(float)*pa->rectx*pa->recty, "alpha layer");
float *fcol= rl->rectf, *acol= acolrect;
int x;
@@ -3256,7 +3258,7 @@ void zbufshade_tile(RenderPart *pa)
for(x=pa->rectx*pa->recty; x>0; x--, acol+=4, fcol+=4) {
addAlphaOverFloat(fcol, acol);
}
- RE_freeN(acolrect);
+ MEM_freeT(acolrect);
}
}
@@ -3280,8 +3282,8 @@ void zbufshade_tile(RenderPart *pa)
/* display active layer */
rr->renlay= BLI_findlink(&rr->layers, R.r.actlay);
- RE_freeN(pa->rectp); pa->rectp= NULL;
- RE_freeN(pa->rectz); pa->rectz= NULL;
+ MEM_freeT(pa->rectp); pa->rectp= NULL;
+ MEM_freeT(pa->rectz); pa->rectz= NULL;
}
/* ------------------------------------------------------------------------ */
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index 7bbbd7fc3ef..0b813d90df7 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -55,8 +55,6 @@
#include "radio_types.h"
#include "radio.h" /* needs RG, some root data for radiosity */
-#include "SDL_thread.h"
-
#include "RE_render_ext.h"
/* local includes */
@@ -87,15 +85,15 @@ void zbuf_alloc_span(ZSpan *zspan, int rectx, int recty)
zspan->rectx= rectx;
zspan->recty= recty;
- zspan->span1= RE_mallocN(recty*sizeof(float), "zspan");
- zspan->span2= RE_mallocN(recty*sizeof(float), "zspan");
+ zspan->span1= MEM_mallocT(recty*sizeof(float), "zspan");
+ zspan->span2= MEM_mallocT(recty*sizeof(float), "zspan");
}
static void zbuf_free_span(ZSpan *zspan)
{
if(zspan) {
- if(zspan->span1) RE_freeN(zspan->span1);
- if(zspan->span2) RE_freeN(zspan->span2);
+ if(zspan->span1) MEM_freeT(zspan->span1);
+ if(zspan->span2) MEM_freeT(zspan->span2);
zspan->span1= zspan->span2= NULL;
}
}
@@ -261,9 +259,9 @@ static APixstr *addpsmainA(ListBase *lb)
{
APixstrMain *psm;
- psm= RE_mallocN(sizeof(APixstrMain), "addpsmainA");
+ psm= MEM_mallocT(sizeof(APixstrMain), "addpsmainA");
BLI_addtail(lb, psm);
- psm->ps= RE_callocN(4096*sizeof(APixstr),"pixstr");
+ psm->ps= MEM_callocT(4096*sizeof(APixstr),"pixstr");
return psm->ps;
}
@@ -275,8 +273,8 @@ static void freepsA(ListBase *lb)
for(psm= lb->first; psm; psm= psmnext) {
psmnext= psm->next;
if(psm->ps)
- RE_freeN(psm->ps);
- RE_freeN(psm);
+ MEM_freeT(psm->ps);
+ MEM_freeT(psm);
}
}
@@ -2398,7 +2396,7 @@ static void zbuffer_abuf(RenderPart *pa, APixstr *APixbuf, ListBase *apsmbase, u
zspan.zofsy= -pa->disprect.ymin;
/* the buffers */
- zspan.arectz= RE_mallocN(sizeof(int)*pa->rectx*pa->recty, "Arectz");
+ zspan.arectz= MEM_mallocT(sizeof(int)*pa->rectx*pa->recty, "Arectz");
zspan.apixbuf= APixbuf;
zspan.apsmbase= apsmbase;
@@ -2480,7 +2478,7 @@ static void zbuffer_abuf(RenderPart *pa, APixstr *APixbuf, ListBase *apsmbase, u
if(R.test_break()) break;
}
- RE_freeN(zspan.arectz);
+ MEM_freeT(zspan.arectz);
zbuf_free_span(&zspan);
}
@@ -2646,7 +2644,7 @@ void zbuffer_transp_shade(RenderPart *pa, RenderLayer *rl, float *pass)
if(R.test_break())
return;
- APixbuf= RE_callocN(pa->rectx*pa->recty*sizeof(APixstr), "APixbuf");
+ APixbuf= MEM_callocT(pa->rectx*pa->recty*sizeof(APixstr), "APixbuf");
if(R.osa>16) {
printf("abufsetrow: osa too large\n");
@@ -2818,7 +2816,7 @@ void zbuffer_transp_shade(RenderPart *pa, RenderLayer *rl, float *pass)
offs+= pa->rectx;
}
- RE_freeN(APixbuf);
+ MEM_freeT(APixbuf);
freepsA(&apsmbase);
}