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
2020-06-02DrawManager: Graph Task SchedulingJeroen Bakker
This patch uses a graph flow scheduler for creating all mesh batches. On a Ryzen 1700 the framerate of Spring/020_02A.anim.blend went from 10 fps to 11.5 fps. For each mesh where batches needs to be updated a sub-graph will be added to the task_graph. This sub-graph starts with an extract_render_data_node. This fills/converts the required data from Mesh. Small extractions and extractions that can't be multi-threaded are grouped in a single `extract_single_threaded_task_node`. Other extractions will create a node for each loop exceeding 4096 items. these nodes are linked to the `user_data_init_task_node`. the `user_data_init_task_node` prepares the userdata needed for the extraction based on the data extracted from the mesh. Note: If the `lines` and `lines_loose` are requested, the `lines_loose` sub-buffer is created as part of the lines extraction. When the lines_loose is only requested the sub-buffer is created from the existing `lines` buffer. It is assumed that the lines buffer is always requested before or together with the lines_loose what is always the case (see `DRW_batch_requested(cache->batch.loose_edges, GPU_PRIM_LINES)` in `draw_cache_impl_mesh.c`). Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D7618
2020-05-28Cleanup: spellingCampbell Barton
2020-05-25Mesh: skip conversion from edit-mesh to mesh in edit-modeCampbell Barton
This resolves a performance regression in 2.8x where every edit-mode update performed an edit-mesh to mesh conversion. Now the conversion will be lazily initialized if/when it's required. New BKE_mesh_wrapper_* functions abstract over mesh data access. Currently only edit-mesh and regular meshes are supported. In the future sub-surface meshes may be supported too.
2020-05-08Cleanup: clang-formatCampbell Barton
2020-05-08Fix T76498: Refactoring - Rename BKE modifiers funtionsAntonio Vazquez
2020-04-07Fix T75343: Wireframe overylay is not working properly with multiple modifiersPhilipp Oeser
Since rBcf258b02f449, only wires and edges that are mapped to the original mesh were drawn if the mesh was modified by modifiers. Above commit was only meant for showing orig wires for paint mask overlays [where final wireframe is not desired], so now only use MR_EXTRACT_MAPPED when we are in a paint mode. Maniphest Tasks: T75343 Differential Revision: https://developer.blender.org/D7333
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: Including "BLI_listbase.h" for LISTBASE_FOREACH macroDalai Felinto
These headers are not needed right away, but will be in the upcoming commit.
2020-04-03Cleanup: use term 'attr' instead of 'attrib'Campbell Barton
This was already the case in most parts of the GPU API. Use full name for descriptive-comments.
2020-03-27Cleanup: add iterator macros to clang-formatCampbell Barton
Also rename START to BEGIN (matching BEGIN/END for most iterator macros).
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Weight Paint: Implement a new Lock-Relative mode.Alexander Gavrilov
This check box alters how weights are displayed and painted, similar to Multi Paint, but in a different way. Specifically, weights are presented as if all locked vertex groups were deleted, and the remaining deform groups normalized. The new feature is intended for use when balancing weights within a group of bones while all others are locked. Enabling the option presents weight as if the locked bones didn't exist, and their weight was proportionally redistributed to the editable bones. Conversely, the Multi-Paint feature allows balancing a group of bones as a whole against all unselected bones, while ignoring weight distribution within the selected group. This mode also allows temporarily viewing non-normalized weights as if they were normalized, without actually changing the values. Differential Revision: https://developer.blender.org/D3837
2020-02-19DRW: New High Quality Normal & Tangent extractClément Foucault
This patch adds a dedicated path to extract 16bit normals instead of packing them into 10bits/comp. The tangents are also packed to 10bits/comp if not using the new High Quality Normal option. Fix T61024 Degraded texture shading on dense meshes Reviewed By: brecht Differential Revision: https://developer.blender.org/D6614
2020-02-15Cleanup: refactor GPU material attribute and texture requestsBrecht Van Lommel
2020-02-11Cleanup: extra semicolons, comma use, undeclared varsCampbell Barton
2020-02-04Merge branch 'blender-v2.82-release'Campbell Barton
2020-02-04Fix T73095: Edit Mode Overlay Linked MeshJeroen Bakker
When using duplicate linked meshes, objects that are not in edit-mode will be drawn as it is in edit mode, when another object with the same mesh is in edit mode. This will not be the case when one of the objects are influenced by modifiers. The change reflects more how it was done in Blender 2.79. The current change introduces a draw manager method that checks in detail who is responsible for the drawing (render engine or overlay engine). If the edit mesh is not the original or the object that is drawn doesn't draw the original mesh the object will be drawn by the render engine. Known Limitation of this patch is that the rendering outside edit mode doesn't reflect the latest changes until the user switches between object and edit mode. When there are no modifiers in use, the updating is done immediately. IMO this would be sufficient for blender 2.82, it also fixes parts of T72733. The updating of the surface batches requires more development and is post-poned for now. Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D6737
2020-01-28Merge remote-tracking branch 'origin/blender-v2.82-release'Sybren A. Stüvel
2020-01-28Fix T72593 Blender crashes when modifier change the material countClément Foucault
Instead of changing the modifiers behavior, we make sure to always use the data->totcol instead of the ob->totcol. Also we centralize getting this number to avoid future issues. Fix T72593 Blender crashes when separating mesh Fix T72017 Crash on set visibility change
2020-01-17DRW: Use USHORT for vertex color and upload them in linear color to the GPUClément Foucault
This way we remove the need for the srgb boolean uniform and a lot of code complexity. However, mesh update is going to be a bit slower. I did not benchmark the performance impact. This also fix a typo in draw_cache_impl_particles.c and fix hair not using vertex color in workbench. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6610
2020-01-17Fix T72905: EEVEE + UV Edit Unused MapJeroen Bakker
There is a cornercase when the user edits an uvmap, that is not part of the material (yet). When this is the case the uvmap was not added to the uv buffer and the 'pos' alias was not created. This change will always request the active uv map when uv editing. Reviewed By: fclem Differential Revision: https://developer.blender.org/D6534
2020-01-13Fix T73044 Crash in UV editor when changing UV selection modesClément Foucault
Thanks to @campbellbarton for the fix.
2020-01-08Fix T72667: Collection delete hierarchy in edit-mode crashesCampbell Barton
Also resolves T72848, although updating multiple windows doesn't work, this matches 2.7x behavior.
2020-01-07BMesh: remove BMEditMesh.ob use for draw managerCampbell Barton
2019-12-04Fix T72130: Wireframe Visible After DisablingJeroen Bakker
The lines index buffer can contain all edges (edit mode) or only loose edges (object mode). When switching between these modes the wrong content of the index buffer can be used. This patch will clear the lines index buffer when a `loose_edges` is requested. Making sure it is always up to date. Note that this is supporting an exising hack where the IBO is truncated during the creation. We should find a different way how to solve these kind of issues. Reviewed By: fclem Differential Revision: https://developer.blender.org/D6349
2019-12-02Overlay Engine: Refactor & CleanupClément Foucault
This is the unification of all overlays into one overlay engine as described in T65347. I went over all the code making it more future proof with less hacks and removing old / not relevent parts. Goals / Acheivements: - Remove internal shader usage (only drw shaders) - Remove viewportSize and viewportSizeInv and put them in gloabl ubo - Fixed some drawing issues: Missing probe option and Missing Alt+B clipping of some shader - Remove old (legacy) shaders dependancy (not using view UBO). - Less shader variation (less compilation time at first load and less patching needed for vulkan) - removed some geom shaders when I could - Remove static e_data (except shaders storage where it is OK) - Clear the way to fix some anoying limitations (dithered transparency, background image compositing etc...) - Wireframe drawing now uses the same batching capabilities as workbench & eevee (indirect drawing). - Reduced complexity, removed ~3000 Lines of code in draw (also removed a lot of unused shader in GPU). - Post AA to avoid complexity and cost of MSAA. Remaining issues: - ~~Armature edits, overlay toggles, (... others?) are not refreshing viewport after AA is complete~~ - FXAA is not the best for wires, maybe investigate SMAA - Maybe do something more temporally stable for AA. - ~~Paint overlays are not working with AA.~~ - ~~infront objects are difficult to select.~~ - ~~the infront wires sometimes goes through they solid counterpart (missing clear maybe?) (toggle overlays on-off when using infront+wireframe overlay in solid shading)~~ Note: I made some decision to change slightly the appearance of some objects to simplify their drawing. Namely the empty arrows end (which is now hollow/wire) and distance points of the cameras/spots being done by lines. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6296
2019-10-16Fix assert and memleak in recent Skin Root Display patchClément Foucault
Caused by 4ddf3215a7df
2019-10-16Fix T68380 Skin modifier root not displayedClément Foucault
2019-10-10Cleanup: Fix wrong assert introduced by rBd98ae27f02c7Clément Foucault
2019-10-10Fix T70659 Warning, Regression, slow vertex selectionClément Foucault
This changes the fix for T70302 by reducing the number of things we discard.
2019-10-08Fix T68857 EditUV: Crash on Remesh modifier with 'Display in Edit Mode'Clément Foucault
2019-10-08Fix T69363 EEVEE: Blender crash when using Edit mode for OceanClément Foucault
Use same Mesh* as extraction. We always use the final mesh for shaded geom.
2019-10-07Fix T70302 Crash on entering solid view after some specific stepsClément Foucault
2019-10-02Fix T70414 EEVEE: Crash with 2 viewports, UV edit and sync selectionClément Foucault
2019-09-28Fix T70226 EEVEE: Crash/Assert entering edit mode with instanced meshes...Clément Foucault
... and modifiers. This was caused by wrong mesh being taken into account when in edit mode.
2019-09-27Fix T70247 Crash on enter edit mode with UV editor openedClément Foucault
2019-09-27Fix T69941 Assert selecting UVsClément Foucault
Was caused by DRW_mesh_batch_cache_get_edituv_faces_stretch_area called after DRW_mesh_batch_cache_create_requested. So it was created on the wrong object/mesh.
2019-09-23Revert part of "GPencil: Invert Paste operator and make Paste to Active default"Brecht Van Lommel
This commit accidentally undid a bunch of previous commits. Only the intended changes are left now.
2019-09-13Cleanup: unused headers (GPU)Campbell Barton
2019-09-07Cleanup: use post increment/decrementCampbell Barton
When the result isn't used, prefer post increment/decrement (already used nearly everywhere in Blender).
2019-09-04Fix T63755: Area Stretching OverlayJeroen Bakker
Support for UV Stretching overlay during multi object editing. The VBO now holds the ratios per fase. In the shader these ratios will be compared against the global ratios. The global rations are created from all selected objects. The current implementation does not fit well with the draw module. The plan is to move the drawing of other spaces towards the draw manager what leads to a better fit. Currently the details on this solution is unclear but this requirement will become an attentionpoint in the future design. Reviewed By: fclem Differential Revision: https://developer.blender.org/D5665
2019-08-26Fix T69051 Vertex Paint: Selection not show in vertex select mode.Clément Foucault
2019-08-26GPencil: Invert Paste operator and make Paste to Active defaultAntonio Vazquez
Before there were two options: Paste to original layer called "Paste" and Paste to active layer called "Paste & Merge" Now, by default the paste is in active layer and the "Paste & Merge" has been renamed "Paste". For old "Paste", now is called "Paste by Layer" and it's not the default value anymore. Note: Minor edits to add icons not present in Differential revision. Differential Revision: https://developer.blender.org/D5591
2019-08-26Fix T68826 Eevee: Multi-Mat not working if switching from Solid shadingClément Foucault
The correct fix would be to avoid all those hacks but this is needed if we want to be able to parallelize object vbo extractions. This is the fixed version of the hack. The issue was that the ibo ranges were saved before the batch were reset and the IBO was discarded, leading to a read after free error. All previous reported crash were tested and are now not reproductible.
2019-08-23Revert "Fix T68826 Eevee: Multi-Mat not working if switching from Solid shading"Brecht Van Lommel
This reverts commit d357e7b06535. This caused crashes in UV editor drawing and updates in lookdev mode. Fixes T69087, T69083, T69088, T69096.
2019-08-21Fix T68826 Eevee: Multi-Mat not working if switching from Solid shadingClément Foucault
The correct fix would be to avoid all those hacks but this is needed if we want to be able to parallelize object vbo extractions.
2019-08-19Mesh Batch Cache: Fix crash caused by rB3cbf2462391cClément Foucault
2019-08-19Fix T68719 Viewport: Wrong material index when switching between view modeClément Foucault
This was due to the GPUIndexBuf ranges only computed when requesting the triangles indices. If the tris were already calculated, the new shading batches would never have the GPUIndexBuf ranges and instead use the full triangle index buffer. So since this only happen when shading data does not match, we just save the previous GPUIndexBuf ranges and reuse them for the new batch. This patch is a bit of a hack on top of a hack but it works fine.
2019-08-15Fix T68675: particle edit mode makes blender crashPhilipp Oeser
In rB9c010c44f420, DRW_mesh_batch_cache_create_requested was changed to take a scene (instead of toolsettings directly), but DRW_draw_depth_object is calling this with with NULL, just checking for this seems to fix... Reviewers: fclem Maniphest Tasks: T68675 Differential Revision: https://developer.blender.org/D5488
2019-08-15Mesh Batch Cache: Split UV an tangent into 2 distinct VBOsClément Foucault
This is done because they don't have the same update frequency. UV can be persistent even on geometry update (ex: skinned object) but tangents can change if the normals change. Also the name buffer per vbo was too small to contain all names.