9b70851d91684e81bda76cb2b35d921da2ddfaaa
The initial goal of this PR is to avoid creating vertex and index buffers as part of the "request" phase of the drawing loop. Conflating requesting and creating index buffers might not sound so bad, but it ends up significantly complicating the whole process. It is also incompatible with a future buffer cache that would allow avoiding re-uploading mesh buffers. Specifically, this means removing the use of `DRW_vbo_request` and `DRW_ibo_request` from the mesh batch extraction process. Instead, a list of buffer types is gathered based on the requested batches. Then that list is filtered to find the batches that haven't been requested yet. Overall I find the new process much easier to understand. A few examples of simplifications this allows are avoiding allocating `MeshRenderData` on the heap, and the removal of its `use_final_mesh` member. That's just replaced by passing the necessary information through the call stack. Another notable difference is that for meshes, EEVEE's velocity module now requests a batch that contains the buffer rather than just requesting the buffer itself. This is just simpler to get working since it doesn't require a separate code path. The task graph argument for extraction is unused after this change. It wasn't used effectively anyway; a simpler method of multithreading extractions is used in this PR. I didn't remove it completely because it will probably be repurposed in the next step of this project. The next step in this project is to replace `MeshBufferList` with a global cache that's keyed based on the mesh data that compromises each batch, when possible (i.e. for non edit-mode meshes). This changes above should be applied to other object types too. Pull Request: https://projects.blender.org/blender/blender/pulls/135699
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
