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
2020-12-17Explicitly link X11 librariesSybren A. Stüvel
Fix X11 library underlinking, which was breaking Debian and Ubuntu packages. From Ubuntu Hirsute changelog: ``` blender (2.83.5+dfsg-4ubuntu1) hirsute; urgency=medium * Try to also link ghost library with x11, needed because of missing XConvertSelection symbol link (used in ghost static library). * Don't use gold, but switch to bfd linker that seems to be working better on ppc64el. -- Gianfranco Costamagna <locutusofborg@debian.org> Wed, 11 Nov 2020 14:17:29 +0100 ``` Reviewed by: sybren Differential Revision: https://developer.blender.org/D9617
2020-12-17Synchronize Wintab and Win32 time.Nicholas Rishel
Time is synchronized by the difference between the WT_PACKET receive time and the last received PACKET's pkTime. This is used to prevent Wintab packets from being prematurely expired.
2020-12-16Ghost/Linux: Avoid error print if special directory can't be determinedJulian Eisel
The function is supposed to fail gracefully if there is some error. That includes not being able to find `xdg-user-dir`. So don't let the error be printed to the console, it's misleading/annoying. From what I can tell we'll detect that problem fine and return NULL then.
2020-12-15Cleanup: make formatJacques Lucke
2020-12-15Cleanup: doxy comments (use colon after parameter name)Campbell Barton
Also remove colon after `\note`.
2020-12-15Cleanup: spellingCampbell Barton
2020-12-14Fix T75539: Cycles missing geometry update when switching displacement methodJoan Bonet Orantos
The shaders were not tagged for a needed geometry update when the displacement method was modified, neither were the Geometry and Object managers. Reviewed By: kevindietrich Maniphest Tasks: T75539 Differential Revision: https://developer.blender.org/D8896
2020-12-11Fix T83586: Cycles failing to load OpenEXR image with EXR RGBAZ channelsValdemar Lindberg
Don't refuse to load 5-channel images, instead drop any channels after the 4th and hope that the first channels represent RGBA. Differential Revision: https://developer.blender.org/D9820
2020-12-11Cycles: enable OpenCL rendering on recent Intel GPUsSergey Sharybin
Based on testing by Intel, rendering on Iris GPUs and upcoming Xe GPUs should work. This is enabled on Windows and Linux. More testing is needed to verify correctness and performance in production scenes, but our basic benchmark files seem to give correct results.
2020-12-11Cleanup: compiler warningsBrecht Van Lommel
If you mark one function as override in a class, all must be marked.
2020-12-11Trackpad: Fix wrong scroll deltas on RetinaYevgeny Makarov
Scale Mac trackpad scrolling changes by pixel size of output device. Differential Revision: https://developer.blender.org/D9723 Reviewed by Brecht Van Lommel
2020-12-11Ghost: Support queries for special user directories (desktop, documents, etc.)Julian Eisel
When we had to get special user directories, we'd usually do it in varying, rather ad-hoc ways. It would be done with a bunch of `#ifdef`s for the different operating systems. Also, some of the used Win32 functions were legacy ones and the API docs recommend using newer ones. Further, seems `BKE_appdir_folder_default()` used `XDG_DOCUMENTS_DIR` wrong. It's not supposed to be an environment variable but a value inside a config file. This adds the platform dependent logic to Ghost, so we can abstract it away nicely using the `GHOST_ISystemPaths` interface. Getting the desktop directory for example can now easily be done with: `GHOST_getUserSpecialDir(GHOST_kUserSpecialDirDesktop).` For now I added the logic for desktop, documents, downloads, videos, images and music directories, even though we only use the Documents one. We can extend/ change this as needed, it's easy to do now. On Windows and macOS, it uses pretty much the same way to access the directories as elsewhere already. On Linux, it uses the `xdg-user-dir` command that seems to be available by default on most Linux systems. No functional changes. The new queries are not actually used yet. Differential Revision: https://developer.blender.org/D9800 Reviewed by: Brecht Van Lommel
2020-12-11Cycles: Add CPU+GPU rendering support with OptiXPatrick Mours
Adds support for building multiple BVH types in order to support using both CPU and OptiX devices for rendering simultaneously. Primitive packing for Embree and OptiX is now standalone, so it only needs to be run once and can be shared between the two. Additionally, BVH building was made a device call, so that each device backend can decide how to perform the building. The multi-device for instance creates a special multi-BVH that holds references to several sub-BVHs, one for each sub-device. Reviewed By: brecht, kevindietrich Differential Revision: https://developer.blender.org/D9718
2020-12-10Fix T82852: Cycles crashes when editing a mesh with adaptive subdivisionKévin Dietrich
The issue is caused by stale data on the Mesh Node which is not cleared during synchronizing since the socket API refactor so that we can detect changes. However, synchronization only updates the sockets of the Mesh, so other properties were left with outdated values. This caused an underflow when computing attribute size for undisplaced coordinates as it was using the current number of vertices minus the previous count of subdivision vertices, which at this point should be 0. Added a simple method to clear non socket data. Also modified Mesh.add_undisplaced to always use an ATTR_PRIM_GEOMETRY as the data is not subdivided yet and it avoids any further issues regarding computing attribute sizes.
2020-12-09Fix T83581: "Only local" ambient occlusion option causes error on OptiX 2.92Patrick Mours
The SVM AO node calls "scene_intersect_local" with a NULL pointer for the intersection information, which caused a crash with OptiX since it was not checking for this case and always dereferencing this pointer. This fixes that by checking whether any hit information was requested first (like is done in the BVH2 intersection routines).
2020-12-08Cycles: Remove "OptiX support is experimental" noticePatrick Mours
OptiX support is not in fact experimental anymore, so it is time for that notice to go. All Cycles features that are currently supported on the GPU do work now when OptiX is selected.
2020-12-08Cycles: Enable baking panel in OptiX and redirect those requests to CUDA for nowPatrick Mours
This enables support for baking when OptiX is active, but uses CUDA for that behind the scenes, since the way baking is currently implemented does not work well with OptiX. Reviewed By: brecht Differential Revision: https://developer.blender.org/D9784
2020-12-08CMake: fix linking with WITH_SDL_DYNLOADCampbell Barton
While this was only needed in 'source/blender/python', add to ghost to avoid problems in the future.
2020-12-07Fix failing Cycles tests after Cryptomatte changesBrecht Van Lommel
For old files without Cycles cryptomatte settings, must provide the defaults.
2020-12-07Fix Cryptomatte panel not visible in EEVEEJeroen Bakker
Caused by {rB5baae026a86f}
2020-12-07File Subversion Bump: 2.92.5Jeroen Bakker
2020-12-07Cycles: Use Blender Cryptomatte Settings.Jeroen Bakker
Blender has now the place to store the Cryptomatte settings. This patch migrates Cycles to use the new settings. Reviewed By: Brecht van Lommel Differential Revision: https://developer.blender.org/D9746
2020-12-04Atomics: Add 16 bit fetch + AND and fetch + OR signed integer operationsJulian Eisel
I could use a 16 bit atomic fetch + AND for D9719. The alternative would be to turn a `short` into a `int` in DNA, which isn't a nice workaround. Also adds tests for the new functions.
2020-12-04Cycles: Add support for shader raytracing in OptiXPatrick Mours
Support for the AO and bevel shader nodes requires calling "optixTrace" from within the shading VM, which is only allowed from inlined functions to the raygen program or callables. This patch therefore converts the shading VM to use direct callables to make it work. To prevent performance regressions a separate kernel module is compiled and used for this purpose. Reviewed By: brecht Differential Revision: https://developer.blender.org/D9733
2020-12-03Fix Cycles device kernels containing debug assertation codePatrick Mours
NanoVDB includes "assert.h" and makes use of "assert" in several places and since the compile pipeline for CUDA/OptiX kernels does not define "NDEBUG" for release builds, those debug checks were always added. This is not intended, so this patch disables "assert" for CUDA/OptiX by defining "NDEBUG" before including NanoVDB headers. This also fixes a warning about unknown pragmas in NanoVDB thrown by the CUDA compiler.
2020-12-02Fix T83300: constant scene refreshing in Cycles with empty volumesKévin Dietrich
This infinite loop is caused by a conflict between the volume mesh creation which unintentionally clears the shaders before early exiting when no grid is found, and the Blender exporter which adds back the shaders causing us to reupdate as the shaders changed. To fix this simply preserve the shaders on the Volume node.
2020-12-01Libmv: Tweak default logging verbosity levelSergey Sharybin
Log to verbosity level 1 rather than INFO severity. Avoids a lot of overhead coming from construction of the INFO stream and improves performance and threadability of code which uses logging. This makes tracking of 250 frames of a track of default settings to drop down from 0.6sec to 0.4sec.
2020-12-01Libmv: Cleanup, remove unused logging macrosSergey Sharybin
Unused and was not entirely happy with such short abbreviations.
2020-11-30Fix T82870: on macOS, continuous grab jumps when crossing editor borderYevgeny Makarov
The event queue can contain events from before pointer warping, ignore those now. This is an old issue, but became more common now that we disabled event coalescing and started using the event mouse location rather than the current mouse location. Thanks to Yevgeny Makarov and Nicholas Rishel for helping solve this. Ref D9662
2020-11-30Cleanup: avoid harmless but unnecessary float division by zeroBrecht Van Lommel
2020-11-30Libmv: Add threading primitivesSergey Sharybin
Allows to use mutex, scoped_lock, and conditional_variable from within the libmv namespace. Implementation is coming from C++11. Other configurations are easy to implement, but currently C++11 is the way to go.
2020-11-30Libmv: Add build configuration headerSergey Sharybin
Allows to easily access build platform information, such as bitness, compiler, supported C++ version and so on.
2020-11-30Libmv: add missing files to bundlerSergey Sharybin
Bundler wouldn't be able to pull changes form upstream until all the changes are upstreamed, but is better to have information consistent.
2020-11-30Deps: PugiXML 1.10Ray Molenkamp
This separates out PugiXML that was previously bundled by OIIO. As this linux/mac libs are not available this commit only contains the builder and windows changes, and the option to enable pugixml is guarded by a platform if, this can be removed once all platforms have committed the svn libs. For details see D8628
2020-11-26Fluid: Updated Mantaflow source filesSebastián Barschkis
This update introduces two improvements from the Mantaflow repository: (1) Improved particle sampling: - Liquid and secondary particles are sampled more predictably. With all parameters being equal, baked particles will be computed at the exact same position during every bake. - Before, this was not guaranteed. (2) Sparse grid caching: - While saving grid data to disk, grids will from now on be saved in a sparse structure whenever possible (e.g. density, flame but not levelsets). - With the sparse optimization grid cells with a value under the 'Empty Space' value (already present in domain settings) will not be cached. - The main benefits of this optimization are: Smaller cache sizes and faster playback of simulation data in the viewport. - This optimization works 'out-of-the-box'. There is no option in the UI to enable it. - For now, only smoke simulation grids will take advantage of this optimization.
2020-11-25Atomics: Fix missing 64bit implementation for 32bit platformsSergey Sharybin
Blender uses 64bit atomics to manipulate SessionUUID, and these atomics were not defined on any of 32bit platforms. While official support is limited to 64bit platforms only, the code should not make assumptions about bitness or endianess, in terms that there should be codepaths and fallback (or provision of them) for 32bit platforms. This change makes 64bit atomic functions defined for all platforms. The atomic_test was compiled and successfully tested on i686 and armv7l platforms. The rest of compilation process of Blender will be very tedious, so that was not done. This change is essential, but not necessarily enough to make Blender compilable on i686 (ability to compile Blender on 32bit platforms was lost during the 2.91 development). This is a functional part of original fix done by Brecht in D9577.
2020-11-25Atomics: Cleanup, move defines closer to usageSergey Sharybin
There is a special defines block needed for ARM on Linux. Move it from public header to an implementation file. No functional changes. This is a non-functional part of original fix done by Brecht in D9577.
2020-11-23Fix T82884: Cycles Compilation Error OpenCL/NanoVDBJeroen Bakker
Recent changes introduced `acc` parameter into the texture read functions. When nanovdb isn't enabled this leads to compilation errors as the `acc` variable wasn't defined. OpenCL only compiles needed features what made it more prominent. Reviewed By: Patrick Mours Differential Revision: https://developer.blender.org/D9629
2020-11-23Cycles: Remove Compilation WarningJeroen Bakker
ROCm 3.9 already defined `NULL`. This patch will first check if it was already defined to remove compilation warnings. NOTE: This doesn't add official support for ROCm as it still fails to render correctly (crashes with default cube). Reviewed By: Brecht van Lommel Differential Revision: https://developer.blender.org/D9610
2020-11-20Cleanup: spellingCampbell Barton
2020-11-20Cycles: Fixed zero sized normals when certain attributes were missing.Stefan Werner
The Normal Map node was falling back to (0, 0, 0) when it was missing the required attributes to calculate a new normal. (0, 0, 0) is not a valid normal and can lead to NaNs when it is normalized later in the shader. Instead, we now return sd->N, the unperturbed surface normal.
2020-11-19Atomic: Cover with unit testsSergey Sharybin
Cover all atomic functions with unit tests. The tests are quite simple, nothing special so far. The goal is to: - Make sure implementation exists. - Implementation behaves the same way on all platforms (We had issue when MSVC and GCC were behaving differently in the past). - Proper bitness is used for implementation and non-fixed-size function implementation. The tests can be extended further to make sure, for example, that CAS operations do not cast arguments to a more narrow type for comparison. Considering it a possible further improvement, as it is better be done being focused on that specific task. There is an annoying ifdef around 64bit implementation, which uses same internal ifdef as the header does. This check is aimed to be removed, so is easier to simply accept such duplication for now. The tests seems somewhat duplicate for signed/unsigned variants and things like this. The reason for that is to keep test code as simple as possible: attempting to do something smart/tricky in the test code often causes the test code to be a subject of being covered with its own unit tests. Differential Revision: https://developer.blender.org/D9590
2020-11-19Guarded allocator: Fix lock-free allocator testsSergey Sharybin
Previously the lock-free tests were actually testing guarded allocator because the main entry point of tests was switching allocator to the guarded one. There seems to be no allocations happening between the initialization sequence and the fixture's SetUp(), so easiest seems to be just to switch to lockfree implementation in the fixture's SetUp(). The test are passing locally, so the "should work" has high chance of actually being truth :) Differential Revision: https://developer.blender.org/D9584
2020-11-19Guarded allocator: Add safety around type changeSergey Sharybin
While it might not cover all possible abuse of API, it does provide basic checks against most obvious usage mistakes.
2020-11-19Guarded allocator: Add explicit switch to the lockfree implementationSergey Sharybin
Previously the only way to use lockfree implementation was to start executable and never switch to guarded allocator. Surely, it is not possible to switch implementation once any allocation did happen, but some tests are desired to test lock-free implementation of the allocator. Those tests did not operate properly because the main entry point of tests are forcing guarded allocator to help catching bugs. This change makes it possible for those tests to ensure they do operate on lock-free implementation. There is no functional changes here, preparing boilerplate for an upcoming work on the allocator tests themselves.
2020-11-19Fix T82445: Wintab packets being discarded.Nicholas Rishel
Switched timer to use GetTickCount instead of QueryPerformanceCounter as Wintab's pkTime seems to (but is not guaranteed to) use the former.
2020-11-18Merge branch 'blender-v2.91-release'Sebastián Barschkis
2020-11-18Fluid: Revert changes from T82488Sebastián Barschkis
Scaling of forces needs more work. Before making changes to them it would be nice to have a setup, that works physically correct across multiple modifiers (cloth, rigid bodies, fluid). This will be a to do for 2.92.
2020-11-17Merge branch 'blender-v2.91-release'Richard Antalik
Conflicts: source/blender/editors/render/render_opengl.c source/blender/sequencer/intern/effects.c
2020-11-17Cycles: Fix compilation error and warning without OPENVDBClément Foucault