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
2022-10-24Cycles: Metal integrator state size tuningMichael Jones
This patch tunes the integrator state sizing for Metal (`num_concurrent_states` and `num_concurrent_busy_states`). On all GPUs architecture, we adjust the busy:total states ratio to be 1:4 which gives better rendering performance than the previous 1:16 ratio (independent of total state count). This gives a small performance uplift (e.g. 2-3% on M1 Ultra). Additionally for M2 architectures, we double the overall state size if there is available headroom. Inclusive of the first change, we can expect uplift of close to 10% in future, as this results in larger dispatch sizes and minimises work submission overheads. In order to make an accurate determination of available headroom, we defer the calculation of `num_concurrent_states` and `num_concurrent_busy_states` until the time of integrator state allocation (i.e. after all of the scene data has been allocated). We also refactor `alloc_integrator_soa` to calculate an *exact* single-state-size in a first pass, right before allocating the integrator SoA buffers in a second pass. Reviewed By: brecht Differential Revision: https://developer.blender.org/D16313
2022-10-21Build: add option to error when features can't be enabledBrecht Van Lommel
This is to help ensure buildbot builds are correct, while still gracefully disabling features in user/developer builds. * Add WITH_STRICT_BUILD_OPTIONS to give an error when features can't be enabled due to missing libraries or other reasons. Add new macro set_and_warn_library_found used everywhere features were being automatically disabled. * Remove code from Windows and macOS for various libraries that would automatically disable features. set_and_warn_library_found could be used here also, but we are generally assuming the precompiled libraries are complete and only test for availability when libraries are just added. Differential Revision: https://developer.blender.org/D16104
2022-10-21Avoid re-compilation of oneAPI AoT kernels when configuration changesSergey Sharybin
Buildbot infrastructure relies on the fact that it can enable and disable `WITH_CYCLES_<COMPUTE>_BINARIES` without affecting speed of incremental builds. This allows buildbot to skip GPU kernels when doing CI regression tests which do not need GPU kernels, as well as it allows to move GPU kernels compilation to a separate step where all the resources are available to the GPU kernel builders. For the oneAPI compute enabling and disabling AoT kernels has much higher implications due to the kernels being a part of the device implementation from the build target perspective. This change makes it so different target names are used for JIT and AoT configurations, which allows CMake to more fully benefit from "caching" the compiled result. The end goal of this change is to make it so sequential build of the same code base on the buildbot happens super fast, Blender binary still needs to be re-linked when the AOT of oneAPI option is toggled, but that's already the case in the buildbot due to the WITH_BUILDINFO. Differential Revision: https://developer.blender.org/D16312
2022-10-21Cycles: oneAPI: migrate from deprecated APIs, require libSYCL 6.0+Xavier Hallade
sycl::info::device::ext_intel_* descriptors are deprecated, replaced with sycl::ext::intel::info::device:: that are available from 6.0+, for which we now check version in CMake.
2022-10-21Cycles: oneAPI: remove use of SYCL host deviceXavier Hallade
Host device is deprecated in SYCL 2020 spec, cpu device or standard C++ should be used instead.
2022-10-21Cycles: Bump versions of DPC++, IGC, and dependenciesSergey Sharybin
Patch by Xavier Hallade. Committing next to the actual libraries update in the svn.
2022-10-20Cycles: replace (tm) with unicode equivalent in UIXavier Hallade
It was already done for (TM) which is present in some GPU names on Windows. Names on Linux ended up using (tm) instead: https://gitlab.freedesktop.org/mesa/mesa/-/commit/91fec2657a0dcf9bc2e6d080d84a114ecde44382
2022-10-20Cleanup: formatCampbell Barton
2022-10-20Fix T94136: Cycles: No Hair Shadows with Transparent BSDFLukas Stockner
2022-10-20Fix T93382: Blender still generates subsurface render passesLukas Stockner
In T93382, the problem was that the Blender-side rendering code was still generating the subsurface passes because the old render pass flags were set, even though Cycles doesn't generate them anymore. After a closer look, it turns out that the entire hardcoded pass creation code can be removed. We already have an Engine API function to query the list of render passes from the engine, so we might as well just call that and create the returned passes. Turns out that Eevee already did this anyways. On the Cycles side, it allows to deduplicate a lot of `BlenderSync::sync_render_passes`. Before, passes were defined in engine.py and in sync.cpp. Now, all passes that engine.py returns are created automatically, so sync.cpp only needs to handle a few special cases. I'm not really concerned about affecting external renderer addons, since they already needed to handle the old "builtin passes" in their Engine API implementation anyways to make them show up in the compositor. So, unless they missed that for like 10 releases, they should not notice any difference. Differential Revision: https://developer.blender.org/D16295
2022-10-19Fix macOS build error after recent changes to enable Intel GPUsBrecht Van Lommel
This will only work once we upgrade to the macOS 13 SDK. Ref D16253
2022-10-19Cycles: Allow Intel GPUs under MetalMorteza Mostajab
Known Issues: - Command buffer failures when using binary archives (binary archives is disabled for Intel GPUs as a workaround) - Wrong texture sampler being applied (to be addressed in the future) Ref T92212 Reviewed By: brecht Maniphest Tasks: T92212 Differential Revision: https://developer.blender.org/D16253
2022-10-19Cycles: oneAPI: fix clean Windows ninja buildsXavier Hallade
Previously, a first build using ninja would throw "ninja: error: 'intern/cycles/kernel/cycles_kernel_oneapi.lib', needed by 'bin/blender.exe', missing and no known rule to make it".
2022-10-19Cycles: oneAPI: preload kernels only when not using prebuilt binariesXavier Hallade
sycl::build triggers compilation even if prebuilt binaries are available, we'll have to find a better way in this case.
2022-10-19Cycles: oneAPI: include sycl/sycl.hpp instead of CL/sycl.hppXavier Hallade
Since SYCL 2020 API, sycl/sycl.hpp is the way.
2022-10-19Cycles: oneAPI: fix check_usm for debug buildsXavier Hallade
2022-10-19Cycles: oneAPI: fix MSVC_TOOLS_DIR for some build environmentsXavier Hallade
MSVC Tools version doesn't match MSVC Redist version on some systems and it's not populated when using Ninja outside of Visual Studio shell, trying another way.
2022-10-19Cleanup: CMake include pathsCampbell Barton
Remove redundant separators & redundant references to parent paths.
2022-10-18Fix T101529: Blender crashes when using Path GuidingSebastian Herholz
2022-10-17Fix T101850: Cycles DDS oversaturation when alpha is in useAras Pranckevicius
DDS files coming through OIIO needed a similar treatment as TGA in T99565; just for DDS OIIO just never set the "unassociated alpha" attribute. Fixes T101850. Reviewed By: Brecht Van Lommel Differential Revision: https://developer.blender.org/D16270
2022-10-17Fix T99565: Cycles reading TGA files with alpha different than BlenderBrecht Van Lommel
Thanks to Lukas for tracking down the cause in OIIO.
2022-10-17Cycles: Fix floor intrinsic for ARM NeonLukas Stockner
2022-10-16Fix T98672: Noise texture shows incorrect behaviour for large scalesLukas Stockner
This was a floating point precision issue - or, to be more precise, an issue with how Cycles split floats into the integer and fractional parts for Perlin noise. For coordinates below -2^24, the integer could be wrong, leading to the fractional part being outside of 0-1 range, which breaks all sorts of other things. 2^24 sounds like a lot, but due to how the detail octaves work, it's not that hard to reach when combined with a large scale. Since this code is originally based on OSL, I checked if they changed it in the meantime, and sure enough, there's a fix for it: https://github.com/OpenImageIO/oiio/commit/5c9dc68391e9 So, this basically just ports over that change to Cycles. The original code mentions being faster, but as pointed out in the linked commit, the performance impact is actually irrelevant. I also checked in a simple scene with eight Noise textures at detail 15 (with >90% of render time being spent on the noise), and the render time went from 13.06sec to 13.05sec. So, yeah, no issue.
2022-10-14Fix wrong Cycles default radius for motion blurred point cloudsBrecht Van Lommel
Missing from recent commit to change the default in a6db2c2.
2022-10-14Cycles: oneAPI: Make test kernel more representativeNikita Sirgienko
Test kernel will now test functionalities related to kernel execution with USM memory allocations instead of with SYCL buffers and accessors as these aren't currently used in the backend.
2022-10-13Cycles: use one instance of oneAPI gpu compiler by defaultNikita Sirgienko
This change removes CMake code for automatic calculation of the number of offline device compiler instances, to hand over control to developers instead as it incurs a rather large memory usage with around 8GB per instance at peak. Use SYCL_OFFLINE_COMPILER_PARALLEL_JOBS CMake variable to configure it.
2022-10-13Cleanup: Fixed some warningsWerner, Stefan
Some unused parameters were left after changing the oneAPI device code to be a direclty linked shared library.
2022-10-12Cycles: Use 0.01m as default point cloud radiusHans Goudey
Currently Cycles uses zero as a default radius when no "radius" attribute exists. This is more confusing than helpful. Instead, use the same default radius as EEVEE and Workbench.
2022-10-12Cycles: Enable MNEE on Metal (macOS >= 13)Michael Jones
This patch enables MNEE on macOS >= 13. There was an inefficiency in the calculation of spill requirements, fixed as of macOS 13. This patch also adds a temporary inlining workaround for a Metal compiler bug which causes `mnee_compute_constraint_derivatives` to behave incorrectly. Reviewed By: brecht Differential Revision: https://developer.blender.org/D16235
2022-10-10Fix T101651: Cycles crashes when failing to initialize render deviceLukas Stockner
The issue here was that PathTraceWork was set up before checking if any error occurred, and it didn't account for the dummy device so it called a non-implemented function. This fix therefore avoids creating PathTraceWork for dummy devices and checks for device creation errors earlier in the process.
2022-10-10Cycles: oneAPI: Trigger compilation of used kernels onlyNikita Sirgienko
JIT compilation of oneAPI kernels now happens during load stage and proper message gets shown in the GUI during compilation. Also, this implementation skips kernels that aren't needed for the used scene, reducing overall (re)compilation time.
2022-10-10Cleanup: spelling in commentsCampbell Barton
2022-10-10Partially fix T101702: OSL Shaders with boolean inputs crashLukas Stockner
OSL (like Cycles) has no internal boolean type, instead an integer input can be flagged to be shown as a boolean in the UI. Cycles reacts to this by creating a boolean socket on the Blender side, but as a result incorrectly called the boolean overload of the set function even though the internal type is an integer. There's another unrelated crash in the GPU viewport shader code that appears to apply to every OSL node that outputs a shader, and the file in T101702 triggers both, so this is only a partial fix for the report.
2022-10-08Attribute Node: support accessing attributes of View Layer and Scene.Alexander Gavrilov
The attribute node already allows accessing attributes associated with objects and meshes, which allows changing the behavior of the same material between different objects or instances. The same idea can be extended to an even more global level of layers and scenes. Currently view layers provide an option to replace all materials with a different one. However, since the same material will be applied to all objects in the layer, varying the behavior between layers while preserving distinct materials requires duplicating objects. Providing access to properties of layers and scenes via the attribute node enables making materials with built-in switches or settings that can be controlled globally at the view layer level. This is probably most useful for complex NPR shading and compositing. Like with objects, the node can also access built-in scene properties, like render resolution or FOV of the active camera. Lookup is also attempted in World, similar to how the Object mode checks the Mesh datablock. In Cycles this mode is implemented by replacing the attribute node with the attribute value during sync, allowing constant folding to take the values into account. This means however that materials that use this feature have to be re-synced upon any changes to scene, world or camera. The Eevee version uses a new uniform buffer containing a sorted array mapping name hashes to values, with binary search lookup. The array is limited to 512 entries, which is effectively limitless even considering it is shared by all materials in the scene; it is also just 16KB of memory so no point trying to optimize further. The buffer has to be rebuilt when new attributes are detected in a material, so the draw engine keeps a table of recently seen attribute names to minimize the chance of extra rebuilds mid-draw. Differential Revision: https://developer.blender.org/D15941
2022-10-07Fix small errors in tool tips for path guidingBrecht Van Lommel
Contributed by Alaska. Differential Revision: https://developer.blender.org/D16166
2022-10-07Fix: One-API build issue on windows.Ray Molenkamp
Flags were not properly passed to the compiler.
2022-10-07Cycles: link oneAPI backend with debug version of sycl when in DebugXavier Hallade
It fixes SYCL runtime issues in Debug builds that were due to mixing Release and Debug MSVC runtimes. This commit also removes specific handling of dpcpp compiler executable to simplify the CMake implementation. Using it like clang++ works and clang++ executable is also available from Intel oneAPI DPC++ compiler in case it doesn't.
2022-10-07Cycles: use direct linking for oneAPI backendXavier Hallade
This is a minimal set of changes, allowing a lot of cleanup that can happen afterward as it allows sycl method and objects to be used outside of kernel.cpp. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D15397
2022-10-07Cleanup: spelling in commentsCampbell Barton
2022-10-06Fix T101458: Changing volume density when pg is enabled causes crashSebastian Herholz
Changing volume parameters during rendering could cause a crash when guiding was enabled. It was due to an unintialized state paramter at the beginning of the path tracing process. In addition guiding is disabled when dealing with almost delta volumes (i.e., g close to 1.0 or -1.0).
2022-10-05Fix T101523: Cycles path guiding debug settings not affecting final renderBrecht Van Lommel
2022-10-04Build: integrate OpenPGL into platform files like other librariesBrecht Van Lommel
To avoid issues with install_deps. If we more generally switch to using CMake configs then perhaps this code can be deduplicated again or at least simplified.
2022-10-04Cycles: refine inlining thresholds for oneAPI backendNikita Sirgienko
New thresholds give a few percent improvement in average.
2022-10-04Cycles: Speed up oneAPI GPU binaries compilation by using parallel instancesNikita Sirgienko
This change speeds up the compilation at the cost of higher memory usage. CMake implementation checks the amount of available memory to spawn a reasonable number of parallel compiler jobs.
2022-10-03Cycles: add option to bake specular from active camera viewpointPhoenix Katsch
Previously it would bake viewed from above the surface. The new option can be useful when the baked result is meant to be viewed from a fixed viewpoint or with limited camera motion. Some effort is made to give a continuous reflection on parts of the surface invisible to the camera, but this is necessarily only a rough approximation. Differential Revision: https://developer.blender.org/D15921
2022-10-03Cleanup: in Cycles force inline transform_inverse_implBrecht Van Lommel
We expect this to always happen. Ref T100891
2022-10-03Cleanup: spelling in commentsCampbell Barton
Also replace "dm" for evaluated mesh in some comments.
2022-09-30Attribute Node: refactor lookup to remove duplication between engines.Alexander Gavrilov
Currently lookup of Object and Instancer attributes is completely duplicated between Cycles, Eevee and Eevee Next. This is bad design, so this patch aims to deduplicate it by introducing a common API in blenkernel. In case of Cycles this requires certain hacks, but according to Brecht it is planned to be rewritten later for more direct access to internal Blender data anyway. Differential Revision: https://developer.blender.org/D16117
2022-09-29Cleanup: cmake indentationCampbell Barton
2022-09-28Cleanup: spelling in commentsCampbell Barton
Also add missing task ID.