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
AgeCommit message (Collapse)Author
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2018-11-09Cycles: Cleanup, spacing after preprocessorSergey Sharybin
It is supposed to be two spaces before comment stating which if else/endif statements corresponds to. Was mainly violated in the header guards.
2018-07-06Cleanup: strip trailing space for cyclesCampbell Barton
2018-01-19Cycles: Remove unneeded include statementsSergey Sharybin
Also try to move them from headers to implementation files as much as possible.
2017-08-03Cycles: Extra tweaks to performance of header expansionSergey Sharybin
Two main things here: 1. Replace all unsafe for #line directive characters into a single loop, avoiding multiple iterations and multiple temporary strings created. 2. Don't merge token char by char but calculate start and end point and then copy all substring at once. This gives about 15% speedup of source processing time. At this point (with all previous commits from today) we've shrinked down compiled sources size from 108 MB down to ~5.5 MB and lowered processing time from 4.5 sec down to 0.047 sec on my laptop running Linux (this was a constant time which Blender will always spent first time loading kernel, even if we've got compiled clbin).
2017-08-02Cycles: Avoid some expensive operations in header expansionsSergey Sharybin
Basically gather lines as-is during traversal, avoiding allocating memory for all the lines in headers. Brings additional performance improvement abut 20%.
2017-08-02Cycles: Support "precompiled" headers in include expansion algorithmSergey Sharybin
The idea here is that it is possible to mark certain include statements as "precompiled" which means all subsequent includes of that file will be replaced with an empty string. This is a way to deal with tricky include pattern happening in single program OpenCL split kernel which was including bunch of headers about 10 times. This brings preprocessing time from ~1sec to ~0.1sec on my laptop.
2017-08-02Cycles: Speed up #include expansion algorithmSergey Sharybin
The idea is to re-use files which were already processed. Gives about 4x speedup of processing time (~4.5sec vs 1.0sec) on my laptop for the whole OpenCL kernel. For users it will mean lower delay before OpenCL rendering might start.
2017-05-17Cycles: Optimize expansion of headers in the sourceSergey Sharybin
Use smarter check of where the file is coming from instead of attempting to replace same source twice with different settings. Brings down processing time from 3.6sec to 1.8sec.
2017-04-28Cycles: Use relative path for #line directivesSergey Sharybin
This way moving Blender bundle around doesn't re-trigger kernels compilation.
2017-03-31Cycles: More fixes after include changesMai Lavelle
2017-03-29Cycles: Make all #include statements relative to cycles source directorySergey Sharybin
The idea is to make include statements more explicit and obvious where the file is coming from, additionally reducing chance of wrong header being picked up. For example, it was not obvious whether bvh.h was refferring to builder or traversal, whenter node.h is a generic graph node or a shader node and cases like that. Surely this might look obvious for the active developers, but after some time of not touching the code it becomes less obvious where file is coming from. This was briefly mentioned in T50824 and seems @brecht is fine with such explicitness, but need to agree with all active developers before committing this. Please note that this patch is lacking changes related on GPU/OpenCL support. This will be solved if/when we all agree this is a good idea to move forward. Reviewers: brecht, lukasstockner97, maiself, nirved, dingto, juicyfruit, swerner Reviewed By: lukasstockner97, maiself, nirved, dingto Subscribers: brecht Differential Revision: https://developer.blender.org/D2586
2017-03-08Cycles: Use 1-based line number for #line directivesSergey Sharybin
AMD CPU platform was complaining about #line 0 directives in the code.
2016-11-12Fix Cycles OSL compilation based on modified time not working.Brecht Van Lommel
2016-09-29Cycles: Improve OpenCL line information handlingSergey Sharybin
Previously it was falling back to just a path after #include statement was finished. Now we fall back to a proper current file name after dealing with the preprocessor statement.
2016-09-12Cycles: Fix compilation error after recent commitsSergey Sharybin
2016-09-12Cycles: Use XDG's .cache folder for cached kernelsSergey Sharybin
Basically just moves cached kernels from ~/.config/blender/BLENDER_VERSION to ~/.cache/cycles/kernels. This has following benefits: - Follows XDG specification more closely, not as if it's totally crucial or measurable by users, but still nice. - Prevents unexpected sizes of config folder, makes disk space used in more predictable for users way. - Allows to share kernels across multiple Blender versions, which makes it easier debugging at the times close to release. - "Copy Previous Settings" operator will no longer be copying possibly gigabytes of cached kernels, which used to lead to really nast disk usage and annoying delays of copying settings. - In the future we can have some smart logic to clear old unused cached kernels. Currently only done for Linux and OSX. Windows still follows old "cache" folder logic, but it's not really important for now because we don't support kernel compilation on this platform yet. Reviewers: dingto, juicyfruit, brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D2197
2016-07-31Fix Cycles OpenCL compile error on Windows.Brecht Van Lommel
2016-07-30Cycles OpenCL: use #line directives for better error messages.Brecht Van Lommel
2016-05-11Cycles: Use explicit qualifier for single-argument constructorsSergey Sharybin
Almost in all cases we want such constructors to be explicit, there are exceptions but only in few places.
2016-04-13Cycles: Minor cleanup, whitespace around keyword and preprocessor indentSergey Sharybin
2016-04-01Fix T47505: Cycles OpenCL rendering crash on Windows.Brecht Van Lommel
Restore the boost bug workaround, but without changing the locale.
2016-03-25Cycles: Cleanup, indent nested preprocessor directivesSergey Sharybin
Quite straightforward, main trick is happening in path_source_replace_includes(). Reviewers: brecht, dingto, lukasstockner97, juicyfruit Differential Revision: https://developer.blender.org/D1794
2016-03-23Fix T47856: Cycles problem when running from multi-byte pathSergey Sharybin
This is a mix of regression and old unsupported configuration. Regression was caused by some checks added on Blender side which was checking whether python function returned error or not. This made it impossible to enable Cycles when running from a file path which can't be encoded with MBCS codepage. Non-regression issue was that it wasn't possible to use pre-compiled CUDA kernels when running from a path with non-ascii multi-byte characters. This commit fixes regression and CUDA parts, but OSL still can't be used from a non-ascii location because it uses non-widechar API to work with file paths by the looks of it. Not sure we can solve this just from our side by using some codepage trick (UTF-16?) since even oslc fails to compile shader when there are non-ascii characters in the path.
2016-02-17Cycles: Don't silence unused macro, remove the macro insteadSergey Sharybin
It's not really handy to silence something unused hoping for it'll be used in the future. We can end up with quite some silencing then. Also made this flag which i find rather useless to NOT cause -Werror in Cycles code.
2016-02-17Cleanup: unused define warningCampbell Barton
2016-02-16Cycles: Some cleanup, should be no functional changesSergey Sharybin
Addressing meaningful feedback from coverity.
2016-02-12Cycles: Fix compilation error with MinGWSergey Sharybin
Was using some C++0 which we don't officially enabled yet.
2016-02-06Cycles: Re-implement some utilities to avoid use of boostSergey Sharybin
The title says it all actually, the idea is to make Cycles only requiring Boost via 3rd party dependencies like OIIO and OSL. So now there are only few places which still uses Boost: - Foreach, function bindings and threading primitives. Those we can easily get rid with C++11 bump (which seems inevitable sooner or later if we'll want ot use newer LLVM for OSL), - Networking devices There's no quick solution for those currently, but there are some patches around which improves serialization. Reviewers: juicyfruit, mont29, campbellbarton, brecht, dingto Reviewed By: brecht, dingto Differential Revision: https://developer.blender.org/D1764
2016-02-06Cycles: Remove workaround for MSVC2010 and BoostSergey Sharybin
We've upgraded to Boost-1.60 and MSVC2013 since the workaround was originally committed. After checks with current compiler and libraries the original bug is no longer happening. This will make string comparison much faster in Windows, solving synchronization bottlenecks of fewzillion objects. Thanks Martin Felke (aka scorpion81) for the tests!
2015-02-18Cleanup: Remove support for Boost filesystem 2.Thomas Dinges
This is deprecated since Boost 1.48.
2015-02-02Cycles: Allow paths customization via environment variablesSergey Sharybin
This is for development and test environment setup only, not for regular users usage hence no mentioning in the man page needed.
2014-12-25Cleanup: Fix Cycles Apache header.Thomas Dinges
This was already mixed a bit, but the dot belongs there.
2014-10-14Fix T42021: OSL doesn't work when there are non-ascii chars in the pathSergey Sharybin
Quite annoying, the same thing we do from the blender side, But as a positive side we can get rid of some utf8/utf16 conversions. Hopefully it all work fine now, at leats works on mu russki windoze laptop.
2014-03-21Cycles Standalone: Support for relative paths and string OSL parameters.Thomas Dinges
Patch by John Haddon. Differential Revision: https://developer.blender.org/D418
2014-01-23Fix T38311: cycles BVH cache crash on Windows.Brecht Van Lommel
2014-01-14Further fix for T37817: non-ascii paths fix in Cycles broke OSL rendering.Brecht Van Lommel
Not quite sure yet what is going on here, but this works for me.
2014-01-11Fix T37817: cycles CUDA detection problem on Windows with non-ascii paths.Brecht Van Lommel
2013-12-28creation of path from std::string on Windows (VC10/11/12) crashes (access error)Martijn Berger
Summary: Seems to be a known problem in boost: https://svn.boost.org/trac/boost/ticket/6320 Applied the solution but do not know if this is the right place. Reviewers: dingto, brecht Reviewed By: dingto Differential Revision: https://developer.blender.org/D140
2013-08-18Cycles: relicense GNU GPL source code to Apache version 2.0.Brecht Van Lommel
More information in this post: http://code.blender.org/ Thanks to all contributes for giving their permission!
2013-05-27Cycles OpenCL: patch #35514 by Doug GaleBrecht Van Lommel
* Support using devices from all OpenCL platforms, so that you can use e.g. both Intel and NVidia OpenCL implementations if you have them installed. * Fix compile error due to missing fmodf after recent math node change. * Enable advanced shading for Intel OpenCL. * CYCLES_OPENCL_DEBUG environment variable for generating debug symbols so you can debug with gdb. This crashes the compiler with Intel OpenCL on Linux though. To make this work the preprocessed kernel source code is written out, as gdb needs this. * Show OpenCL compiler warnings even if the build succeeded. * Some small fixes to initialize cdDevice to NULL, add missing NULL check when creating buffer and add missing space at end of build options for Apple OpenCL. * Fix crash with multi device + opencl, now e.g. CPU + GPU render should work. I did a few tweaks to the code and also: * Fix viewport render failing sometimes with Apple CPU OpenCL, was not taking workgroup size limits into account properly. * Add compile error when advanced shading in the Blender binary and OpenCL kernel are not in sync.
2012-11-03Cycles OSL: shader script nodeBrecht Van Lommel
Documentation here: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/OSL http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.65/Cycles These changes require an OSL build from this repository: https://github.com/DingTo/OpenShadingLanguage The lib/ OSL has not been updated yet, so you might want to keep OSL disabled until that is done. Still todo: * Auto update for external .osl files not working currently, press update manually * Node could indicate better when a refresh is needed * Attributes like UV or generated coordinates may be missing when requested from an OSL shader, need a way to request them to be loaded by cycles * Expose string, enum and other non-socket parameters * Scons build support Thanks to Thomas, Lukas and Dalai for the implementation.
2012-07-29Additional fix #32074, by Sven-Hendrik Haase (svenstaro). Boost version ↵Lukas Toenne
header must be included in cycles in order to expand the version check macro.
2012-07-26Make Cycles compatible with older boost versions.Sergey Sharybin
Patch by IRIE Shinsuke, thanks!
2012-07-11Patch #32074: Fix compilation with boost 1.50Sergey Sharybin
This patch switches from boost's filesystem v2 to v3. This should be completely smooth due to filesystem v3 is pretty old already. Patch by Sven-Hendrik Haase (aka svenstaro), thanks!
2012-06-09style cleanup: block commentsCampbell Barton
2011-11-22Fix #29274: problem compiling cycles opencl kernel from directory with spaces.Brecht Van Lommel
Some drivers don't support passing include paths with spaces in them, nor does the opencl spec specify anything about how to quote/escape such paths, so for now we just resolved #includes ourselves. Alternative would have been to use c preprocessor, but this also resolves all #ifdefs, which we do not want.
2011-09-27Cycles: fix error in md5 hash computation for files in directories belowBrecht Van Lommel
the first level.
2011-09-12Cycles:Brecht Van Lommel
* Fix missing update when editing objects with emission materials. * Fix preview pass rendering set to 1 not showing full resolution. * Fix CUDA runtime compiling failing due to missing cache directory. * Use settings from first render layer for visibility and material override. And a bunch of incomplete and still disabled code mostly related to closure sampling.