Commit Graph

3887 Commits

Author SHA1 Message Date
Thomas Dinges
ac27a1a0f6 Scons: Some tweaks for f70d9660474c, we don't need SSE41 kernel for 32bit, nor vc2008 x64. 2014-01-29 13:29:24 +01:00
f70d966047 Scons: refactor cycles kernel code to avoid building the AVX kernel with
compilers that don't support it.

CMake still needs to updated to work the same for consistency, but this should
fix the OS X buildbot at least.
2014-01-28 23:02:06 +01:00
52ea13e970 Fix T37999: incorrect windows size with Visual Studio 2013 builds.
This is a known bug in Windows, now work around it.
https://bugreports.qt-project.org/browse/QTBUG-36192
http://connect.microsoft.com/VisualStudio/feedback/details/753224/regression-getsystemmetrics-delivers-different-values
2014-01-28 21:37:40 +01:00
Martijn Berger
84f9587540 Cuda use streams and async to avoid busywaiting
This is my first stab at this and is based on this IRC converstation:

<mib2berlin> brecht: this is meaning as reminder only, I know you have other things to do > http://openvidia.sourceforge.net/index.php/Optimization_Notes#avoiding_busy_waits
<brecht> mib2berlin: thanks, bookmarked

only tested on Ubuntu 14.04 / cuda 5.0 but ill do some more testing tomorrow.

Also unsure about the placement and the lifetime of the stream and the event. But creating / deleting these seems to incur a non trivial cost.

Reviewers: brecht

Reviewed By: brecht

CC: mib2berlin, dingto

Differential Revision: https://developer.blender.org/D262
2014-01-28 18:40:08 +01:00
Sergey Sharybin
790e30af67 Code cleanup: indentation of interior preprocessor 2014-01-28 14:33:42 +06:00
Anton Khirnov
2b858b45c2 audaspace: use new libavcodec audio encoding API where available 2014-01-28 14:25:40 +06:00
Anton Khirnov
f99e581ae1 libavformat API usage: use avformat_close_input() instead of av_close_input_file() 2014-01-28 14:20:22 +06:00
Anton Khirnov
b7f8bfef25 libavcodec API usage: use new video encoding API
avcodec_encode_video() has been replaced with avcodec_encode_video2()
in new libavcodec versions.
2014-01-28 14:17:50 +06:00
Anton Khirnov
8c3b27ce27 Change libavcodec CODEC_ID_* to AV_CODEC_ID_*
CODEC_ID_* have been replaced with AV_CODEC_ID_* in new libavcodec
versions.

Update the code to use those new identifiers.

Added a compatibility code to ffmpeg_compat.h
2014-01-28 14:00:31 +06:00
Jens Verwiebe
11094a0b29 OSX/scons: fix own error in last commit and do a cleanup 2014-01-27 20:39:20 +01:00
Jens Verwiebe
15e08394a0 OSX/scons: consequently make use of the recently introduced C_COMPILER_ID and CCVERSION env vars 2014-01-27 19:56:15 +01:00
Jens Verwiebe
623a550eec OSX/scons: fix gnu gcc compile by using clang assembler ( openMP builds) 2014-01-27 19:46:05 +01:00
7280321f7a Revert recent OpenEXR cmake/linux fix and earlier OS X fix to use GCC for AVX.
Both need a better solution and break working builds.
2014-01-27 19:13:25 +01:00
9e20d3e32a Attempt to fix T38373: cmake linux build failure with OpenEXR. 2014-01-27 15:26:03 +01:00
Martijn Berger
184294782e patch by liblib (lid b)
Default installation path of cuda nvcc.exe contain spaces

Reviewers: juicyfruit

Differential Revision: https://developer.blender.org/D239
2014-01-27 11:43:41 +01:00
Thomas Dinges
12109dd18e Cycles Standalone: Basic support for external OSL shaders.
* Very simple implementation, only allows for 1 output socket. As we haven't decided yet whether we keep the XML API, rather not spend more time on this now.

* To use an external osl shader, put the .osl file next to the xml file.
* Parameters: "output" is the output socket name, "output_type" the variable type (float, color and closure color are supported).
Example:
<osl_shader name="tex" src="ramp_closure.osl" output="Phong" output_type="closure color" />
<connect from="tex Phong" to="output surface" />
2014-01-26 16:23:07 +01:00
Thomas Dinges
97aab5acc4 Cycles: Set samples to USHRT_MAX per default in the constructor, this is already used elsewhere. 2014-01-25 19:25:24 +01:00
Thomas Dinges
f746d90398 Cycles Standalone: Various changes
* Change Info in header, put more important info to the left
* API: Move Camera width/height to camera, add some film properties
* Add ESC key to help menu
2014-01-25 18:57:02 +01:00
Martijn Berger
b46dcafa7a fix building cycles standalone on windows / cmake 2014-01-25 14:20:25 +01:00
Thomas Dinges
1dd05a1e7b Cleanup: Simplify Cycles standalone OSL detection code. 2014-01-25 13:25:26 +01:00
Thomas Dinges
544b7e6be4 Cycles Standalone: Add a help message, which appears when pressing the "h" key.
This is very basic for now, but can be extended with more info (available devices for example) later.

Thanks to Bastien and Sergey for some help with the glRect coordinates stuff.
2014-01-24 12:59:15 +01:00
b119f471f4 Fix T37302: cycles slow hair export with many hairs, especially on Windows. 2014-01-23 18:14:19 +01:00
Sergey Sharybin
a81cf3182f Fix typo in mmap commit from a while ago 2014-01-23 18:41:38 +06:00
4b820fb673 Fix T38311: cycles BVH cache crash on Windows. 2014-01-23 01:13:46 +01:00
282ad434a8 Memory allocation: do not use mmap for memory allocation on 64 bit.
On Windows we can only do mmap memory allocation up to 4 GB, which causes a
crash when doing very large renders on 64 bit systems with a lot of memory.

As far as I can tell the reason to use mmap is to get around address space
limitation on some 32 bit operating systems, and I can't see a reason to use
it on 64 bit. For the original explanation see here:
http://orange.blender.org/blog/stupid-memory-problems

Fixes T37841.
2014-01-23 01:13:46 +01:00
Thomas Dinges
ae3f577ac1 Cycles Standalone: Volume integrator settings. 2014-01-21 20:56:56 +01:00
Thomas Dinges
a6e697f6d7 Cycles Standalone: XML Updates for the integrator. 2014-01-21 19:15:54 +01:00
Thomas Dinges
5ece1594ca Cycles Standalone: Updates for the XML API, added some missing nodes. Still not complete, but better. 2014-01-21 01:30:20 +01:00
Thomas Dinges
fd0b104f70 Cycles Standalone: GUI flag was not passed correctly to the code, own mistake when I added the GUI build option. 2014-01-20 21:12:28 +01:00
Thomas Dinges
21264f89ac Cycles: Add a cmake config to easily compile Cycles Standalone.
On Linux/Mac OS X, simply type "make cycles" inside the Blender source directory, to get a standalone build of the engine.

Reviewed by: Brecht
Differential Revision: https://developer.blender.org/D228
2014-01-20 20:44:39 +01:00
fc3be511f0 Fix T37978: cycles nodes with multiple Material Output nodes not predictable.
Now it uses the last activated node like compositing does. This should have no
effect on existing files until you activate another output node there.
2014-01-20 20:31:10 +01:00
Sv. Lockal
62f6d5351f Revert "Cycles: mix hair minimum width code with SSE intersection code"
Code is not equivalent in min/max part (SSE works with NaNs differently), this results in black dots with cardinal_curve hair.

This reverts commit b886c26d1f70d512b4f68975142372e3bee81c89.
2014-01-20 00:23:17 +04:00
Jens Verwiebe
8842569bc4 OSX/Cycles: tentative fix for avx, try use the compiler that is default on desired xcode version.
Atm. it is only verified to work with clang 5.0, so either this works too with llvm-gcc or apple gcc,
or we have to rise the requirements for osx.
2014-01-17 14:56:29 +01:00
Campbell Barton
63ccb26303 Code Cleanup: spelling 2014-01-17 17:35:03 +11:00
e9227c76d4 Fix T37706: avoid cycles crash when using a stack that exceeds SVM stack limits.
This should be pretty rare, the shader in question had many parallel node links
because of copying the nodes many times, which is inefficient to run anyway.
2014-01-16 22:36:30 +01:00
Jens Verwiebe
1b4ced86b9 Workaround for avx assembler not compiling with vanilla gcc ( with openMP case ) 2014-01-16 19:44:25 +01:00
Thomas Dinges
da523185fb Fix compilation of Cycles AVX kernel with cmake. 2014-01-16 18:32:54 +01:00
Thomas Dinges
de28a4d4b2 Cycles: Add an AVX kernel for CPU rendering.
* AVX is available on Intel Sandy Bridge and newer and AMD Bulldozer and newer.
* We don't use dedicated AVX intrinsics yet, but gcc auto vectorization gives a 3% performance improvement for Caminandes. Tested on an i5-3570, Linux x64.
* No change for Windows yet, MSVC 2008 does not support AVX.

Reviewed by: brecht
Differential Revision: https://developer.blender.org/D216
2014-01-16 17:04:11 +01:00
d9e52ac98b Code cleanup: move half float functions to separate header file. 2014-01-15 15:29:22 +01:00
8af782ad22 Code cleanup: some reshuffling of SIMD defines moving more code to util_optimization.h. 2014-01-15 15:11:50 +01:00
Sergey Sharybin
5cd321203e Fix compilation error with stricg GCC flags 2014-01-15 16:21:53 +06:00
Bastien Montagne
6ba02681de Fix a bunch of UI string issues... 2014-01-15 10:40:54 +01:00
Thomas Dinges
9e3ddd70d4 Cycles: Disable SSE41 kernel on 32bit, we don't use intrinsics here anyway. Also disable it for Visual Studio < 2012, broken blendv instruction. 2014-01-14 23:51:59 +01:00
Martijn Berger
0f3fed2970 OS X linker does not like empty compilation unit by itself in a library. Scons creates one library (.a) per kernel. This fixes that 2014-01-14 22:48:31 +01:00
Thomas Dinges
5d88f7c7db Cycles: Build SSE41 kernel per default, remove build option. This hopefully also fixes some compile errors on various systems. 2014-01-14 22:04:32 +01:00
Martijn Berger
993b946681 DingTo forgot to make sure kernel_sse41 is compiled in even when empty 2014-01-14 21:49:48 +01:00
Thomas Dinges
9351ac0d85 Cycles: Skip the compilation of the dedicated SSE2 kernel on x86-64, we can assume SSE2 here, so just re-use the regular one. Saves 500kb in the blender binary.
Reviewed by: brecht
Differential Revision: https://developer.blender.org/D199
2014-01-14 20:39:54 +01:00
d980c3eccb Further fix for T37817: non-ascii paths fix in Cycles broke OSL rendering.
Not quite sure yet what is going on here, but this works for me.
2014-01-14 20:01:26 +01:00
Sv. Lockal
1c49eb0072 Cycles, Code cleanup: simplify code for color linear interpolation and float math
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D215
2014-01-14 22:55:02 +04:00
a02a97753b Fix T38192: OSL got incorrectly enabled in preview render when GPU was selected
for rendering of the main scene.
2014-01-13 23:29:35 +01:00