Skip to content

Commit

Permalink
Merged from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
obiwac committed Dec 19, 2021
2 parents 39b8d17 + 6878897 commit 51e1d9f
Show file tree
Hide file tree
Showing 772 changed files with 14,431 additions and 6,168 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,11 @@ if(NOT APPLE)
mark_as_advanced(CYCLES_HIP_BINARIES_ARCH)
endif()

# Apple Metal
if(APPLE)
option(WITH_CYCLES_DEVICE_METAL "Enable Cycles Apple Metal compute support" ON)
endif()

# Draw Manager
option(WITH_DRAW_DEBUG "Add extra debug capabilities to Draw Manager" OFF)
mark_as_advanced(WITH_DRAW_DEBUG)
Expand Down
1 change: 1 addition & 0 deletions build_files/cmake/config/blender_release.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
# platform dependent options
if(APPLE)
set(WITH_COREAUDIO ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_DEVICE_METAL ON CACHE BOOL "" FORCE)
endif()
if(NOT WIN32)
set(WITH_JACK ON CACHE BOOL "" FORCE)
Expand Down
117 changes: 58 additions & 59 deletions doc/doxygen/doxygen.intern.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,91 +6,90 @@
* as part of the normal development process.
*/

/** \defgroup MEM Guarded memory (de)allocation
* \ingroup intern
/* TODO: other modules.
* - `libmv`
* - `cycles`
* - `opencolorio`
* - `opensubdiv`
* - `openvdb`
* - `quadriflow`
*/

/** \defgroup clog C-Logging (CLOG)
* \ingroup intern
*/
/** \defgroup intern_atomic Atomic Operations
* \ingroup intern */

/** \defgroup ctr container
* \ingroup intern
*/
/** \defgroup intern_clog C-Logging (CLOG)
* \ingroup intern */

/** \defgroup iksolver iksolver
* \ingroup intern
*/
/** \defgroup intern_eigen Eigen
* \ingroup intern */

/** \defgroup itasc itasc
* \ingroup intern
*/
/** \defgroup intern_glew-mx GLEW with Multiple Rendering Context's
* \ingroup intern */

/** \defgroup memutil memutil
* \ingroup intern
*/
/** \defgroup intern_iksolver Inverse Kinematics (Solver)
* \ingroup intern */

/** \defgroup mikktspace mikktspace
* \ingroup intern
*/
/** \defgroup intern_itasc Inverse Kinematics (ITASC)
* \ingroup intern */

/** \defgroup moto moto
* \ingroup intern
*/
/** \defgroup intern_libc_compat libc Compatibility For Linux
* \ingroup intern */

/** \defgroup eigen eigen
* \ingroup intern
*/
/** \defgroup intern_locale Locale
* \ingroup intern */

/** \defgroup smoke smoke
* \ingroup intern
*/
/** \defgroup intern_mantaflow Manta-Flow Fluid Simulation
* \ingroup intern */

/** \defgroup string string
* \ingroup intern
*/
/** \defgroup intern_mem Guarded Memory (de)allocation
* \ingroup intern */

/** \defgroup intern_memutil Memory Utilities (memutil)
* \ingroup intern */

/** \defgroup intern_mikktspace MikktSpace
* \ingroup intern */

/** \defgroup intern_numaapi NUMA (Non Uniform Memory Architecture)
* \ingroup intern */

/** \defgroup intern_rigidbody Rigid-Body C-API
* \ingroup intern */

/** \defgroup intern_sky_model Sky Model
* \ingroup intern */

/** \defgroup intern_utf_conv UTF-8/16 Conversion (utfconv)
* \ingroup intern */

/** \defgroup audaspace Audaspace
* \ingroup intern undoc
* \todo add to doxygen
*/
* \todo add to doxygen */
/** \defgroup audcoreaudio Audaspace CoreAudio
* \ingroup audaspace
*/
* \ingroup audaspace */
/** \defgroup audfx Audaspace FX
* \ingroup audaspace
*/
* \ingroup audaspace */
/** \defgroup audopenal Audaspace OpenAL
* \ingroup audaspace
*/
* \ingroup audaspace */
/** \defgroup audpulseaudio Audaspace PulseAudio
* \ingroup audaspace
*/
* \ingroup audaspace */
/** \defgroup audwasapi Audaspace WASAPI
* \ingroup audaspace
*/
* \ingroup audaspace */
/** \defgroup audpython Audaspace Python
* \ingroup audaspace
*/
* \ingroup audaspace */
/** \defgroup audsdl Audaspace SDL
* \ingroup audaspace
*/
* \ingroup audaspace */
/** \defgroup audsrc Audaspace SRC
*
* \ingroup audaspace
*/
* \ingroup audaspace */
/** \defgroup audffmpeg Audaspace FFMpeg
* \ingroup audaspace
*/
* \ingroup audaspace */
/** \defgroup audfftw Audaspace FFTW
* \ingroup audaspace
*/
* \ingroup audaspace */
/** \defgroup audjack Audaspace Jack
* \ingroup audaspace
*/
* \ingroup audaspace */
/** \defgroup audsndfile Audaspace sndfile
* \ingroup audaspace
*/
* \ingroup audaspace */

/** \defgroup GHOST GHOST API
* \ingroup intern GUI
Expand Down
21 changes: 14 additions & 7 deletions doc/doxygen/doxygen.source.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
/** \defgroup bmesh BMesh
* \ingroup blender
*/
/** \defgroup compositor Compositing */
/** \defgroup compositor Compositing
* \ingroup blender */

/** \defgroup python Python
* \ingroup blender
Expand Down Expand Up @@ -78,7 +79,8 @@
* \ingroup blender
*/

/** \defgroup data DNA, RNA and .blend access*/
/** \defgroup data DNA, RNA and .blend access
* \ingroup blender */

/** \defgroup gpu GPU
* \ingroup blender
Expand All @@ -101,11 +103,12 @@
* merged in docs.
*/

/** \defgroup gui GUI */
/**
* \defgroup gui GUI
* \ingroup blender */

/** \defgroup wm Window Manager
* \ingroup blender gui
*/
* \ingroup gui */

/* ================================ */

Expand Down Expand Up @@ -279,7 +282,8 @@
* \ingroup gui
*/

/** \defgroup externformats External Formats */
/** \defgroup externformats External Formats
* \ingroup blender */

/** \defgroup collada COLLADA
* \ingroup externformats
Expand Down Expand Up @@ -308,4 +312,7 @@
/* ================================ */

/** \defgroup undoc Undocumented
* \brief Modules and libraries that are still undocumented, or lacking proper integration into the doxygen system, are marked in this group. */
*
* \brief Modules and libraries that are still undocumented,
* or lacking proper integration into the doxygen system, are marked in this group.
*/
2 changes: 1 addition & 1 deletion intern/atomic/atomic_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
*/

/** \file
* \ingroup Atomic
* \ingroup intern_atomic
*
* \brief Provides wrapper around system-specific atomic primitives,
* and some extensions (faked-atomic operations over float numbers).
Expand Down
4 changes: 4 additions & 0 deletions intern/atomic/intern/atomic_ops_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
* The Original Code is: adapted from jemalloc.
*/

/** \file
* \ingroup intern_atomic
*/

#ifndef __ATOMIC_OPS_EXT_H__
#define __ATOMIC_OPS_EXT_H__

Expand Down
4 changes: 4 additions & 0 deletions intern/atomic/intern/atomic_ops_msvc.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

/** \file
* \ingroup intern_atomic
*/

#ifndef __ATOMIC_OPS_MSVC_H__
#define __ATOMIC_OPS_MSVC_H__

Expand Down
4 changes: 4 additions & 0 deletions intern/atomic/intern/atomic_ops_unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
* The Original Code is: adapted from jemalloc.
*/

/** \file
* \ingroup intern_atomic
*/

#ifndef __ATOMIC_OPS_UNIX_H__
#define __ATOMIC_OPS_UNIX_H__

Expand Down
4 changes: 4 additions & 0 deletions intern/atomic/intern/atomic_ops_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
* The Original Code is: adapted from jemalloc.
*/

/** \file
* \ingroup intern_atomic
*/

#ifndef __ATOMIC_OPS_UTILS_H__
#define __ATOMIC_OPS_UTILS_H__

Expand Down
8 changes: 4 additions & 4 deletions intern/clog/CLG_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

#ifndef __CLG_LOG_H__
#define __CLG_LOG_H__

/** \file
* \ingroup clog
* \ingroup intern_clog
*
* C Logging Library (clog)
* ========================
Expand Down Expand Up @@ -68,6 +65,9 @@
* - 4+: May be used for more details than 3, should be avoided but not prevented.
*/

#ifndef __CLG_LOG_H__
#define __CLG_LOG_H__

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
Expand Down
2 changes: 1 addition & 1 deletion intern/clog/clog.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

/** \file
* \ingroup clog
* \ingroup intern_clog
*/

#include <assert.h>
Expand Down
1 change: 1 addition & 0 deletions intern/cycles/blender/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ set(SRC
object_cull.cpp
output_driver.cpp
particles.cpp
pointcloud.cpp
curves.cpp
logging.cpp
python.cpp
Expand Down
2 changes: 2 additions & 0 deletions intern/cycles/blender/addon/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -1479,6 +1479,8 @@ def _draw_devices(self, layout, device_type, devices):
col.label(text="Support is actively being worked on, however!", icon='BLANK1')
if sys.platform[:3] == "win":
col.label(text="and AMD Radeon Pro 21.Q4 driver or newer", icon='BLANK1')
elif device_type == 'METAL':
col.label(text="Requires Apple Silicon and macOS 12.0 or newer", icon='BLANK1')
return

for device in devices:
Expand Down
2 changes: 1 addition & 1 deletion intern/cycles/blender/addon/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ class CYCLES_OBJECT_PT_motion_blur(CyclesButtonsPanel, Panel):
def poll(cls, context):
ob = context.object
if CyclesButtonsPanel.poll(context) and ob:
if ob.type in {'MESH', 'CURVE', 'CURVE', 'SURFACE', 'FONT', 'META', 'CAMERA'}:
if ob.type in {'MESH', 'CURVE', 'CURVE', 'SURFACE', 'FONT', 'META', 'CAMERA', 'HAIR', 'POINTCLOUD'}:
return True
if ob.instance_type == 'COLLECTION' and ob.instance_collection:
return True
Expand Down
16 changes: 16 additions & 0 deletions intern/cycles/blender/geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "scene/hair.h"
#include "scene/mesh.h"
#include "scene/object.h"
#include "scene/pointcloud.h"
#include "scene/volume.h"

#include "blender/sync.h"
Expand All @@ -39,6 +40,10 @@ static Geometry::Type determine_geom_type(BObjectInfo &b_ob_info, bool use_parti
return Geometry::HAIR;
}

if (b_ob_info.object_data.is_a(&RNA_PointCloud)) {
return Geometry::POINTCLOUD;
}

if (b_ob_info.object_data.is_a(&RNA_Volume) ||
(b_ob_info.object_data == b_ob_info.real_object.data() &&
object_fluid_gas_domain_find(b_ob_info.real_object))) {
Expand Down Expand Up @@ -111,6 +116,9 @@ Geometry *BlenderSync::sync_geometry(BL::Depsgraph &b_depsgraph,
else if (geom_type == Geometry::VOLUME) {
geom = scene->create_node<Volume>();
}
else if (geom_type == Geometry::POINTCLOUD) {
geom = scene->create_node<PointCloud>();
}
else {
geom = scene->create_node<Mesh>();
}
Expand Down Expand Up @@ -170,6 +178,10 @@ Geometry *BlenderSync::sync_geometry(BL::Depsgraph &b_depsgraph,
Volume *volume = static_cast<Volume *>(geom);
sync_volume(b_ob_info, volume);
}
else if (geom_type == Geometry::POINTCLOUD) {
PointCloud *pointcloud = static_cast<PointCloud *>(geom);
sync_pointcloud(pointcloud, b_ob_info);
}
else {
Mesh *mesh = static_cast<Mesh *>(geom);
sync_mesh(b_depsgraph, b_ob_info, mesh);
Expand Down Expand Up @@ -231,6 +243,10 @@ void BlenderSync::sync_geometry_motion(BL::Depsgraph &b_depsgraph,
object_fluid_gas_domain_find(b_ob_info.real_object)) {
/* No volume motion blur support yet. */
}
else if (b_ob_info.object_data.is_a(&RNA_PointCloud)) {
PointCloud *pointcloud = static_cast<PointCloud *>(geom);
sync_pointcloud_motion(pointcloud, b_ob_info, motion_step);
}
else {
Mesh *mesh = static_cast<Mesh *>(geom);
sync_mesh_motion(b_depsgraph, b_ob_info, mesh, motion_step);
Expand Down
Loading

0 comments on commit 51e1d9f

Please sign in to comment.