Commit Graph

127546 Commits

Author SHA1 Message Date
Bastien Montagne
fcf10bea86 I18N: Updated UI translations from SVN trunk (r6686). 2023-09-04 19:06:43 +02:00
Clément Foucault
3973dc080e Fix: GPU: Fix shader builder option not building
This was caused by the recent change in DNA headers
making all extern data C++.
2023-09-04 19:04:44 +02:00
Jason Fielder
68c4e05427 GPU: Add support for rasterization order groups
Enables performance optimizations and new rendering
features through allowing colour attachments to be
tagged with a rasterization order group. This means that
all accesses to the same pixel location are guaranteed
to happen in submission order.

This lays the ground work for tile-based architecture
optimizations, enabling additional features for
deferred rendering which allow subsequent passes
which operate on pixel data to occur in order, while
memory remains on-tile.

This patch allows fragment outputs to be tagged
with a raster order group and also adds a new
FragmentTileIn parameter to a shader, which allows
speciication of incoming parameters from a previous
draw.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/111748
2023-09-04 18:45:40 +02:00
Jason Fielder
503bdbf777 GPU: Add clear color support to explicit FB LoadStore state
Enhance custom framebuffer binding state to allow
specification of clear color as part of the loadstore
state at framebuffer bind time.

This ensures all parameters controlling attachment
loading and storage behaviour can be explicitly
specified when binding a framebuffer.

This change enables optimizations which leverage
explicit framebuffer load store state to also specify
a clear color without prematurely triggering a
clear which may occur independently to
render work when using GPU_framebuffer_clear(..).

Authored by Apple: Michael Parkin-White.

Pull Request: https://projects.blender.org/blender/blender/pulls/111810
2023-09-04 18:30:54 +02:00
Julian Eisel
ba03948dd2 Cleanup: Move BKE preview image code to separate file
Previously, BKE level preview image code was in `BKE_icons.h` and `icons.hh`.
While these types are related, I always found this quite hard to navigate since
preview image stuff was just in the middle of icon functions. Plus, people
don't expect preview image functions in icon files, the relationship is not
obvious.

Instead, use focused files that make it easy to quickly navigate them
and see what they are dealing with.

Pull Request: https://projects.blender.org/blender/blender/pulls/111709
2023-09-04 18:02:16 +02:00
Colin Marmond
372b007a56 Fix #111508: Shader node previews crash when deleting common output
The node-tree does not necessarily contain an output node, so it has to
be checked, as well as the existence of the socket.

Pull Request: https://projects.blender.org/blender/blender/pulls/111604
2023-09-04 18:00:23 +02:00
salipourto
359bbf6af2 Fix Cycles HIP RT issues with curves and transparent shadows
Ref #104110

Pull Request: https://projects.blender.org/blender/blender/pulls/111414
2023-09-04 17:55:21 +02:00
Brecht Van Lommel
526f935981 Fix broken OPTIX_ROOT_DIR environment variable for setting up build
Changes in 42713bf made it ignore the environment variable if there is a
defined but empty CMake variable. Also make similar changes for other
GPU compute APIs, to guard against future problems like this.

Pull Request: https://projects.blender.org/blender/blender/pulls/111928
2023-09-04 17:28:00 +02:00
Damien Picard
564bbdf6e7 I18n: disambiguate and extract a few messages
This commit disambiguates the following messages:

- Sequencer effect strip types: use "Sequence" context in relevant
  places, as that is already extracted as part of the
  `sequencer_prop_effect_types` enum, and more specific.
- "Language" (a natural or programming language)
- "Flat" (gender)
- "Smooth" (action or amount -- very partial disambiguation for now
  because this is all over the place)

It also extracts these messages:

- Newly created Freestyle data
  - LineStyle
  - LineSet
  - Modifiers
- "Registering panel class:" error message from RNA registration
- "Node must be run as tool" error message from tool geometry nodes

Ref #43295

Pull Request: https://projects.blender.org/blender/blender/pulls/111146
2023-09-04 16:16:26 +02:00
Bastien Montagne
9e129abcf2 Fix #111905: Filewrite: Do not write ShapeKeys of unused geometry.
This is more of a temp hack than a proper fix, proper solution would be
to make shapekeys actual embedded IDs (which they are, in all aspects
but actual implementation), and to address long-standing design tasks
about handling of unused data on file save (see #61209 and #87490).

But for now, simply do not write ShapeKeys IDs if they have no owner, or
their owner has no user (and is therefore also not written to disk).
2023-09-04 16:14:23 +02:00
Bastien Montagne
ad60d40ed3 Cleanup: Move 'uneditable' info message about item renaming in Outliner to INFO.
These are not actually warnings, but merely info for the user.

NOTE: A good chunk of these messages are aguably useless actually,
saying 'you cannot rename this' does not add any info for the user...

Better/more informative wording (or removal) of some of these messages
is left for later.
2023-09-04 16:14:23 +02:00
Julian Eisel
4c8847ec4f Cleanup: Remove extern "C" from DNA headers
`extern "C"` did not actually have an effect here since it only impacts
name mangling of functions, not structs (or other class types). Now this
can get in the way when we add C++ blocks with functions , e.g.
templates are not allowed in code with C-linkage.

Most of these were added in ad4b7741db, even though it was known that
this doesn't have any impact. Reason was because developers thought they
would have to add that to all direct and indirect includes to be able to
use a header in C++ (a common misconception). Now with most files
compiled in C++, it's obvious that this isn't the case.

Pull Request: https://projects.blender.org/blender/blender/pulls/111926
2023-09-04 15:59:40 +02:00
Nikita Sirgienko
56ff55ed09 Cycles: oneAPI: Resolve an compilation error in assert 2023-09-04 15:41:05 +02:00
Jason Fielder
fa9e3e38d7 Metal: Compute bind state cleanup and debugging
Removes old unused bind state parameters from
prior to the addition of explicit resource location support.

Patch also ensures compute state is reset between each
encoder and adds a debug option to dispatch each
compute command within its own encoder for debugging
synchronization issues.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/111753
2023-09-04 15:29:09 +02:00
Jason Fielder
c375e9725f GPU: Add support for memoryless textures
Memoryless textures are only used as intermediate attachments
during rasterization, but do not have any backing storage. This is
particularly useful if a virutal framebuffer is needed, or, there is
a situation where a depth buffer is only needed within the pass
itself and the results are discarded once the pass completes.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/111749
2023-09-04 15:27:50 +02:00
Jason Fielder
109bc2d416 GPU: Add imageStoreFast for increased write performance
imageStoreFast provides a variant of imageStore which does
not perform any bounds checking, reducing shader divergence,
register pressure and increasing performance through fewer
instructions.

However, this should only be used for cases where the writing
coordinate is guaranteed to fall within the texture.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/111750
2023-09-04 15:15:55 +02:00
Brecht Van Lommel
19da2fba83 Fix macOS Arm build of OSL library dependency
This patch is already in upstream, so this is temporary until we upgrade
to the latest OSL version.

Ref #110708
2023-09-04 15:08:02 +02:00
Jason Fielder
5cf7089e43 GPU: Ensure usage of gpu_Layer is specified
Some shaders using gl_Layer/gpu_Layer were missing
the correct usage bit in the shader create info. Shaders
also need to inherit feature usage bits from included
additional_info.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/111751
2023-09-04 15:06:20 +02:00
Jason Fielder
5fb952a1a6 EEVEE Next: Resolve out of bounds reads in shadows
Resource IDs and tile shfits often meant buffers were
accessed outside of their valid range. Patch ensures
resource IDs are unpacked and shift ranges are
shifted into the positive range to avoid inconsistent
behaviour with negative modulo operations.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/111808
2023-09-04 15:03:54 +02:00
Alexander Gavrilov
dee29f4e81 Armature: apply new DualQuat scale handling to constraints and crazyspace.
The f12e9f32b56ec7 patch introduced a new improved method of blending
dual quaternion transformations to handle combined scale and rotation
better. However, the changes were not complete:

* The new math ignored crazyspace computations, which need to compute
  a complete transformation matrix. As an optimization, the new method
  avoided fully computing the scale component, so the matrix would
  have no scale or shear.
* The Armature constraint is supposed to behave identically to the
  modifier, and it was not updated. The constraint also requires
  computing a complete matrix.

This change extracts the new math into a utility function, change
the optimization to be controlled by a parameter, and use the new
function in the constraint.

Pull Request: https://projects.blender.org/blender/blender/pulls/111759
2023-09-04 14:49:28 +02:00
Philipp Oeser
6cb96aea7c Fix: Outliner missing update adding asset nodegroups
Blender File view was not listing the new group under "Node Groups"
after import (this is not covered by ED_node_tree_propagate_change() -
and probably shouldnt).

Added the dedicated notifier for this case in the operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/111924
2023-09-04 12:46:22 +02:00
Philipp Oeser
30e3caaf82 Fix #111779: drop asset shading group to GN editor still imports
Dropbox poll function was not sufficiently checking compatibility, so we
could end up calling
`WM_drag_get_local_ID_or_import_from_asset`. The asset might not
actually be used because of further checks later (so it would end up as
an orphan which would go away after save/reload), but still the import
should be avoided.

This fixes the case for dropping a shader nodegroup to the Geometry
Nodes Editor by getting asset metadata (and checking if the nodetree
type matches editor) in the dropbox poll function.

Will check on other possible cases of drag-drop to incompatible editors
next.

Pull Request: https://projects.blender.org/blender/blender/pulls/111921
2023-09-04 12:43:56 +02:00
Clément Foucault
938d43c317 Fix: EEVEE-Next: Fix LUT translation unit hanging debug build 2023-09-04 11:43:02 +02:00
136b311196 Fix #111789: Anim, bone collections not created when linking armature
Linking the armature ID directly, instead of the object containing the
armature, did not run the versioning code to create bone collections
from armature layers and bone groups.

Bone groups cannot be versioned into bone collections in this case, as
they only exist on the Object.

Bone layers are now properly versioned.
2023-09-04 10:49:10 +02:00
Clément Foucault
102bdfaed7 Fix: EEVEE-Next: Ambiguous cast compilation error 2023-09-04 09:46:45 +02:00
Clément Foucault
30de3d7c1a EEVEE-Next: Move LUT to C++ and eevee-next folder 2023-09-03 17:22:31 +02:00
Clément Foucault
8fe1ec100b BLI: Math: Allow vector of 1 component 2023-09-03 16:43:45 +02:00
Clément Foucault
760aa0e917 Cleanup: EEVEE-Next: Rename LookUpTable to Precompute 2023-09-03 16:42:53 +02:00
Clément Foucault
ad71a04de0 EEVEE-Next: Fix G1_V term used to compute the GGX pdf
Thanks goes to @weizhen for spotting the mistake.
2023-09-03 16:42:53 +02:00
Clément Foucault
2aebfb596e Cleanup: EEVEE-Next: Rename G1 to G1_V to avoid confusion 2023-09-03 16:42:53 +02:00
Clément Foucault
2637bbf016 EEVEE-Next: Add LUT test
This avoid the generation code to become desync with
the precomputed tabled.

This is also a good way to test any changes to them.
2023-09-03 16:42:53 +02:00
Clément Foucault
7b54fce723 EEVEE-Next: Port LUT generation code
This ports the LUT using compute shader.
All LUT are computed by the same compute shader
to avoid boiler plate code to add new LUTs.

As for the generation code itself it is mostly the
same except for the use of `hammersley_2d` instead of
regular grid sampling. Regular grid did not improve
anything and was a bit more cumbersome.

This also bumps the number of samples very high
for more precision.

The new utility class for computing the LUT has
methods to write the content to a PFM image file
or as C++ array header.
2023-09-03 16:42:53 +02:00
Jacques Lucke
7d2c854261 Geometry Nodes: generalize modifier simulation cache storage names
The main goal here is to rename things in a way that makes sense for
simulation baking, but also for the upcoming bake node.

This also removes some versioning code from 3.6 which initialized the
default bake path. Baked data from back then can't be loaded anymore
anyway, and the way the default path is generated is different now as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/111845
2023-09-03 16:14:11 +02:00
Jacques Lucke
7f00cfeab4 Cleanup: move bake items code to separate namespace 2023-09-03 13:37:50 +02:00
Campbell Barton
0c11542708 Cleanup: rename check_spelling_c_config to check_spelling_config
This is used for GLSL/Python sources too.
2023-09-03 21:36:04 +10:00
Campbell Barton
e8c812a307 Cleanup: spelling in comments, update dictionary 2023-09-03 21:35:07 +10:00
Campbell Barton
9af2291541 check_spelling: rename check_spelling_osl -> check_spelling_shaders
- 'make check_spelling_shaders' now checks MSL & GLSL spelling.
- Add '--match' argument to 'check_spelling.py' for more configurable
  checks without relying on picking directories that only contain the
  desired file-type.
- Ignore spelling for scripts/addons & scripts/addons_contrib.
2023-09-03 21:35:07 +10:00
Jacques Lucke
d1c2b45836 Geometry Nodes: rename bdata to blob
Blob stands for "binary large object" and is a known term. I used to use the term `bdata`
to mean "binary data", mainly because I didn't think of a better name. Blob is a much
better name as it captures the intend of those files much better.

This change breaks existing bakes, because I rename the folder from `bdata` to `blobs`.
I think that is ok, because I also just broke bakes two days ago in a larger refactor
(e92c59bc9bcd69576b44425042c0168e6d3c3cfa).

Pull Request: https://projects.blender.org/blender/blender/pulls/111822
2023-09-03 12:33:59 +02:00
Campbell Barton
3082037743 Cleanup: spelling in comments 2023-09-03 16:15:01 +10:00
Campbell Barton
8ea2db5337 Cleanup: format, remove redundant trailing commas 2023-09-03 15:48:30 +10:00
Pratik Borhade
3d798e8486 Cleanup: Remove unused parameter
`relbase` is unsed after 1c0a1ae801a0d09a2c2ea1f863e7d941f0edeace
2023-09-03 10:22:20 +05:30
Clément Foucault
5ad7d81549 Cleanup: EEVEE-Next: Fix compilation warning and errors on Metal 2023-09-02 23:17:36 +02:00
Germano Cavalcante
7b0b2e4a5d Fix conditional logic in 'synced_selection' check
The conditional `(selected ? 0 : bm->totvert)` should be evaluated first.
2023-09-02 14:51:02 -03:00
Lukas Tönne
79a6a6977a Fix #111721: Node interface root panel flag missing
The file in question does not have the default (internal) root panel
flag for allowing child panels. This was probably saved before the flag
was added. A simple versioning snippet takes care of this case.

Pull Request: https://projects.blender.org/blender/blender/pulls/111828
2023-09-02 15:58:19 +02:00
Lukas Tönne
5a7df8f587 Fix #111817: Use new interface API in move-to-nodes operator
This also now supports sockets that have been marked both input and
output.

Pull Request: https://projects.blender.org/blender/blender/pulls/111824
2023-09-02 14:08:45 +02:00
Lukas Tönne
7ddf1820ff Fix #111763: Incorrect string copy function for default_attribute_name
`default_attribute_name` is an allocated string, unlike most other strings in `bNodeSocket`.

Pull Request: https://projects.blender.org/blender/blender/pulls/111823
2023-09-02 14:07:54 +02:00
Bastien Montagne
2698dbd6a4 Also pass relevant filedata to versioning code in linking code.
Folloup to bfdfde18e1, forgot to add this for the linking/appending code
path (similar change to what was done for the main blendfile readfile code).
2023-09-02 12:55:25 +02:00
Philipp Oeser
b0d5f3dc22 Fix #111711: bone collection visibility cannot be overridden
Since the switch from bone layers to bone collections in
998136f7a7b520ef10c998c5af744eb0d464fdd3, visibility could not be
overridden anymore. Moreso, layer visibility could also be toggled even in linked
state in 3.6 [those changes get lost on file reload, but it was still
useful and expected behavior].

Both are now restored.

Pull Request: https://projects.blender.org/blender/blender/pulls/111775
2023-09-02 10:38:23 +02:00
Jacques Lucke
8cadeac18b Cleanup: fix node registration
This was broken in 15f5dfd45d14655f715617802f371f7f6b7a26ae.
2023-09-02 09:18:09 +02:00
Pratik Borhade
1c0a1ae801 Fix #109561: Overwrite existing imagepath based on relativepath property
Update the filepath of an image when it already exists in the main
storage. This is useful when `relative_path` property is changed and we
attempt to open the same image file again.

Also remove `is_relative_path` parameter. Not required anymore because
`range->filepath` is correctly set to absolute/relative. This is also
passed in `BKE_image_load_exists_ex` to set path to non-exiting image.

Pull Request: https://projects.blender.org/blender/blender/pulls/109815
2023-09-02 07:19:54 +02:00