Skip to content

Commit

Permalink
Merge pull request #4002 from Bforartists/sync_blender_master
Browse files Browse the repository at this point in the history
Sync blender master
  • Loading branch information
Draise14 committed Dec 14, 2023
2 parents d9173a6 + e36222a commit 8552d9f
Show file tree
Hide file tree
Showing 1,410 changed files with 104,991 additions and 64,320 deletions.
11 changes: 10 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,13 @@ trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 4
max_line_length = 120
max_line_length = 120

# HTML
[*.html]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
max_line_length = 99
39 changes: 39 additions & 0 deletions .gitea/issue_template/api_docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Python API Documentation
about: File a bug report for the python API documentation
labels:
- "Type/Report"
- "Status/Needs Triage"
- "Priority/Normal"
body:
- type: markdown
attributes:
value: |
### Instructions
Thank you for reporting an issue with Blender's Python API documentation.
If you meant to file an issue with the software please create a normal [bug report](https://projects.blender.org/blender/blender/issues/new?template=.gitea%2fissue_template%2fbug.yaml).
Please add to the description below explain the issue at hand.
Use **Report issue on this page** at the bottom of the page with an issue to autofill some information.
Including details, examples, or suggested fixes are appreated and will help resolve the issue as soon as possible.
- type: textarea
id: body
attributes:
label: "Description"
hide_label: true
value: |
**Page Information**
Blender Version: (example: 4.0, edbf15d3c044, main)
[Permanent Link](https://docs.blender.org/api/current/) (Update me to the URL of the page with an issue)
**Short description of issue**
[Please fill out a short description of the issue here]
- type: markdown
attributes:
value: |
### Help the developers
Bug fixing is important, the developers will handle reports swiftly. For that reason, carefully provide exact steps and a **small and simple Python scipt** if neccesarry to reproduce the problem. You do your half of the work, then we do our half!
45 changes: 34 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,11 @@ endif()
# quiet output for Makefiles, 'make -s' helps too
# set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)

# global compile definitions since add_definitions() adds for all.
# Global compile definitions since add_definitions() adds for all.
# _DEBUG is a Visual Studio define, enabled for all platforms.
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
$<$<CONFIG:Debug>:DEBUG;_DEBUG>
$<$<CONFIG:Release>:NDEBUG>
$<$<CONFIG:MinSizeRel>:NDEBUG>
$<$<CONFIG:RelWithDebInfo>:NDEBUG>
$<$<CONFIG:Debug>:_DEBUG>
)


# -----------------------------------------------------------------------------
# Set policy

Expand Down Expand Up @@ -99,7 +95,6 @@ endif()

include(build_files/cmake/macros.cmake)


# -----------------------------------------------------------------------------
# Initialize Project

Expand Down Expand Up @@ -733,6 +728,9 @@ mark_as_advanced(WITH_CXX_GUARDEDALLOC)
option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" ON)
mark_as_advanced(WITH_ASSERT_ABORT)

option(WITH_ASSERT_RELEASE "Build with asserts enabled even for non-debug configurations" OFF)
mark_as_advanced(WITH_ASSERT_RELEASE)

if((UNIX AND NOT APPLE) OR (CMAKE_GENERATOR MATCHES "^Visual Studio.+"))
option(WITH_CLANG_TIDY "\
Use Clang Tidy to analyze the source code \
Expand Down Expand Up @@ -762,8 +760,8 @@ endif()

# Unit testing
option(WITH_GTESTS "Enable GTest unit testing" OFF)
option(WITH_OPENGL_RENDER_TESTS "Enable OpenGL render related unit testing (Experimental)" OFF)
option(WITH_OPENGL_DRAW_TESTS "Enable OpenGL UI drawing related unit testing (Experimental)" OFF)
option(WITH_GPU_RENDER_TESTS "Enable GPU render related unit testing (EEVEE, Workbench and Grease Pencil)" OFF)
option(WITH_GPU_DRAW_TESTS "Enable GPU drawing related unit testing (GPU backends and draw manager)" OFF)
option(WITH_COMPOSITOR_REALTIME_TESTS "Enable regression testing for realtime compositor" OFF)
if(UNIX AND NOT (APPLE OR HAIKU))
option(WITH_UI_TESTS "\
Expand Down Expand Up @@ -1786,13 +1784,21 @@ if(CMAKE_COMPILER_IS_GNUCC)
CXX_WARN_NO_SUGGEST_OVERRIDE -Wno-suggest-override
CXX_WARN_UNINITIALIZED -Wuninitialized

# NOTE(@ideasman42): In GCC 13.2.1 on Linux this causes internal compiler errors.
# The crashes can be resolved by disabling the flag per module (but not via pragmas).
# However this also causes a type mix-up FreeStyle (Blender & FreeStyle's `Curve`)
# so it seems to impact GCC's the internal state enough that it's too risky to enable.
# When this is resolved the check can be enabled for fixed GCC versions.
#
# Prevents linking errors with MSVC.
# `CXX_WARN_MISMATCHED_TAGS -Wmismatched-tags`

# Useful but too many false positives and inconvenient to suppress each occurrence.
CXX_WARN_NO_STRINGOP_OVERREAD -Wno-stringop-overread
CXX_WARN_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow

# Use `[[fallthrough]]` or `ATTR_FALLTHROUGH` macro to suppress.
CXX_WARN_IMPLICIT_FALLTHROUGH -Wimplicit-fallthrough=5

)

# causes too many warnings
Expand Down Expand Up @@ -1895,6 +1901,9 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
CXX_WARN_UNDEF_PREFIX -Wundef-prefix
CXX_WARN_UNUSED_PARAMETER -Wunused-parameter

# Prevents linking errors with MSVC.
CXX_WARN_MISMATCHED_TAGS -Wmismatched-tags

# Gives too many unfixable warnings.
# `C_WARN_UNUSED_MACROS -Wunused-macros`
# `CXX_WARN_UNUSED_MACROS -Wunused-macros`
Expand Down Expand Up @@ -2165,6 +2174,20 @@ if(WITH_ASSERT_ABORT)
add_definitions(-DWITH_ASSERT_ABORT)
endif()

# NDEBUG is the standard C define to disable asserts.
if(WITH_ASSERT_RELEASE)
# CMake seemingly be setting the NDEBUG flag on its own already on some configurations
# therefore we need to remove the flags if they happen to be set.
remove_cc_flag("-DNDEBUG") # GCC/CLang
remove_cc_flag("/DNDEBUG") # MSVC
else()
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
$<$<CONFIG:Release>:NDEBUG>
$<$<CONFIG:MinSizeRel>:NDEBUG>
$<$<CONFIG:RelWithDebInfo>:NDEBUG>
)
endif()

# message(STATUS "Using CFLAGS: ${CMAKE_C_FLAGS}")
# message(STATUS "Using CXXFLAGS: ${CMAKE_CXX_FLAGS}")

Expand Down
1 change: 1 addition & 0 deletions build_files/build_environment/cmake/ocloc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ExternalProject_Add(external_ocloc
PREFIX ${BUILD_DIR}/ocloc
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ocloc ${DEFAULT_CMAKE_FLAGS} ${OCLOC_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/ocloc
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/ocloc/src/external_ocloc/ < ${PATCH_DIR}/ocloc.diff
)

add_dependencies(
Expand Down
1 change: 1 addition & 0 deletions build_files/build_environment/cmake/openimagedenoise.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ if(NOT APPLE)
${OIDN_EXTRA_ARGS}
-DOIDN_DEVICE_SYCL=ON
-DOIDN_DEVICE_SYCL_AOT=OFF
-DOIDN_DEVICE_HIP=ON
-DLEVEL_ZERO_ROOT=${LIBDIR}/level-zero/lib
)
endif()
Expand Down
6 changes: 0 additions & 6 deletions build_files/build_environment/cmake/openvdb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ set(OPENVDB_EXTRA_ARGS
)

set(OPENVDB_PATCH ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb.diff)
if(APPLE)
set(OPENVDB_PATCH
${OPENVDB_PATCH} &&
${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb_metal.diff
)
endif()

ExternalProject_Add(openvdb
URL file://${PACKAGE_DIR}/${OPENVDB_FILE}
Expand Down
14 changes: 14 additions & 0 deletions build_files/build_environment/patches/ocloc.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/shared/offline_compiler/source/ocloc_fatbinary.cpp b/shared/offline_compiler/source/ocloc_fatbinary.cpp
index 98a1c0e..4d9b5b0 100644
--- a/shared/offline_compiler/source/ocloc_fatbinary.cpp
+++ b/shared/offline_compiler/source/ocloc_fatbinary.cpp
@@ -286,7 +286,9 @@ int buildFatBinaryForTarget(int retVal, const std::vector<std::string> &argsCopy
productConfig = ProductConfigHelper::parseMajorMinorRevisionValue(argHelper->productConfigHelper->getProductConfigFromDeviceName(product));
}

- fatbinary.appendFileEntry(pointerSize + "." + productConfig, pCompiler->getPackedDeviceBinaryOutput());
+ // Storing binaries under the hardware prefix instead of the full architecture version number,
+ // as they would otherwise be ignored if they do not fully match that of the execution device.
+ fatbinary.appendFileEntry(pointerSize + "." + NEO::hardwarePrefix[argHelper->productConfigHelper->getProductFamilyFromDeviceName(productConfig)], pCompiler->getPackedDeviceBinaryOutput());
return retVal;
}

0 comments on commit 8552d9f

Please sign in to comment.