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
2019-08-26Cycles: GPU code generation optimizations for direct lightingPatrick Mours
Use a single loop to iterate over all lights, reducing divergence and amount of code to generate. Moving ray intersection calls out of conditionals will also help the Optix compiler. Ref D5363
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
2017-11-09Cycles: Replace __MAX_CLOSURE__ build option with runtime integrator variableMai Lavelle
Goal is to reduce OpenCL kernel recompilations. Currently viewport renders are still set to use 64 closures as this seems to be faster and we don't want to cause a performance regression there. Needs to be investigated. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2775
2017-11-05Cycles: reduce closure memory usage for emission/shadow shader data.Brecht Van Lommel
With a Titan Xp, reduces path trace local memory from 1092MB to 840MB. Benchmark performance was within 1% with both RX 480 and Titan Xp. Original patch was implemented by Sergey. Differential Revision: https://developer.blender.org/D2249
2017-09-13Code cleanup: deduplicate some branched and split kernel code.Brecht Van Lommel
Benchmarks peformance on GTX 1080 and RX 480 on Linux is the same for bmw27, classroom, pabellon, and about 2% faster on fishy_cat and koro.
2017-09-12Cycles: improve sample stratification on area lights for path tracing.Brecht Van Lommel
Previously we used a 1D sequence to select a light, and another 2D sequence to sample a point on the light. For multiple lights this meant each light would get a random subset of a 2D stratified sequence, which is not guaranteed to be stratified anymore. Now we use only a 2D sequence, split into segments along the X axis, one for each light. The samples that fall within a segment then each are a stratified sequence, at least in the limit. So for example for two lights, we split up the unit square into two segments [0,0.5[ x [0,1[ and [0.5,1[ x [0,1[. This doesn't make much difference in most scenes, mainly helps if you have a few large area lights or some types of HDR backgrounds.
2017-08-19Code cleanup: move rng into path state.Brecht Van Lommel
Also pass by value and don't write back now that it is just a hash for seeding and no longer an LCG state. Together this makes CUDA a tiny bit faster in my tests, but mainly simplifies code.
2017-05-02Cycles: Branched path tracing for the split kernelMai Lavelle
This implements branched path tracing for the split kernel. General approach is to store the ray state at a branch point, trace the branched ray as normal, then restore the state as necessary before iterating to the next part of the path. A state machine is used to advance the indirect loop state, which avoids the need to add any new kernels. Each iteration the state machine recreates as much state as possible from the stored ray to keep overall storage down. Its kind of hard to keep all the different integration loops in sync, so this needs lots of testing to make sure everything is working correctly. We should probably start trying to deduplicate the integration loops more now. Nonbranched BMW is ~2% slower, while classroom is ~2% faster, other scenes could use more testing still. Reviewers: sergey, nirved Reviewed By: nirved Subscribers: Blendify, bliblubli Differential Revision: https://developer.blender.org/D2611
2017-03-27Cycles: Add OpenCL support for shadow catcher featureHristo Gueorguiev
The title says it all actually.
2017-03-27Cycles: Remove ccl_addr_space from RNG passed to functionsHristo Gueorguiev
Simplifies code quite a bit, making it shorter and easier to extend. Currently no functional changes for users, but is required for the upcoming work of shadow catcher support with OpenCL.
2017-03-16Cycles: Define ccl_local variables in kernel functionsSergey Sharybin
Declaring ccl_local in a device function is not supported by certain compilers.
2017-03-13Cycles: Cleanup, wipe obviously outdated parts of split kernel commentsSergey Sharybin
2017-03-08Cycles: Remove ccl_fetch and SOAMai 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-30Cycles: Add optional probabilistic termination of light samples based on ↵Lukas Stockner
their expected contribution In scenes with many lights, some of them might have a very small contribution to some pixels, but the shadow rays are traced anyways. To avoid that, this patch adds probabilistic termination to light samples - if the contribution before checking for shadowing is below a user-defined threshold, the sample will be discarded with probability (1 - (contribution / threshold)) and otherwise kept, but weighted more to remain unbiased. This is the same approach that's also used in path termination based on length. Note that the rendering remains unbiased with this option, it just adds a bit of noise - but if the setting is used moderately, the speedup gained easily outweighs the additional noise. Reviewers: #cycles Subscribers: sergey, brecht Differential Revision: https://developer.blender.org/D2217
2016-09-14Cycles: Stop lamp sampling if the lamp isn't visibleLukas Stockner
Both spot and area light have large areas where they're not visible. Therefore, this patch stops the light sampling code when one of these cases (outside of the spotlight cone or behind the area light) occurs, before the lamp shader is evaluated. In the case of the area light, the solid angle sampling can also be skipped. In a test scene with Sample All Lights and 18 Area lamps and 9 Spot lamps that all point away from the area that the camera sees, render time drops from 12sec to 5sec. Reviewers: brecht, sergey, dingto, juicyfruit Differential Revision: https://developer.blender.org/D2216
2016-05-23Cycles CUDA: reduce stack memory by reusing ShaderData.Brecht Van Lommel
57% less for path and 48% less for branched path.
2016-01-28Cycles: Remove few function arguments needed only for the split kernelSergey Sharybin
Use KernelGlobals to access all the global arrays for the intermediate storage instead of passing all this storage things explicitly. Tested here with Intel OpenCL, NVIDIA GTX580 and AMD Fiji, didn't see any artifacts, so guess it's all good. Reviewers: juicyfruit, dingto, lukasstockner97 Differential Revision: https://developer.blender.org/D1736
2016-01-07Cycles: Refactor how we pass bounce info to light path node.Thomas Dinges
This commit changes the way how we pass bounce information to the Light Path node. Instead of manualy copying the bounces into ShaderData, we now directly pass PathState. This reduces the arguments that we need to pass around and also makes it easier to extend the feature. This commit also exposes the Transmission Bounce Depth to the Light Path node. It works similar to the Transparent Depth Output: Replace a Transmission lightpath after X bounces with another shader, e.g a Diffuse one. This can be used to avoid black surfaces, due to low amount of max bounces. Reviewed by Sergey and Brecht, thanks for some hlp with this. I tested compilation and usage on CPU (SVM and OSL), CUDA, OpenCL Split and Mega kernel. Hopefully this covers all devices. :)
2015-11-01Cycles: Remove unused argument from the split kernel functionsSergey Sharybin
Should be no functional changes, just simplifies operation with kernels.
2015-10-29Cycles: OpenCL split kernel cleanup, move casts from .h files to .cl filesSergey Sharybin
Ideally we shouldn't use char* at all, but for now we have to, so at least let's assume common .h files are free from pointer magic.
2015-05-27Cycles: Code cleanup, split kernelSergey Sharybin
2015-05-26Fix T44833: Can't use ccl_local space in non-kernel functionsSergey Sharybin
This commit re-shuffles code in split kernel once again and makes it so common parts which is in the headers is only responsible to making all the work needed for specified ray index. Getting ray index, checking for it's validity and enqueuing tasks are now happening in the device specified part of the kernel. This actually makes sense because enqueuing is indeed device-specified and i.e. with CUDA we'll want to enqueue kernels from kernel and avoid CPU roundtrip. TODO: - Kernel comments are still placed in the common header files, but since queue related stuff is not passed to those functions those comments might need to be split as well. Just currently read them considering that they're also covering the way how all devices are invoking the common code path. - Arguments might need to be wrapped into KernelGlobals, so we don't ened to pass all them around as function arguments.
2015-05-25Fix T44833, OpenCL compile error on AMD.Thomas Dinges
This was broken after the kernel file restructure. Variables allocated in the __local address space can only be defined inside a __kernel function. We probably need to solve this a bit differently once we do the CUDA kernel split, but this fix shoud be good enough until then.
2015-05-22Cycles: Restructure kernel files organizationSergey Sharybin
Since the kernel split work we're now having quite a few of new files, majority of which are related on the kernel entry points. Keeping those files in the root kernel folder will eventually make it really hard to follow which files are actual implementation of Cycles kernel. Those files are now moved to kernel/kernels/<device_type>. This way adding extra entry points will be less noisy. It is also nice to have all device-specific files grouped together. Another change is in the way how split kernel invokes logic. Previously all the logic was implemented directly in the .cl files, which makes it a bit tricky to re-use the logic across other devices. Since we'll likely be looking into doing same split work for CUDA devices eventually it makes sense to move logic from .cl files to header files. Those files are stored in kernel/split. This does not mean the header files will not give error messages when tried to be included from other devices and their arguments will likely be changed, but having such separation is a good start anyway. There should be no functional changes. Reviewers: juicyfruit, dingto Differential Revision: https://developer.blender.org/D1314