Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-03-30Cleanup/Refactor: Unify functions that redraw the depth bufferGermano Cavalcante
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
2021-03-08Fix T86106: bpy.types.SpaceView3D.draw_handler_remove(...) causes Blender to ↵Germano Cavalcante
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.
2021-03-06Cleanup: rename wm_get_cursor_positionCampbell Barton
Match naming of other wm_cursor_position_* functions.
2021-02-06UI: Fix Typos in Comments and Docsluzpaz
Approximately 91 spelling corrections, almost all in comments. Differential Revision: https://developer.blender.org/D10288 Reviewed by Harley Acheson
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-10-17Cleanup: Miscellaneous improvements in wm directoryHans Goudey
- Reduce variable scope. - Use LISTBASE_FOREACH macros. - Return early in some cases to reduce to reduce indentation.
2020-10-09GPU: Add more safeguard for BGL callsClément Foucault
This makes sure no BGL call before window drawing locks the GPUState.
2020-09-16GPU: Add debug groups inside wm_draw.cClément Foucault
This makes the debugging easier
2020-09-12Fix remaining GL calls/type preventing from building due to recent cleanupClément Foucault
2020-09-09Fix T80590: Popups clipped by status-bar and top-barJulian Eisel
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.
2020-09-01Sequencer: Fix crash caused by stereo rendering fixClément Foucault
Caused by rB2e908156d0c7 This was caused by the sequencer timeline area not using a GPUViewport but still using `sequencer_draw_preview`.
2020-09-01Cleanup: Use GPUBatch for icon and area drawingClément Foucault
This is in order to remove GPU_draw_primitive to streamline the drawing abstraction.
2020-08-30GPUFrameBuffer: GL backend isolationClément Foucault
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.
2020-08-23Cleanup: GPU: Use explicit clear value in GPU_clear* commandsClément Foucault
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.
2020-08-21Cleanup: split `BKE_scene_get_depsgraph()` into two functionsSybren A. Stüvel
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.
2020-08-18Cleanup: GPUState: remove double GPU_blend callsClément Foucault
2020-08-18GPUState: GPU_blend final API renamingClément Foucault
We now use GPU_blend for enabling / disabling blending and explicitly set the blend equation.
2020-08-18Cleanup: GPUState: remove use of GPU_blend_set_funcClément Foucault
2020-08-18Cleanup: GPU: Move towards an explicit Blend stateClément Foucault
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
2020-08-18Fix T77564: VSE (and compositor background) lost stereoscopy previewClément Foucault
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
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
2020-08-07Cleanup: Blenlib, Clang-Tidy else-after-return fixes (incomplete)Sybren A. Stüvel
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.
2020-08-05Merge branch 'blender-v2.90-release'Jeroen Bakker
2020-08-05Fix T77346: GPU Workaround Always Render Using Main ContextJeroen Bakker
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
2020-07-30Cleanup: GPU: Remove GPU_draw.h and move fluid gpu function to DRWClément Foucault
2020-07-30Cleanup: Split gpu_texture_image.c into BKE and IMB modulesClément Foucault
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`.
2020-07-18Cleanup: unused warningCampbell Barton
2020-07-18Cleanup: WM: Encapsulate stereo draw buffers bindingClément Foucault
2020-07-18Cleanup: GPU: Encapsulate scissor testClément Foucault
2020-07-18Cleanup: GPU: Encapsulate glScissorClément Foucault
2020-07-17Fix T78959: Show current frame indicator when interface is lockedHans Goudey
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
2020-07-16Cleanup: WM: Use GPUTexture API instead of raw ogl callsClément Foucault
2020-07-16Cleanup: Port glClear calls to GPU module functionsClément Foucault
2020-07-02GPUOffScreen: Remove the sample parameterClément Foucault
This is because the DRW module is no longer compatible with drawing using MSAA. This also change the Python API.
2020-07-01Fix missing GPU image free in background modeBrecht Van Lommel
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
2020-06-23Cleanup: renamed `do_draw_overlay` to `do_draw_paintcursor`Jeroen Bakker
To make a better distinction with region overlay.
2020-06-23Performance: Draw play head as an overlayJeroen Bakker
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
2020-06-02Cleanup: GPU: Remove GPU_shaderinterface_uniform_ensureClément Foucault
2020-05-19Merge branch 'blender-v2.83-release'Philipp Oeser
2020-05-19Fix T73169: Side by Side Stereo Rendering GlitchesJeroen Bakker
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
2020-05-18OpenSubdiv: Cleanup, Remove from legacy SubsurfCCG codeSergey Sharybin
The CPU side implementation is done on a new dedicate base ground. The GPU side must be redone anyway.
2020-05-14UI: Fix Unreported missing background for azone arrowClément Foucault
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.
2020-05-14Cleanup: sync clang-format with masterCampbell Barton
Avoid noisy diff's & conflicts.
2020-04-27Fix T75736 Viewport update problem when switching between view layersClément Foucault
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.
2020-04-23Fix T75607: crash trying to sculpt while remesh is in progressBrecht Van Lommel
The interface is already locked, but the paint brush drawing could stll be reading the mesh that was being edited in another thread.
2020-04-03Code Quality: Replace for loops with LISTBASE_FOREACHDalai Felinto
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
2020-04-03Cleanup: Rename ScrArea variables from sa to areaJulian Eisel
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.
2020-04-03Cleanup: Continue renaming ARegion variables from ar to regionJulian Eisel
Continuation of b2ee1770d4c3, now non-single word variables are also renamed. Part of T74432. Also ran clang-format on affected files.
2020-04-01Cleanup: use doxy sections for wm_draw.cCampbell Barton
2020-03-20Python API: add bl_use_stereo_viewport for RenderEngineBrecht Van Lommel
To indicate if the render engine supports rendering a stereo 3D viewport. This is not currently supported for Cycles. Fixes T62582