Commit Graph

873 Commits

Author SHA1 Message Date
David G Yu
c65995b834 Merge pull request #541 from barfowl/mask_interface
Moved Vtr::MaskInterface into Far::PrimvarRefiner
2015-05-28 13:50:30 -07:00
Takahito Tejima
9cfdb6c5c1 Mac build and shader compiler error fix. 2015-05-28 10:27:23 -07:00
David G Yu
7d51c1d2e9 Merge pull request #539 from takahito-tejima/osdapi
Add GPU stencil/patch derivative kernels
2015-05-28 10:04:26 -07:00
Jeremy Cowles
30fb3260ec Merge pull request #540 from barfowl/boundary_none
Fixed refinement when using BoundaryInterpolation mode "None"
2015-05-27 21:02:55 -07:00
barfowl
6ce3292576 Moved Vtr::MaskInterface into Far::PrimvarRefiner:
- updated PrimvarRefiner to make use of now-local Mask class
    - renamed vtr/maskInterfaces.h to vtr/componentInterfaces.h
    - updated usage of renamed header file and CMakeLists.txt
2015-05-27 20:44:06 -07:00
barfowl
9cd082fde1 Tag faces as holes when using BoundaryInterpolation setting of "none" 2015-05-27 19:42:27 -07:00
Takahito Tejima
9dcbaee147 Add GPU stencil/patch derivative kernels
implements cuda, CL, GLXFB and GLCompute kernels of derivative
evaluation for both limit stencils and patches.
2015-05-27 17:23:36 -07:00
barfowl
9a14bf72d4 Added missing scaling to derivatives of Bilinear patches 2015-05-27 15:11:35 -07:00
David G Yu
7f03b864b7 Merge pull request #534 from barfowl/face_uniform
Moved base-face propagation to Far::PrimvarRefiner
2015-05-27 15:32:01 -04:00
Takahito Tejima
49a16539dd A workaround for the GLSL compute crash on some nvidia drivers
It looks like there's a compiler bug in some earlier nvidia driver 340/346 releases.
It has been fixed in 348.07 (win) as far as I can tell.

Following code behaves incorrectly.

void f(int a) {
  for (int i=0; i<3; ++i) doSomething(a, i);
}
void g() {
  for (int i=0; i<100; ++i) f(i);
}

The workaround is to use different identifiers for each function.
2015-05-27 08:57:47 -07:00
barfowl
0a86d6fe44 Moved base-face propagation to Far::PrimvarRefiner:
- removed TopologyRefiner options to propagate base face in Refinememt
    - removed all Vtr storage and management of base face
    - added PrimvarRefiner methods to "interpolate" per-face primvar data
2015-05-26 19:56:39 -07:00
David G Yu
22936eff56 Merge pull request #533 from c64kernal/dev_internal
Lower-case Internal namespace to match convention.
2015-05-26 21:27:28 -04:00
George ElKoura
a8568fc983 Lower-case Internal namespace to match convention.
Renamed "Internal" namespace to "internal" to match the convention in the rest
of the library.
2015-05-26 18:19:45 -07:00
George ElKoura
e9507b9fd6 Merge pull request #525 from barfowl/vtr_internal
Moved Vtr classes within internal namespace:
2015-05-26 18:09:41 -07:00
Takahito Tejima
47f79e54fc Merge pull request #528 from davidgyu/memfix
Fixed buffer access into empty container
2015-05-26 14:55:27 -07:00
Takahito Tejima
62b7197389 Merge branch '358' of https://github.com/ielillo/OpenSubdiv into ielillo-358
Conflicts:
	opensubdiv/far/stencilBuilder.cpp
2015-05-26 14:22:36 -07:00
Takahito Tejima
749bbf4271 Fix OpenCL and CUDA EvalPatches kernels. 2015-05-26 11:13:30 -07:00
David G. Yu
8568370630 Fixed buffer access into empty container
Raised as a run-time error by the VS2013 debug STL implementation.
2015-05-26 11:03:21 -07:00
Takahito Tejima
541aeddd3a Osd API refactor: EvalStencils and EvalPatches
Add EvalStencils and EvalPatches API for most of CPU and GPU evaluators.

with this change, Eval API in the osd layer consists of following parts:

- Evaluators (Cpu, Omp, Tbb, Cuda, CL, GLXFB, GLCompute, D3D11Compute)
  implements EvalStencils and EvalPatches(*). Both supports derivatives
  (not fully implemented though)

- Interop vertex buffer classes (optional, same as before)
  Note that these classes are not necessary to use Evaluators.
  All evaluators have EvalStencils/Patches which take device-specific
  buffer objects. For example, GLXFBEvaluator can take GLuint directly
  for both stencil tables and input primvars. Although using these
  interop classes makes it easy to integrate osd into relatively
  simple applications.

- device-dependent StencilTable and PatchTable (optional)
  These are also optional, but can be used simply a substitute of
  Far::StencilTable and Far::PatchTable for osd evaluators.

- PatchArray, PatchCoord, PatchParam
  They are tiny structs used for GPU based patch evaluation.

(*) TODO and known issues:
- CLEvaluator and D3D11Evaluator's EvalPatches() have not been implemented.
- GPU Gregory patch evaluation has not been implemented in EvalPatches().
- CudaEvaluator::EvalPatches() is very unstable.
- All patch evaluation kernels have not been well optimized.
- Currently GLXFB kernel doesn't support derivative evaluation.
   There's a technical difficulty for the multi-stream output.
2015-05-25 22:43:43 -07:00
barfowl
85b65bd2ef Moved Vtr classes within internal namespace:
- moved all major Vtr classes within namespace internal
    - updated all Vtr class access with Far
2015-05-25 20:34:50 -07:00
Jeremy Cowles
d335c7249e Merge pull request #522 from barfowl/primvarRefiner
Moved primvar interpolation methods to new Far::PrimvarRefiner class
2015-05-24 22:18:26 -07:00
George ElKoura
670a48fd86 Fix build breakage on MSVC due to implicit downcasting.
Be explicit about the casting from size_t to int in stencilBuilder.cpp.
2015-05-24 01:21:48 -07:00
Jeremy Cowles
15020c2c4c Fix StencilBuilder copyright (2015) 2015-05-23 20:34:59 -07:00
Jeremy Cowles
befbc282db Add stencilTable.cpp, minor cleanup
* Added stencilTable.cpp
 * Fixed the "off" variable shadow warning
 * Moved constructors to cpp file
 * Made LimitStencilTable constructor private
 * other minor clean up.
2015-05-23 20:31:18 -07:00
barfowl
a15edc1f2c Moved primvar interpolation methods to new Far::PrimvarRefiner class
- created new class Far::PrimvarRefiner with interpolation methods
    - removed interpolation and limit methods from Far::TopologyRefiner
    - replaced internal usage in Far::StencilTableFactory
    - replaced usage in regressions, tutorials and examples
2015-05-23 18:56:36 -07:00
Ignacio Lillo
e6733580ba Fixed warning that prevented building the project. 2015-05-23 00:48:58 -03:00
George ElKoura
7a97d7be5d Merge pull request #520 from barfowl/vtr_friends
Removing friends from Vtr classes
2015-05-22 18:49:47 -07:00
jcowles
909757ca9b Faster, simpler stencil table construction.
This is a new implementation of the stencil table construction algorithm found
in protoStencil.h. In local tests with production assets, the new algorithm is
~25% faster and significantly more stable, in terms of average performance

In one asset test, generating stencils for level 10 adaptive refinement of
BuzzLightyear was reduced from 18s to 13s.
2015-05-22 16:36:12 -07:00
barfowl
b64eb5e2e0 Removing friends from Vtr classes and making more accessible internally:
- removed all friend declarations (no more Far declarations with Vtr)
    - all protected methods made public
    - intent is to move these into namespace internal
    - access between Vtr classes is under review
2015-05-22 15:52:47 -07:00
Takahito Tejima
a7c5179ef9 renaming (2/2) PatchTables and StencilTables to PatchTable and StencilTable
replace all occurrences reffering PatchTables, StencilTables, and their factories.
2015-05-22 11:50:01 -07:00
Takahito Tejima
e6f951c010 renaming (1/2) PatchTables and StencilTables to PatchTable and StencilTable
this commit just changes filenames (for better diffs)
2015-05-22 11:02:58 -07:00
Jeremy Cowles
bec60d5500 Merge pull request #512 from takahito-tejima/dev
remove maximum valence limitation in gregory basis and bspline basis end caps.
2015-05-21 23:38:40 -07:00
barfowl
3d80cc56f5 Replaced and removed remaining use of TopologyRefiner level methods:
- replaced all remaining usage internal to far with TopologyLevel
    - removed the obsolete methods from TopologyRefiner
2015-05-21 21:26:41 -07:00
barfowl
ff13665a02 Introduced Far::TopologyLevel methods in place of TopologyRefiner in Osd 2015-05-21 20:20:16 -07:00
David G Yu
2b33de38f8 Merge pull request #513 from takahito-tejima/refactor2
implements Osd::CpuEvaluator::EvalPatches function.
2015-05-21 18:55:09 -07:00
David G Yu
71055dbdd9 Merge pull request #510 from takahito-tejima/refactor
glStencilViewer crash fix
2015-05-21 18:53:45 -07:00
Takahito Tejima
2e26f932e1 implements Osd::CpuEvaluator::EvalPatches function.
- it takes number and pointer for the input PatchCoords.
- add derivative evaluations.
- enhance glEvalLimit example to see the derivative evaluation works.
2015-05-21 17:45:13 -07:00
Takahito Tejima
2008e6ca05 Merge pull request #511 from davidgyu/shadingRefactor
Sync'ed up GLSL and HLSL patch shader source.
2015-05-21 11:51:40 -07:00
Takahito Tejima
b15762204a remove maxvalence limitation in FarGregoryBasis. 2015-05-21 10:59:40 -07:00
David G Yu
f4a8cafe86 Sync'ed up GLSL and HLSL patch shader source.
Cleaned up the Legacy Gregory shader source by accessing buffer
data through helper functions.

Switched to performing tessellation in untransformed (object) space.
2015-05-21 09:56:25 -07:00
Takahito Tejima
743c424e9c Add high-valence evaluation path into gregory basis. 2015-05-21 09:42:26 -07:00
Takahito Tejima
e8ac41dbc8 glStencilViewer crash fix #2
this change fixes a crash when selecting catmark_hole_test1
in glStencilViewer. If there's a hole limit stencils may not
be found for given limit location, resulting invalid stencil
entries.
2015-05-21 09:05:33 -07:00
Takahito Tejima
c9150cfb23 glStencilViewer crash fix #1
use patchtables instead of patchTables (yes, quite confusing...)
patchtables may be created ondemand if patchTables isn't given
as an argument.
2015-05-21 09:03:06 -07:00
barfowl
05e9c48ea9 Raised maximum valence supported by Vtr and included new test shapes:
- changed Vtr::LocalIndex to 16-bit integer from 8-bit
    - added test shapes including valence 360 vertices
    - disabled new shapes in far/regression until improved accuracy accepted
2015-05-20 23:36:45 -07:00
George ElKoura
32e9bb7e29 Merge pull request #508 from davidgyu/dxfix
Fixed HLSL shader compile error.
2015-05-20 22:25:14 -07:00
David G Yu
1bdc69dbfc Merge pull request #506 from c64kernal/dev_patch
Remove need for friending a class in PatchTables.
2015-05-20 21:53:19 -07:00
David G. Yu
d1452a02cf Fixed HLSL shader compile error. 2015-05-20 21:48:52 -07:00
George ElKoura
b53a73f7de Removed unnecessary friendship in ProtoStencil. 2015-05-20 20:10:14 -07:00
George ElKoura
f521c9dde3 Remove need for friending a class in PatchTables.
PatchTables no longer needs to friend EndCapLegacyGregoryPatchFactory.
Instead we now make the patch table factory pass in the data that needs
to be updated directly to EndCapLegacyGregoryPatchFactory.
2015-05-20 19:44:43 -07:00
George ElKoura
a7d9d6a9b4 Merge pull request #504 from davidgyu/cleanup
Comment cleanups discovered while reviewing Far
2015-05-20 19:40:49 -07:00