Maniphest T94644

GPU subdivision improvements
Needs Triage, NormalTO DO

Assigned To
None
Authored By
Kévin Dietrich (kevindietrich)
Jan 4 2022, 7:28 PM
Tags
  • EEVEE & Viewport
  • Modeling
Subscribers
Carlos (Mujsoye)
Daniel Salazar (zanqdo)
Evan Wilson (EAW)
Garek (Garek)
Jacob Merrill (blueprintrandom)
Jeroen Bakker (jbakker)
Kévin Dietrich (kevindietrich)
2 More Subscribers
Tokens
"Love" token, awarded by kivig."Love" token, awarded by andruxa696."Love" token, awarded by Mujsoye."Yellow Medal" token, awarded by liquidificador."Like" token, awarded by blueprintrandom.

Description

This is a list of TODOs and ideas for improving GPU subdivision support (D12406).

TODOs

  • Investigate if read and write operations can be made more coherent.
  • Investigate if compute dispatch size can be improved, to avoid too many calls.
  • Remove some useless OpenGL initialization from OpenSubDiv
    • We use our own patch evaluation shader, however we are still forced to compile the one from OpenSubDiv. This will require to implement our own GLComputeEvaluator.
    • GLVertexBuffer also initializes the OpenGL library. We can avoid this by using our own vertex buffer wrapper.
  • Compressed data structures for reducing memory usage
    • Using compute shaders forces us to only deal with ints and floats. However, this is using more memory than necessary (e.g. for normals).
    • This requires to do manual bit packing in the shaders, we need to pay good attention to alignements and data types (int vs. uint).
  • Use multithreading for CPU tasks when applicable
    • We still process some data on the CPU (e.g. polygons to materials map, edit mode flags). Although they are based on the coarse mesh, we could use multithreading to speed things up if needed.

Ideas

  • Heuristic to disable GPU subdivision for small meshes, if they are hindering performance
  • The mesh wrapper used for on the CPU might not need all of the data to be subdivided (e.g. we do not need vertex colors for snapping), we could potentially speed up CPU subdivision by only subdividing what we need.
  • Potentially evaluate points on the GPU and copy back to the CPU side, this would require threads to have their own GL context.
  • See if OpenSubDiv data structures can be shared between the CPU and GPU code (e.g. the stencils buffers) so that we do not have to create duplicate versions when the CPU side mesh is requested.

Vulkan

Event Timeline

Kévin Dietrich (kevindietrich) created this task.Jan 4 2022, 7:28 PM
Kévin Dietrich (kevindietrich) updated the task description.
Kévin Dietrich (kevindietrich) mentioned this in D12406: OpenSubDiv: add support for an OpenGL evaluator.Jan 4 2022, 7:31 PM
Kévin Dietrich (kevindietrich) updated the task description.Jan 4 2022, 7:43 PM
Jacob Merrill (blueprintrandom) awarded a token.Jan 4 2022, 9:17 PM
Jacob Merrill (blueprintrandom) added a subscriber: Jacob Merrill (blueprintrandom).
Garek (Garek) added a subscriber: Garek (Garek).Jan 4 2022, 10:54 PM
G. Solis (liquidificador) awarded a token.Jan 5 2022, 12:40 AM
Carlos (Mujsoye) added a subscriber: Carlos (Mujsoye).Jan 5 2022, 7:02 AM
Carlos (Mujsoye) awarded a token.Jan 5 2022, 7:05 AM
Jeroen Bakker (jbakker) added a subscriber: Jeroen Bakker (jbakker).Jan 5 2022, 12:41 PM
Daniel Salazar (zanqdo) added a subscriber: Daniel Salazar (zanqdo).Jan 8 2022, 12:00 AM
Brecht Van Lommel (brecht) mentioned this in T68996: OpenSubdiv GPU acceleration.Jan 10 2022, 2:50 PM
Andrey (andruxa696) awarded a token.Jan 10 2022, 3:48 PM
Sam Green (samgreen) added a subscriber: Sam Green (samgreen).Jan 10 2022, 6:37 PM
paul szajner (szap) added a subscriber: paul szajner (szap).Jan 10 2022, 6:41 PM
Luc Revardel (lrevardel) added a subscriber: Luc Revardel (lrevardel).Jan 13 2022, 3:58 AM
Konstantins Visnevskis (kivig) awarded a token.Jan 17 2022, 3:57 PM
Kévin Dietrich (kevindietrich) mentioned this in rBc5dcfb63d9e4: Fix T94881: GPU subdivision fails with high polycount coarse meshes.Feb 17 2022, 1:14 PM
Evan Wilson (EAW) added a subscriber: Evan Wilson (EAW).Feb 20 2022, 9:23 PM
Omar Emara (OmarSquircleArt) changed the subtype of this task from "Report" to "To Do".Apr 6 2022, 11:35 AM