Skip to content

Commit

Permalink
Merge remote-tracking branch 'b/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
youle31 committed Mar 7, 2025
2 parents a1851a9 + 48398b2 commit 0c0c0cf
Show file tree
Hide file tree
Showing 349 changed files with 4,966 additions and 4,742 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@ set(PLATFORM_CFLAGS)
set(C_WARNINGS)
set(CXX_WARNINGS)

# NOTE: These flags are intended for situations where where it's impractical to
# NOTE: These flags are intended for situations where it's impractical to
# suppress warnings by modifying the code or for code which is maintained externally.
# For GCC this typically means adding `-Wno-*` arguments to negate warnings
# that are useful in the general case.
Expand Down
5 changes: 3 additions & 2 deletions build_files/utils/make_source_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from typing import (
TextIO,
Any,
Tuple,
Union,
# Proxies for `collections.abc`
Iterable,
Expand All @@ -30,7 +31,7 @@
# Support for other platforms could be added by moving GNU `tar` & `md5sum` use to Python.
# This also relies on having a Unix shell (sh) to run some git commands.

SKIP_NAMES = (
SKIP_NAMES: Tuple[str, ...] = (
".gitignore",
".gitmodules",
".gitattributes",
Expand All @@ -39,7 +40,7 @@
".svn",
)

SKIP_FOLDERS = (
SKIP_FOLDERS: Tuple[str, ...] = (
"release/datafiles/assets/working",
)

Expand Down
2 changes: 1 addition & 1 deletion doc/python_api/examples/bpy.types.Depsgraph.1.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def execute(self, context):
# current scene and view layer.
#
# NOTE: This call ensure the dependency graph is fully evaluated. This might be expensive
# if changes were made made to the scene, but is needed to ensure no dangling or incorrect
# if changes were made to the scene, but is needed to ensure no dangling or incorrect
# pointers are exposed.
depsgraph = context.evaluated_depsgraph_get()
# Actually request evaluated object.
Expand Down
9 changes: 7 additions & 2 deletions extern/audaspace/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,20 @@ The Equalizer sound effect has been added by

- Marcos Perez

Some performance improvements, especially to the JOSResampler have been made by:
Some performance improvements, especially to the JOSResampler have been made by

- Aras Pranckevičius

The pipewire backend and many fixes have been provided by

- Sebastian Parborg

Several people provided fixes:

- Aaron Carlisle
- Sebastian Parborg
- Leon Zandman
- Richard Antalik
- Robert-André Mauchin
- Lalit Shankar Chowdhury
- Nathan Burnham
- Weizhen Huang
33 changes: 33 additions & 0 deletions extern/audaspace/CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
Audaspace 1.6

- Pipewire support (thanks Sebastian Parborg!)
- AAC container (ADTS stream).
- Update to C++17.
- Improvements for PulseAudio backend.
- Many (bug) fixes.

Detailed list of changes:

70b18a5 Port fix by Weizhen Huang from Blender.
ecaa71c CoreAudio: closing issue fixed from Apple for newer MacOS versions.
0035101 Port Blender changes to upstream.
dd419af Blender bug fix #129162: High idle CPU usage with PulseAudio in Linux
9220ab5 Set C++ version python plugin bulid to 17.
9db9578 Add AAC container You could already use Matroska container with AAC codec, but if someone wants raw .aac file ("ADTS stream"), there was no container option to pick.
d3b7471 Fix whitespace
d1f1704 Fix rendering audio to Matroska container
5aabc89 Pipewire support (#43)
f5e8ccc Audaspace: Update PulseAudio sync functions to be more accurate (#42)
f4611c0 Porting ffmpeg compatibility back from Blender.
6afeab2 Update to C++17.
81b0d76 PulseAudio: try to play as much as possible of buffered data on playback stop.
426dab5 Fix Sound.filter a argument default not a sequence
d701d0b loadRight documented as duplicate of loadLeft
4326b24 Fix for building python module without fftw.
901f14e Bugfix for MacOS from Blender.
ee59832 Fix a typo
27bc641 Update AUTHORS.
689d645 Windows: Use COM smart pointers in WASAPI plugin
5efc5c4 Update FFmpeg code to avoid direct assignation of ch_layout
56edbe4 Making the OpenCloseDevice thread safe.

Audaspace 1.5

- Performance improvements and two more quality presets for the JOS resampler.
Expand Down
2 changes: 1 addition & 1 deletion extern/audaspace/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ endif()

project(audaspace)

set(AUDASPACE_VERSION 1.5)
set(AUDASPACE_VERSION 1.6)
set(AUDASPACE_LONG_VERSION ${AUDASPACE_VERSION}.0)

if(DEFINED AUDASPACE_CMAKE_CFG)
Expand Down
6 changes: 3 additions & 3 deletions extern/audaspace/README.blender
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Project: Audaspace
URL: https://audaspace.github.io/
License: SPDX:Apache-2.0
Upstream version: 1.4+ (ae29ce2, 2024 Feb 26)
Copyright: "Copyright © 2009-2015 Jörg Müller. All rights reserved."
Local modifications: none
Upstream version: 1.6.0 (cb493a1, 2025 Mar 3)
Copyright: "Copyright © 2009-2025 Jörg Müller. All rights reserved."
Local modifications: none
2 changes: 1 addition & 1 deletion extern/audaspace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The following (probably incomplete) features are supported by audaspace:
License
-------

> Copyright © 2009-2024 Jörg Müller. All rights reserved.
> Copyright © 2009-2025 Jörg Müller. All rights reserved.
>
> Licensed under the Apache License, Version 2.0 (the "License");
> you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion extern/audaspace/bindings/C/AUD_Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ typedef enum
AUD_CONTAINER_MP3,
AUD_CONTAINER_OGG,
AUD_CONTAINER_WAV,
AUD_CONTAINER_AAC,
AUD_CONTAINER_AAC
} AUD_Container;

/// Audio codecs for writers.
Expand Down
2 changes: 1 addition & 1 deletion extern/audaspace/bindings/python/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if sys.platform == 'win32':
extra_args.append('/EHsc')
extra_args.append('/DAUD_BUILD_SHARED_LIBRARY')
else:
extra_args.append('-std=c++11')
extra_args.append('-std=c++17')

audaspace = Extension(
'aud',
Expand Down
2 changes: 1 addition & 1 deletion extern/audaspace/plugins/pipewire/PipeWireLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bool loadPipeWire()

#undef PIPEWIRE_SYMBOL

return AUD_pw_check_library_version != nullptr && AUD_pw_check_library_version(1,1,0);
return AUD_pw_check_library_version != nullptr && AUD_pw_check_library_version(1, 1, 0);
}

AUD_NAMESPACE_END
2 changes: 1 addition & 1 deletion intern/cycles/bvh/binning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ BVHObjectBinning::BVHObjectBinning(const BVHRange &job,

/* compute number of bins to use and precompute scaling factor for binning */
num_bins = min(size_t(MAX_BINS), size_t(4.0f + 0.05f * size()));
scale = reciprocal(cent_bounds_.size()) * make_float3((float)num_bins);
scale = safe_divide(cent_bounds_.size(), make_float3((float)num_bins));

/* initialize binning counter and bounds */
BoundBox bin_bounds[MAX_BINS][4]; /* bounds for every bin in every dimension */
Expand Down
56 changes: 20 additions & 36 deletions intern/cycles/device/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,46 +78,30 @@ enum MetalRTSetting {

class DeviceInfo {
public:
DeviceType type;
DeviceType type = DEVICE_CPU;
string description;
string id; /* used for user preferences, should stay fixed with changing hardware config */
int num;
bool display_device; /* GPU is used as a display device. */
bool has_nanovdb; /* Support NanoVDB volumes. */
bool has_mnee; /* Support MNEE. */
bool has_osl; /* Support Open Shading Language. */
bool has_guiding; /* Support path guiding. */
bool has_profiling; /* Supports runtime collection of profiling info. */
bool has_peer_memory; /* GPU has P2P access to memory of another GPU. */
bool has_gpu_queue; /* Device supports GPU queue. */
bool use_hardware_raytracing; /* Use hardware instructions to accelerate ray tracing. */
bool use_metalrt_by_default; /* Use MetalRT by default. */
KernelOptimizationLevel kernel_optimization_level; /* Optimization level applied to path tracing
* kernels (Metal only). */
DenoiserTypeMask denoisers; /* Supported denoiser types. */
int cpu_threads;
/* used for user preferences, should stay fixed with changing hardware config */
string id = "CPU";
int num = 0;
bool display_device = false; /* GPU is used as a display device. */
bool has_nanovdb = false; /* Support NanoVDB volumes. */
bool has_mnee = true; /* Support MNEE. */
bool has_osl = false; /* Support Open Shading Language. */
bool has_guiding = false; /* Support path guiding. */
bool has_profiling = false; /* Supports runtime collection of profiling info. */
bool has_peer_memory = false; /* GPU has P2P access to memory of another GPU. */
bool has_gpu_queue = false; /* Device supports GPU queue. */
bool use_hardware_raytracing = false; /* Use hardware instructions to accelerate ray tracing. */
bool use_metalrt_by_default = false; /* Use MetalRT by default. */
KernelOptimizationLevel kernel_optimization_level =
KERNEL_OPTIMIZATION_LEVEL_FULL; /* Optimization level applied to path tracing
* kernels (Metal only). */
DenoiserTypeMask denoisers = DENOISER_NONE; /* Supported denoiser types. */
int cpu_threads = 0;
vector<DeviceInfo> multi_devices;
string error_msg;

DeviceInfo()
{
type = DEVICE_CPU;
id = "CPU";
num = 0;
cpu_threads = 0;
display_device = false;
has_nanovdb = false;
has_mnee = true;
has_osl = false;
has_guiding = false;
has_profiling = false;
has_peer_memory = false;
has_gpu_queue = false;
use_hardware_raytracing = false;
use_metalrt_by_default = false;
kernel_optimization_level = KERNEL_OPTIMIZATION_LEVEL_FULL;
denoisers = DENOISER_NONE;
}
DeviceInfo() = default;

bool operator==(const DeviceInfo &info) const
{
Expand Down
2 changes: 1 addition & 1 deletion intern/cycles/device/hip/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ bool hipSupportsDriver()
{
# ifdef _WIN32
# ifndef WITH_HIP_SDK_5
/* This check is only neccesary if we're using HIP SDK 6 or newer. */
/* This check is only necessary if we're using HIP SDK 6 or newer. */
int hip_driver_version = 0;
hipError_t result = hipDriverGetVersion(&hip_driver_version);
if (result != hipSuccess) {
Expand Down
20 changes: 13 additions & 7 deletions intern/cycles/device/hiprt/device_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ HIPRTDevice::HIPRTDevice(const DeviceInfo &info,
return;
}

hiprtSetLogLevel(hiprtLogLevelNone);
if (VLOG_DEBUG_IS_ON) {
hiprtSetLogLevel(hiprtLogLevelInfo | hiprtLogLevelWarn | hiprtLogLevelError);
}
else {
hiprtSetLogLevel(hiprtLogLevelNone);
}
}

HIPRTDevice::~HIPRTDevice()
Expand Down Expand Up @@ -761,6 +766,9 @@ void HIPRTDevice::build_blas(BVHHIPRT *bvh, Geometry *geom, hiprtBuildOptions op
break;
}

case Geometry::LIGHT:
return;

default:
assert(geom_input.geomType != hiprtInvalidValue);
}
Expand Down Expand Up @@ -805,7 +813,7 @@ void HIPRTDevice::build_blas(BVHHIPRT *bvh, Geometry *geom, hiprtBuildOptions op
}

hiprtScene HIPRTDevice::build_tlas(BVHHIPRT *bvh,
vector<Object *> objects,
const vector<Object *> &objects,
hiprtBuildOptions options,
bool refit)
{
Expand Down Expand Up @@ -1097,18 +1105,16 @@ void HIPRTDevice::build_bvh(BVH *bvh, Progress &progress, bool refit)
HIPContextScope scope(this);

if (!bvh_rt->is_tlas()) {
vector<Geometry *> geometry = bvh_rt->geometry;
const vector<Geometry *> &geometry = bvh_rt->geometry;
assert(geometry.size() == 1);
Geometry *geom = geometry[0];
build_blas(bvh_rt, geom, options);
build_blas(bvh_rt, geometry[0], options);
}
else {

const vector<Object *> objects = bvh_rt->objects;
if (scene) {
hiprtDestroyScene(hiprt_context, scene);
}
scene = build_tlas(bvh_rt, objects, options, refit);
scene = build_tlas(bvh_rt, bvh_rt->objects, options, refit);
}
}
CCL_NAMESPACE_END
Expand Down
2 changes: 1 addition & 1 deletion intern/cycles/device/hiprt/device_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class HIPRTDevice : public HIPDevice {
hiprtGeometryBuildInput prepare_point_blas(BVHHIPRT *bvh, PointCloud *pointcloud);
void build_blas(BVHHIPRT *bvh, Geometry *geom, hiprtBuildOptions options);
hiprtScene build_tlas(BVHHIPRT *bvh,
vector<Object *> objects,
const vector<Object *> &objects,
hiprtBuildOptions options,
bool refit);

Expand Down
15 changes: 13 additions & 2 deletions intern/cycles/device/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ string device_kernel_mask_as_string(DeviceKernelMask mask)
{
string str;

for (uint64_t i = 0; i < sizeof(DeviceKernelMask) * 8; i++) {
if (mask & (uint64_t(1) << i)) {
for (uint64_t i = 0; i < mask.size(); i++) {
if (mask.test(i)) {
if (!str.empty()) {
str += " ";
}
Expand All @@ -190,6 +190,17 @@ string device_kernel_mask_as_string(DeviceKernelMask mask)

return str;
}

bool DeviceKernelMask::operator<(const DeviceKernelMask &other) const
{
for (size_t i = 0; i < size(); i++) {
if (test(i) ^ other.test(i)) {
return other.test(i);
}
}

return false;
}
#endif

CCL_NAMESPACE_END
10 changes: 9 additions & 1 deletion intern/cycles/device/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@

# include "util/string.h"

# include <bitset>
# include <iosfwd>
#endif

CCL_NAMESPACE_BEGIN

/* DeviceKernel */

bool device_kernel_has_shading(DeviceKernel kernel);
bool device_kernel_has_intersection(DeviceKernel kernel);

Expand All @@ -22,7 +25,12 @@ const char *device_kernel_as_string(DeviceKernel kernel);
#ifndef __KERNEL_ONEAPI__
std::ostream &operator<<(std::ostream &os, DeviceKernel kernel);

using DeviceKernelMask = uint64_t;
/* DeviceKernelMask */

struct DeviceKernelMask : public std::bitset<DEVICE_KERNEL_NUM> {
bool operator<(const DeviceKernelMask &other) const;
};

string device_kernel_mask_as_string(DeviceKernelMask mask);
#endif

Expand Down
Loading

0 comments on commit 0c0c0cf

Please sign in to comment.