Commit Graph

13341 Commits

Author SHA1 Message Date
Campbell Barton
d288b73062 Merge branch 'blender-v4.0-release' 2023-10-18 14:40:42 +11:00
Campbell Barton
df6cedeee1 Merge branch 'blender-v4.0-release' 2023-10-18 14:40:39 +11:00
Campbell Barton
176218fce1 Merge branch 'blender-v4.0-release' 2023-10-18 14:40:34 +11:00
Campbell Barton
d35dd83701 Merge branch 'blender-v4.0-release' 2023-10-18 14:40:31 +11:00
Campbell Barton
3eda5a114f Fix Wayland/LIBDECOR window size on startup without a hack
The USE_LIBDECOR_FRACTIONAL_SCALE_HACK worked on my system but made
window size issues worse in older versions of GNOME, see: #109194.

Replace the hack with logic to set the window size using frational
scaling information from the output.
2023-10-18 14:37:12 +11:00
Campbell Barton
bafb36f8bc Fix glitches resizing windows on Wayland, LIBDECOR & fractional scaling
When fractional scaling is used, window sizes from LIBDECOR are still
divided by the window-decorations internal buffer scale which doesn't
match the GHOST window (always 1 in the case of fractional scale).

Also resolve glitches caused by recalculating the window size when
no size change was intended. In this case reuse LIBDECOR's internal
size so there are never any changes (caused by rounding for e.g.).
2023-10-18 14:37:11 +11:00
Campbell Barton
3ad21b2169 Fix invalid surface size under Wayland when GHOST set the window size
When the window manager set the window size, there were no checks
the size is a multiple of the buffer scale (a requirement for Wayland).

This meant setting the window size could exit Blender without warning
if an invalid window size was set.
2023-10-18 14:37:09 +11:00
Campbell Barton
46159c131d Cleanup: add rounding utilities for GHOST/Wayland
Prepare for fixes that use add additional rounding.
2023-10-18 14:37:08 +11:00
Campbell Barton
89efeedd5b Merge branch 'blender-v4.0-release' 2023-10-16 10:35:45 +11:00
Campbell Barton
db36c9f204 Merge branch 'blender-v4.0-release' 2023-10-16 10:35:42 +11:00
Campbell Barton
f95ee3e871 Fix incorrect window decoration size with Wayland & libdecor on startup
When fractional scaling was used with libdecor the window decorations
would not match the window size on startup, drawing small and on top
of Blender's window.
While there are still glitches with fractional-scaling & libdecor
(which doesn't support fractional scaling),
see #109194 this at least resolves one of the worst issues.
2023-10-16 10:01:00 +11:00
Campbell Barton
e8f2c3e45f GHOST/Wayland: don't preempt new windows buffer fractional scale
When a new window is created the final buffer scale isn't known
so setting the buffer scale assuming the final state was just a guess
and only had the minor advantage of preventing rounding the window size
on startup.

Removing this to resolve a bug with LIBDECOR & fractional scaling
relating to #109194 (will commit separately).
2023-10-16 09:50:44 +11:00
Jeroen Bakker
8ebe7d98d7 Vulkan: Remove Renderdoc Extension
When running Blender inside renderdoc an extension can be used to print
from any shader stage to the console. This is useful during developing,
but not so during running/triaging. For now we remove the extension to
not confuse by incorrect error messages.

Pull Request: https://projects.blender.org/blender/blender/pulls/113654
2023-10-13 11:35:56 +02:00
Jeroen Bakker
159e798cdb Vulkan: Add Viewport Array/Layer Workarounds
This PR adds workarounds for platforms that don't support `shaderOutputLayer`
or `shaderOutputViewportIndex`. Some NVIDIA laptop GPUs and ARM GPUs don't
have those device features.

The workaround uses the same approach as OpenGL. A geometry shader is injected
to emulate the feature.

For testing the workarounds they have also been connected to the
`--debug-gpu-force-workarounds` command line argument.

Fixes #113475 by implementing #113529

Pull Request: https://projects.blender.org/blender/blender/pulls/113605
2023-10-13 10:40:11 +02:00
Campbell Barton
ac82a7c3f8 Merge branch 'blender-v4.0-release' 2023-10-13 17:32:55 +11:00
Campbell Barton
5e6a34ac6c Fix memory leak with Wayland drag & drop
The data-offer for drag & drop wasn't freed when cancelled or not
dropped on a Blender owned surface.
2023-10-13 17:31:02 +11:00
Campbell Barton
c814c0295d Merge branch 'blender-v4.0-release' 2023-10-13 15:46:41 +11:00
Campbell Barton
3e9403bd76 Fix drag & drop crash when dragging over window decorations on Wayland
Missing null checks for drag events for non-GHOST surfaces
(typically window decorations).
2023-10-13 15:34:21 +11:00
Campbell Barton
3180f16cef Merge branch 'blender-v4.0-release' 2023-10-12 14:20:26 +11:00
Campbell Barton
3d90af5ae1 Merge branch 'blender-v4.0-release' 2023-10-12 14:20:19 +11:00
Campbell Barton
ecde39baf3 Fix #113328: Wrong startup window size with fractional scale on Wayland
The output's XDG scale wasn't available at startup, add a round-trip
to resolve this.
2023-10-12 14:18:53 +11:00
Campbell Barton
ee15925716 Fix incorrect screen-size under Wayland with transformed outputs
- The transform was incorrectly accessed as a flag.
- Missing checks for 270 degree rotation.
2023-10-12 14:18:51 +11:00
Harley Acheson
0deb4f3e98 Merge branch 'blender-v4.0-release' 2023-10-11 18:34:04 -07:00
Harley Acheson
6aeadce34b UI: Win32 Warp Margin Adjustment
Windows mouse warping bounds margin needs to be different when not
GHOST_kGrabHide, or else the visible wrapping occurs within the
area at an odd location. Making it 2, like it used to be.
2023-10-11 18:32:11 -07:00
Harley Acheson
fba58a1483 Merge branch 'blender-v4.0-release' 2023-10-11 16:05:09 -07:00
Harley Acheson
67e4af3ea1 Fix #113511: Win32 Warping Needs Screen Edge Margin
Windows mouse warping requires a margin when the bounds are at screen
edge. Setting a margin of 10% of bounds width tests sufficient.

Pull Request: https://projects.blender.org/blender/blender/pulls/113565
2023-10-12 01:03:53 +02:00
Campbell Barton
db093a4608 Merge branch 'blender-v4.0-release' 2023-10-12 09:27:43 +11:00
Campbell Barton
b8ad624006 Cleanup: use doxygen doc-strings, spelling in comments 2023-10-12 09:26:53 +11:00
Brecht Van Lommel
59f8712040 Merge branch 'blender-v4.0-release' into main 2023-10-11 21:14:05 +02:00
Brecht Van Lommel
09046e8121 Fix #113461: Cycles subsurface artifacts with volume interior
Ignore self for the volume stack update from the the subsurface entry to
the exit point. This was meant for other objects only.
2023-10-11 21:13:28 +02:00
Brecht Van Lommel
5baf173609 Fix #113527: Cycles OSL crash with empty closure for layering 2023-10-11 21:12:57 +02:00
Alaska
4f5e684e24 Fix Cycles OSL geometry node point cloud inconsistency
Update the OSL script for the "Geometry" node to follow the correct
Tangent code path when working with point clouds.

There should be no functional change for the end user since the correct
code path was already taken by accident.

Pull Request: https://projects.blender.org/blender/blender/pulls/113472
2023-10-11 21:05:41 +02:00
Sergey Sharybin
79dc2c7672 Merge branch 'blender-v4.0-release' 2023-10-11 19:12:12 +02:00
Sergey Sharybin
534e7f4470 Fix #112935: Wrong window order handling on macOS 14
The issue was caused by the custom code which was ensuring that closing
About window does not leave application without any key
windows.

Turns out that the windowWillClose is executed when menu is closed,
forcing the custom code to ensure a key window.

The solution is to only perform manual re-ordering if the closing window
was a key window. This both keeps old behavior of ensuring there is a
key window after closing About, and solves the ordering issues when a
window is created or activated via menus.

Pull Request: https://projects.blender.org/blender/blender/pulls/113515
2023-10-11 19:11:41 +02:00
Xavier Hallade
5aed85dcd7 Cycles: oneAPI: query graphics compiler for supported targets
In case a target isn't supported by the graphics compiler, it will be
filtered out from the target architectures to build for.

Pull Request: https://projects.blender.org/blender/blender/pulls/112669
2023-10-11 18:19:48 +02:00
Xavier Hallade
79b9fff399 Revert "Cycles: oneAPI: query graphics compiler for supported targets"
This reverts commit ad8c5fd441.
As it's currently failing on linux buildbot.
2023-10-11 15:44:55 +02:00
Sergey Sharybin
36e603c430 Cycles: Add option to control smoothing when using bump map
Cycles implements the "Taming the Shadow Terminator" paper by Matt Jen-Yuan
Chiang to solve shadow terminator issues when a bump map is applied, as well
as similar approach for the glossy reflection to ensure ray does not get
reflected to inside of the object.

This correction term is applied unconditionally, which makes it harder to have
full control over shading via normals for stylistic reasons.

This change exposes this corrective term as an option called "Bump Map
Correction" which is available in the shader settings next to the
"Transparent Shadows".

The reason to make it per-shader rather than per-object is to allow flexibility
of a control: it is possible that an object has multiple shaders attached to it,
and only some of them used for bump mapping. Another, and possibly stronger
reason to have it per-shader is ease of assets control: shader brings settings
which are needed for its proper behavior. So if material at some point
decides to take over normals, artists would not need to update settings on
every asset which uses that material.

The option is enabled by default, so there is no changes for existing setups.

Pull Request: https://projects.blender.org/blender/blender/pulls/113480
2023-10-11 15:07:21 +02:00
Xavier Hallade
ad8c5fd441 Cycles: oneAPI: query graphics compiler for supported targets
In case a target isn't supported by the graphics compiler, it will be
filtered out from the target architectures to build for.
2023-10-11 14:59:26 +02:00
Xavier Hallade
c4b49aa391 Cycles: oneAPI: rename target intel arch cmake setting
CYCLES_ONEAPI_SPIR64_GEN_DEVICES -> CYCLES_ONEAPI_INTEL_BINARIES_ARCH
so it's more aligned with the name for the other backends, such as
CYCLES_CUDA_BINARIES_ARCH.
2023-10-11 14:59:26 +02:00
Xavier Hallade
ef80392721 Cycles: oneAPI: update windows ocloc to 101.4723
The first public Windows driver version with a higher number is
101.4824, so we bump the min-required driver version on Windows to this
one to ensure compatibility.
2023-10-11 14:47:48 +02:00
Campbell Barton
b0a6c6c1de Merge branch 'blender-v4.0-release' 2023-10-11 10:44:23 +11:00
Campbell Barton
58442a420e Cleanup: comment for release configuration, quote-style & remove parens 2023-10-11 10:41:16 +11:00
Campbell Barton
5e7a85539d Merge branch 'blender-v4.0-release' 2023-10-10 11:06:29 +11:00
Campbell Barton
951ae52912 GHOST/Wayland: disable assert which can happen during debugging 2023-10-10 11:04:36 +11:00
Campbell Barton
137f8dd7bc Cleanup: spelling in comments 2023-10-10 09:44:57 +11:00
Harley Acheson
a6a4d45538 Merge branch 'blender-v4.0-release' 2023-10-09 13:10:22 -07:00
Harley Acheson
1d141e721c Fix #109968: Allow Warping on Actual Mouse Bounds
For Color Circle (and Square) and for Walk Navigation, use the actual
region bounds for mouse warping.

Pull Request: https://projects.blender.org/blender/blender/pulls/113066
2023-10-09 22:09:04 +02:00
Brecht Van Lommel
5bb729b155 Merge branch 'blender-v4.0-release' into main 2023-10-09 19:19:11 +02:00
Alaska
85c4df2c42 Cycles: Update Glass BSDF to generalized_schlick
Update the Glass BSDF to internally use Generalized Schlick fresnel.
This allows for easier expansion of certain features in the future.

There should be no functional change from the users perspective.

Pull Request: https://projects.blender.org/blender/blender/pulls/112701
2023-10-09 19:17:15 +02:00
Brecht Van Lommel
03b2523df8 Merge branch 'blender-v4.0-release' into main 2023-10-09 16:14:39 +02:00