1
1
Commit Graph

124342 Commits

Author SHA1 Message Date
905d1c71b9 Cycles: record path guiding information for dedicated shadow ray
A flag was not enough for this, we actually need to pass along the MIS weight,
so we can compute the direct contribution without the MIS weight.

Pull Request: blender/blender#108195
2023-05-23 16:48:30 +02:00
19f46e1cae Merge branch 'main' into cycles-light-linking 2023-05-23 14:10:30 +02:00
61ed5b3d24 Depsgraph: Add explicit object collection hierarchy tracking
The practical problem this change addresses is ability to have base
flag dependent functionality in Cycles without re-setting the render
on selection. This problem initially arose during the Cycles light
linking project.

The original review happened there:

    blender/blender#105837

Pull Request: blender/blender#108182
2023-05-23 14:02:45 +02:00
94f5ea9731 Refactor instanced collection relation builder in depsgraph
Move the instancing related code to a dedicated function, leaving
the generic `build_collection()` dedicated to the building of the
collection itself.

Should be no functional changes: the code paths should effectively
still be the same. This is because non-instancing cases were passing
object as a null pointer, disabling the non-generic code path.
2023-05-23 14:02:44 +02:00
493856427d Cycles: bumping OpenPGL minimum version to 0.5 and removing version checks 2023-05-23 13:23:09 +02:00
40484a6586 Cleanup: Silence unused parameters warnings 2023-05-23 14:14:07 +03:00
e54a20b2a2 Cleanup: Remove unused collection pointer from depsgraph builder
Pull Request: blender/blender#108177
2023-05-23 12:35:23 +02:00
a9beb62449 EEVEE-Next: Fix int3 packing with MSL 2023-05-23 12:30:29 +02:00
07c59041ac GPU: Add packed_int3 for SSBO/UBO struct alignment
MSL require to use packed_int3 for compatibility
with GLSL memory layout.
2023-05-23 12:17:01 +02:00
4997748e5e Vulkan: Select Compatible Render Surface
In previous implementation the first available render surface was
selected. For NVIDIA platform this was the correct one, but for
AMD and Intel GPUs this was incorrect. This PR goes over all the
available render surfaces and selects a compatible one.

For now when no compatible render surface is found it will still select
the first available one. With the expectation that the screen is drawn
incorrectly and users would report a bug so we can investigate.

Pull Request: blender/blender#108169
2023-05-23 11:03:53 +02:00
9397bc1ed4 Merge branch 'main' into cycles-light-linking 2023-05-23 09:23:14 +02:00
793446cbdc BLI: Replace some macros with inlined functions for C++
Covers the macro ARRAY_SIZE() and STRNCPY.

The problem this change is aimed to solve it to provide cross-platform
compiler-independent safe way pf ensuring that the functions are used
correctly.

The type safety was only ensured for GCC and only for C. The C++
language and Clang compiler would not have detected issues of passing
bare pointer to neither of those macros.

Now the STRNCPY() will only accept a bounded array as the destination
argument, on any compiler.

The ARRAY_SIZE as well, but there are a bit more complications to it
in terms of transparency of the change.

In one place the ARRAY_SIZE was used on float3 type. This worked in the
old code because the type implements subscript operator, and the type
consists of 3 floats. One would argue this is somewhat hidden/implicit
behavior, which better be avoided. So an in-lined value of 3 is used now
there.

Another place is the ARRAY_SIZE used to define a bounded array of the
size which matches bounded array which is a member of a struct. While
the ARRAY_SIZE provides proper size in this case, the compiler does not
believe that the value is known at compile time and errors out with a
message that construction of variable-size arrays is not supported.

Solved by converting the field to std::array<> and adding dedicated
utility to get size of std::array at compile time. There might be a
better way of achieving the same result, or maybe the approach is
fine and just need to find a better place for such utility.

Surely, more macro from the BLI_string.h can be covered with the C++
inlined functions, but need to start somewhere.

There are also quite some changes to ensure the C linkage is not
enforced by code which includes the headers.

Pull Request: blender/blender#108041
2023-05-23 09:21:45 +02:00
a5677d225b Refactor Render Result to allow implicit buffer sharing
Allows to share buffer data between the render result and image buffers.

The storage of the passes and buffers in the render result have been
wrapped into utility structures, with functions to operate on them.

Currently only image buffers which are sharing buffers with the render
results are using the implicit sharing. This allows proper decoupling of
the image buffers from the lifetime of the underlying render result.

Fixes #107248: Compositor ACCESS VIOLATION when updating datablocks from handlers

Additionally, this lowers the memory usage of multi-layer EXR sequences
by avoiding having two copies of render passes in memory.

It is possible to use implicit sharing in more places, but needs
some API to ensure the render result is the only owner of data before
writing to its pixels.

Pull Request: blender/blender#108045
2023-05-23 09:19:37 +02:00
495e4f2d0e PyAPI: remove deprecated 2D_/3D_ prefix (update docs) 2023-05-23 16:24:08 +10:00
9a8fd2f1dd PyAPI: remove deprecated 2D_/3D_ prefix for built-in shader names
Names passed to gpu.shader.from_builtin()
no longer skip the 2D_/3D_ prefix.
2023-05-23 15:51:54 +10:00
fd68f977e0 PyAPI: remove dpi from BLF doc-string
Missed from recent removal of the argument.
2023-05-23 15:45:55 +10:00
7bc34283ea PyAPI: Operator.bl_property no longer defaults to "type"
This hard-coded assumption meant that operators would behave as if
bl_property = "type" was assigned in the operator - when the variable
wasn't found.

Remove the hard coded name. Operators that depended on this now need
to assign bl_property = "type" in the operator class explicitly.

Remove this because it wasn't documented as means operator behavior
could change unexpectedly when renaming a property.
2023-05-23 15:38:33 +10:00
345fc2b1f6 PyAPI: remove deprecated bpy.app.version_char 2023-05-23 15:25:47 +10:00
472e6563b0 Cleanup: replace strncpy calls with BLI_strncpy
Prefer BLI_strncpy as it ensures the string is null terminated.
2023-05-23 15:09:58 +10:00
d1cc16913d PyAPI: use faster argument parsing for internal bpy.ops call & poll
No functional changes.
2023-05-23 14:55:37 +10:00
ac263a9bce PyAPI: remove context override argument from bpy.ops
Remove deprecated context override argument to operator execution and
poll() method in favor of context.temp_override().
2023-05-23 14:34:09 +10:00
ab5fc46872 PyAPI: remove deprecated Mesh.calc_normals 2023-05-23 13:02:12 +10:00
8d2679e1c5 Fix wrong buffer size passed to snprintf, use BLI_snprintf
Also remove redundant call to snprintf.
2023-05-23 12:46:55 +10:00
9357f7b606 PyAPI: remove deprecated blf.size() dpi argument
Scripts can be updated by scaling the font size, e.g.

blf.size(id, size, dpi) -> blf.size(id, size * (dpi / 72.0))
2023-05-23 12:02:10 +10:00
7fbac7e235 UI: set the waiting cursor from pack/unpack operators
Remove the guimode argument which used to set the cursor back in v2.4x.
2023-05-23 11:58:20 +10:00
ad87bf3dc7 Cleanup: spelling, wording improvements 2023-05-23 11:50:34 +10:00
63074dddb1 Merge branch 'blender-v3.6-release' 2023-05-23 11:34:50 +10:00
bceb1adb20 Fix potential buffer overflow in AssetList::setup
While in practice an overflow seems unlikely in this particular case,
internal path manipulation assume FILE_MAX_LIBEXTRA so passing in
smaller buffer sizes is error prone.
2023-05-23 11:30:52 +10:00
5659e83e04 Cleanup: remove incorrect use of the r_ prefix, use sized argument
Rename `r_dir` to `dirpath` as this isn't a return only argument.
Also add the maximum size in the argument as a hint for the maximum size.
2023-05-23 11:21:02 +10:00
c440efb23a Fix invalid buffer size used in ED_asset_handle_get_full_library_path
Relatively harmless as the length was shorter, however all callers
used the larger size.
2023-05-23 10:56:22 +10:00
6ac6e63eaf Merge branch 'blender-v3.6-release' 2023-05-23 10:52:24 +10:00
93ca0444f3 Fix #108129: exception editing custom properties
Regression in [0], caused by the sub-type enum not containing NONE.

[0]: 6e2721da30
2023-05-23 10:50:36 +10:00
2c1338f67b Merge branch 'blender-v3.6-release' 2023-05-23 10:19:09 +10:00
7d682fa107 Fix missing include 2023-05-23 10:18:02 +10:00
c06e8f6549 UI: Change tooltip for edit mode display shapekey
Change terminology from Apply to Display.
Apply suggests a destructive change to
the base mesh.

Display is also used in modifiers.
2023-05-22 17:15:38 -06:00
6609ca4593 UI: Shapekey pin tooltip change
Use correct terminology "value" vs strength
2023-05-22 16:45:53 -06:00
f85fb56a4a Merge branch 'blender-v3.6-release' 2023-05-23 09:41:01 +12:00
43fe7bec4f Cleanup: format 2023-05-23 09:38:47 +12:00
a569344a81 Fix: Build error from ae9ac99d2b 2023-05-23 09:38:07 +12:00
ae9ac99d2b Fix #108117: Crash in uv editor with hidden geometry
Many "UV island" style operations internally use #UvElementMap, including:

- Transform tools
- Smart-Stitch
- UV Pinch, UV Grab and UV Relax sculpt tools.

Normally, every UV in the mesh is included in the #UvElementMap.
However, with hidden geometry, only the visible geometry is included in the map. [0]
This change enforces stricter usage, reducing the chance of crashes in other areas.

Regression from [0] which was a fix for "UV Island calculation doesn't ignore hidden faces" [1].

[0]: 8f543a73ab
[1]: #99659

Pull Request: blender/blender#108130
2023-05-22 23:23:23 +02:00
ae405639e7 Metal: Stencil texture view support
Adds stencil texture view support for Metal, allowing reading of
stencil component during texture sample/read.

Stencil view creation refactored to use additional parameter in
textureview creation function, due to deferred stencil parameter
causing double texture view creation in Metal, when this should
ideally be provided upfront.

Authored by Apple: Michael Parkin-White

Pull Request: blender/blender#107971
2023-05-22 20:40:38 +02:00
5eab240f7f Merge branch 'blender-v3.6-release' 2023-05-22 18:53:56 +02:00
e25d58a866 I18n: Updated UI translations from SVN trunk (r6538). 2023-05-22 18:52:33 +02:00
ce7b006136 Fix light linking crash when raytrace shaders are used
When light-linked mesh emitter has raytrace dependent node (such as
bevel) OptiX render would have failed with an invalid address.

Pull Request: blender/blender#108154
2023-05-22 17:54:12 +02:00
4080cf1232 Refactor: change light linking object storage be dynamically allocated
To reduce memory usage of Object a bit when no light linking is in use.

Pull Request: blender/blender#108090
2023-05-22 17:51:03 +02:00
c93bb9f323 LibOverride: Minor improvement to recent liboverride API changes.
Avoid two GHash lookups when deleting an override property by its RNA
path.
2023-05-22 17:15:13 +02:00
e2fbf0193f Merge branch 'main' into cycles-light-linking 2023-05-22 17:09:26 +02:00
7d416ece82 Cleanup: fix compiler warnings 2023-05-22 17:08:50 +02:00
f9ec539a51 Merge branch 'blender-v3.6-release' 2023-05-22 10:55:21 -04:00
24ca886ac0 Revert "Animation: Update NLA "TAB" tweak mode to be full stack evaluation"
This reverts commit 0f67ac4547.
2023-05-22 10:54:57 -04:00