diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-10-16 15:59:18 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-10-30 17:15:56 +0300 |
commit | f3059723771b90337b126a87a58b1ada981a21b1 (patch) | |
tree | 5443b7fe777d60f47ad1ca41a8dcd8e43977cffc /intern/opensubdiv/opensubdiv_evaluator_capi.h | |
parent | 05ee67a7c82b1c35add60cbf719f370b28538ac9 (diff) |
OpenSubdiv: Initial implementation of batched evaluation
The idea is to give multiple coordinates to evaluator and evaluate them
all at once, avoiding any possible overhead.
Diffstat (limited to 'intern/opensubdiv/opensubdiv_evaluator_capi.h')
-rw-r--r-- | intern/opensubdiv/opensubdiv_evaluator_capi.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/intern/opensubdiv/opensubdiv_evaluator_capi.h b/intern/opensubdiv/opensubdiv_evaluator_capi.h index ceb0c58feba..1572d01b851 100644 --- a/intern/opensubdiv/opensubdiv_evaluator_capi.h +++ b/intern/opensubdiv/opensubdiv_evaluator_capi.h @@ -24,6 +24,7 @@ extern "C" { #endif struct OpenSubdiv_EvaluatorInternal; +struct OpenSubdiv_PatchCoord; struct OpenSubdiv_TopologyRefiner; typedef struct OpenSubdiv_Evaluator { @@ -108,6 +109,19 @@ typedef struct OpenSubdiv_Evaluator { float face_v, float face_varying[2]); + // Batched evaluation of multiple input coordinates. + + // Evaluate limit surface. + // If derivatives are NULL, they will not be evaluated. + // + // NOTE: Output arrays must point to a memory of size float[3]*num_patch_coords. + void (*evaluatePatchesLimit)(struct OpenSubdiv_Evaluator *evaluator, + const struct OpenSubdiv_PatchCoord *patch_coords, + const int num_patch_coords, + float *P, + float *dPdu, + float *dPdv); + // Internal storage for the use in this module only. // // This is where actual OpenSubdiv's evaluator is living. |