From b89beaf9909bfcc65558d7837ac9bc444f4dbb31 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 14 Feb 2012 15:26:20 +0000 Subject: [PATCH 01/11] Buildbot: enable building CUDA binaries on Windows slaves. Should make CUDA available for rendering in buildbot builds. --- build_files/buildbot/slave_compile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/build_files/buildbot/slave_compile.py b/build_files/buildbot/slave_compile.py index 415f95a516f..f29e826f8c3 100644 --- a/build_files/buildbot/slave_compile.py +++ b/build_files/buildbot/slave_compile.py @@ -115,6 +115,7 @@ else: bitness = '64' scons_options.append('BF_BITNESS=' + bitness) + scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=True') retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options) sys.exit(retcode) From 1df04f1dcd26ec08e5e9d530bf553c39f9f13615 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 14 Feb 2012 15:44:17 +0000 Subject: [PATCH 02/11] SCons: command line options should be coma-separated when adding to options list --- build_files/scons/tools/btools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py index a71ab04b888..fe481d7ef34 100644 --- a/build_files/scons/tools/btools.py +++ b/build_files/scons/tools/btools.py @@ -158,7 +158,7 @@ def validate_arguments(args, bc): 'WITH_BF_JEMALLOC', 'WITH_BF_STATICJEMALLOC', 'BF_JEMALLOC', 'BF_JEMALLOC_INC', 'BF_JEMALLOC_LIBPATH', 'BF_JEMALLOC_LIB', 'BF_JEMALLOC_LIB_STATIC', 'BUILDBOT_BRANCH', 'WITH_BF_3DMOUSE', 'WITH_BF_STATIC3DMOUSE', 'BF_3DMOUSE', 'BF_3DMOUSE_INC', 'BF_3DMOUSE_LIB', 'BF_3DMOUSE_LIBPATH', 'BF_3DMOUSE_LIB_STATIC', - 'WITH_BF_CYCLES', 'WITH_BF_CYCLES_CUDA_BINARIES' 'BF_CYCLES_CUDA_NVCC', 'BF_CYCLES_CUDA_NVCC', 'WITH_BF_CYCLES_CUDA_THREADED_COMPILE', + 'WITH_BF_CYCLES', 'WITH_BF_CYCLES_CUDA_BINARIES', 'BF_CYCLES_CUDA_NVCC', 'BF_CYCLES_CUDA_NVCC', 'WITH_BF_CYCLES_CUDA_THREADED_COMPILE', 'WITH_BF_OIIO', 'WITH_BF_STATICOIIO', 'BF_OIIO', 'BF_OIIO_INC', 'BF_OIIO_LIB', 'BF_OIIO_LIB_STATIC', 'BF_OIIO_LIBPATH', 'WITH_BF_BOOST', 'WITH_BF_STATICBOOST', 'BF_BOOST', 'BF_BOOST_INC', 'BF_BOOST_LIB', 'BF_BOOST_LIB_STATIC', 'BF_BOOST_LIBPATH', 'WITH_BF_LIBMV', 'WITH_BF_CARVE' From 9df1fb50760d843af88e5cdfcf4f97e7e289d241 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 14 Feb 2012 15:59:10 +0000 Subject: [PATCH 03/11] Buildbot: another attempt to make Windows builds support CUDA Set BF_CYCLES_CUDA_NVCC to nvcc.exe, hopefully it's on search path at builder machine. --- build_files/buildbot/slave_compile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/build_files/buildbot/slave_compile.py b/build_files/buildbot/slave_compile.py index f29e826f8c3..6a695d3af5d 100644 --- a/build_files/buildbot/slave_compile.py +++ b/build_files/buildbot/slave_compile.py @@ -116,6 +116,7 @@ else: scons_options.append('BF_BITNESS=' + bitness) scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=True') + scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe') retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options) sys.exit(retcode) From 5bff5577445c8a032be584fca847963dcbb1ad68 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 14 Feb 2012 17:03:06 +0000 Subject: [PATCH 04/11] Camera tracking: corrected default values for some reconstruction-related properties. --- source/blender/makesrna/intern/rna_tracking.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index 993c0ca0bde..aff8a85dd26 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -546,6 +546,7 @@ static void rna_def_trackingSettings(BlenderRNA *brna) prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_float_sdna(prop, NULL, "dist"); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Distance", "Distance between two bundles used for scene scaling"); /* frames count */ @@ -665,6 +666,7 @@ static void rna_def_trackingSettings(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "object_distance"); RNA_def_property_ui_text(prop, "Distance", "Distance between two bundles used for object scaling"); RNA_def_property_range(prop, 0.001, 10000); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_range(prop, 0.001, 10000.0, 1, 3); } @@ -1227,6 +1229,7 @@ static void rna_def_trackingObject(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "scale"); RNA_def_property_range(prop, 0.0001f, 10000.0f); RNA_def_property_ui_range(prop, 0.0001f, 10000.0, 1, 4); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Scale", "Scale of object solution in camera space"); RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_trackingObject_flushUpdate"); } From 001299a0f670b4852d9eb50d7042d3c3a54dcf7f Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 14 Feb 2012 17:03:27 +0000 Subject: [PATCH 05/11] Buildbot: WITH_BF_CYCLES_CUDA_BINARIES should be set for packing stage too. --- build_files/buildbot/slave_pack.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build_files/buildbot/slave_pack.py b/build_files/buildbot/slave_pack.py index 94640803aae..91444fe080a 100644 --- a/build_files/buildbot/slave_pack.py +++ b/build_files/buildbot/slave_pack.py @@ -79,6 +79,8 @@ if builder.find('scons') != -1: bitness = '64' scons_options.append('BF_BITNESS=' + bitness) + scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=True') + scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe') retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options) sys.exit(retcode) From 91058355cc0508ed938aa1cb2d1f35bb1b529cf6 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Tue, 14 Feb 2012 18:23:58 +0000 Subject: [PATCH 06/11] font objects in blenderplayer fail when object with alpha is rendered the embed bge has its own DisableForText() routine which prepares the GL flags for the text render. For some reason blenderplayer is taking a slim approach and going straight for the rendering. This routine helps to address this bug/case (non reported, foundin my own project files). If need arises we should move this to its own routine incorporating the other GL tests the embed bge performs. --- .../GamePlayer/common/GPC_RenderTools.cpp | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp index 55e3220c08c..54e2efd8776 100644 --- a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp +++ b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp @@ -291,6 +291,29 @@ void GPC_RenderTools::RenderText3D( int fontid, double* mat, float aspect) { + if(GLEW_ARB_multitexture) { + for(int i=0; i Date: Wed, 15 Feb 2012 08:53:28 +0000 Subject: [PATCH 07/11] CMake: determine if python should be bundled into "lib" or "lib64" folder. Needed to deal with OS like openSUSE where Python is installed to /usr/lib64 and don't work if it's getting bundled into /python/lib. Thanks to Campbell to making this patch cleaner :) --- source/creator/CMakeLists.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 61551f4f8c1..1b4d88a6f2e 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -398,12 +398,21 @@ if(UNIX AND NOT APPLE) if(WITH_PYTHON) if(WITH_PYTHON_INSTALL) + # on some platforms (like openSUSE) Python is linked + # to be used from lib64 folder. + # determine this from Python's libraries path + if(${PYTHON_LIBPATH} MATCHES "lib64$") + set(_target_LIB "lib64") + else() + set(_target_LIB "lib") + endif() + # Copy the systems python into the install directory # Scons copy in tools/Blender.py # install(CODE "message(\"copying a subset of the systems python...\")") install( DIRECTORY ${PYTHON_LIBPATH}/python${PYTHON_VERSION} - DESTINATION ${TARGETDIR_VER}/python/lib + DESTINATION ${TARGETDIR_VER}/python/${_target_LIB} PATTERN ".svn" EXCLUDE PATTERN "__pycache__" EXCLUDE # * any cache * PATTERN "distutils" EXCLUDE # ./distutils @@ -421,6 +430,7 @@ if(UNIX AND NOT APPLE) # # doesnt work, todo # install(CODE "execute_process(COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/ -name '*.so' -exec strip -s {} '\;')") + unset(_target_LIB) endif() endif() elseif(WIN32) From 9d32f5dcd6cd16a95bc9c38afb097e870467292f Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 15 Feb 2012 13:41:33 +0000 Subject: [PATCH 08/11] Movie clip: comment what magic constant 768 means in DNA structure --- source/blender/makesdna/DNA_movieclip_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/makesdna/DNA_movieclip_types.h b/source/blender/makesdna/DNA_movieclip_types.h index e5c706d2a3a..80728cd9817 100644 --- a/source/blender/makesdna/DNA_movieclip_types.h +++ b/source/blender/makesdna/DNA_movieclip_types.h @@ -51,7 +51,7 @@ typedef struct MovieClipUser { } MovieClipUser; typedef struct MovieClipProxy { - char dir[768]; /* custom directory for index and proxy files (defaults to BL_proxy) */ + char dir[768]; /* 768=FILE_MAXDIR custom directory for index and proxy files (defaults to BL_proxy) */ short tc; /* time code in use */ short quality; /* proxy build quality */ From 47d1c813d0164de9852a65019b22b70274c1d4e3 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 15 Feb 2012 14:05:28 +0000 Subject: [PATCH 09/11] FFmpeg settings can't be animated. Clear animation flag to prevent confusing warnings appear on the screen. --- source/blender/makesrna/intern/rna_scene.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index f797368ac13..0ece6902012 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2863,65 +2863,76 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) #ifdef WITH_FFMPEG prop = RNA_def_property(srna, "format", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "type"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_items(prop, ffmpeg_format_items); RNA_def_property_ui_text(prop, "Format", "Output file format"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update"); prop = RNA_def_property(srna, "codec", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "codec"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_items(prop, ffmpeg_codec_items); RNA_def_property_ui_text(prop, "Codec", "FFmpeg codec to use"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update"); prop = RNA_def_property(srna, "video_bitrate", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "video_bitrate"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 1, 14000); RNA_def_property_ui_text(prop, "Bitrate", "Video bitrate (kb/s)"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "minrate", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "rc_min_rate"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0, 9000); RNA_def_property_ui_text(prop, "Min Rate", "Rate control: min rate (kb/s)"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "maxrate", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "rc_max_rate"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 1, 14000); RNA_def_property_ui_text(prop, "Max Rate", "Rate control: max rate (kb/s)"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "muxrate", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "mux_rate"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0, 100000000); RNA_def_property_ui_text(prop, "Mux Rate", "Mux rate (bits/s(!))"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "gopsize", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "gop_size"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0, 100); RNA_def_property_ui_text(prop, "GOP Size", "Distance between key frames"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "buffersize", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "rc_buffer_size"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0, 2000); RNA_def_property_ui_text(prop, "Buffersize", "Rate control: buffer size (kb)"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "packetsize", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "mux_packet_size"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0, 16384); RNA_def_property_ui_text(prop, "Mux Packet Size", "Mux packet size (byte)"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_autosplit", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FFMPEG_AUTOSPLIT_OUTPUT); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at 2GB boundary"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_lossless_output", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FFMPEG_LOSSLESS_OUTPUT); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_boolean_funcs(prop, NULL, "rna_FFmpegSettings_lossless_output_set"); RNA_def_property_ui_text(prop, "Lossless Output", "Use lossless output for video streams"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); From 2e752dea2f47992cc048041bda7a81006cbda899 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 15 Feb 2012 14:32:07 +0000 Subject: [PATCH 10/11] Fix #30139: multi render layer not working with CUDA render, due to padding error in render pass code. --- intern/cycles/kernel/kernel_types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index 477b08f2f87..4231b29cc11 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -450,6 +450,8 @@ typedef struct KernelFilm { int pass_emission; int pass_background; + int pass_pad1; + int pass_pad2; } KernelFilm; typedef struct KernelBackground { From 697270a0243776001fc06ed5faa3b963659c2558 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 15 Feb 2012 14:56:08 +0000 Subject: [PATCH 11/11] Fix another padding error in cycles, to complete the previous bugfix. --- intern/cycles/kernel/kernel_types.h | 1 + 1 file changed, 1 insertion(+) diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index 4231b29cc11..00635282202 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -501,6 +501,7 @@ typedef struct KernelIntegrator { /* render layer */ int layer_flag; + int pad1, pad2, pad3; } KernelIntegrator; typedef struct KernelBVH {