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
2022-10-11Fix linker order of X11 and Wayland libsSebastian Parborg
For some compiler and linker configurations, linking would fail as the wayland libs were linked at a high level and not at the actual code where they were needed. After talking to Campbell, we decided to clean up this part and now only link both the X11 and Wayland libs where they are used.
2022-10-11GHOST/Wayland: correct the library path for libwayland-eglCampbell Barton
Systems without `libwayland-egl.so` (Fedora 37 beta) failed to start, as the name `libwayland-egl.so.0` wasn't correct.
2022-10-11GHOST/Wayland: print all dynamic loading failure when using WaylandCampbell Barton
Previously only failure to dynamically load libdecor would report a warning. Now report failure to load all Wayland libraries. This was done because Wayland libraries (besides libdecor) are likely to be installed on systems running Wayland. However it makes it difficult to troubleshoot failure to load Wayland on systems with libdecor. Only silence Wayland dynamic loading warnings when Wayland isn't running.
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-10GHOST/Wayland: warn when falling back to X11 because of missing libdecorCampbell Barton
X11 is used as a fallback when libdecor isn't found on the users system. Now print a warning when Blender falls back to X11 and a missing libdecor is the only reason wayland could not be used. Only print this warning when using Wayland so this warning doesn't show on X11 systems which have Wayland libraries installed. Addresses T101715.
2022-10-10UI: show the windowing environment in the "About" splashCampbell Barton
Show the windowing environment on non MS-Windows/Apple systems, since X11/WAYLAND are selected startup there was no convenient way for users to know which back-end was being used. Include the windowing environment in the About splash & system-info.txt since it will be useful for handling bug reports. This commit adds a private API call not intended for general use as I would like to be able to remove this later and it's only needed in the specific case of testing if Blender is using WAYLAND or X11 (which maybe be used via XWayland). Python scripts can already inspect the system to check which windowing environment used, the API call is mainly useful for troubleshooting.
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: use doxy sectionsCampbell Barton
Also use doxy syntax for some comments.
2022-10-07GHOST/Wayland: silence warnings for modifier key handling in GNOMECampbell Barton
GNOME (mutter) intentionally doesn't follow the Wayland spec for the keyboard_enter events (held keys are always an empty array). This means we can't know which keys are held on window activation, making the result of getModifierKeys invalid (in that we don't know which modifiers are held). Detect this situation and suppress warnings as the issue has been reported and it doesn't help for users to see noisy warnings for a known problem.
2022-10-07GHOST/Wayland: improve logging messages for keyboard eventsCampbell Barton
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-05Fix T101185: New Mikktspace crashes on meshes without valid trianglesLukas Stockner
The code already had a check for meshes with zero triangles, but it didn't catch the case where all triangles are flagged as degenerate. A simple way to reproduce this is to take a mesh and scale it to zero. After checking the code, it turns out that in this case it's supposed to just set all tangents to zero, so the fix simply is to detect this case and skip the computation.
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-04Cleanup: rename BKE_appdir_folder_id_version, improve doc-stringsCampbell Barton
Rename BKE_appdir_folder_id_version to BKE_appdir_resource_path_id_with_version because BKE_appdir_folder_id and BKE_appdir_folder_id_version didn't accept compatible arguments. Also add notes to GHOST_getSystemDir & GHOST_getUserDir that BKE_appdir_resource_path_id(..) should be used instead (in most cases).
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-30Cleanup: use function style casts for C++Campbell Barton
2022-09-29Cleanup: cmake indentationCampbell Barton
2022-09-28Cleanup: spelling in commentsCampbell Barton
Also add missing task ID.
2022-09-28Cleanup: formatCampbell Barton
2022-09-27Cycles: Add optional per-kernel performance statisticsNikita Sirgienko
When verbose level 4 is enabled, Blender prints kernel performance data for Cycles on GPU backends (except Metal that doesn't use debug_enqueue_* methods) for groups of kernels. These changes introduce a new CYCLES_DEBUG_PER_KERNEL_PERFORMANCE environment variable to allow getting timings for each kernels separately and not grouped with others. This is done by adding explicit synchronization after each kernel execution. Differential Revision: https://developer.blender.org/D15971
2022-09-27Cleanup: Unused variable warning with path guiding turned offHans Goudey
2022-09-27Fix: OpenPGL related build error on windowsRay Molenkamp
Debug and Release libs are different libs on Windows and will give linker errors when you try to mix and match them. This changes retrieves both libs and fills the OPENPGL_LIBRARIES variable appropriately resolving the linker error.
2022-09-27Cycles: Tweak inlining policy on MetalMichael Jones
This patch optimises the Metal inlining policy. It gives a small speedup (2-3% on M1 Max) with no notable compilation slowdown vs what is already in master. Previously noted compilation slowdowns (as reported in T100102) were caused by forcing inlining for `ccl_device`, but we get better rendering perf by relying on compiler heuristics in these cases. Reviewed By: brecht Differential Revision: https://developer.blender.org/D16081
2022-09-27Cycles: Disable binary archives on macOS < 13.0Michael Jones
An bug with binary archives was fixed in macOS 13.0 which stops some spurious kernel recompilations. In older macOS versions, falling back on the system shader cache will prevent recompilations in most instances (this is the same behaviour as in Blender 3.1.x and 3.2.x). Reviewed By: brecht Differential Revision: https://developer.blender.org/D16082
2022-09-27Cycles: add Path Guiding on CPU through Intel OpenPGLSebastian Herhoz
This adds path guiding features into Cycles by integrating Intel's Open Path Guiding Library. It can be enabled in the Sampling > Path Guiding panel in the render properties. This feature helps reduce noise in scenes where finding a path to light is difficult for regular path tracing. The current implementation supports guiding directional sampling decisions on surfaces, when the material contains a least one diffuse component, and in volumes with isotropic and anisotropic Henyey-Greenstein phase functions. On surfaces, the guided sampling decision is proportional to the product of the incident radiance and the normal-oriented cosine lobe and in volumes it is proportional to the product of the incident radiance and the phase function. The incident radiance field of a scene is learned and updated during rendering after each per-frame rendering iteration/progression. At the moment, path guiding is only supported by the CPU backend. Support for GPU backends will be added in future versions of OpenPGL. Ref T92571 Differential Revision: https://developer.blender.org/D15286
2022-09-27Cycles: BSDF eval refactor to remove separate reflection/refraction methodsBrecht Van Lommel
Simplifies code overall to do it inside the eval function, most of the BSDFs already compute the dot product. The refactoring in bsdf_principled_hair_eval() was needed to avoid a HIP compiler bug. Cause is unclear, just changing the implementation enough is meant to sidestep it. Ref T92571, D15286
2022-09-27Cycles: BSDF changes in preparation of path guidingSebastian Herhoz
* Return roughness and IOR for BSDF sampling * Add functions to query IOR and label for given BSDF * Default IOR to 1.0 instead of 0.0 for BSDFs that don't use it * Ensure pdf >= 0.0 in case of numerical precision issues Ref T92571, D15286
2022-09-27GHOST: exit with an error when GHOST cannot be initializedCampbell Barton
When the GHOST back-end Blender was built with isn't supported, Blender would crash on startup without any useful information. This could happen when building X11 only, then running on Wayland. Now show a list of the GHOST back-ends that were attempted and exit with an error code instead of crashing.
2022-09-27Cleanup: remove workarounds and version checks for unsupported compilersCampbell Barton
Match minimum supported versions from the WIKI [0] by raising them to: - GCC 9.3.1 - CLANG 8.0 - MVCS 2019 (16.9.16 / 1928) Details: - Add CMake checks that ensure supported compiler versions early on. - Previously GCC per-processor version checks served to exclude `__clang__`, in some cases this has been replaced by explicitly excluding `__clang__`. This was needed as CLANG treated some of these flags differently to GCC, causing the build to fail. - Remove USE_APPLE_OMP_FIX GCC-4.2 OpenMP workaround. - Remove linking error workaround for old MSVC versions. [0]: https://wiki.blender.org/wiki/Building_Blender Reviewed by: brecht, LazyDodo Ref D16068
2022-09-27Cleanup: use the system-handle arg for GHOST_SetMultitouchGesturesCampbell Barton
There was an unused argument warning, quiet by using the argument.
2022-09-26UI: add preference to disable touchpad multitouch gesturesrecht Van Lommel
Available on Windows and macOS, where such gestures are supported. For Windows, disabling this option restores touchpad behavior to match Blender 3.2. Ref T97925 Differential Revision: https://developer.blender.org/D16005
2022-09-26Fix T101354: Cycles crash with baking and adaptive samplingBrecht Van Lommel
2022-09-26Cycles: increase min-supported driver version for Intel GPUsXavier Hallade
Windows drivers 101.3430 fix an important GUI-related crash and it's best to prevent users from running into it. Linux drivers weren't affected but still had relevant gpu binary compatibility fixes, so it makes sense to keep the min-supported version aligned across OSes.
2022-09-26Cleanup: replace C-style casts with functional casts for numeric typesCampbell Barton
Use function style casts in C++ headers & source.
2022-09-26Cleanup: remove redundant parenthesisCampbell Barton
2022-09-26Cleanup: use 'u' prefixed integer types for brevity in C codeCampbell Barton
This also simplifies using function style casts when moving to C++.