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
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
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
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
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
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).
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.
`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
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
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
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
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
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
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
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
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
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.
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.
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
- '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.
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
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
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
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