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
path: root/intern
AgeCommit message (Collapse)Author
2021-10-25Cycles: Revert all host update specific changesSergey Sharybin
The approach didn't turn out to be that useful after all as there are unavoidable dependencies of data from the device. For example, to know whether object intersects volume or not it is required to run displacement kernels. The way of splitting host and device updates caused state where some data is not yet available, causing confusion and leaving code to be error-prone.
2021-10-24Cleanup: spelling in commentsCampbell Barton
2021-10-22Fix Cycles HIP binaries always recompilingBrecht Van Lommel
2021-10-22Cleanup: refactor float/half conversions for clarityBrecht Van Lommel
2021-10-22Cycles: various fixes for HIP and compilation of HIP binariesSayak Biswas
* Additional structs added to the hipew loader for device props * Adds hipRTC functions to the loader for future usage * Enables CPU+GPU usage for HIP * Cleanup to the adaptive kernel compilation process * Fix for kernel compilation failures with HIP with latest master Ref T92393, D12958
2021-10-22Cycles: improve communication of supported GPUs in preferencesBrecht Van Lommel
Mention required CUDA and OptiX compute capability and minimum driver version. For HIP there is a placeholder until we know the supported architectures.
2021-10-21Fix T92363: OptiX fails with ambient occlusion node, after recent changesBrecht Van Lommel
This triggered a compiler bug where it does not handle the sub.s16 PTX instruction. Instead refactor the code so we don't need to do uint16_t subtraction at all. Also update OptiX device to remove the AO pass direct callable. Thanks Patrick Mours for figuring this out.
2021-10-21Cycles: add shadow path compaction for GPU renderingBrecht Van Lommel
Similar to main path compaction that happens before adding work tiles, this compacts shadow paths before launching kernels that may add shadow paths. Only do it when more than 50% of space is wasted. It's not a clear win in all scenes, some are up to 1.5% slower. Likely caused by different order of scheduling kernels having an unpredictable performance impact. Still feels like compaction is just the right thing to avoid cases where a few shadow paths can hold up a lot of main paths. Differential Revision: https://developer.blender.org/D12944
2021-10-21Cleanup: make HIP and CUDA code more consistentBrecht Van Lommel
Ref D12834
2021-10-21Fix T65532: can't assign a key on Italian apple keyboards.Yevgeny Makarov
Apple's international keyboards have an additional `kVK_ISO_Section` key. With some (Italian, Spanish) keyboard layouts, this is `\`, `[` keys which Blender keymap can use. Right now this key is explicitly set as `Unknown`. Note that `kVK_ANSI_Grave` is located in a different location. Differential Revision: https://developer.blender.org/D12905
2021-10-21Re-bundle Libmv to ensure it is in sync with the repoSergey Sharybin
2021-10-20Fix: Add cast to atof for CYCLES_CONCURRENT_STATES_FACTOR env variable parsing.William Leeson
The conversion from double to float was causing a build failure. Differential Revision: https://developer.blender.org/D12946
2021-10-20Cleanup: remove unused codeBrecht Van Lommel
2021-10-20Cycles: more accurately count main paths for adding work tilesBrecht Van Lommel
Easy now thanks to the main and shadow path decoupling. Doesn't help in an benchmark scene except Spring, where it reduces render time by maybe 2-3%. Ref T87836
2021-10-20Cleanup: some renaming to better distinguish main and shadow pathsBrecht Van Lommel
2021-10-20Cycles: make ambient occlusion pass take into account transparency againBrecht Van Lommel
Taking advantage of the new decoupled main and shadow paths. For CPU we just store two nested structs in the integrator state, one for direct light shadows and one for AO. For the GPU we restrict the number of shade surface states to be executed based on available space in the shadow paths queue. This also helps improve performance in benchmark scenes with an AO pass, since it is no longer needed to use the shader raytracing kernel there, which has worse performance. Differential Revision: https://developer.blender.org/D12900
2021-10-20Cycles: reduce kernel reserved local memory when not using shader raytracingBrecht Van Lommel
Ref T87836
2021-10-20HIP device code cleanup and fix for high VRAM usageSayak Biswas
This patch cleans up code for HIP device and makes it more consistent with the CUDA code. It also fixes the issue with high VRAM usage on AMD cards using HIP allowing better performance and usage on cards like 6600XT. Added a check in intern/cycles/kernel/bvh/bvh_util.h to prevent compiler error with hipcc Reviewed By: brecht, leesonw Maniphest Tasks: T92124 Differential Revision: https://developer.blender.org/D12834
2021-10-20Fix T62325, T91990: changing Cycles presets does not update the Blender UIBrecht Van Lommel
2021-10-19Cycles: bake transparent shadows for hairBrecht Van Lommel
These transparent shadows can be expansive to evaluate. Especially on the GPU they can lead to poor occupancy when only some pixels require many kernel launches to trace and evaluate many layers of transparency. Baked transparency allows tracing a single ray in many cases by accumulating the throughput directly in the intersection program without recording hits or evaluating shaders. Transparency is baked at curve vertices and interpolated, for most shaders this will look practically the same as actual shader evaluation. Fixes T91428, performance regression with spring demo file due to transparent hair, and makes it render significantly faster than Blender 2.93. Differential Revision: https://developer.blender.org/D12880
2021-10-19Cycles: avoid intermediate stack array for writing shadow intersectionsBrecht Van Lommel
Helps save one OptiX payload and is a bit more efficient. Differential Revision: https://developer.blender.org/D12909
2021-10-19Cycles: decouple shadow paths from main path on GPUBrecht Van Lommel
The motivation for this is twofold. It improves performance (5-10% on most benchmark scenes), and will help to bring back transparency support for the ambient occlusion pass. * Duplicate some members from the main path state in the shadow path state. * Add shadow paths incrementally to the array similar to what we do for the shadow catchers. * For the scheduling, allow running shade surface and shade volume kernels as long as there is enough space in the shadow paths array. If not, execute shadow kernels until it is empty. * Add IntegratorShadowState and ConstIntegratorShadowState typedefs that can be different between CPU and GPU. For GPU both main and shadow paths juse have an integer for SoA access. Bt with CPU it's a different pointer type so we get type safety checks in code shared between CPU and GPU. * For CPU, add a separate IntegratorShadowStateCPU struct embedded in IntegratorShadowState. * Update various functions to take the shadow state, and make SVM take either type of state using templates. Differential Revision: https://developer.blender.org/D12889
2021-10-19Cycles: improve sampling pattern description regarding adaptive samplingBrecht Van Lommel
2021-10-19Cleanup: fix compiler warningsBrecht Van Lommel
2021-10-19Fix invalid principled diffuse in Cycles OSLSergey Sharybin
Need to initialize components for the full Diffuse BSDF. Steps to reproduce: - Default cube scene - Switch to Cycles renderer - Enable OSL backend - Start viewport render - Observe cube being much black Differential Revision: https://developer.blender.org/D12921
2021-10-19Cleanup: More readable Cycles OSL BSDF definitionSergey Sharybin
A Clang-Format configuration to make the closure definition block to be properly recognized as such. Also small wrapper macro to avoid comma in the actual definition code which was causing unwanted indentation of parameters definition. Requires Clang-Format 7 or newer. The version we ship in the libs is 12, so for recommended development setup it should all be good. Differential Revision: https://developer.blender.org/D12920
2021-10-19Fix T85779: Cycles not using all threads when using OpenImageDenoiseBrecht Van Lommel
The thread affinity setting in OIDN can break multithreading on some CPUs. While this leads to somewhat worse performance on CPUs that do work correctly, it's better than having some CPUs use only half the cores.
2021-10-19Cleanup: Unused device argument in host update functionsSergey Sharybin
Better not to tempt anyone from using unsafe access to device functionality during host update.
2021-10-19Fix invalid OSL shader compilation stateSergey Sharybin
The lookup tables are to be initialized after device free. On Linux was only noticeable when rendering default cube scene with an extra assert. On Windows it was causing an assert in STL in debug builds. Differential Revision: https://developer.blender.org/D12918
2021-10-19Cleanup: clang-formatCampbell Barton
2021-10-18Revert "Cycles: optimize volume stack copying for shadow catcher/compaction"Brecht Van Lommel
This reverts commit 3065d2609700d14100490a16c91152a6e71790e8. Causing crashes in the spring scene.
2021-10-18Cleanup: minor refactoring in preparation of main and shadow path decouplingBrecht Van Lommel
Ref D12889
2021-10-18Cycles: reduce GPU state memory a littleBrecht Van Lommel
* isect Ng is no longer needed for shadows, for main path needed for SSS only * Reduce rng_offset and queued_kernel to 16 bits Ref D12889
2021-10-18Cycles: optimize volume stack copying for shadow catcher/compactionBrecht Van Lommel
Only copy the number of items used instead of the max items. Ref D12889
2021-10-18Cleanup: fix outdated comment and use of atomicsBrecht Van Lommel
This is only used by a single device, not need for thread safety.
2021-10-18Cleanup: consistently use uint32_t for path flagBrecht Van Lommel
2021-10-18Cycles: replace integrator state argument macrosBrecht Van Lommel
* Rename struct KernelGlobals to struct KernelGlobalsCPU * Add KernelGlobals, IntegratorState and ConstIntegratorState typedefs that every device can define in its own way. * Remove INTEGRATOR_STATE_ARGS and INTEGRATOR_STATE_PASS macros and replace with these new typedefs. * Add explicit state argument to INTEGRATOR_STATE and similar macros In preparation for decoupling main and shadow paths. Differential Revision: https://developer.blender.org/D12888
2021-10-18Cleanup: fix compiler warningBrecht Van Lommel
2021-10-18Cleanup: spelling in commentsCampbell Barton
2021-10-15Fix T92032: Cycles panoramic cameras do not support shiftBrecht Van Lommel
2021-10-15Cycles: Voronoi noise, fix uninitialised variableCharlie Jolly
Caused a debug crash in Windows MSVS. Reviewed By: brecht Differential Revision: https://developer.blender.org/D12873
2021-10-15Cleanup: refactor BVH2 shadow intersection for upcoming changesBrecht Van Lommel
2021-10-15Cleanup: refactor OptiX shadow intersection for upcoming changesBrecht Van Lommel
2021-10-15Cleanup: don't copy constant memory to GPU multiple times for displacementBrecht Van Lommel
2021-10-15Cleanup: add utility functions for packing integersBrecht Van Lommel
2021-10-15Cleanup: refactor to make number of channels for shader evaluation variableBrecht Van Lommel
2021-10-15Fix Cycles Python error with pinned materials in properties editorBrecht Van Lommel
2021-10-15Fix T92128: Cycles CUDA wrong hair attributes, after recent changesBrecht Van Lommel
2021-10-14Cycles: Kernel address space changes for MSLMichael Jones
This is the first of a sequence of changes to support compiling Cycles kernels as MSL (Metal Shading Language) in preparation for a Metal GPU device implementation. MSL requires that all pointer types be declared with explicit address space attributes (device, thread, etc...). There is already precedent for this with Cycles' address space macros (ccl_global, ccl_private, etc...), therefore the first step of MSL-enablement is to apply these consistently. Line-for-line this represents the largest change required to enable MSL. Applying this change first will simplify future patches as well as offering the emergent benefit of enhanced descriptiveness. The vast majority of deltas in this patch fall into one of two cases: - Ensuring ccl_private is specified for thread-local pointer types - Ensuring ccl_global is specified for device-wide pointer types Additionally, the ccl_addr_space qualifier can be removed. Prior to Cycles X, ccl_addr_space was used as a context-dependent address space qualifier, but now it is either redundant (e.g. in struct typedefs), or can be replaced by ccl_global in the case of pointer types. Associated function variants (e.g. lcg_step_float_addrspace) are also redundant. In cases where address space qualifiers are chained with "const", this patch places the address space qualifier first. The rationale for this is that the choice of address space is likely to have the greater impact on runtime performance and overall architecture. The final part of this patch is the addition of a metal/compat.h header. This is partially complete and will be extended in future patches, paving the way for the full Metal implementation. Ref T92212 Reviewed By: brecht Maniphest Tasks: T92212 Differential Revision: https://developer.blender.org/D12864
2021-10-14Fix shadow catcher behind transparent object on GPUSergey Sharybin
The assumption about absent shadow path was wrong. The rest of the changes are to ensure shadow paths are finished prior to the split, so that they write to the proper passes. The issue was caught by running regression tests on OptiX. Differential Revision: https://developer.blender.org/D12857