After performing a transformation EEVEE-Next non-stops resets the
sampling. The cause is that the `recalc` flag that are stored in the
Object isn't consumed. When transforming it was always filled with
`ID_RECALC_TRANSFORM` and kept on resetting the sampling.
Regression introduced by PR #113252.
Pull Request: https://projects.blender.org/blender/blender/pulls/113484
Currently nodes are reordered so that the "on top" nodes are last in
the list. Node order changing for simple operations like selection
means we either have to reevaluate the node tree data-block on
selections or accept that the evaluated order can be different from the
original. Currently we do the latter (see d76a0e98ba), but
makes it complex to access nodes by index, and is hard to reason about.
Instead of reordering nodes, store the ui order in the node itself
and sort the nodes before drawing them or doing any processing
that depends on the "depth."
The "selected_nodes" list in the context is no longer ordered by the
recent selection.
Pull Request: https://projects.blender.org/blender/blender/pulls/113419
When using Immediate mode emulation the data is stored in a ring buffer.
As data isn't overwritten it is safe to call multiple draw commands in
a single command buffer.
This improves drawing performance when immediate mode is being used, it
mostly improves the readability of the GPU traces in renderdoc.
Pull Request: https://projects.blender.org/blender/blender/pulls/113482
Wireframe mode wasn't working and viewport had flickering artifacts.
Reason was that the render pass creation failed for its framebuffer as
the input data was filled with garbage for attachments that were unused.
Vulkan requires every attachment to be filled upto the highest used attachment
slot. This PR fills missing attachments with a dummy texture.
Pull Request: https://projects.blender.org/blender/blender/pulls/113141
It seems that the code only ever converted the
first IK constraint found into a `PoseTree`.
Before #110417 constraints with zero influence were
skipped so it worked, except for the bug with the depsgraph.
After this patch the logic is the following:
From top to bottom of the constraint stack,
keep adding constraints until the first constraint with influence is added.
This ensures, that if there is only one disabled constraint,
it still gets converted into a `PoseTree`,
which is needed for the depsgraph to work correctly.
The resulting behavior from adding the first active constraint is
that the higher in the stack the constraint is, the higher its priority.
To achieve that I split off a helper function `find_ik_constraints`
that populates a vector of `bConstraint` pointers.
The code to create the `PoseTree` is still largely the same,
except I moved a few variables closer to where they are used.
Pull Request: https://projects.blender.org/blender/blender/pulls/113056
Remove unnecessary calls to BLI_file_descriptor_size when using
BLI_mmap_open since this stores the file size too.
While accessing the size twice isn't so bad, the additional check
that the file size isn't an error value is unnecessarily verbose.
Failure to seek would attempt to MMAP SIZE_T_MAX, while this would
likely fail, prefer an explicit error check instead of relying on
unreasonable requests to be rejected.
Accessing the file size returns -1 on error, for file packing this
was passed directly to an allocation which would wrap around to
SIZE_T_MAX and fail to allocate. In other cases zero was treated
as an error value but -1 wasn't.
Add checks for the error return value, also warn that packing files over
2gb isn't supported.
The image size was used to set the window size, large values could
make the window fail to create it's GPU context.
Resolve by constraining window size by the main display dimensions.
Even in cases where the window would succeed to create its generally
not useful to have a window larger than the screen size.
While passing in multiple files is supported, scrubbing both images
an movies wasn't working properly when multiple files were passed in.
For images, arguments such as "*.png" expand to multiple image files
which were each assigned a frame index of 0, this would play but stopped
scrubbing from working completely.
For movies, passing in multiple files would play back all files but
only properly scrub the first file, if other videos were longer than
the first scrubbing would jump to those.
Resolve by starting the frame index where the previous files left off.
Also resolve divide by zero when showing the indiciator for a single
frame.
Simplifies the fix to #111120, because it is clearer that the threadsafe
Mesh access is used rather than the potentially problematic object-level
bounds access.
Removing one unnecessary check in wm_link_append_exec that caused us to
error out even though multiple files are selected. This removed check
is also done later on in the function so safety is still ensured.
Pull Request: https://projects.blender.org/blender/blender/pulls/113350
The selection engine has some complex tricks that improve performance.
These are:
- Only draws objects whose bounding box intersects the selection
threshold;
- If the viewport or objects are not "dirty", it does not clean the
texture IDs and only adds objects that have not yet been drawn;
- Only updates the depth buffer if a new object is drawn;
- Skip drawing if no object is found;
These tricks were initially implemented so that this engine could be
used for snapping.
But this initial idea has changed and now the engine is only used to
select Vertices, Edges or Faces.
Due to this limited use, these tricks bring no real benefit.
In fact, it's even worse with the Retopology Overlay, as it forces the
Depth buffer to be redrawn.
This commit removes these tricks and only keeps those that indicate
whether the drawing needs to be updated.
Pull Request: https://projects.blender.org/blender/blender/pulls/113308
This PR adds support for Intel ARC GPUs. Due barriers inside a non
uniform control flow the Intel ARC can stall the whole system.
The cause is that a barrier is used, but some threads in the shader
have completed. The barriers might wait until it gets the signal from
the exited threads and stalls the system.
Although some implementations support it it is safer to limit the
number of HiZ levels.
Pull Request: https://projects.blender.org/blender/blender/pulls/113447