Is probably harmless in practice, but the ASAN was generating an
error about it:
draw_manager_data.cc:187:59: runtime error: member access within null pointer of type 'struct DRWUniformChunk'
Pull Request: https://projects.blender.org/blender/blender/pulls/108798
Was only happening for the tiled compositor implementation.
This is likely to be the source of flackey tests on the
buildbot.
Also, the reference image was empty because of this, so
it needs to be re-generated.
Pull Request: https://projects.blender.org/blender/blender/pulls/108800
The RNA function `FCurve.update()` now also deduplicates keys. This is done
in a way that is independent of key selection; simply the last key in the
list of keyframes 'wins' and overwrites earlier ones. It is exactly the
same as `FCurve.keyframe_points.deduplicate()`.
Workbench normals where inverted resulting to drawing artifacts like:
- Black pixels during matcaps (normals contained NAN values)
- Studio light inverted
The root cause for this was that Vulkan default to determine if a
primitive is facing the camera should be switched. The default was still
incorrect.
Although this fixes it, a better solution is to determine the front
facing based on if the viewport should be switched. As all rendering
occurs when the viewport is inverted it doesn't matter at this moment.
Pull Request: https://projects.blender.org/blender/blender/pulls/108797
Compiling files in `makesrna` as C code is often a bit annoying when converting
other files to C++ (#103343). That's because one often had to introduce additional
C wrappers.
The goal of this patch is to support compiling rna files as C++ code. This mostly
required changes in `makesrna.c` to make the generated code compatible with C
and C++. The cmake code had to change a bit as well because we need to pass
different compiler options for C++ code to avoid some warnings.
This commit also converts a few rna files to C++ already, although that is mostly
just for testing. The rest of the files are expected to be converted after this patch
is merged.
It's possible, even likely, that `makesrna.c` has to change a little bit more to
support C++, but that is hard to know without converting all files first.
Co-authored-by: Lukas Tönne <lukas@blender.org>
Co-authored-by: Ray Molenkamp <github@lazydodo.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/108290
Hopefully now the behavior is fully consistent with before the refactor,
current implemented one by this commit:
- When loading factory settings file on startup, go full-screen.
- In all other startup cases, use size as stored in the startup .blend
file.
Regression from ebb5643e59 and 32bbfbb06e.
When unlinking IDs like GN tree, materials, etc. undo step is not created.
To fix this, assign `undo_push_label` a string value for registering an
undo-step (with the help of `ED_undo_push`)
Pull Request: https://projects.blender.org/blender/blender/pulls/108452
Pinning information was accidentally skipped inside of the
UV packing engine because of their ordering.
This was most noticeable when using the "Bounding Box" shape
method, causing some pinned islands to be moved when they
should have been locked in place.
The quaternion header depended on the old C header where it doesn't
need to with a better alternative in the newer C++ types. Also remove an
unused function in another header.
This increases the framerate in a production file from about 2.3 to 2.5
FPS, and reduces gaps in a profile where the CPU was waiting for just
a few threads to finish the BVH tree lookups. If BVH lookups become
faster in the future, this grain size could be increased.
No user visible changes expected.
This brings us another step closer to replacing the temporary asset
handle design with the proper asset representation design. I held off
with this a bit because we eventually want to support non-ID assets, but
for now it is fine to consider all assets to be IDs. In future the asset
system can make the necessary distinctions still.
Now only the preview is handled via asset handle still.
`SCE_SNAP_MODE_FACE_NEAREST` is actually not supported as one of the
geometry snap modes.
It is not used for either the snap cursor or the `Set Snap Base` mode.
Fixes#108730
The call to `CustomData_interp` also interpolated the face corner
topology attributes, which broke the mesh completely. To fix this,
avoid relying on the CustomData API and move the attribute
interpolation to use the attribute API instead. This change also
makes it trivial to support all attribute types in the future.
Also, only retrieve the closest vertex once, instead of doing it
again for every attribute. Combined with building the topology
maps in parallel this approximately doubled the performance
of color attribute propagation in a test with 2 million vertices
and 8 color attributes on both domains (63 to 34 ms).
Pull Request: https://projects.blender.org/blender/blender/pulls/108773
No user visible changes expected.
This is needed in #104831 but makes sense to expose publicly in the
asset system APIs either way. So committing this to the main branch
already.
Ensure buffer read operations wait for pending GPU work to
complete. This is only required for unit tests, but required to
ensure correct results in all cases. Also adds support for staging
buffer if GPU memory type is private.
Buffer clearing routine added to support values above 1 byte.
The previous buffer clearing functionality using fillBuffer writes
values to each byte, rather than the full 32 bit uint used by the
GPU API.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/108757
No user visible change expected.
It wasn't clear that the caller of `UI_textbutton_activate_rna()` would
have to override the context region for it to work correctly. This is
only the case because UI internals happen to require it.
Instead of implicitly requiring the caller to do the context override so
UI internals work, do the override inside of the API function in
question.
Ensure float3 data types are marked as packed where appropriate for
ObjectInfos and instead update ObjectBounds during resource
finalization using local resource to reduce global memory thrashing.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/108766
Addressing a number of small issues and OOB reads/writes occuring in
EEVEE Next shadows + lighting passes. Improving correctness for unit
tests. Shadows are not yet working overall, but this unblocks progress
towards unit tests.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/108768
The filter is used to reduce noise while preserving edges. It can be used to create a cartoon effect from photorealistic images.
It offers two variations:
1) Classic aka isotropic kuwahara filter: simple and faster computation. Algorithm splits an area around a single pixel in four parts and computes the mean of the region with the lowest standard deviation.
2) Anisotropic Kuwahara filter: improves the classical approach by considering the direction of structures of regions
This patch implements both approaches above as multi-threaded operations for the full-frame and tiled compositor.
Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/107015
The ownership of image views depends on how they are used. When used as
an framebuffer attachment the image view is owned by the framebuffer.
When used as a image/texture in a shader the ownership of the image view
is the texture itself.
Pull Request: https://projects.blender.org/blender/blender/pulls/108765
* opengl_context -> system_gpu_context. This is the operating system OpenGL,
Metal or Vulkan context provided by GHOST.
* gpu_context -> blender_gpu_context. This is the GPUContext provided by
the Blender GPU module, which wraps the GHOST context and adds some state.
* Various functions create/destroy/enable/disable both contexts, these have
just gpu_context in the name now.
Pull Request: https://projects.blender.org/blender/blender/pulls/108723
This patch implements the Sun Beams node for the realtime compositor.
The implementation is not identical to the existing CPU implementation,
but is very close. The new implementation is a higher quality one and
resolves some of the artefacts in the existing implementation. This is
achieved by doing a simple line integration toward the source pixel,
while having a number of integration steps that is invariant of the
angle to the source.
Pull Request: https://projects.blender.org/blender/blender/pulls/108718