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-02-18Merge branch 'blender-v3.1-release'Sergey Sharybin
2022-02-18Fix graphics interop resources leak in CyclesSergey Sharybin
When new display driver is given to the PathTrace ensure that there are no GPU resources used from it by the work. This solves graphics interop descriptors leak. This aqlso fixes Invalid graphics context in cuGraphicsUnregisterResource error when doing final render on the display GPU. Fixes T95837: Regression: GPU memory accumulation in Cycles render Fixes T95733: Cycles Cuda/Optix error message with multi GPU devices. (Invalid graphics context in cuGraphicsUnregisterResource) Fixes T95651: GPU error (Invalid graphics context in cuGraphicsUnregisterResource) Fixes T95631: VRAM is not being freed when rendering (Invalid graphics context in cuGraphicsUnregisterResource) Fixes T89747: Cycles Render - Textures Disappear then Crashes the Render Maniphest Tasks: T95837, T95733, T95651, T95631, T89747 Differential Revision: https://developer.blender.org/D14146
2022-02-18Merge branch 'blender-v3.1-release'Bastien Montagne
2022-02-18Fix strict compilation warningsSergey Sharybin
2022-02-18XR: Enable Vive Focus 3 controller extensionPeter Kim
Allows controller-specific action bindings for the HTC Vive Focus 3 controller. Currently not supported by any OpenXR runtimes (save for the dedicated Focus 3 runtime in developer early-access: https://forum.vive.com/topic/11354-openxr-support-for-focus-3-early-access-application-form), but useful to have for the future.
2022-02-17Merge branch 'blender-v3.1-release'Brecht Van Lommel
2022-02-17Fix build error on some compilers after recent bugfixBrecht Van Lommel
2022-02-17Merge branch 'blender-v3.1-release'Brecht Van Lommel
2022-02-17Fix T95368: wrong white point adaptation for Linear ACES color spaceBrecht Van Lommel
This affected loading of EXR files with set to Linear ACES colorspace, as well as the sky texture for in some custom OpenColorIO configurations. Use the builtin OpenColorIO transform from ACES AP0 to XYZ D65 to fix this.
2022-02-17Merge branch 'blender-v3.1-release'Sebastian Parborg
2022-02-17OCIO: Port shader creation logic to use GPUShaderCreateInfoClément Foucault
This commit should suffice to make the shader API agnostic now (given that all users of it use the GPU API). This makes the shaders not trigger a false positive error anymore since the binding slots are now garanteed by the backend and not changed at after compilation. This also bundles all uniforms into UBOs. Making them extendable without limitations of push constants. The generated uniforms from OCIO are not densely packed in the UBO to avoid complexity. Another approach would be to use GPU_uniformbuf_create_from_list but this requires converting uniforms to GPUInputs which is too complex for what it is. Reviewed by: brecht, jbakker Differential Revision: https://developer.blender.org/D14123
2022-02-17Fix part of T95654: Cycles crash with text objects in excluded view layersBrecht Van Lommel
This is a bug on the Blender side, where the depsgraph does not have proper relations for text object duplis and fails to include the required materials in the dependency graph. But at least Cycles should not crash.
2022-02-17Merge remote-tracking branch 'origin/blender-v3.1-release'Kévin Dietrich
2022-02-17Fix compile error on MSVCKévin Dietrich
`uint` is POSIX type, use `GLuint` like for the rest of the code.
2022-02-17Merge remote-tracking branch 'origin/blender-v3.1-release'Kévin Dietrich
2022-02-17Fix T94881: GPU subdivision fails with high polycount coarse meshesKévin Dietrich
Coarse meshes with high polycount would show as corrupted when GPU subdivision is used with AMD cards This was caused by the OpenSubdiv library not taking `GL_MAX_COMPUTE_WORK_GROUP_COUNT` into account when dispatching computes. AMD drivers tend to set the limit lower than NVidia ones (2^16 for the former, and 2^32 for the latter, at least on my machine). This moves the `GLComputeEvaluator` from the OpenSubdiv library into `intern/opensubdiv` and modifies it to compute a dispatch size in a similar way as for the draw code: we split the dispatch size into a 2 dimensional value based on `GL_MAX_COMPUTE_WORK_GROUP_COUNT` and manually compute an index in the shader. We could have patched the OpenSubdiv library and sent the fix upstream (which can still be done), however, moving it to our side allows us to better control the `GLComputeEvaluator` and in the future remove some redundant work that it does compared to Blender (see T94644) and probably prepare the ground for Vulkan support. As a matter of fact, this patch also removes the OpenGL initialization that OpenSubdiv would do here. This removal is not related to the bug fix, but necessary to not have to copy more files/code over. Differential Revision: https://developer.blender.org/D14131
2022-02-17Merge branch 'blender-v3.1-release'Peter Kim
2022-02-17Fix T76082: VR Scene Inspection: It shows me only a pink screenPeter Kim
This fixes VR pink screen issues when using the DirectX backend, caused by `wglDXRegisterObjectNV()` failing to register the shared OpenGL-DirectX render buffer. The issue is mainly present on AMD graphics, however, there have been reports on NVIDIA as well. A limited workaround for the SteamVR runtime (AMD only) was provided in rB82ab2c167844, however this patch provides a more complete solution that should apply to all OpenXR runtimes. For example, with this patch, the Windows Mixed Reality runtime that exclusively uses DirectX can now be used with AMD graphics cards. Implementation-wise, a `GL_TEXTURE_2D` render target is used as a fallback for the shared OpenGL-DirectX resource in the case that registering a render buffer (`GL_RENDERBUFFER`) fails. While using a texture render target may be less optimal than a render buffer, it enables proper display in VR using the OpenGL/DirectX interop (tested on AMD Vega 64). Reviewed By: Severin Differential Revision: https://developer.blender.org/D14100
2022-02-16Merge branch 'blender-v3.1-release'Brecht Van Lommel
2022-02-16Cycles: restore basic standalone GUI, now using SDLBrecht Van Lommel
GLUT does not support offscreen contexts, which is required for the new display driver. So we use SDL instead. Note that this requires using a system SDL package, the Blender precompiled SDL does not include the video subsystem. There is currently no text display support, instead info is printed to the terminal. This would require adding an embedded font and GLSL shaders, or using GUI library. Another improvement to be made is supporting OpenColorIO display transforms, right now we assume Rec.709 scene linear and display. All OpenGL, GLEW and SDL code was move out of core cycles and into app/opengl. This serves as a template for apps that want to integrate Cycles interactive rendering, with a simple OpenGLDisplayDriver example. In general this would be adapted to the graphics API and color management used by the app. Ref T91846
2022-02-15License headers: use SPDX for remaining files in CyclesCampbell Barton
2022-02-15Merge branch 'blender-v3.1-release'Brecht Van Lommel
2022-02-15Cleanup: clang-formatBrecht Van Lommel
2022-02-14Merge branch 'blender-v3.1-release'Thomas Dinges
2022-02-14Fix T95778, the macOS minimum versions have been increased for Metal.Thomas Dinges
2022-02-14Fix Cycles assert in debug mode after recent changesBrecht Van Lommel
We sometimes call start() on already started renders, just do nothing then. Ref D14086
2022-02-12Merge branch 'blender-v3.1-release'Brecht Van Lommel
2022-02-12Cycles: Fix Metal kernel compilation for AMD GPUsMichael Jones
Workaround for a compilation issue preventing kernels compiling for AMD GPUs: Avoid problematic use of templates on Metal by making `gpu_parallel_active_index_array` a wrapper macro, and moving `blocksize` to be a macro parameter. Reviewed By: brecht Differential Revision: https://developer.blender.org/D14081
2022-02-12Cycles: Removed redundant/buggy code in multiscatter BSDFStefan Werner
A zero length vector was normalized and the resulting NaN used in further calculations. This caused trouble on some compilers when using fast math. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D14058
2022-02-11Merge branch 'blender-v3.1-release'Brecht Van Lommel
2022-02-11Cycles: enable Metal on AMD GPUs, set macOS minimum versionsMichael Jones
* Apple Silicon support enabled on macOS 12.2+ * AMD support enabled on macOS 12.3+ This patch also fixes a device enumeration crash on certain AMD configs which was caused by over-release of MTLDevice objects. Differential Revision: https://developer.blender.org/D14090
2022-02-11Fix missing license file from last commitBrecht Van Lommel
2022-02-11Cycles: use SPDX license headersBrecht Van Lommel
* Replace license text in headers with SPDX identifiers. * Remove specific license info from outdated readme.txt, instead leave details to the source files. * Add list of SPDX license identifiers used, and corresponding license texts. * Update copyright dates while we're at it. Ref D14069, T95597
2022-02-11Merge branch 'blender-v3.1-release'Sergey Sharybin
2022-02-11Fix Cycles compilation on 32bit ARM platformSergey Sharybin
The rbit instruction is only available starting with ARMv6T2 and the register prefix is different from what AARCH64 uses. Separate the 32 and 64 bit ARM branches, add missing ISA checks. Made sure the code works as intended on macMini with Apple silicon, and on Raspberry Pi 4 B running 32bit Raspbian OS. Differential Revision: https://developer.blender.org/D14056
2022-02-11Merge branch 'blender-v3.1-release'Brecht Van Lommel
2022-02-11Cycles: refactor to keep session thread alive for duration of sessionBrecht Van Lommel
Instead of creating and destroying threads when starting and stopping renders, keep a single thread alive for the duration of the session. This makes it so all display driver OpenGL resource allocation and destruction can happen in the same thread. This was implemented as part of trying to solve another bug, but it did not help. Still I prefer this behavior, to eliminate potential future issues wit graphics drivers or with future Cycles display driver implementations. Differential Revision: https://developer.blender.org/D14086
2022-02-11Fix T95420: Cycles crash with stereo render and tilesBrecht Van Lommel
For reasons unclear, destroying and then recreating a vertex buffer in the render OpenGL context is affecting the immediate mode vertex buffer in the draw manager OpenGL context. Instead just create a single vertex buffer and use it for the lifetime of the render OpenGL context. There's not really any need to have a separate one per tile as far as I can tell. Differential Revision: https://developer.blender.org/D14084
2022-02-11Cycles: support rendering attributes for Curves objectsKévin Dietrich
This adds support for exporting attributes from a Blender Curves object to Cycles. The implementation follows that of the Mesh object. This also creates motion blur data if the "velocity" attribute is present on the Curves. Ref T94193 Reviewed By: brecht Maniphest Tasks: T94193 Differential Revision: https://developer.blender.org/D14088
2022-02-11Merge branch 'blender-v3.1-release'Peter Kim
2022-02-11Fix incompatible swapchain format for Quest 2Peter Kim
When using a RGBA16 (`GL_RGBA16`, `DXGI_FORMAT_R16G16B16A16_UNORM`) swapchain format with Quest 2, no image is presented to the headset. This can occur when using the SteamVR runtime with an AMD graphics card (ex. T95374). Workaround is to move this format after the Quest 2-compatible RGBA16F formats in the candidates list so that the RGBA16F formats are chosen instead. Reviewed By: Severin Differential Revision: https://developer.blender.org/D14024
2022-02-11Fix T94268: Closing SteamVR and restarting VR Session crashes BlenderPeter Kim
Crash was caused since the function pointers `s_xrGetOpenGLGraphicsRequirementsKHR_fn`/ `s_xrGetD3D11GraphicsRequirementsKHR_fn` were static and were not updated with the correct proc address after being set the first time. As stated in the OpenXR spec: "function pointers returned by xrGetInstanceProcAddr using one XrInstance may not be valid when used with objects related to a different XrInstance". Although it would seem reasonable that the proc address would not change if the instance was the same (hence the `static XrInstance s_instance;`), in testing, repeated calls to `xrGetInstanceProcAddress()` with the same instance still can result in changes (at least for the SteamVR runtime) so the workaround is to simply set the function pointers every time, essentially trivializing their `static` designations. Reviewed By: Severin Maniphest Tasks: T94268 Differential Revision: https://developer.blender.org/D14023
2022-02-11File headers: manually convert files to use SPDX headersCampbell Barton
Also add BSD-2-Clause to SPDX license list.
2022-02-11File headers: add missing copyright, add MIT to SPDX licensesCampbell Barton
2022-02-11File headers: use SPDX license for CMake filesCampbell Barton
2022-02-11File headers: use SPDX for Zlib licenseCampbell Barton
2022-02-11Cleanup: remove white-space before headersCampbell Barton
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-02-11Cleanup: clang-formatCampbell Barton
2022-02-10Merge branch 'blender-v3.1-release'Hans Goudey