Merge branch 'blender-v4.1-release'

This commit is contained in:
Hans Goudey 2024-03-08 16:35:33 -05:00
commit 04a9790035
6 changed files with 27 additions and 9 deletions

View File

@ -12,9 +12,9 @@ function(download_source dep)
if(PACKAGE_USE_UPSTREAM_SOURCES)
set(TARGET_URI ${${dep}_URI})
elseif(BLENDER_VERSION)
set(TARGET_URI https://svn.blender.org/svnroot/bf-blender/tags/blender-${BLENDER_VERSION}-release/lib/packages/${TARGET_FILE})
set(TARGET_URI https://projects.blender.org/blender/lib-source/media/branch/blender-v${BLENDER_VERSION}-release/${TARGET_FILE})
else()
set(TARGET_URI https://svn.blender.org/svnroot/bf-blender/trunk/lib/packages/${TARGET_FILE})
set(TARGET_URI https://projects.blender.org/blender/lib-source/media/branch/main/${TARGET_FILE})
endif()
# Validate all required variables are set and give an explicit error message
# rather than CMake erroring out later on with a more ambigious error.

View File

@ -340,11 +340,6 @@ string MetalDevice::preprocess_source(MetalPipelineType pso_type,
}
}
if (@available(macos 14.0, *)) {
/* Use Program Scope Global Built-ins, when available. */
global_defines += "#define __METAL_GLOBAL_BUILTINS__\n";
}
# ifdef WITH_CYCLES_DEBUG
global_defines += "#define __KERNEL_DEBUG__\n";
# endif
@ -359,13 +354,22 @@ string MetalDevice::preprocess_source(MetalPipelineType pso_type,
global_defines += "#define __KERNEL_METAL_AMD__\n";
/* The increased amount of BSDF code leads to a big performance regression
* on AMD. There is currently no workaround to fix this general. Instead
* disable Principled Hair. */
* disable Principled Hair and patch evaluation. */
if (kernel_features & KERNEL_FEATURE_NODE_PRINCIPLED_HAIR) {
global_defines += "#define WITH_PRINCIPLED_HAIR\n";
}
if (kernel_features & KERNEL_FEATURE_PATCH_EVALUATION) {
global_defines += "#define WITH_PATCH_EVAL\n";
}
break;
case METAL_GPU_APPLE:
global_defines += "#define __KERNEL_METAL_APPLE__\n";
if (@available(macos 14.0, *)) {
/* Use Program Scope Global Built-ins, when available. */
global_defines += "#define __METAL_GLOBAL_BUILTINS__\n";
}
# ifdef WITH_NANOVDB
/* Compiling in NanoVDB results in a marginal drop in render performance,
* so disable it for specialized PSOs when no textures are using it. */

View File

@ -10,6 +10,8 @@
#pragma once
#include "util/color.h"
CCL_NAMESPACE_BEGIN
/* Normal on triangle. */

View File

@ -116,6 +116,9 @@ CCL_NAMESPACE_BEGIN
# ifndef WITH_PRINCIPLED_HAIR
# undef __PRINCIPLED_HAIR__
# endif
# ifndef WITH_PATCH_EVAL
# undef __PATCH_EVAL__
# endif
#endif
/* Scene-based selective features compilation. */

View File

@ -2248,8 +2248,17 @@ void BKE_main_mesh_legacy_convert_auto_smooth(Main &bmain)
continue;
}
if (CustomData_has_layer(&mesh->corner_data, CD_CUSTOMLOOPNORMAL)) {
/* Auto-smooth disabled sharp edge tagging when the evaluated mesh had custom normals.
* When the original mesh has custom normals, that's a good sign the evaluated mesh will
* have custom normals as well. */
continue;
}
if (ModifierData *last_md = static_cast<ModifierData *>(object->modifiers.last)) {
if (ELEM(last_md->type, eModifierType_WeightedNormal, eModifierType_NormalEdit)) {
/* These modifiers always generate custom normals which disabled sharp edge tagging. */
continue;
}
}
if (!auto_smooth_node_tree) {
auto_smooth_node_tree = add_auto_smooth_node_tree(bmain);
BKE_ntree_update_main_tree(&bmain, auto_smooth_node_tree, nullptr);

View File

@ -511,7 +511,7 @@ static bool curves_ensure_attributes(const Curves &curves,
for (const int i : IndexRange(final_cache.attr_used.num_requests)) {
const DRW_AttributeRequest &request = final_cache.attr_used.requests[i];
if (cache.curves_cache.proc_attributes_buf[i] != nullptr) {
if (cache.curves_cache.final[subdiv].attributes_buf[i] != nullptr) {
continue;
}