PixarAnimationStudios / OpenSubdiv

An Open-Source subdivision surface library.
graphics.pixar.com/opensubdiv
Other
2.88k stars 558 forks source link

hbr/mesh.h: Fix warning, numfaces written but not read. #1306

Closed waywardmonkeys closed 1 year ago

waywardmonkeys commented 1 year ago

While it was iterating over the faces and calculating counts, numfaces was being incremented, but then nfaces was used. These would differ if there was a null face.

Found when using roughly current compilers for emscripten and a WebAssembly build.

davidgyu commented 1 year ago

Filed as internal issue #0SD-424

davidgyu commented 1 year ago

As noted here: 3.x Hbr Overview and here 3.5 Release Notes the code in opensubdiv/hbr is deprecated and slated for removal at some point in the future. We're reluctant to merge changes into this part of the codebase. We are looking into adding a NO_HBR option which hopefully would help you out here. Thanks!

waywardmonkeys commented 1 year ago

I hadn't seen that. Would an external PR to add such an option be of interest or will you just do it internally?

davidgyu commented 1 year ago

A PR would be welcome but be forewarned that there are currently dependencies on hbr in the regression tests which complicates implementing such a NO_HBR option.

davidgyu commented 1 year ago

Marking this closed per discussion above.