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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-02-01 23:47:23 +0300
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-02-01 23:47:23 +0300
commit18a2b9940e5b74475ab72359271656e7117aa9a2 (patch)
tree845c784b911f5a728cf2d55594b10ccc9ccd1cbd /source/blender/render
parent107667d20a15593f5c94437cc57fe786bcb92f7a (diff)
parent58b89bbac30a65ae8a7bc0f2063422670e3ec0b1 (diff)
Merged changes in the trunk up to revision 26533.
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/CMakeLists.txt4
-rw-r--r--source/blender/render/SConscript11
-rw-r--r--source/blender/render/intern/source/pipeline.c15
-rw-r--r--source/blender/render/intern/source/shadeinput.c4
-rw-r--r--source/blender/render/intern/source/zbuf.c5
5 files changed, 36 insertions, 3 deletions
diff --git a/source/blender/render/CMakeLists.txt b/source/blender/render/CMakeLists.txt
index 66f0a327e81..699367e9c5a 100644
--- a/source/blender/render/CMakeLists.txt
+++ b/source/blender/render/CMakeLists.txt
@@ -54,6 +54,10 @@ IF(APPLE)
ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES "i386" OR CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
ENDIF(APPLE)
+IF(WITH_RAYOPTIMIZATION)
+ ADD_DEFINITIONS(-D__SSE__)
+ENDIF(WITH_RAYOPTIMIZATION)
+
#TODO
#if env['OURPLATFORM']=='linux2':
# cflags='-pthread'
diff --git a/source/blender/render/SConscript b/source/blender/render/SConscript
index f3a997aa5bf..7f80731e26d 100644
--- a/source/blender/render/SConscript
+++ b/source/blender/render/SConscript
@@ -34,6 +34,11 @@ if env['OURPLATFORM'] == 'linux2':
cxxflags = env['CXXFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS']
incs += ' ../../../extern/binreloc/include'
+if env['OURPLATFORM'] == 'linuxcross':
+ if env['WITH_BF_RAYOPTIMIZATION']:
+ cflags = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS']
+ cxxflags = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS']
+
if env['WITH_BF_QUICKTIME']:
defs.append('WITH_QUICKTIME')
incs += ' ../quicktime ' + env['BF_QUICKTIME_INC']
@@ -44,6 +49,12 @@ if env['WITH_BF_OPENEXR']:
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
+#
+# HACK: To fix problem with error 'MMX instruction set not enabled' from mmintrin.h
+#
+if env['OURPLATFORM'] == 'linuxcross':
+ defs.append('__MMX__')
+
if env['WITH_BF_RAYOPTIMIZATION']:
defs.append('__SSE__')
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index da0be4d55d5..671811f0b7a 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -2092,7 +2092,7 @@ static void load_backbuffer(Render *re)
strcpy(name, re->r.backbuf);
BLI_convertstringcode(name, G.sce);
- BLI_convertstringframe(name, re->r.cfra);
+ BLI_convertstringframe(name, re->r.cfra, 0);
if(re->backbuf) {
re->backbuf->id.us--;
@@ -2844,9 +2844,18 @@ static int do_write_image_or_movie(Render *re, Scene *scene, bMovieHandle *mh, R
/* float factor for random dither, imbuf takes care of it */
ibuf->dither= scene->r.dither_intensity;
+
/* prepare to gamma correct to sRGB color space */
- if (scene->r.color_mgt_flag & R_COLOR_MANAGEMENT)
- ibuf->profile = IB_PROFILE_LINEAR_RGB;
+ if (scene->r.color_mgt_flag & R_COLOR_MANAGEMENT) {
+ /* sequence editor can generate 8bpc render buffers */
+ if (ibuf->rect) {
+ ibuf->profile = IB_PROFILE_SRGB;
+ if (ELEM(scene->r.imtype, R_OPENEXR, R_RADHDR))
+ IMB_float_from_rect(ibuf);
+ } else {
+ ibuf->profile = IB_PROFILE_LINEAR_RGB;
+ }
+ }
ok= BKE_write_ibuf(scene, ibuf, name, scene->r.imtype, scene->r.subimtype, scene->r.quality);
diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c
index 38241878300..d1fa8a5ed51 100644
--- a/source/blender/render/intern/source/shadeinput.c
+++ b/source/blender/render/intern/source/shadeinput.c
@@ -1416,6 +1416,10 @@ int shade_samples(ShadeSample *ssamp, PixStr *ps, int x, int y)
shade_input_do_shade(shi, shr);
}
}
+ else if(shi->passflag & SCE_PASS_Z) {
+ for(samp=0; samp<ssamp->tot; samp++, shi++, shr++)
+ shr->z= -shi->co[2];
+ }
return 1;
}
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index 484dbdd37a3..6d67c068bdd 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -3828,6 +3828,11 @@ static int shade_tra_samples(ShadeSample *ssamp, StrandShadeCache *cache, int x,
renderspothalo(shi, shr->combined, shr->combined[3]);
}
}
+ else if(shi->passflag & SCE_PASS_Z) {
+ for(samp=0; samp<ssamp->tot; samp++, shi++, shr++)
+ shr->z= -shi->co[2];
+ }
+
return 1;
}
return 0;