Page MenuHome

Fix T94729: GPU subdivision does not support meshes without polygons
ClosedPublic

Authored by Kévin Dietrich (kevindietrich) on Feb 21 2022, 4:25 PM.

Details

Summary

There are two issues revealed in the bug report:

  • the GPU subdivision does not support meshes with only loose geometry
  • the loose geometry is not subdivided

For the first case, checks are added to ensure we still fill the
buffers with loose geometry even if no polygons are present.

For the second case, this adds
BKE_subdiv_mesh_interpolate_position_on_edge which encapsulates the
loose vertex interpolation mechanism previously found in
subdiv_mesh_vertex_of_loose_edge.

The subdivided loose geometry is stored in a new specific data structure
DRWSubdivLooseGeom so as to not pollute MeshExtractLooseGeom. These
structures store the corresponding coarse element data, which will be
used for filling GPU buffers appropriately.

Diff Detail

Repository
rB Blender
Branch
fix_T94729_gpu_subdiv_loose_geom (branched from master)
Build Status
Buildable 20679
Build 20679: arc lint + arc unit

Event Timeline

Kévin Dietrich (kevindietrich) requested review of this revision.Feb 21 2022, 4:25 PM
Kévin Dietrich (kevindietrich) created this revision.

Here are the tests files I used to check things are working:

Not sure the load on Clement currently. Maybe @Jeroen Bakker (jbakker) can help with the review of draw manager side?

Is there an update here? As this fixes a high priority bug on the 3.1 board, it would be good to check on this asap.

Codewise the patch seems ok, but haven't been able to test it.

source/blender/draw/intern/draw_cache_impl_subdivision.cc
1898

Could add a comment that we continue for loose geometry?

Add comment that we might continue for loose geometry.

This revision is now accepted and ready to land.Mar 2 2022, 2:49 PM