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-07-25Cycles: more closely match some math and intersection operations in EmbreeBrecht Van Lommel
This helps with debugging, and gives a slightly closer match between CPU and CUDA/HIP/Metal renders when it comes to ray tracing precision.
2022-07-25Fix build error with WITH_CYCLES_KERNEL_NATIVE_ONLY on macOS ArmBrecht Van Lommel
-march=native is not supported for all architectures.
2022-07-24Fix T98367: Light group passes do not work when shadow catcher is usedLukas Stockner
2022-07-22GHOST/Wayland: Fix mouse wheel events for Sway Compositor (use seat v5)Campbell Barton
Bump the requested seat version to v5, use discreet scroll callback. Tested with gnome, river & sway.
2022-07-21Fix T91932: number sliders wrap around when dragged for long distance on X11Sebastiano Barrera
The value of number sliders (e.g. the "end frame" button) wrap around to their pre-click value when dragging them for a very long distance (e.g. by lifting the mouse off the desk and placing it back on to keep dragging in the same direction). The problem is X11-specific, and due to XTranslateCoordinates using a signed int16 behind the curtains, while its signature and the rest of Blender uses int32. The solution is to only use XTranslateCoordinates on (0, 0) to get the delta between the screen and client reference systems, and applying the delta in a second step. Differential Revision: https://developer.blender.org/D15507
2022-07-21GHOST/Wayland: fix cursor glitch after grabbing while hiddenCampbell Barton
When the cursor grabbing was disabled, Blender's internal location (wmWindow.eventstate) kept the location before un-hiding. This caused the paint cursor to show in the wrong location after adjusting the color wheel for e.g.
2022-07-21Cleanup: spelling in comments, typos in tool-tipsCampbell Barton
2022-07-20Point Cloud: Remove redundant custom data pointersHans Goudey
Similar to e9f82d3dc7eebadcc52, but for point clouds instead. Differential Revision: https://developer.blender.org/D15487
2022-07-20Curves: Remove redundant custom data pointersHans Goudey
These mutable pointers present problems with ownership in relation to proper copy-on-write for attributes. The simplest solution is to just remove them and retrieve the layers from `CustomData` when they are needed. This also removes the complexity and redundancy of having to update the pointers as the curves change. A similar change will apply to meshes and point clouds. One downside of this change is that it makes random access with RNA slower. However, it's simple to just use the RNA attribute API instead, which is unaffected. In this patch I updated Cycles to do that. With the future attribute CoW changes, this generic approach makes sense because Cycles can just request ownership of the existing arrays. Differential Revision: https://developer.blender.org/D15486
2022-07-19Cleanup: Remove compile option for curves objectHans Goudey
After becb1530b1c81a408e20 the new curves object type isn't hidden behind an experimental flag anymore, and other areas depend on this, so disabling curves at compile time doesn't make sense anymore.
2022-07-19Cleanup: quiet compiler warningsCampbell Barton
2022-07-18Cleanup: change internal Cycles compact BVH default to match UIBrecht Van Lommel
2022-07-18Subdiv: remove unused GPU device choice, fix crash with libepoxy on initBrecht Van Lommel
openSubdiv_init() would detect available evaluators before any OpenGL context exists, causing a crash with libepoxy. This test however is redundant as we already check the requirements on the Blender side through the GPU API. To simplify things, completely remove the device detection in the opensubdiv module and reduce the evaluators to just CPU and GPU. The plan here is to move to the GPU module abstraction over OpenGL/Metal/Vulkan and so all these different backends no longer make sense. This also removes the user preference for OpenSubdiv compute device, which was not used for the new GPU subdivision implementation. Ref D15291 Differential Revision: https://developer.blender.org/D15470
2022-07-16Cleanup: early exit MEM_lockfree_freeN when called with NULL pointerCampbell Barton
Simplify logic for freeing a NULL pointer. While no null-pointer de-reference was performed, this wasn't as so obvious as the pointer was passed to MEM_lockfree_allocN_len before checking for NULL. NOTE: T99744 claimed the a NULL pointer free was a vulnerability, while I can't see evidence for this - exiting early makes it clearer the memory isn't accessed. *Details* - Add MEMHEAD_LEN macro, avoids redundant NULL check. - Use "UNLIKELY(..)" hint's for error cases (freeing NULL pointer and checking if `leak_detector_has_run`).
2022-07-15Cycles: refactor rays to have start and end distance, fix precision issuesBrecht Van Lommel
For transparency, volume and light intersection rays, adjust these distances rather than the ray start position. This way we increment the start distance by the smallest possible float increment to avoid self intersections, and be sure it works as the distance compared to be will be exactly the same as before, due to the ray start position and direction remaining the same. Fix T98764, T96537, hair ray tracing precision issues. Differential Revision: https://developer.blender.org/D15455
2022-07-15Fix Cycles MetalRT error after recent specialization changesBrecht Van Lommel
2022-07-15Cleanup: compiler warningBrecht Van Lommel
2022-07-15Cycles: generalize shader sorting / locality heuristic to all GPU devicesBrecht Van Lommel
This was added for Metal, but also gives good results with CUDA and OptiX. Also enable it for future Apple GPUs instead of only M1 and M2, since this has been shown to help across multiple GPUs so the better bet seems to enable rather than disable it. Also moves some of the logic outside of the Metal device code, and always enables the code in the kernel since other devices don't do dynamic compile. Time per sample with OptiX + RTX A6000: new old barbershop_interior 0.0730s 0.0727s bmw27 0.0047s 0.0053s classroom 0.0428s 0.0464s fishy_cat 0.0102s 0.0108s junkshop 0.0366s 0.0395s koro 0.0567s 0.0578s monster 0.0206s 0.0223s pabellon 0.0158s 0.0174s sponza 0.0088s 0.0100s spring 0.1267s 0.1280s victor 0.0524s 0.0531s wdas_cloud 0.0817s 0.0816s Ref D15331, T87836
2022-07-15Cycles: Apple Silicon optimization to specialize intersection kernelsMichael Jones
The Metal backend now compiles and caches a second set of kernels which are optimized for scene contents, enabled for Apple Silicon. The implementation supports doing this both for intersection and shading kernels. However this is currently only enabled for intersection kernels that are quick to compile, and already give a good speedup. Enabling this for shading kernels would be faster still, however this also causes a long wait times and would need a good user interface to control this. M1 Max samples per minute (macOS 13.0): PSO_GENERIC PSO_SPECIALIZED_INTERSECT PSO_SPECIALIZED_SHADE barbershop_interior 83.4 89.5 93.7 bmw27 1486.1 1671.0 1825.8 classroom 175.2 196.8 206.3 fishy_cat 674.2 704.3 719.3 junkshop 205.4 212.0 257.7 koro 310.1 336.1 342.8 monster 376.7 418.6 424.1 pabellon 273.5 325.4 339.8 sponza 830.6 929.6 1142.4 victor 86.7 96.4 96.3 wdas_cloud 111.8 112.7 183.1 Code contributed by Jason Fielder, Morteza Mostajabodaveh and Michael Jones Differential Revision: https://developer.blender.org/D14645
2022-07-15Cycles: keep track of SVM nodes used in kernelsMichael Jones
To be used for specialization in Metal, to automatically leave out unused nodes from the kernel. Ref D14645
2022-07-15Cycles: refactor to move part of KernelData definition to template headerBrecht Van Lommel
To be used for specialization on Metal in a following commit, turning these members into compile time constants. Ref D14645
2022-07-15Render: camera depth of field support for armature bone targetsDamien Picard
This is useful when using an armature as a camera rig, to avoid creating and targetting an empty object. Differential Revision: https://developer.blender.org/D7012
2022-07-15Cleanup: make formatBrecht Van Lommel
2022-07-15GHOST/Wayland: partial support for updating the UI scaleCampbell Barton
Partial support for changing the UI scale while Blender is open. The scale is set but issues with the window size not updating remain.
2022-07-15GHOST/Wayland: fix error setting the cursor scaleCampbell Barton
Calculate a scale that's compatible with the cursor size. Needed so the cursor is always a multiple of scale.
2022-07-14Fix Cycles MNEE wrong results with area light spreadOlivier Maury
When the solve is successful, the light sample needs to be updated since the effective shading point is now on the last refractive interface. Spread was not taken into account, creating false caustics. Differential Revision: https://developer.blender.org/D15449
2022-07-14Cleanup: replace state flow macros in the kernel with functionsBrecht Van Lommel
2022-07-14Cycles: add presets to the Performance panelBrecht Van Lommel
With choices Default, Lower Memory and Faster Render. For convenience, and to help communicate what the various settings do. Differential Revision: https://developer.blender.org/D15446
2022-07-14Cycles: Improve cache usage on Apple GPUs by chunking active indicesMichael Jones
This patch partitions the active indices into chunks prior to sorting by material in order to tradeoff some material coherence for better locality. On Apple Silicon GPUs (particularly higher end M1-family GPUs), we observe overall render time speedups of up to 15%. The partitioning is implemented by repeating the range of `shader_sort_key` for each partition, and encoding a "locator" key which distributes the indices into sorted chunks. Reviewed By: brecht Differential Revision: https://developer.blender.org/D15331
2022-07-14Cleanup: spelling in commentsCampbell Barton
Also remove duplicate comments in bmesh_log.h, caused by automated comment relocation in [0]. [0]: c4e041da23b9c45273fcd4874308c536b6a315d1
2022-07-14Cleanup: clang-tidy changes to GHOST_SystemX11Campbell Barton
Also remove redundant check.
2022-07-14GHOST: remove redundant ascii argument to GHOST_EventKeyCampbell Barton
Now only the utf8 buffer is used there is no reason to pass both.
2022-07-14GHOST/X11: avoid redundant utf8 text lookups for release eventsCampbell Barton
The text representation of release events is never used, so only calculate this for press events.
2022-07-14GHOST/X11: Quiet warning about key-release events having their utf8 setCampbell Barton
Quiet warning from [0], no functional change as the this information was always ignored. Key release events shouldn't have associated text, this was cleared for wmEvent's, so there is no reason to pass it from GHOST. [0]: d6fef73ef110eb43756b7b87c2cba80abae3b39f
2022-07-14Cleanup: update & correct comments for event handlingCampbell Barton
- Remove references to `ISTEXTINPUT` as any keyboard event with it's utf8_buf set can be handled as text input. - Update references to the key repeat flag.
2022-07-14WM: Remove ASCII members from wmEvent & GHOST_TEventKeyDataCampbell Barton
The `ascii` member was only kept for historic reason as some platforms didn't support utf8 when it was first introduced. Remove the `ascii` struct members since many checks used this as a fall-back for utf8_buf not being set which isn't needed. There are a few cases where it's convenient to access the ASCII value of an event (or nil) so a function has been added to do that. *Details* - WM_event_utf8_to_ascii() has been added for the few cases an events ASCII value needs to be accessed, this just avoids having to do multi-byte character checks in-line. - RNA Event.ascii remains, using utf8_buf[0] for single byte characters. - GHOST_TEventKeyData.ascii has been removed. - To avoid regressions non-ASCII Latin1 characters from GHOST are converted into multi-byte UTF8, when building X11 without XInput & X_HAVE_UTF8_STRING it seems like could still occur.
2022-07-14GHOST/SDL: pass in utf8 buffer for keyboard eventsCampbell Barton
While GHOST/SDL doesn't support non-ASCII text input, use the UTF8 buffer to be consistent with all other back-ends. Move the conversion from SDL_KeyboardEvent to ASCII into a function. Also only lookup this value on key press (not release).
2022-07-14GHOST/SDL: add support for the key repeat flagCampbell Barton
Now all ghost back-ends support the key repeat flag (accessed as WM_EVENT_IS_REPEAT from wmEvent.flag).
2022-07-12Cycles: Make not-compact BVH the default for embreeXavier Hallade
Measurements shown on average a 1.08x speedup for a 1.04x increase in memory usage which is an acceptable trade off for a default setting, although discoverability of such settings influencing memory usage could be improved. Reviewed By: brecht Differential Revision: https://developer.blender.org/D15429
2022-07-12Cycles: fix and enable JIT oneAPI CentOS7 builds for drivers 23570+Xavier Hallade
The current specific CentOS7 workaround we have for AoT, which is to disable __FAST_MATH__ by using -fhonor-nans, now also fixes the compilation issue for JIT as well since at least driver 23570.
2022-07-11Fix T99218: light group add button should be disabled when name is emptyBrecht Van Lommel
Previously it was inactive but still clickable. Ref D15316
2022-07-11Cleanup: remove unused GHOST function getAnyModifiedState.Campbell Barton
Remove unused GHOST_WindowManager::getAnyModifiedState()
2022-07-09Fix cursor display size with tablet input in GHOST/WaylandCampbell Barton
The scale for tablet cursor surfaces was never set, making them display larger. Now the outputs scale is set for mouse & tablet cursors.
2022-07-09Cleanup: split out wl_buffer creation into a utility functionCampbell Barton
Simplify logic for initializing the wl_buffer, ensure the cursors custom data is never heft in a half initialized state. Also remove the need for multiple calls to close when handling errors.
2022-07-09Cleanup: remove buffer_t in GHOST/WaylandCampbell Barton
This was allocated and only used to store the custom cursor data. Use a pointer & size member instead for simplicity.
2022-07-09Cleanup: split memfd_create into it's own function for WaylandCampbell Barton
Avoid ifdef's in cursor loading by creating a memfd_create_sealed utility function that works irrespective of memfd_create availability.
2022-07-09Fix resource leaks setting custom cursors in WaylandCampbell Barton
- Memory from the prior cursor was never un-mapped. - posix_fallocate failure left a file handle open..
2022-07-08Curves: use consistent default radius for Cycles, Eevee, Set Curve Radius nodeBrecht Van Lommel
To avoid Cycles not showing any hair by default, and to avoid very slow render due to many overlaps with the previous 1 meter default in the node. Fixes T97584, T99319 Differential Revision: https://developer.blender.org/D15405
2022-07-08Cycles: enable oneAPI in Linux release buildsXavier Hallade
with a very high min-driver version requirement, placeholder until JIT CentOS runtime compilation issue gets fixed in a defined version. min-driver version check can be worked around by setting CYCLES_ONEAPI_ALL_DEVICES environment variable.
2022-07-08GHOST/Wayland: add logging for listener handlersCampbell Barton
Add logging to all Wayland listener callbacks as it can be difficult to detect the cause of problems. Using break-points often isn't practical for debugging interactive windowing / compositor issues Logging needs to be enabled on the command line, e.g: blender --log "ghost.wl.*" --log-level 2 --log-show-basename