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-09-21Add oneAPI to the 'cycles_device' command line argument help textAlaska
Differential Revision: https://developer.blender.org/D16027
2022-09-20Cycles: don't allow negative BSDF weightsBrecht Van Lommel
This doesn't work with path guiding, and likely other features.
2022-09-20GHOST/Wayland: refactor modifier handling on window activationCampbell Barton
GHOST_SystemWayland::getModifierKeys() now returns the correct modifier keys held instead of guessing that both left/right modifiers were held.
2022-09-19GHOST/Wayland: correct flag for checking pressed keysCampbell Barton
Check modifier keys using XKB_STATE_MODS_DEPRESSED which is used to check if modifiers are physically held. In practice it's unlikely this would have caused an error for key-maps in common use.
2022-09-19Cleanup: spellingCampbell Barton
2022-09-18Cycles: sync changes from standalone repositoryBrecht Van Lommel
* Windows build fixes * Workaround for Hydra + OpenColorIO link issue * Bump version
2022-09-18Build: fix gtest build flags affecting actual libraryBrecht Van Lommel
Switch to target_ functions to avoid this.
2022-09-18Fix OS-key events repeating on GHOST/Win32Campbell Barton
Holding the OS (Windows) key on Win32 used key-repeat behavior. While as far as I know it didn't cause user visible errors - sending repeated modifier events isn't expected behavior and doesn't happen on other platforms (or for other modifier keys).
2022-09-18GHOST: support left/right OS-keyCampbell Barton
Handling the OS key now match other modifiers in GHOST which detect each key separately, making the behavior simpler to reason about since mapping a single key to a modifier state is simpler, avoiding handling that only applied to the OS-Key. This means simulating key up/down events can use the correct modifier. In the window-manager this is still only accessed accessed via KM_OSKEY.
2022-09-17Mikktspace: Fix triangle reordering predicateLukas Stockner
This only affected meshes containing degenerate triangles.
2022-09-17Cleanup: spelling, punctuation & repeated words in commentsCampbell Barton
2022-09-16Cleanup: spelling in commentsCampbell Barton
2022-09-15Fix T101065: wrong denoising depth after ray precision improvementsBrecht Van Lommel
2022-09-14Fix T100899: Drag and Drop failing depending on window positionGermano Cavalcante
Regression introduced in rBbbf87c4f7509, which now relies on OS coordinates for Drag and Drop. These coordinates did not match on different OSs.
2022-09-14Fix T101025: Cycles motion blur crash with changing point cloud sizeHans Goudey
Caused by 410a6efb747f188da30c which didn't properly use the smallest size between the Cycles and Blender point clouds.
2022-09-13Fix compilation error on Windows after recent changeSergey Sharybin
2022-09-13Cycles: Make OSL implementation independent from SVMPatrick Mours
Cleans up the file structure to be more similar to that of the SVM and also makes it possible to build kernels with OSL support, but without having to include SVM support. This patch was split from D15902. Differential Revision: https://developer.blender.org/D15949
2022-09-13Fix oneAPI compilation on modern Linux and CentOS 7 librariesSergey Sharybin
2022-09-13Cycles: Include reason the oneAPI library could not be loadedSergey Sharybin
Additionally, just stick to a pure error stating. Such messages are aimed for developers and it is rather implied that oneAPI rendering will be disabled.
2022-09-13Fix compilation on Linux, glibc 2.34, and CentOS librariesSergey Sharybin
A continuation of previous fix for malloc hooks which got removed from the new glibc library. The pre-compiled jemalloc has definitions which interpose hooks in glibc leading to linking errors with multiple hook definitions. A simple fix is to skip doing the workaround when using jemalloc from pre-compiled libraries. This will likely be revisited in the future, but for now it is important to fix compilation errors for developers.
2022-09-13Cleanup: spelling in commentsCampbell Barton
2022-09-13Fix building WITH_GHOST_WAYLAND, WITH_OPENXR (without X11)Campbell Barton
The pre-processor blocks contained un-balanced braces, causing a syntax error when building with WAYLAND but not X11. Use the same number of opening & closing braces in each pre-processor block so changes aren't as likely to break other platforms. Also assert when unexpected states are reached.
2022-09-13Cleanup: quiet missing-variable-declarations warningCampbell Barton
2022-09-12GLibC Compat: Add deprecated memory hooks symbols removed from 2.34.Bastien Montagne
Starting from GLibC 2.34, deprecated `__malloc_hook` & co. have been removed from headers, while still present in the shared library itself. This means that it is no more possible to build Blender with USD 22.03 on recent linux systems. While USD 22.08 has a fix to this issue, it is unlikely to be upgraded for Blender 3.4, and definitely not for Blender 3.3. This commit ensures Blender can build with USD 22.03 and glibc >= 2.34. Ref.: T99618, https://devtalk.blender.org/t/building-blender-on-linux-using-glibc-2-34-raises-linking-errors-from-the-usd-library/24185 Patch by @brecht, many thanks.
2022-09-10Cleanup: cycles OSL compiler warningsBrecht Van Lommel
2022-09-10Cleanup: format, spellingCampbell Barton
2022-09-09Cycles: Generate OSL closures using macros and a template filePatrick Mours
This has the advantage of being able to use information about the existing OSL closures in various places without code duplication. In addition, the setup code for all closures was moved to standalone functions to avoid usage of virtual function calls in preparation for GPU support. This patch was split from D15902. Differential Revision: https://developer.blender.org/D15917
2022-09-09Cycles: Remove separate OSL attribute map and instead always use SVM ↵Patrick Mours
attribute map The SVM attribute map is always generated and uses a simple linear search to lookup by an opaque ID, so can reuse that for OSL as well and simply use the attribute name hash as ID instead of generating a unique value separately. This works for both object and geometry attributes since the SVM attribute map already stores both. Simplifies code somewhat and reduces memory usage slightly. This patch was split from D15902. Differential Revision: https://developer.blender.org/D15918
2022-09-09Fix Clang warning about braces around initializationSergey Sharybin
2022-09-08Fix T100833: Cycles UDIM baking broken after recent changesBrecht Van Lommel
2022-09-08Fix Cycles wrong MIS logic in shade_light kernel after recent changesBrecht Van Lommel
Though end result was still correct. Thanks to Alaska for spotting this.
2022-09-07Cleanup: sort cmake file listsCampbell Barton
2022-09-07Cleanup: GHOST/Win32 dropCampbell Barton
- Reduce variable scope. - Use snake-case for variables. - Remove unnecessary counter when building file-list. - Remove break after return. - Use early return. - Add missing braces.
2022-09-07Cleanup: rename internal types for GHOST/WaylandCampbell Barton
- Use pascel-case type names, instead of snake-case with `_t` suffix. - Use `GWL_` prefix (short for GhostWayLand), to distinguish these types from ghost (`GHOST_*`) and wayland (`wl_*`) types. - Rename `input` to `seat` (following wayland's own terminology). - Use `wl_` prefix for wayland native variables which have locally defined equivalents so `GWL_Output *output` isn't confused with `struct wl_output *wl_output`. As the locally defined types are used more often this is less verbose overall.
2022-09-07GHOST/Wayland: correct logging IDCampbell Barton
2022-09-07Cleanup: spelling in comments, correct doxy slashes, replace '/w'Campbell Barton
2022-09-07Mikktspace: Optimized port to C++Lukas Stockner
This commit is a big overhaul to the Mikktspace module, which is used to compute tangents. I'm not calling it a rewrite since it's the result of a lot of iterations on the original code, but pretty much everything is reworked somehow. Overall goal was to a) make it faster and b) make it maintainable. Notable changes: - Since the callbacks for requesting geometry data were a big bottleneck before, I've ported it to C++ and made it header-only, templating on the data source. That way, the compiler generates code specific to the caller, which allows it to inline the data source and specialize for some cases (e.g. subd vs. non-subd in Cycles). - The one input parameter, an optional angle threshold, was not used anywhere. Turns out that removing it allows for considerable algorithmic simplification, removing a lot of the complexity in the later stages. Therefore, I've just removed the option in the new code. - The code computes several outputs, but only one (the tangent itself) is ever used in Blender. Therefore, I've removed the others to simplify the code. They could easily be brought back if needed, none of the algorithmic simplifications are conflicting with them. - The original code had fallback paths for many steps in case temporary memory allocation fails, but that never actually gets used anyways since malloc() doesn't really ever return NULL in practise, so I removed them. - In general, I've restructured A LOT of the code to make the algorithms clearer and make use of some C++ features (vectors, std::array, booleans, classes), though there's still some of cleanup that could be done. - Parallelized duplicate detection, neighbor detection, triangle tangent computation, degenerate triangle handling and tangent space accumulation. - Replaced several algorithms with faster equivalents: Duplicate detection uses a (concurrent) hash set now, neighbor detection uses Radixsort and splits vertices by index pairs etc. As for results, the exact speedup depends on the scene of course, but let's consider the file from T97378: - Blender 3.1 (before D14675): 6.07sec - Blender 3.2 (with D14675): 4.62sec - rBf0a36599007d (last nightly build): 4.42sec - With this commit: 0.90sec This speedup will mostly be noticed at the start of Cycles renders and, even more importantly, in Eevee when doing something that changes the geometry (e.g. animating) on a model using normal maps. Differential Revision: https://developer.blender.org/D15589
2022-09-06Fix T100824: Cycles GPU render broken on macOS 13 Beta and Apple siliconBrecht Van Lommel
The recent revert of Apple silicon inlining changes to avoid long compile times worked on macOS 12, but in macOS 13 Beta it results in render errors. This may be a compiler bug and perhaps get fixed in time, but try to be on the safe side and ensure Blender 3.3.0 works regardless. This brings part of the inlining back, which brings improved performance but also longer compiler times again. Compile time is around 2min now, where the previous full inlining was about 5-7min. Patch by Michael Jones. Differential Revision: https://developer.blender.org/D15897
2022-09-06Fix T100845: wrong Cycles OptiX runtime compilation include pathJosh Whelchel
Causing OptiX kernel build errors on Arch Linux. Differential Revision: https://developer.blender.org/D15891
2022-09-06Merge branch 'blender-v3.3-release'Nikita Sirgienko
2022-09-06Cycles: Fix crashes in oneAPI backend for scenes not fitting in dGPU memoryNikita Sirgienko
Differential Revision: https://developer.blender.org/D15889
2022-09-06Cleanup: spelling in comments, formatting, move comments into headersCampbell Barton
2022-09-06MacOS: Resolve purple rendering artifacts in EEVEE materials by increasing ↵Jason Fielder
sampler limit. Enables a feature flag during OpenGL device initialisation on macOS, which increases the available number of texture samplers available for use within shaders. Enabling this flag removes purple rendering artifacts present in certain EEVEE materials, when the existing limit of 16 is exceeded. This feature flag is supported on Apple Silicon and AMD GPUs, for devices supporting macOS 11.0+. Device initialisation first tests whether GL device creation with the flag is supported, if not, we fall back to standard initialisation. Other solutions would not be trivial or incur additional performance overhead or feature limitations. Other workarounds, such as texture atlas's, could already be created by artists. {F13245498} {F13245497} Reviewed By: jbakker Maniphest Tasks: T57759, T63935 Differential Revision: https://developer.blender.org/D15336
2022-09-05Mesh: Remove redundant custom data pointersHans Goudey
For copy-on-write, we want to share attribute arrays between meshes where possible. Mutable pointers like `Mesh.mvert` make that difficult by making ownership vague. They also make code more complex by adding redundancy. The simplest solution is just removing them and retrieving layers from `CustomData` as needed. Similar changes have already been applied to curves and point clouds (e9f82d3dc7ee, 410a6efb747f). Removing use of the pointers generally makes code more obvious and more reusable. Mesh data is now accessed with a C++ API (`Mesh::edges()` or `Mesh::edges_for_write()`), and a C API (`BKE_mesh_edges(mesh)`). The CoW changes this commit makes possible are described in T95845 and T95842, and started in D14139 and D14140. The change also simplifies the ongoing mesh struct-of-array refactors from T95965. **RNA/Python Access Performance** Theoretically, accessing mesh elements with the RNA API may become slower, since the layer needs to be found on every random access. However, overhead is already high enough that this doesn't make a noticible differenc, and performance is actually improved in some cases. Random access can be up to 10% faster, but other situations might be a bit slower. Generally using `foreach_get/set` are the best way to improve performance. See the differential revision for more discussion about Python performance. Cycles has been updated to use raw pointers and the internal Blender mesh types, mostly because there is no sense in having this overhead when it's already compiled with Blender. In my tests this roughly halves the Cycles mesh creation time (0.19s to 0.10s for a 1 million face grid). Differential Revision: https://developer.blender.org/D15488
2022-09-05Merge branch 'blender-v3.3-release'Brecht Van Lommel
2022-09-05Fix T100814: Cycles wrong area light parametric texture coordinatesBrecht Van Lommel
The fix from cefd6140f322 was for light intersection, but light sampling also needs it. Differential Revision: https://developer.blender.org/D15879
2022-09-05Fix Cycles not rendering hair without radius attributesBrecht Van Lommel
This was fixed in 8159e0a but accidentally reverted as part of 18b703d
2022-09-02Cleanup: fix compiler warningBrecht Van Lommel
2022-09-02Cycles: enable adaptive sampling for Sobol-BurleyNathan Vegdahl
This uses the same sample classification approach as used for PMJ, because it turns out to also work equally well with Sobol-Burley. This also implements a fallback (random classification) that should work "okay" for other samplers, though there are no other samplers at the moment. Differential Revision: https://developer.blender.org/D15845
2022-09-02Fix Cycles scrambling distance incorrectly showing as enabled for Sobol-BurleyBrecht Van Lommel
Contributed by Alaska. Differential Revision: https://developer.blender.org/D15849