mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-22 08:30:57 +00:00
blender: 5.1.2 -> 5.2.0, various fixes (#541752)
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
diff --git a/source/blender/gpu/vulkan/vk_texture_pool.cc b/source/blender/gpu/vulkan/vk_texture_pool.cc
|
||||
index 850e7808ae7..3478d4907f2 100644
|
||||
--- a/source/blender/gpu/vulkan/vk_texture_pool.cc
|
||||
+++ b/source/blender/gpu/vulkan/vk_texture_pool.cc
|
||||
@@ -554,7 +554,7 @@ void VKTexturePool::log_usage_data()
|
||||
log_message += std::format(" ({} cached VkImages)", current_usage_data_.image_cache_size);
|
||||
}
|
||||
|
||||
- CLOG_TRACE(&LOG, log_message.c_str());
|
||||
+ CLOG_TRACE(&LOG, "%s", log_message.c_str());
|
||||
}
|
||||
|
||||
} // namespace gpu
|
||||
@@ -1,42 +0,0 @@
|
||||
diff --git a/extern/hipew/src/hipew.c b/extern/hipew/src/hipew.c
|
||||
index e72ccde6..138e1efc 100644
|
||||
--- a/extern/hipew/src/hipew.c
|
||||
+++ b/extern/hipew/src/hipew.c
|
||||
@@ -241,13 +241,13 @@ static int hipewHipInit(void) {
|
||||
/* ROCm 6 changes paths from /opt/rocm/hip/lib to /opt/rocm/lib, so
|
||||
* search for libraries there. */
|
||||
|
||||
- const char* hip_paths[] = { "libamdhip64.so",
|
||||
+ const char* hip_paths[] = { "libamdhip64.so.7",
|
||||
+ "/opt/rocm/lib/libamdhip64.so.7",
|
||||
+ "/opt/rocm/hip/lib/libamdhip64.so.7",
|
||||
"libamdhip64.so.6",
|
||||
"/opt/rocm/lib/libamdhip64.so.6",
|
||||
"/opt/rocm/hip/lib/libamdhip64.so.6",
|
||||
- "libamdhip64.so.7",
|
||||
- "/opt/rocm/lib/libamdhip64.so.7",
|
||||
- "/opt/rocm/hip/lib/libamdhip64.so.7",
|
||||
+ "libamdhip64.so",
|
||||
NULL };
|
||||
#endif
|
||||
static int initialized = 0;
|
||||
diff --git a/intern/cycles/kernel/device/hiprt/CMakeLists.txt b/intern/cycles/kernel/device/hiprt/CMakeLists.txt
|
||||
index 9f48fb9be3..01e05159c9 100644
|
||||
--- a/intern/cycles/kernel/device/hiprt/CMakeLists.txt
|
||||
+++ b/intern/cycles/kernel/device/hiprt/CMakeLists.txt
|
||||
@@ -30,13 +30,13 @@
|
||||
set(SRC_KERNEL_DEVICE_HIPRT_SDK
|
||||
hiprt/impl/Aabb.h
|
||||
hiprt/impl/BvhNode.h
|
||||
- hiprt/impl/Geometry.h
|
||||
+ hiprt/impl/Header.h
|
||||
hiprt/impl/hiprt_device_impl.h
|
||||
hiprt/impl/hiprt_kernels_bitcode.h
|
||||
hiprt/impl/Instance.h
|
||||
+ hiprt/impl/Obb.h
|
||||
hiprt/impl/QrDecomposition.h
|
||||
hiprt/impl/Quaternion.h
|
||||
- hiprt/impl/Scene.h
|
||||
hiprt/impl/Transform.h
|
||||
hiprt/impl/Triangle.h
|
||||
)
|
||||
@@ -13,6 +13,7 @@
|
||||
cudaPackages,
|
||||
cudaSupport ? config.cudaSupport,
|
||||
dbus,
|
||||
draco,
|
||||
embree,
|
||||
fetchFromGitHub,
|
||||
fetchzip,
|
||||
@@ -50,6 +51,7 @@
|
||||
makeWrapper,
|
||||
manifold,
|
||||
mesa,
|
||||
meshoptimizer,
|
||||
nix-update-script,
|
||||
onetbb,
|
||||
openal,
|
||||
@@ -117,12 +119,12 @@ in
|
||||
|
||||
stdenv'.mkDerivation (finalAttrs: {
|
||||
pname = "blender";
|
||||
version = "5.1.2";
|
||||
version = "5.2.0";
|
||||
|
||||
src = fetchzip {
|
||||
name = "source";
|
||||
url = "https://download.blender.org/source/blender-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-FnReSNsP8U1/4jSgZN3cMQV2qkP7OZPh0f/9JA1lAxs=";
|
||||
hash = "sha256-V2+Oc7GT31JvWccffzUaingEs8CtSFaazgQ+YdZUB7M=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@@ -130,36 +132,33 @@ stdenv'.mkDerivation (finalAttrs: {
|
||||
# ceres-solver dependency propagates eigen 3 and appears to be incompatible
|
||||
# with more recent versions.
|
||||
./eigen-3-compat.patch
|
||||
# Required due to `-Werror=format-security` in nixpkgs
|
||||
# https://projects.blender.org/blender/blender/commit/470127ede2448de50a6936b8484b3c382c76d596
|
||||
./fix-quite-clog-warning.patch
|
||||
]
|
||||
# Minimal backport of hiprt 3.x support from https://projects.blender.org/blender/blender/pulls/144889
|
||||
++ lib.optionals rocmSupport [
|
||||
./hiprt-3-compat.patch
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
./darwin.patch
|
||||
];
|
||||
|
||||
postPatch =
|
||||
(lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
: > build_files/cmake/platform/platform_apple_xcode.cmake
|
||||
substituteInPlace source/creator/CMakeLists.txt \
|
||||
--replace-fail '${"$"}{LIBDIR}/python' \
|
||||
'${python3}' \
|
||||
--replace-fail '${"$"}{LIBDIR}/materialx/' '${python3Packages.materialx}/'
|
||||
substituteInPlace build_files/cmake/platform/platform_apple.cmake \
|
||||
--replace-fail '${"$"}{LIBDIR}/brotli/lib/libbrotlicommon-static.a' \
|
||||
'${lib.getLib brotli}/lib/libbrotlicommon.dylib' \
|
||||
--replace-fail '${"$"}{LIBDIR}/brotli/lib/libbrotlidec-static.a' \
|
||||
'${lib.getLib brotli}/lib/libbrotlidec.dylib'
|
||||
'')
|
||||
+ (lib.optionalString rocmSupport ''
|
||||
substituteInPlace extern/hipew/src/hipew.c --replace-fail '"/opt/rocm/hip/lib/libamdhip64.so.${lib.versions.major rocmPackages.clr.version}"' '"${rocmPackages.clr}/lib/libamdhip64.so"'
|
||||
substituteInPlace extern/hipew/src/hipew.c --replace-fail '"opt/rocm/hip/bin"' '"${rocmPackages.clr}/bin"'
|
||||
substituteInPlace extern/hipew/src/hiprtew.cc --replace-fail '"/opt/rocm/lib/libhiprt64.so"' '"${rocmPackages.hiprt}/lib/libhiprt64.so"'
|
||||
'');
|
||||
postPatch = ''
|
||||
substituteInPlace intern/ghost/intern/GHOST_SystemPathsUnix.cc \
|
||||
--replace-fail \
|
||||
'static const char *static_libs_path = PREFIX "/" BLENDER_INSTALL_LIBDIR;' \
|
||||
'static const char *static_libs_path = BLENDER_INSTALL_LIBDIR;'
|
||||
''
|
||||
+ (lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
: > build_files/cmake/platform/platform_apple_xcode.cmake
|
||||
substituteInPlace source/creator/CMakeLists.txt \
|
||||
--replace-fail '${"$"}{LIBDIR}/python' \
|
||||
'${python3}' \
|
||||
--replace-fail '${"$"}{LIBDIR}/materialx/' '${python3Packages.materialx}/'
|
||||
substituteInPlace build_files/cmake/platform/platform_apple.cmake \
|
||||
--replace-fail '${"$"}{LIBDIR}/brotli/lib/libbrotlicommon-static.a' \
|
||||
'${lib.getLib brotli}/lib/libbrotlicommon.dylib' \
|
||||
--replace-fail '${"$"}{LIBDIR}/brotli/lib/libbrotlidec-static.a' \
|
||||
'${lib.getLib brotli}/lib/libbrotlidec.dylib'
|
||||
'')
|
||||
+ (lib.optionalString rocmSupport ''
|
||||
substituteInPlace extern/hipew/src/hipew.c --replace-fail '"/opt/rocm/hip/lib/libamdhip64.so.${lib.versions.major rocmPackages.clr.version}"' '"${rocmPackages.clr}/lib/libamdhip64.so"'
|
||||
substituteInPlace extern/hipew/src/hipew.c --replace-fail '"opt/rocm/hip/bin"' '"${rocmPackages.clr}/bin"'
|
||||
'');
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = "-I${python3}/include/${python3.libPrefix}";
|
||||
|
||||
@@ -207,8 +206,7 @@ stdenv'.mkDerivation (finalAttrs: {
|
||||
(lib.cmakeBool "WITH_CYCLES_CUDA_BINARIES" true)
|
||||
]
|
||||
++ lib.optionals rocmSupport [
|
||||
(lib.cmakeFeature "HIPRT_INCLUDE_DIR" "${rocmPackages.hiprt}/include")
|
||||
(lib.cmakeBool "WITH_CYCLES_DEVICE_HIPRT" true)
|
||||
(lib.cmakeBool "WITH_CYCLES_DEVICE_HIPRT" false)
|
||||
(lib.cmakeBool "WITH_CYCLES_HIP_BINARIES" true)
|
||||
]
|
||||
++ lib.optionals waylandSupport [
|
||||
@@ -255,6 +253,7 @@ stdenv'.mkDerivation (finalAttrs: {
|
||||
alembic
|
||||
boost
|
||||
ceres-solver
|
||||
draco
|
||||
ffmpeg_7
|
||||
fftw
|
||||
fftwFloat
|
||||
@@ -272,6 +271,7 @@ stdenv'.mkDerivation (finalAttrs: {
|
||||
libtiff
|
||||
libwebp
|
||||
manifold
|
||||
meshoptimizer
|
||||
opencolorio
|
||||
openexr
|
||||
openimageio
|
||||
@@ -339,6 +339,7 @@ stdenv'.mkDerivation (finalAttrs: {
|
||||
ps = python3Packages;
|
||||
in
|
||||
[
|
||||
ps.cattrs
|
||||
ps.materialx
|
||||
ps.numpy
|
||||
ps.openshadinglanguage
|
||||
|
||||
@@ -32,6 +32,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "LLVM_STATIC" true)
|
||||
(lib.cmakeBool "USE_QT" false)
|
||||
|
||||
# Build system implies llvm-config and llvm-as are in the same directory.
|
||||
@@ -60,6 +61,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
buildInputs = [
|
||||
hexdump
|
||||
libclang
|
||||
libxml2
|
||||
llvm
|
||||
openexr
|
||||
openimageio
|
||||
@@ -68,9 +70,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
python3Packages.pybind11
|
||||
robin-map
|
||||
zlib
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
libxml2
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
||||
Reference in New Issue
Block a user