Age | Commit message (Collapse) | Author |
|
Now `ED_view3d_backbuf_depth_validate`, `ED_view3d_draw_depth` and
`ED_view3d_draw_depth_gpencil` are unified in `ED_view3d_depth_override`.
This new function replaces `ED_view3d_autodist_init`.
Also, since `ED_view3d_depth_update` depends on the render context, and
changing the context is a slow operation, that function also was removed,
and the depth buffer cached is now updated inside the new unified drawing
function when the "bool update_cache" parameter is true.
Finally `V3D_INVALID_BACKBUF` flag has been renamed and moved to
`runtime.flag`.
Differential revision: https://developer.blender.org/D10678
|
|
crash
The handle of a drawing callback can be removed within the drawing function itself.
This causes `var = (type)(((Link *)(var))->next` to read an invalid memory value in C.
|
|
Match naming of other wm_cursor_position_* functions.
|
|
Approximately 91 spelling corrections, almost all in comments.
Differential Revision: https://developer.blender.org/D10288
Reviewed by Harley Acheson
|
|
|
|
- Reduce variable scope.
- Use LISTBASE_FOREACH macros.
- Return early in some cases to reduce to reduce indentation.
|
|
This makes sure no BGL call before window drawing locks the GPUState.
|
|
This makes the debugging easier
|
|
|
|
The drawing of popus should be done with the window's default viewport
and scissor. Previous functions may change these, so they should be
explicitly reset.
|
|
Caused by rB2e908156d0c7
This was caused by the sequencer timeline area not using a GPUViewport
but still using `sequencer_draw_preview`.
|
|
This is in order to remove GPU_draw_primitive to streamline the drawing
abstraction.
|
|
This is related to the Vulkan port T68990.
This is a full cleanup of the Framebuffer module and a separation
of OpenGL related functions.
There is some changes with how the default framebuffers are handled.
Now the default framebuffers are individually wrapped inside special
GLFrameBuffers. This make it easier to keep track of the currently bound
framebuffer state and have some specificity for operations on these
framebuffers.
Another change is dropping the optimisation of only configuring the
changed attachements during framebuffers update. This does not give
any benefits and add some complexity to the code. This might be brought
back if it has a performance impact on some systems.
This also adds support for naming framebuffers but it is currently not
used.
|
|
This replace `GPU_clear()` by `GPU_clear_color()` and `GPU_clear_depth()`.
Since we always set the clear value before clearing, it is unecessary
to track the clear color state.
Moreover, it makes it clearer what we clear the framebuffer to.
|
|
Split the depsgraph allocation into a separate function
`BKE_scene_ensure_depsgraph()`. Parameters are only passed to those
functions that actually need them. This removes the the "if that boolean
is `false` this pointer is allowed to be `NULL`" logic and more cleanly
decouples code.
No functional changes.
|
|
|
|
We now use GPU_blend for enabling / disabling blending and explicitly
set the blend equation.
|
|
|
|
This make use of the GLStateStack functions for:
- `GPU_blend()`
- `GPU_blend_set_func()`
- `GPU_blend_set_func_separate()`
The goal is to unify them using an explicit state setting.
This will remove the need to use obscure blend functions
|
|
Issue introduced on fe045b2b77dc6d7f0b552619fe824b496d34db6c.
Since the stereoscopy compositing (anaglyph, ...) is only done for
viewports the VSE preview and compositor need to use viewports.
Reviewed by: dfelinto
Differential Revision: https://developer.blender.org/D8472
|
|
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenlib` module. Not all warnings are
addressed in this commit.
No functional changes.
|
|
|
|
In Blender 2.90 EEVEE materials were refactored that introduced crashes on Intel
GPUs on Windows. The crash happened in the `local_context_workaround` that temporary
stored compiled materials in a binary form to reload it in the main GL context.
It has been tested that the workaround isn't needed anymore for HD6xx GPUs, but it
is still needed for HD4000.
After several unsuccesfull fixes we came to the conclusion that we could not support
the local context workaround and needed to come with a different workaround. The idea
of this patch is that in these cases there is only a single context that is used for
rendering. Threads that uses these contextes are guarded by a mutex and will block.
Impact on User Level:
* Due to main mutex lock the UI freezes when rendering or baking or feel less snappy
Reviewed By: Clément Foucault, Brecht van Lommel
Differential Revision: https://developer.blender.org/D8410
|
|
|
|
This is in order to disolve GPU_draw.h into more meaningful code blocks.
All the Image related function are in `image_gpu.c`.
All the MovieClip related function are in `movieclip.c`.
The IMB module now has a connection with GPU. This is not strickly
necessary and the code could be move to `image_gpu.c` if needed.
The Image garbage collection is also ported to `image_gpu.c`.
|
|
|
|
|
|
|
|
|
|
When the playhead drawing moved to an overlay, a check was added to keep
it from drawing with a locked interface. This is necessary for some overlays,
but not this one, so this removes the check, making it the responsibility of
the editor.
A context function is added to make that check easier in the future.
Differential Revision: https://developer.blender.org/D8313
|
|
|
|
|
|
This is because the DRW module is no longer compatible with drawing using
MSAA.
This also change the Python API.
|
|
This is legacy code from before Eevee and Workbench rendering in background
mode was supported. Avoid memory leak by only queueing GPU textures to be
freed when we know they have been allocated.
Differential Revision: https://developer.blender.org/D8172
|
|
To make a better distinction with region overlay.
|
|
When playing back animations a playhead is updated in all the animation editors.
The drawing of the playhead is part of the drawing of the main region
`RGN_TYPE_WINDOW` that redraws the whole region.
This change will draw the play head and window scrollers when updating the
screen. This affects the Action editor, Timeline, Graph editor, NLA editor and
Sequence editor. There is noticeable speedup when using complex animation files.
Spring 02_020_A.anim.blend fps went from 11.8 to 12.5 when showing a timeline
and a action editor on a Ryzen 1700.
* When playing back animation the markers don't jump up/down when near the
frame. This could be added back.
Reviewed By: Brecht van Lommel
Differential Revision: https://developer.blender.org/D8066
|
|
|
|
|
|
Side by side and top down views were rendered using an unset matrix.
This fix will reset the matrix just before copying the views to the
screen.
Reviewed By: Clément Foucault, Dalai Felinto
Differential Revision: https://developer.blender.org/D7777
|
|
The CPU side implementation is done on a new dedicate base ground.
The GPU side must be redone anyway.
|
|
This was caused by the sRGB viewport changes. The fix is to modify the
alpha values manually. The shader was also missing a srgb fix.
|
|
Avoid noisy diff's & conflicts.
|
|
The problem comes from the fact by no data being modified when switching
viewlayers.
To follow what the external render engines do, we completely reset the
viewport by freeing the GPUViewport to avoid any cached data from being
kept.
|
|
The interface is already locked, but the paint brush drawing could stll be
reading the mesh that was being edited in another thread.
|
|
Note this only changes cases where the variable was declared inside
the for loop. To handle it outside as well is a different challenge.
Differential Revision: https://developer.blender.org/D7320
|
|
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432.
Now the area and region naming conventions should be less confusing.
Mostly a careful batch rename but had to do few smaller fixes.
Also ran clang-format on affected files.
|
|
Continuation of b2ee1770d4c3, now non-single word variables are also
renamed.
Part of T74432.
Also ran clang-format on affected files.
|
|
|
|
To indicate if the render engine supports rendering a stereo 3D viewport.
This is not currently supported for Cycles.
Fixes T62582
|