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-06-01DrawManager: Use CPP for Mesh Extraction Scheduling.Jeroen Bakker
More cleanups will come to make this more CPP-like.
2021-06-01Cleanup: Split draw_cache_extract_mesh into multiple files.Jeroen Bakker
draw_cache_extract_mesh for task scheduling. Will be refactored to draw_cache_extract_mesh_scheduling later on after migrating to CPP. draw_cache_extract_mesh_render_data extraction of mesh render data from edit mesh/mesh into a more generic structure. draw_cache_extract_mesh_extractors containing all the extractors. This will be split up further into a single file per extractor.
2021-05-31Fix undeclared identifiers with 'DEBUG_TIME'Germano Cavalcante
These identifiers were accidentally removed in rB44d2479dc36f.
2021-05-31Refactor: DRW Mesh Extractor: Join the extractors in a same loopJeroen Bakker
This patch replaces / redoes the entire MeshExtractors system. Although they were useful and facilitated the addition of new buffers, they made it difficult to control the threads and added a lot of threading overhead. Part of the problem was in traversing the same loop type in different threads. The concurrent access of the BMesh Elements slowed the reading. This patch simplifies the use of threads by merging all the old callbacks from the extracts into a single series of iteration functions. The type of extraction can be chosen using flags. This optimized the process by around 34%. Initial idea and implementation By @mano-wii. Fine-tuning, cleanup by @atmind. MASTER: large_mesh_editing: - rdata 9ms iter 50ms (frame 155ms) - Average: 6.462874 FPS PATCH: large_mesh_editing: - rdata 9ms iter 34ms (frame 136ms) - Average: 7.379491 FPS Differential Revision: https://developer.blender.org/D11425
2021-05-31Fix T88456: DrawManager: Keep subset RenderMeshData around when geometry ↵Jeroen Bakker
does not change. Reuse loose geometry during selection (and other operations) from previous calculation. Loose geometry stays the same, but was recalculated to determine the size of GPU buffers. This patch would reuse the previous loose geometry when geometry wasn't changed. Although not the main bottleneck during selection it is measurable. Master. `rdata 46ms iter 55ms (frame 410ms)` This patch. `rdata 5ms iter 52ms (frame 342ms)` Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D11339
2021-05-28DrawManager: Early return for buffer cache creationGermano Cavalcante
No real functional changes. This is useful for benchmark cases when `cache->uv_cage` is passed but has no buffers are requested.
2021-02-17Cleanup: use edituv prefix for stretch area/angle dataCampbell Barton
2021-02-17Merge branch 'blender-v2.92-release'Campbell Barton
2021-02-17Fix T85680: Crash displaying UV stretch/area with modifiersCampbell Barton
This uses the same logic as drawing UV's, where non-bmesh defaults to mesh.
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
2021-01-11Fix T84459: Face normals not displaying (AMD GPU)Jeroen Bakker
This is part two of the fix for T84459. Issue appears to be caused by AMD graphics driver later than 20.11.1 and affects older GPUs (Polaris/FIJI cards). Drawing normals in edit mode uses the same OpenGL data type for storing normals that is known to be faulty. This change fixes the face dot normals by using GPU_COMP_I16.
2021-01-11Cleanup: Incorrect commentJeroen Bakker
2021-01-11Fix T84459: Wireframe not displaying with AMD GPUJeroen Bakker
Issue appears to be caused by AMD graphics driver later than 20.11.1 and affects older GPUs (Polaris/FIJI cards). Wireframe drawing uses the same OpenGL data type for storing normals what is known to be faulty. This patch enabled storing the normals using GPU_COMP_I16. It also solves the normals drawing in edit mode for vertex and loop normals.
2021-01-04GPU: Add HQ normals workaround.Jeroen Bakker
This change makes it possible for platforms to only support high quality normal rendering. This is part of {T82856} where current AMD drivers running on the polaris architecture does not support the low quality setting due to a driver bug. In a next commit the work around will be enabled.
2020-11-04Merge branch 'blender-v2.91-release'Jeroen Bakker
2020-11-04Fix T81775: Object Disappears During Texture PaintingJeroen Bakker
Issue was that the `tris_per_mat` are not created when the first batch is drawn during select operator and then is not created when needed by the workbench pass since they are not tracked by mesh_buffer_cache_create_requested. This change will create the `tris_per_mat` just in case they are needed later. Solution by Clément Foucault Differential Revision: https://developer.blender.org/D9430
2020-10-30Fix crash when using multiple Sculpt Vertex Color layers for renderingPablo Dobarro
This line was probable left there after a bad merge. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D9367
2020-10-19Spelling: Then Versus ThanHarley Acheson
Corrects incorrect usages of the words 'then' and 'than'. Differential Revision: https://developer.blender.org/D9246 Reviewed by Campbell Barton
2020-10-19Fix T81167: Texture Painting with Paint mask enabled, (de)selecting faces ↵Jeroen Bakker
causes a mess with texture slots Issue caused by {9582797d4b50} in b2.90. The surface per material used an index buffer owned by the batch. These index buffers are created at the same time the surface tris index buffer was created. When a material per batch buffer was invalidated it used the surface tris index buffer rendering all materials on all surfaces making the last draw command render succeed. This patch stores the surface tris per material in the cache so they can be reused. There is also no need to use the `saved_elem_ranges` anymore as they are now part of the cache. The ugly bit of the implementation is that in `extract_tris_finish` the MeshBufferCache is retrieved. But as this part was already documented as a hack and it is something that is only used for final meshes. Other solutions would impact performance or made the fix not condensed (passing parameters that shouldn't be used). Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D9136
2020-09-22MeshAnalysis: Optimize the detection of intersecting geometryGermano Cavalcante
For the self overlap result, each intersection pair does not need to be tested twice.
2020-09-18Sculpt: Render Mask and Face Sets with modifiers activePablo Dobarro
This removes the limitation of the sculpt overlays not being visible with modifiers active. Reviewed By: fclem Maniphest Tasks: T68900 Differential Revision: https://developer.blender.org/D8673
2020-09-07GPU: Rename gpu_extensions to gpu_capabilitiesClément Foucault
This makes more sense as this module has more to it than just GL extensions.
2020-09-06GPUVertBuf: Make GPUVertBuf private to the GPU moduleClément Foucault
This is just a cleanup to isolate the internals of the vertbuf. This adds some getters to avoid refactor of existing code.
2020-08-25Merge branch 'blender-v2.90-release' into masterCampbell Barton
2020-08-25Fix T77359: Crash adding UV's in edit-mode with linked duplicatesCampbell Barton
This prevents UV layer mix up in MeshBatchCache.cd_used/cd_needed/cd_used_over_time which depends on the extraction method. One object's mesh can be accessed with MR_EXTRACT_MESH, another object that uses the same mesh can use MR_EXTRACT_BMESH based on (Object.mode & OB_MODE_EDIT), this causes a problem as the edit-mesh and the mesh aren't always in sync, the custom data layers wont necessarily match up, causing T77359. Reviewed by @jbakker, @brecht Ref D8645
2020-08-21Cleanup: remove MeshBatchCache from MeshRenderDataCampbell Barton
Was noted as a hack, this can be passed as an argument instead.
2020-08-10Merge branch 'blender-v2.90-release'Germano Cavalcante
2020-08-10Fix T78113: Random explosions of cloth with self collisionGermano Cavalcante
The problem is caused by a lack of prediction in the `isect_line_segment_tri_v3` that incorrectly confirms some intersections of coplanar segments to the triangle. The solution is to use another algorithm to detect intersections. This also resulted in a slight improvement in the performance: - 1min 17sec to 1min 6sec in my test file Differential Revision: https://developer.blender.org/D8500
2020-08-07Cleanup: pass arrays const where possibleCampbell Barton
2020-08-07Cleanup: Draw, 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/draw` module. Not all warnings are addressed in this commit. No functional changes.
2020-07-21Fix T79066: Entering Edit Mode when Viewport Display set as Wire or Bounds ↵Jeroen Bakker
leads to crash
2020-07-17Fix T77867: Link Duplicate Object crashes during batch creationJeroen Bakker
When using link duplicated objects it could happen that one object is calculating the GPUBuffers and the second object is marking these buffers invalid. This introduces threading issues. This patch fixes this by combining the surface and surface per material batches. Most likely the surface per material batches are used and when requested you will most likely need the surface batch for the depth tests and overlays. During tests it slightly improves performance as batches aren't thrown away without using it. After this patch we can add a quick path for meshes with one material and two materials. Alternative approaches that have been checked: - sync extraction per object: reduced performance to much (-15%) ({D8292}) - post checks: reduced the threading issues, but didn't solve it. - separating preparation and execution of the extraction ({D8312}) Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D8329
2020-07-10Cleanup: face-center mesh calculationCampbell Barton
Loop over faces and calculate their centers instead of zeroing the face center array and accumulating all faces vertex corners. Move subsurf face center extraction into it's own loop since it works differently.
2020-07-09Sculpt: Make Sculpt Vertex Colors features experimentalPablo Dobarro
This disables all Sculpt Vertex Colors tools, operators, panels and rendering capabilities and puts them under the "Use Sculpt Vertex Colors" experimental option. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8239
2020-07-02Fix T78054: Crash Editing Instanced Objects with Tangent NormalsJeroen Bakker
Similar track as for normal mesh. Don't store the tangent normals in CustomData of the mesh, but in an unassociated CustomData instance. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D8161
2020-07-01DRW: optimize mesh data extractionCampbell Barton
Change extraction callbacks to take index ranges instead of calling them for each mesh element (poly, loop, vert & edge). This gives a minor overall performance gain in my tests, ~5% on average. Details: - Use typed parameter structs and macros for looping over elements. Without this, changes to these callbacks is time consuming as changes need to be made in many places. - Avoid iterating over polygon-loops when iterating over polygons is sufficient. - Simplify logic to access adjacent loops for faster line extraction. - Rename 'loop' iterators to 'poly' (as they take polygon ranges) the iterator callbacks can operator on either polygon or loop data. - Use term 'last' for the last index (inclusive), use 'end' when this value (not inclusive).
2020-06-29Fix T78361: Crash When ModellingJeroen Bakker
Forgot to free the tangent layer for bmesh in the drawing code.
2020-06-29Cleanup: minor change missed last commitCampbell Barton
2020-06-29Cleanup: use designated initializes for mesh extract structsCampbell Barton
Better readability and allows adding new struct members without adding empty slots to every 'MeshExtract' struct.
2020-06-25Cleanup: spellingCampbell Barton
2020-06-25Edit Mesh: minor drawing optimization extracting loop dataCampbell Barton
Gives around ~5% speedup on high poly meshes.
2020-06-23Sculpt Vertex Colors: Initial implementationPablo Dobarro
Sculpt Vertex Colors is a painting system that runs inside sculpt mode, reusing all its tools and optimizations. This provides much better performance, easier to maintain code and more advanced features (new brush engine, filters, symmetry options, masks and face sets compatibility...). This is also the initial step for future features like vertex painting in Multires and brushes that can sculpt and paint at the same time. This commit includes: - SCULPT_UNDO_COLOR for undo support in sculpt mode - SCULPT_UPDATE_COLOR and PBVH flags and rendering - Sculpt Color API functions - Sculpt capability for sculpt tools (only enabled in the Paint Brush for now) - Rendering support in workbench (default to Sculpt Vertex Colors except in Vertex Paint) - Conversion operator between MPropCol (Sculpt Vertex Colors) and MLoopCol (Vertex Paint) - Remesher reprojection in the Voxel Remehser - Paint Brush and Smear Brush with color smoothing in alt-smooth mode - Parameters for the new brush engine (density, opacity, flow, wet paint mixing, tip scale) implemented in Sculpt Vertex Colors - Color Filter - Color picker (uses S shortcut, replaces smooth) - Color selector in the top bar Reviewed By: brecht Maniphest Tasks: T72866 Differential Revision: https://developer.blender.org/D5975
2020-06-23Fix T77893: Crash drawmanager threading custom dataJeroen Bakker
Tangent normals were temporarily saved in the original given layers but the typeinfo wasn't updated. This lead to several issues since we changed the threading of the mesh extraction. This patch stores the tangent normals in a temporary custom data on the stack this way the typemap doesn't need to be updated. Still need to run the tests for an hour to see if it is fixed Reviewed By: Clément Foucault, Philipp Oeser Differential Revision: https://developer.blender.org/D8095
2020-06-22Fix T77607: Edit-mode shading regression 2.90Campbell Barton
Regression in deaff945d0b9
2020-06-15Fix T77496: Bones Custom Shapes Wires not drawnJeroen Bakker
Lines loose extraction cannot happen on the fly as the render data isn't complete. This patch will do the lines loose subbuffer extraction as a simple task and not on the fly. This patch introduces 2 sub-types of tasks that are executed single threaded. `EXTRACT_MESH_EXTRACT` would do the extraction using Mesh/BMesh geometry. `EXTRACT_LINES_LOOSE` creates the `lines_loose` subbuffer from already cached `lines` IBO. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D7964
2020-06-15Fix T77342: Fail to draw loose edgesJeroen Bakker
The underlying issue is that the loose edge extraction cannot be threaded. This patch will extract the loose edges during initialization of the render mesh data. When working on this patch the mesh_render_data_update was split into multiple functions to identify what part was failing. These functions would also help us with debugging. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D7962
2020-06-05Cleanup: spellingCampbell Barton
2020-06-04Fix error in recent fix for T77290Campbell Barton
2020-06-03Fix T77290: Crash displaying vertex colors in edit modeCampbell Barton
Regression from deaff945d0b9, follow logic from d98ae27f02c794a.
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