Providing these as public headers in opensubdiv/osd allows client code
to implement evaluation kernels in their own TBB, CUDA, OMP, GCD, etc.
code without needing an implementation within the osd codebase.
Tested with C++, CUDA, and oneTBB client kernels.
Folded osd/patchBasisCommon.h and osd/patchBasisCommonEval.h into the
single header file osd/patchBasis.h and renamed osd/PatchBasisCommonTypes.h
to osd/patchBasisTypes.h
Moved these into the OpenSubdiv::Osd namespace when compiled for C++ and
added a brief comment describing the intended use cases for this code.
This is a new method for GLSL, HLSL, and MSL which returns patch
drawing shader source which excludes legacy shader source aspects.
This improves portability and compatibility and may also improve
shader compile times since the resulting shader source strings
are smaller without the legacy shader source aspects.
Tested with Vulkan and DX12 in addition to GL, DX11, and Metal.
Relocated from PatchCommon to PatchLegacy several aspects of the
shader source which can cause problems with typical use cases.
Specifically, things like resource bindings, input assembler and
interstage declarations are best left to client code.
These are not removed, just relocated and remain available for
backward compatibility. Updated the GLSL, HLSL, and MSL source.
Updated the CMake build to locate TBB using TBB's CMake config
and deleted the local cmake/FindTBB.cmake module.
While the source code remains compatible with earlier versions of
TBB, updated the minimum TBB version from 4.4 to 2018 since that
is the earliest TBB release to include a CMake config. This is
the version of TBB specified for the CY2019 VFX Reference Platform.
Tested on Windows, Linux, and macOS using TBB 2018 Update 6,
TBB 2020 Update 3, and oneTBB 2021.10.0
The existing implementation in Osd::TbbEvaluator has never been implemented
correctly and that implementation is incompatible with the oneTBB API.
These methods are now marked deprecated in the two places where defined
in Osd::TbbEvaluator and Osd::OmpEvaluator, but for consistency we preserve
the existing implementation when building with older versions of tbb.
We've already removed all use of these methods from the tests and examples.
Updated target object dependencies for Apple static and dynamic frameworks
to use TARGET_EXISTS for osd_gpu_obj to allow correct linking when no
OSD_GPU targets are enabled. We'll likely revisit these targets further
for future releases of OpenSubdiv.
Fixes#1224Fixes#1236
The OpenSubdiv public interface currently requires only C++11 but we
choose this version since C++14 has been the default since GCC 6,
Clang 6, and Visual Studio 2017 (for the most part) and C++14 has been
the default for OpenSubdiv on macOS when support for Metal is enabled.
This setting is guarded so that it can be overridden by the caller when
running CMake.
Fixes#1276
Added target include directories for the library targets
so that interface include directories are published with
the OpenSubdiv cmake config.
Also, removed a cmake version test which is no longer needed.
Fixes#1278
The cmake config export paths are now more consistent
with other vfx platform projects.
The target names are now more consistent with existing
opensubdiv static and dynamic library names.
This simplifies build dependencies when cross-compiling
or when building multi-architecture binaries.
For backward compatibility with earlier releases, the compiled
C++ version of this tool is used when no Python interpreter is found.
- test if a vertex is a corner (one incident face)
- test if valence of a vertex is regular
- tests if a vertex is semi- or inf-sharp
- tests if an edge is semi- or inf-sharp
- apply bitmask in member initialization to suppress warning
- add public Set...() with bitmask for assignment by users
- replace any assignments with new public Set...() methods
- default flags include warnings enabled by -Wall and -Wextra
- suppressed newer warnings in public headers and internal files
(-Wclass-memaccess, -Wcast-function-type, -Wdeprecated-copy)
- suppressed -Wunused-function from internal source files
- normalized the rational weights for pairs of interior points
- fixed sign swap error in mixed partial of bilinear patches
- applied changes to both far/patchBasis and osd/patchBasisCommon
This set of commits includes the addition of a new evaluation interface
that treats a subdivision mesh more like a piecewise parametric surface
primitive. The new interface was placed in namespace "Bfr" for "Base
Face Representation" as all concepts and classes relate to a single face
of the base mesh.
Client applications may keep track of the active shader program so as to
not unnecessarily bind and unbind the same shader consecutively as
switching shaders is costly.
The current behavior of the OpenGL compute evaluator is to set the
active shader to 0 (zero) after running its program(s) which might
interfere with the aforemoentioned client applications' behavior,
leading to bugs.
Instead of unsetting any previously set shader program, cache the
current program before using the evaluator program, and reset the active
program to the previous one when done.
In Blender, this lead to some rendering artifacts. See https://
developer.blender.org/D15064 for more details on it.
Assigned the postfix "_static" to the static framework
and also fixed header installation. This makes the static
framework usable and also fixes build errors when using
recent versions of CMake. Also fixes build errors that
can occur when building with multiple threads.