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
AgeCommit message (Collapse)Author
2022-07-15Fix T99706: Crash rendering with headless buildsCampbell Barton
When rendering with headless builds, show an error instead of crashing. Previously GPU_backend_init was called indirectly from DRW_opengl_context_create, a new function is now called from the window manager (GPU_backend_init_once), so it's possible to check if the GPU has a back-end. This also disables the `bgl` Python module when building WITH_HEADLESS. Reviewed By: fclem Ref D15463
2022-07-15GPU: Remove USD dependency from shader_builder.Ray Molenkamp
Dependency was added as shader builder depended to blenkernel as an umbrella, in stead of adding the actual dependencies it required.
2022-07-11GPU: add BUIDTIME to WITH_GPU_SHADER_BUILDERJeroen Bakker
Adds a better name that describes when it is used. The GPU_SHADER_BUILDER is a buildtime tool for developers to pre-validate GLSL (and in the overseen future pre-compile to SpirV). We don't see that this needs to become a required step in the future so WITH_GPU_BUILDTIME_SHADER_BUILDER is more descriptive name.
2022-07-11GPU: Do not allow GPU Shader builder when USD is enabled.Jeroen Bakker
Linking GPU shader builder requires stubs for many functions of the USD library. We don't want to rely on other modules to update the stubs for a tool that is only used by GPU developers. This patch raises an error when both WITH_GPU_SHADER_BUILDER and WITH_USD are enabled. This reduces the maintenance of updating the stubs when USD API changes. Reviewed By: LazyDodo Differential Revision: https://developer.blender.org/D15422
2022-07-06GHOST/Wayland: support dynamic loading libraries for WaylandCampbell Barton
Add intern/wayland_dynload which is used when WITH_GHOST_WAYLAND_DYNLOAD is enabled (off by default). When enabled, systems without Wayland installed will fall back to X11. This allows Blender to dynamically load: - libwayland-client - libwayland-cursor - libwayland-egl - libdecor-0 (when WITH_GHOST_WAYLAND_LIBDECOR is enabled).
2022-06-29Cycles: Add support for rendering on Intel GPUs using oneAPIXavier Hallade
This patch adds a new Cycles device with similar functionality to the existing GPU devices. Kernel compilation and runtime interaction happen via oneAPI DPC++ compiler and SYCL API. This implementation is primarly focusing on Intel® Arc™ GPUs and other future Intel GPUs. The first supported drivers are 101.1660 on Windows and 22.10.22597 on Linux. The necessary tools for compilation are: - A SYCL compiler such as oneAPI DPC++ compiler or https://github.com/intel/llvm - Intel® oneAPI Level Zero which is used for low level device queries: https://github.com/oneapi-src/level-zero - To optionally generate prebuilt graphics binaries: Intel® Graphics Compiler All are included in Linux precompiled libraries on svn: https://svn.blender.org/svnroot/bf-blender/trunk/lib The same goes for Windows precompiled binaries but for the graphics compiler, available as "Intel® Graphics Offline Compiler for OpenCL™ Code" from https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html, for which path can be set as OCLOC_INSTALL_DIR. Being based on the open SYCL standard, this implementation could also be extended to run on other compatible non-Intel hardware in the future. Reviewed By: sergey, brecht Differential Revision: https://developer.blender.org/D15254 Co-authored-by: Nikita Sirgienko <nikita.sirgienko@intel.com> Co-authored-by: Stefan Werner <stefan.werner@intel.com>
2022-06-28Cycles: enable Vega GPU/APU supportSayak Biswas
Enables Vega and Vega II GPUs as well as Vega APU, using changes in HIP code to support 64-bit waves and a new HIP SDK version. Tested with Radeon WX9100, Radeon VII GPUs and Ryzen 7 PRO 5850U with Radeon Graphics APU. Ref T96740, T91571 Differential Revision: https://developer.blender.org/D15242
2022-06-28Build: when using Wayland, always enable EGL and disable system GLEWChristian Rauch
GLEW does not support GLX and EGL at the same time, and the distribution version is likely to have GLX. This also refactors the code so all OpenGL related CMake options are together. Differential Revision: https://developer.blender.org/D12034
2022-06-27GHOST/Wayland: Add a build time option for DBUS, disable by defaultCampbell Barton
Add WITH_GHOST_WAYLAND_DBUS option, so Blender can be built without DBUS support. Currently it's only used to access the cursor theme. Without this the "default" cursors are used instead. Disabling this since it adds an additional dependency for a minor gain in functionality, with the benefit of removing a library requirement. There is also a problem where Blender hangs on startup for ~5 seconds when DBUS isn't running. Eventually it would be good to be able to avoid this problem without a build option.
2022-06-24GHOST/Wayland: support client-side window decorationsChristian Rauch
This implements client-side window decorations for moving and resizing windows and HiDPI support. This functionality depends on the external project 'libdecor' that is currently a build option: WITH_GHOST_WAYLAND_LIBDECOR. Reviewed by: brecht, campbellbarton Ref D7989
2022-06-08CMake: optionally disable OBJ, STL & GPencil SVG supportCampbell Barton
The following CMake options have been added (enabled by default), except for the lite build configuration. - WITH_IO_STL - WITH_IO_WAVEFRONT_OBJ - WITH_IO_GPENCIL (for grease pencil SVG importing). Note that it was already possible to disable grease pencil export by disabling WITH_PUGIXML & WITH_HARU. This is intended to keep the lite builds fast and small for building, linking & execution. Reviewed By: iyadahmed2001, aras_p, antoniov, mont29 Ref D15141
2022-05-27Merge branch 'blender-v3.2-release'Brecht Van Lommel
2022-05-27Fix T96397: Cycles missing HIP support for gfx1035 devicesJagannadhan Ravi
Such as AMD Radeon RX 6700S. Differential Revision: https://developer.blender.org/D13495
2022-05-25BLI: use no_unique_address attributeJacques Lucke
Even though the `no_unique_address` attribute has only been standardized in C++20, compilers seem to support it with C++17 already. This attribute allows reducing the memory footprint of structs which have empty types as data members (usually that is an allocator or inline buffer in Blender). Previously, one had to use the empty base optimization to achieve the same effect, which requires a lot of boilerplate code. The types that benefit from this the most are `Vector` and `Array`, which usually become 8 bytes smaller. All types which use these core data structures get smaller as well of course. Differential Revision: https://developer.blender.org/D14993
2022-05-20CMake: disable WITH_MOD_FLUID when WITH_PYTHON=OFFCampbell Barton
2022-05-19Cleanup: suppress 'address' warnings for ./extern/glewCampbell Barton
Also add comments noting why some warnings shouldn't be added to strict-flags.
2022-05-11Update Ceres to latest upstream version 2.1.0Sergey Sharybin
This release deprecated the Parameterization API and the new Manifolds API is to be used instead. This is what was done in the Libmv as part of this change. Additionally, remove the bundling scripts. Nowadays those are only leading to a duplicated work to maintain. No measurable changes on user side is expected.
2022-05-11CMake: Fix noisy PUGIXML warning.Ray Molenkamp
When doing a lite build, a warning is displayed that due to PUGIXML being off WITH_CYCLES_OSL is being disabled as well. If WITH_CYCLES is off this is just useless noise. this diff changes the warning to only emit when WITH_CYCLES is on.
2022-05-09Remove unused compile flag on linux x86 GCC platformsSebastian Parborg
The "cast-align" warning is only triggered on Arm CPUs when using GCC. Currently the only officialy supported ARM platform is the Mac platform where we use Clang. So this warning never triggers.
2022-05-04Build: update outdated description of WITH_TBB optionBrecht Van Lommel
2022-04-28CMake: Reduce dependencies of USDSybren A. Stüvel
`PXR_ENABLE_OSL_SUPPORT=OFF`: OpenShadingLanguage is an optional dependency of the Imaging module. However, since that module was included for its support for converting primitive shapes (sphere, cube, etc.) to geometry, OSL is not necessary. Disabling it will make it simpler to build Blender; currently only Cycles uses OSL. `PXR_ENABLE_GL_SUPPORT=OFF`: GL support on Linux also links to X11 libraries. Enabling it would break headless or Wayland-only builds. OpenGL support would be useful if someone wants to work on a Hydra viewport in Blender; when that's actually being worked on, we could patch in a new PXR_ENABLE_X11_SUPPORT option (to separate OpenGL from X11) and contribute it upstream. `PXR_BUILD_OPENIMAGEIO_PLUGIN=OFF`: It's used for loading image textures in Hydra Storm / Embree renderers which we don't use. Reviewed By: LazyDodo, brecht, makowalski Differential Revision: https://developer.blender.org/D14792
2022-04-22Cycles: enable AMD RDNA GPU support on LinuxBrecht Van Lommel
This enables building of HIP binaries for AMD RDNA and RDNA2 GPUs. This requires the 22.10 / ROCm 5.1 driver. Ref T91571 Differential Revision: https://developer.blender.org/D14360
2022-04-20Build: updates for Blender to build against new 3.2 librariesBrecht Van Lommel
Building against the existing 3.1 libraries should continue to work, until the precompiled libraries are committed for all platforms. * Enable WebP by default. * Update Windows for new library file names. * Automatically clear outdated CMake cache variables when upgrading to new libraries. * Fix static library linking order issues on Linux for OpenEXR and OpenVDB. Implemented by Ray Molenkamp, Sybren Stüvel and Brecht Van Lommel. Ref T95206
2022-04-12Revert "Cycles: enable HIP for Vega and Vega II (Radeon 7) GPUs on Windows"Brecht Van Lommel
This is not currently working, reverting until the driver/compiler has a fix. This reverts commit c46e58817cd72d1481967d32e3c6f47f42933d39.
2022-03-25CMake: Give some extra space to info_cfg_optionRay Molenkamp
WITH_PYTHON_INSTALL_ZSTANDARD was too long and didn't align very well compared to the other items in the list.
2022-03-25ImBuf: Add support for WebP image formatAaron Carlisle
Currently only supports single image frames (no animation possible). If quality slider is set to 100 then lossless compression will be used, otherwise lossy compression is used. Gives about 35% reduction of filesize save when re-saving splash screens with lossless compression. Also saves much faster, up to 15x faster than PNG with a better compression ratio as a plus. Note, this is currently left disabled until we have WebP libs (see T95206) For testing precompiled libs can be downloaded from Google: https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html Differential Revision: https://developer.blender.org/D1598
2022-03-24Cycles: enable HIP for Vega and Vega II (Radeon 7) GPUs on WindowsBrian Savery
Basic testing on windows only so far. Will need some testing on Linux as well when the Linux enablement patch is ready. Does not enable Vega APUs yet (which would be gfx902 or gfx90c). Differential Revision: https://developer.blender.org/D14432
2022-03-23Cycles: Add Hydra render delegatePatrick Mours
This patch adds a Hydra render delegate to Cycles, allowing Cycles to be used for rendering in applications that provide a Hydra viewport. The implementation was written from scratch against Cycles X, for integration into the Blender repository to make it possible to continue developing it in step with the rest of Cycles. For this purpose it follows the style of the rest of the Cycles code and can be built with a CMake option (`WITH_CYCLES_HYDRA_RENDER_DELEGATE=1`) similar to the existing standalone version of Cycles. Since Hydra render delegates need to be built against the exact USD version and other dependencies as the target application is using, this is intended to be built separate from Blender (`WITH_BLENDER=0` CMake option) and with support for library versions different from what Blender is using. As such the CMake build scripts for Windows had to be modified slightly, so that the Cycles Hydra render delegate can e.g. be built with MSVC 2017 again even though Blender requires MSVC 2019 now, and it's possible to specify custom paths to the USD SDK etc. The codebase supports building against the latest USD release 22.03 and all the way back to USD 20.08 (with some limitations). Reviewed By: brecht, LazyDodo Differential Revision: https://developer.blender.org/D14398
2022-03-22Metal: Initial Implementation of Metal Backend for GPU Module.Jason Fielder
Adding WITH_METAL option to CMAKE to guard compilation for macOS only. Implemented stub METALBackend to mirror GPUBackend interface and added capabilities initialisation, along with API initialisation paths. Global rendering coordination commands added to backend with GPU_render_begin and GPU_render_end() commands globally wrapping GPU work. This is required for Metal to ensure temporary resources are generated within an NSAutoReleasePool and freed accordingly. Authored by Apple: Michael Parkin-White, Vil Harvey, Marco Giordano, Michael Jones, Morteza Mostajabodaveh, Jason Fielder Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14293
2022-03-16CMake: Extra flags to ignore for strict compilerSergey Sharybin
Solves warnings generated by default build on macOS.
2022-03-14Fix mistake in 4c951bfa829ed123b57c33e7821569f283658fd9Campbell Barton
Removed WITH_SYSTEM_GLEW by mistake, thanks to @The_Orb for spotting.
2022-03-07Cleanup: fix various typosBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D14203
2022-02-23Cleanup: Remove repeated word in commentAlaska
Differential Revision: https://developer.blender.org/D14178
2022-02-22Cycles: Removed numaapi from standaloneStefan Werner
2022-02-22Merge branch 'blender-v3.1-release'Campbell Barton
2022-02-22Python: bump minimum version to 3.10Campbell Barton
Since Python 3.10 is now supported on all platform, bump the minimum version to reduce the number of Python versions that need to be supported simultaneously. Reviewed By: LazyDodo, sybren, mont29, brecht Ref D13943
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-04macOS: support building blender-thumbnailerAnkit Meel
It was missing framework flags added in `setup_platform_linker_flags`. Keep it off until QuickLook Thumbnailing is implemented. Differential Revision: https://developer.blender.org/D13997
2022-01-28Cleanup: indentation for CMake filesCampbell Barton
Also minor white-space & case changes.
2022-01-26CMake: add WITH_SYSTEM_FREETYPE to link against the systems freetypeCampbell Barton
2022-01-19CMake: Support external callback in configurationAnkit Meel
An external CMake script can be used to debug CMake code, modify/read target properties, inter-target dependencies, non-cache variables etc. Reviewed by: LazyDodo, brecht Differential Revision: https://developer.blender.org/D13830
2022-01-19CMake Cleanup: use set for filepath instead of optionAnkit Meel
See https://developer.blender.org/D13830#368219
2022-01-17Revert "Revert "GPUShaderCreateInfo for interface abstraction""Jeroen Bakker
This reverts commit edee5a947b7ea3e1324aa334a22c7c9bbf47f5f7. Fixes compilation error (Missing file BLI_float2.hh)
2022-01-17Revert "GPUShaderCreateInfo for interface abstraction"Jeroen Bakker
This reverts commit 8fb2ff458ba579dba08bfdf57d043ad158b5db07. Missing some files.
2022-01-17GPUShaderCreateInfo for interface abstractionJeroen Bakker
This is a first part of the Shader Create Info system could be. A shader create info provides a way to define shader structure, resources and interfaces. This makes for a quick way to provide backend agnostic binding informations while also making shader variations easy to declare. - Clear source input (only one file). Cleans up the GPU api since we can create a shader from one descriptor - Resources and interfaces are generated by the backend (much simpler than parsing). - Bindings are explicit from position in the array. - GPUShaderInterface becomes a trivial translation of enums and string copy. - No external dependency to third party lib. - Cleaner code, less fragmentation of resources in several libs. - Easy to modify / extend at runtime. - no parser involve, very easy to code. - Does not hold any data, can be static and kept on disc. - Could hold precompiled bytecode for static shaders. This also includes a new global dependency system. GLSL shaders can include other sources by using #pragma BLENDER_REQUIRE(...). This patch already migrated several builtin shaders. Other shaders should be migrated one at a time, and could be done inside master. There is a new compile directive `WITH_GPU_SHADER_BUILDER` this is an optional directive for linting shaders to increase turn around time. What is remaining: - pyGPU API {T94975} - Migration of other shaders. This could be a community effort. Reviewed By: jbakker Maniphest Tasks: T94975 Differential Revision: https://developer.blender.org/D13360
2022-01-14CMake: add WITH_LINKER_MOLD option for GCC/Clang Unix platformsCampbell Barton
Can give considerably faster linking, especially on system with many cores. The mold linker recently reached 1.0, see: https://github.com/rui314/mold The current stable release of GCC can't use this linker via -fuse-ld=mold, so this patch uses the "-B" argument to add a binary directory containing an alternate "ld" command that points to "mold" (which is part of the default mold installation). Some timing tests for linking full builds for AMD TR 3970X: - BFD: 20.78 seconds. - LLD: 12.16 seconds. - GOLD: 7.21 seconds. - MOLD: 2.53 seconds. Ref D13807 Reviewed by: sergey, brecht
2022-01-12Revert "BLI: Refactor vector types & functions to use templates"Clément Foucault
Includes unwanted changes This reverts commit 46e049d0ce2bce2f53ddc41a0dbbea2969d00a5d.
2022-01-12BLI: Refactor vector types & functions to use templatesClment Foucault
This patch implements the vector types (i.e:`float2`) by making heavy usage of templating. All vector functions are now outside of the vector classes (inside the `blender::math` namespace) and are not vector size dependent for the most part. In the ongoing effort to make shaders less GL centric, we are aiming to share more code between GLSL and C++ to avoid code duplication. ####Motivations: - We are aiming to share UBO and SSBO structures between GLSL and C++. This means we will use many of the existing vector types and others we currently don't have (uintX, intX). All these variations were asking for many more code duplication. - Deduplicate existing code which is duplicated for each vector size. - We also want to share small functions. Which means that vector functions should be static and not in the class namespace. - Reduce friction to use these types in new projects due to their incompleteness. - The current state of the `BLI_(float|double|mpq)(2|3|4).hh` is a bit of a let down. Most clases are incomplete, out of sync with each others with different codestyles, and some functions that should be static are not (i.e: `float3::reflect()`). ####Upsides: - Still support `.x, .y, .z, .w` for readability. - Compact, readable and easilly extendable. - All of the vector functions are available for all the vectors types and can be restricted to certain types. Also template specialization let us define exception for special class (like mpq). - With optimization ON, the compiler unroll the loops and performance is the same. ####Downsides: - Might impact debugability. Though I would arge that the bugs are rarelly caused by the vector class itself (since the operations are quite trivial) but by the type conversions. - Might impact compile time. I did not saw a significant impact since the usage is not really widespread. - Functions needs to be rewritten to support arbitrary vector length. For instance, one can't call `len_squared_v3v3` in `math::length_squared()` and call it a day. - Type cast does not work with the template version of the `math::` vector functions. Meaning you need to manually cast `float *` and `(float *)[3]` to `float3` for the function calls. i.e: `math::distance_squared(float3(nearest.co), positions[i]);` - Some parts might loose in readability: `float3::dot(v1.normalized(), v2.normalized())` becoming `math::dot(math::normalize(v1), math::normalize(v2))` But I propose, when appropriate, to use `using namespace blender::math;` on function local or file scope to increase readability. `dot(normalize(v1), normalize(v2))` ####Consideration: - Include back `.length()` method. It is quite handy and is more C++ oriented. - I considered the GLM library as a candidate for replacement. It felt like too much for what we need and would be difficult to extend / modify to our needs. - I used Macros to reduce code in operators declaration and potential copy paste bugs. This could reduce debugability and could be reverted. - This touches `delaunay_2d.cc` and the intersection code. I would like to know @howardt opinion on the matter. - The `noexcept` on the copy constructor of `mpq(2|3)` is being removed. But according to @JacquesLucke it is not a real problem for now. I would like to give a huge thanks to @JacquesLucke who helped during this and pushed me to reduce the duplication further. Reviewed By: brecht, sergey, JacquesLucke Differential Revision: https://developer.blender.org/D13791
2022-01-12Revert "BLI: Refactor vector types & functions to use templates"Clément Foucault
Reverted because the commit removes a lot of commits. This reverts commit a2c1c368af48644fa8995ecbe7138cc0d7900c30.
2022-01-12BLI: Refactor vector types & functions to use templatesClément Foucault
This patch implements the vector types (i.e:float2) by making heavy usage of templating. All vector functions are now outside of the vector classes (inside the blender::math namespace) and are not vector size dependent for the most part. In the ongoing effort to make shaders less GL centric, we are aiming to share more code between GLSL and C++ to avoid code duplication. Motivations: - We are aiming to share UBO and SSBO structures between GLSL and C++. This means we will use many of the existing vector types and others we currently don't have (uintX, intX). All these variations were asking for many more code duplication. - Deduplicate existing code which is duplicated for each vector size. - We also want to share small functions. Which means that vector functions should be static and not in the class namespace. - Reduce friction to use these types in new projects due to their incompleteness. - The current state of the BLI_(float|double|mpq)(2|3|4).hh is a bit of a let down. Most clases are incomplete, out of sync with each others with different codestyles, and some functions that should be static are not (i.e: float3::reflect()). Upsides: - Still support .x, .y, .z, .w for readability. - Compact, readable and easilly extendable. - All of the vector functions are available for all the vectors types and can be restricted to certain types. Also template specialization let us define exception for special class (like mpq). - With optimization ON, the compiler unroll the loops and performance is the same. Downsides: - Might impact debugability. Though I would arge that the bugs are rarelly caused by the vector class itself (since the operations are quite trivial) but by the type conversions. - Might impact compile time. I did not saw a significant impact since the usage is not really widespread. - Functions needs to be rewritten to support arbitrary vector length. For instance, one can't call len_squared_v3v3 in math::length_squared() and call it a day. - Type cast does not work with the template version of the math:: vector functions. Meaning you need to manually cast float * and (float *)[3] to float3 for the function calls. i.e: math::distance_squared(float3(nearest.co), positions[i]); - Some parts might loose in readability: float3::dot(v1.normalized(), v2.normalized()) becoming math::dot(math::normalize(v1), math::normalize(v2)) But I propose, when appropriate, to use using namespace blender::math; on function local or file scope to increase readability. dot(normalize(v1), normalize(v2)) Consideration: - Include back .length() method. It is quite handy and is more C++ oriented. - I considered the GLM library as a candidate for replacement. It felt like too much for what we need and would be difficult to extend / modify to our needs. - I used Macros to reduce code in operators declaration and potential copy paste bugs. This could reduce debugability and could be reverted. - This touches delaunay_2d.cc and the intersection code. I would like to know @Howard Trickey (howardt) opinion on the matter. - The noexcept on the copy constructor of mpq(2|3) is being removed. But according to @Jacques Lucke (JacquesLucke) it is not a real problem for now. I would like to give a huge thanks to @Jacques Lucke (JacquesLucke) who helped during this and pushed me to reduce the duplication further. Reviewed By: brecht, sergey, JacquesLucke Differential Revision: http://developer.blender.org/D13791