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
2017-10-07Code refactor: make texture code more consistent between devices.Brecht Van Lommel
* Use common TextureInfo struct for all devices, except CUDA fermi. * Move image sampling code to kernels/*/kernel_*_image.h files. * Use arrays for data textures on Fermi too, so device_vector<Struct> works.
2017-08-12Fix T52372: CUDA build error after recent changes.Brecht Van Lommel
2017-08-12Fix T52368: OSL trace() crash after recent changes.Brecht Van Lommel
2017-08-07Code refactor: split defines into separate header, changes to SSE type headers.Brecht Van Lommel
I need to use some macros defined in util_simd.h for float3/float4, to emulate SSE4 instructions on SSE2. But due to issues with order of header includes this was not possible, this does some refactoring to make it work. Differential Revision: https://developer.blender.org/D2764
2017-05-24Cycles: Use falltrhough attribute to help catching missing break statementsSergey Sharybin
2017-05-07Cycles: Implement denoising option for reducing noise in the rendered imageLukas Stockner
This commit contains the first part of the new Cycles denoising option, which filters the resulting image using information gathered during rendering to get rid of noise while preserving visual features as well as possible. To use the option, enable it in the render layer options. The default settings fit a wide range of scenes, but the user can tweak individual settings to control the tradeoff between a noise-free image, image details, and calculation time. Note that the denoiser may still change in the future and that some features are not implemented yet. The most important missing feature is animation denoising, which uses information from multiple frames at once to produce a flicker-free and smoother result. These features will be added in the future. Finally, thanks to all the people who supported this project: - Google (through the GSoC) and Theory Studios for sponsoring the development - The authors of the papers I used for implementing the denoiser (more details on them will be included in the technical docs) - The other Cycles devs for feedback on the code, especially Sergey for mentoring the GSoC project and Brecht for the code review! - And of course the users who helped with testing, reported bugs and things that could and/or should work better!
2017-05-03Fix Cycles build on WindowsDalai Felinto
2017-04-28Cycles: Cleanup, indentaiton and trailing whitespace and wrappingSergey Sharybin
2017-04-27Unlimited number of textures for CyclesStefan Werner
This patch allows for an unlimited number of textures in Cycles where the hardware allows. It replaces a number static arrays with dynamic arrays and changes the way the flat_slot indices are calculated. Eventually, I'd like to get to a point where there are only flat slots left and textures off all kinds are stored in a single array. Note that the arrays in DeviceScene are changed from containing device_vector<T> objects to device_vector<T>* pointers. Ideally, I'd like to store objects, but dynamic resizing of a std:vector in pre-C++11 calls the copy constructor, which for a good reason is not implemented for device_vector. Once we require C++11 for Cycles builds, we can implement a move constructor for device_vector and store objects again. The limits for CUDA Fermi hardware still apply. Reviewers: tod_baudais, InsigMathK, dingto, #cycles Reviewed By: dingto, #cycles Subscribers: dingto, smellslikedonkey Differential Revision: https://developer.blender.org/D2650
2017-04-25Cycles: Split vectorized types into separate filesSergey Sharybin
The final goal to reach is to make vectorized types much easier to maintain and the previous design had following issues: - Having all types and methods implementation made the source file rather bloated and unfun to navigate in. - It was not possible to quickly glance available API for the type you are interested in. - Adding more vectorization types will bloat the file even more, making things even more tricky to follow.
2017-04-25Cycles: Cleanup, preprocessor indentationSergey Sharybin
2017-04-13Cycles: Make vectorized types constructor from register explicitSergey Sharybin
This is not a cheap operation which we dont' want to happen silently.
2017-04-07[Cycles/msvc] Get cycles_kernel compile time under control.lazydodo
Ever since we merged the extra texture types (half etc) and spit kernel the compile time for cycles_kernel has been going out of control. It's currently sitting at a cool 1295.762 seconds with our standard compiler (2013/x64/release) I'm not entirely sure why msvc gets upset with it, but the inlining of matrix near the bottom of the tri-cubic 3d interpolator is the source of the issue, this patch excludes it from being inlined. This patch bring it back down to a manageable 186 seconds. (7x faster!!) with the attached bzzt.blend that @sergey kindly provided i got the following results with builds with identical hashes 58:51.73 buildbot 58:04.23 Patched it's really close, the slight speedup could be explained by the switch instead of having multiple if's (switches do generate more optimal code than a chain of if/else/if/else statements) but in all honesty it might just have been pure luck (dev box,very polluted, bad for benchmarks) regardless, this patch doesn't seem to slow down anything with my limited testing. {F532336} {F532337} Reviewers: brecht, lukasstockner97, juicyfruit, dingto, sergey Reviewed By: brecht, dingto, sergey Subscribers: InsigMathK, sergey Tags: #cycles Differential Revision: https://developer.blender.org/D2595
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-28Cycles: Pass m128 vectors by const referenceSergey Sharybin
2017-03-11Fix T50888: Numeric overflow in split kernel state buffer size calculationMai Lavelle
Overflow led to the state buffer being too small and the split kernel to get stuck doing nothing forever.
2017-03-08Cycles: CPU implementation of split kernelMai Lavelle
2017-03-08Cycles: OpenCL split kernel refactorMai Lavelle
This does a few things at once: - Refactors host side split kernel logic into a new device agnostic class `DeviceSplitKernel`. - Removes tile splitting, a new work pool implementation takes its place and allows as many threads as will fit in memory regardless of tile size, which can give performance gains. - Refactors split state buffers into one buffer, as well as reduces the number of arguments passed to kernels. Means there's less code to deal with overall. - Moves kernel logic out of OpenCL kernel files so they can later be used by other device types. - Replaced OpenCL specific APIs with new generic versions - Tiles can now be seen updating during rendering
2016-10-12Cycles: Use more SSE intrinsics for float3 typeSergey Sharybin
This gives about 5% speedup on AVX2 kernels (other kernels still have SSE disabled for math operations) and this solves the slowdown of koro scene mention in the previous commit. The title says it all actually. This commit also contains changes to pass float3 as const reference in affected functions. This should make MSVC happier without breaking OpenCL because it's only done in areas which are ifdef-ed for non-OpenCL. Another patch based on inspiration from Maxym Dmytrychenko, thanks!
2016-10-03Fix Cycles CUDA performance on CUDA 8.0.Brecht Van Lommel
Mostly this is making inlining match CUDA 7.5 in a few performance critical places. The end result is that performance is now better than before, possibly due to less register spilling or other CUDA 8.0 compiler improvements. On benchmarks scenes, there are 3% to 35% render time reductions. Stack memory usage is reduced a little too. Reviewed By: sergey Differential Revision: https://developer.blender.org/D2269
2016-07-11Cycles: Use utility define for restrict pointersSergey Sharybin
This way restrict can be used for CUDA and OpenCL as well. From quick tests in areas i've been testing this it might give some barely measurable %% of speedup, but it increases registers pressure. So use of this qualifier is still really limited.
2016-02-12Cycles: Make Blender importer more forward compatibleSergey Sharybin
Basically the idea is to make code robust against extending enum options in the future by falling back to a known safe default setting when RNA is set to something unknown. While this approach solves the issues similar to T47377, but it wouldn't really help when/if any of the RNA values gets ever deprecated and removed. There'll be no simple solution to that apart from defining explicit mapping from RNA value to Cycles one. Another part which isn't so great actually is that we now have to have some enum guards and give some explicit values to the enum items, but we can live with that perhaps. Reviewers: dingto, juicyfruit, lukasstockner97, brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D1785
2015-07-28Cycles: Add implementation of clip extension modeSergey Sharybin
For now there's no OpenCL support, it'll come later.
2015-07-28Cycles: Correction to image extension setting commitSergey Sharybin
Technically it was all wrong and it should have been called Extend instead of Clip. Got confused by the naming in different libraries. More options are still to come.
2015-07-21Cycles: Expose image image extension mapping to the image managerSergey Sharybin
Currently only two mappings are supported by API, which is Repeat (old behavior) and new Clip behavior. Internally this extension is being converted to periodic flag which was already supported but wasn't exposed. There's no support for OpenCL yet because of the way how we pack images into a single texture. Those settings are not exposed to UI or anywhere else and there should be no functional changes so far.
2015-03-13Initial compilation support with C++11 featureset enabledSergey Sharybin
This commit makes some preliminary fixes and tweaks aimed to make blender compilable with C++11 feature set. This includes: - Build system attribute to enable C++11 featureset. It's for sure default OFF, but easy to enable to have a play around with it and make sure all the stuff is compilable before we go C++11 for real. - Changes in Compositor to use non-named cl_int structure fields. This is because __STRICT_ANSI__ is defined by default by GCC and OpenCL does not use named fields in this case. - Changes to TYPE_CHECK() related on lack of typeof() in C++11 This uses decltype() instead with some trickery to make sure returned type is not a reference. - Changes for auto_ptr in Freestyle This actually conditionally switches between auto_ptr and unique_ptr since auto_ptr is deprecated in C++11. Seems to be not strictly needed but still nice to be ready for such an update anyway/ This all based on changes form depsgraph_refactor branch apart from the weird changes which were made in order to support MinGW compilation. Those parts of change would need to be carefully reviewed again after official move to gcc49 in MinGW. Tested on Linux with GCC-4.7 and Clang-3.5, other platforms are not tested and likely needs some more tweaks. Reviewers: campbellbarton, juicyfruit, mont29, lukastoenne, psy-fi, kjym3 Differential Revision: https://developer.blender.org/D1089
2014-12-25Cleanup: Fix Cycles Apache header.Thomas Dinges
This was already mixed a bit, but the dot belongs there.
2014-12-25Cycles: Add some utility functions and structuresSergey Sharybin
Most of them are not currently used but are essential for the further work. - CPU kernels with SSE2 support will now have sse3b, sse3f and sse3i - Added templatedversions of min4, max4 which are handy to use with register variables. - Added util_swap function which gets arguments by pointers. So hopefully it'll be a portable version of std::swap.
2014-11-15Cycles: Revert changes to inline flags enabled for release onlySergey Sharybin
It appears it's not really needed for convenient debugging when using proper flags passed to the compiler. Basically, it is -g3 and set breakpoint to a function as if it's not in the namespace. Not as if a code was any wrong, just it's possible to have more clear solution for the issue i've tried to solve in the past.
2014-09-26Cycles: Keep ccl_always_inline always inlining the stuffSergey Sharybin
It works around strange shading bug when building with MSVC. If such weirdeness continues, we perhaps would need to use proper inline flags all the time. Anyway, lets see how things will behave now.
2014-09-25Cycles: Accidentally inverted the logic of NDEBUG macroSergey Sharybin
2014-09-25Cycles: Don't inline functions for debug CPU kernelSergey Sharybin
Nobody will use debug mode for benchmarks anyway and this way it's much easier to set breakpoints on inlined functions to catch all their usages.
2014-08-02Make CHECK_TYPE_NONCONST macro portableCampbell Barton
also replace __typeof -> typeof
2014-06-13Cycles Refactor: Add SSE Utility code from Embree for cleaner SSE code.Thomas Dinges
This makes the code a bit easier to understand, and might come in handy if we want to reuse more Embree code. Differential Revision: https://developer.blender.org/D482 Code by Brecht, with fixes by Lockal, Sergey and myself.
2014-05-19Move ShadingSystem enum to shader.hNathan Letwory
Add SHADINGSYSTEM_ to enum member names, so it is clear where they are from. Revert BVHType enum changes, as there's no need for code dedup here.
2014-05-19Move BVHType and shadingsystem enums to top-level of Cycles namespace.Nathan Letwory
Easier access of BVHType and deduplication for ShadingSystem. Reviewers: dingto, brecht Differential Revision: https://developer.blender.org/D534
2014-05-11Code cleanup: comment typosCampbell Barton
2014-05-05Add check for LIKELY/UNLIKELY is CPU onlyCampbell Barton
2014-05-04Cycles: use LIKELY/UNLIKELY macrosCampbell Barton
Gives overall ~3% speedup in own tests for BMW scene.
2014-05-04Style cleanup: indentation, bracesCampbell Barton
2014-03-08Add support for multiple interpolation modes on cycles image texturesMartijn Berger
All textures are sampled bi-linear currently with the exception of OSL there texture sampling is fixed and set to smart bi-cubic. This patch adds user control to this setting. Added: - bits to DNA / RNA in the form of an enum for supporting multiple interpolations types - changes to the image texture node drawing code ( add enum) - to ImageManager (this needs to know to allocate second texture when interpolation type is different) - to node compiler (pass on interpolation type) - to device tex_alloc this also needs to get the concept of multiple interpolation types - implementation for doing non interpolated lookup for cuda and cpu - implementation where we pass this along to osl ( this makes OSL also do linear untill I add smartcubic to the interface / DNA/ RNA) Reviewers: brecht, dingto Reviewed By: brecht CC: dingto, venomgfx Differential Revision: https://developer.blender.org/D317
2014-03-02Cycles: remove ccl_align macro for GPU as unused and unsupported in OpenCLSv. Lockal
2014-02-27Cycles: fix crash in SSE hair and half-floats on x86+vc2008Sv. Lockal
MSVC 2008 ignores alignement attribute when assigning from unaligned float4 vector, returned from other function. Now Cycles uses unaligned loads instead of casts for win32 in x86 mode.
2014-02-04Cycles: bvh_cardinal_curve_intersect intro SSE optimizationSv. Lockal
Gives 5% speedup for koro_final.blend, 10-15% for hair.blend Reviewed By: brecht Differential Revision: https://developer.blender.org/D225
2014-02-04Fix cycles crash with float image textures on CPU without AVX support.Brecht Van Lommel
The AVX kernel functions for reading image textures could be get used from non-AVX kernels. These are C++ class methods and need to be marked for inlining, all other functions are static so they don't leak into other kernels.
2014-01-15Code cleanup: move half float functions to separate header file.Brecht Van Lommel
2014-01-15Code cleanup: some reshuffling of SIMD defines moving more code to ↵Brecht Van Lommel
util_optimization.h.
2014-01-11Fix T38129: cycles viewport render display with very bright colors turning ↵Brecht Van Lommel
black. This happened when exceeding the maximum value representable by half floats.
2013-12-28Cycles: Move SIMD utility functions into its own file.Thomas Dinges
Recently added SSE macros for noise texture can be moved here as well, but I leave this for later.
2013-11-23Fix cycles build error with visual studio, apparently the windows ABI does notBrecht Van Lommel
like 16 bit alignment on 32 bit.