Commit Graph

503 Commits

Author SHA1 Message Date
barry
45928c1b81 Extended face-varying patch arrays to properly support two types:
- extended Far::PatchTable's FVar channels with two descriptors and stride
    - updated Far::PatchTableFactory to properly construct FVar patch arrays
    - extended Osd::PatchArray with two descriptors and common stride
    - updated Osd::CpuPatchTable and CpuEvaluator to use PatchArray extensions
2018-09-13 16:51:53 -07:00
barry
0f63aa997d Added bilinear end-cap option to Osd::MeshBits 2018-08-06 16:29:07 -07:00
barfowl
9c9108c3db
Merge pull request #959 from davidgyu/hlsl_patch_normals
Thanks David
2018-01-16 15:31:33 -08:00
barfowl
dcd82f4137
Merge pull request #960 from davidgyu/mtl_patch_normals
Metal patch shader changes for degenerate normals
2018-01-16 15:31:11 -08:00
David G Yu
6e02082bd7 Metal patch shader changes for degenerate normals
Updated Metal patch shaders to resolve degenerate normals.
This fix was ported from the GLSL patch shader source.

Also, added missing inf sharp test cases to mtlViewer.
2017-12-12 08:46:00 -08:00
David G Yu
917fc36dde HLSL patch shader changes for degenerate normals
Updated HLSL patch shaders to resolve degenerate normals.
This fix was ported from the GLSL patch shader source.

Also, added missing inf sharp test cases to dxViewer.
2017-11-21 18:01:57 -08:00
barry
0c2dd830b0 Updated GLSL patch shaders to resolve degenerate normals:
- modified Gregory patch shader to use existing Bezier patch evaluation
    - rewrote Bezier patch evaluation to use intermediate bilinear points
    - added detection and resolution of degenerate normal
    - eval normal partials no longer uses Weingarten eqns (requires N != 0)
    - updated normal partials to use differentiation/projection
2017-09-13 11:03:03 -07:00
David G Yu
58d867feea Fixed a typo in MTLPatchShaderSource
This fixes a shader compile error when enabling
the OPENSUBDIV_GREGORY_EVAL_TRUE_DERIVATIVES option.
2017-07-25 12:15:31 -07:00
David G Yu
2bcdedf0cc Fixed MtlComputeEvaluator docs and overloads
Updated MtlComputeEvaluator documentation to be
consistent with the documentation for other compute
evaluator implementations and fixed missing or
incorrect doxygen tags.

Also, updated the overloads for the EvalStencils
and EvalPatches methods to account for 1st and
2nd derivative evaluation.
2017-07-17 18:12:49 -07:00
Nicholas Blasingame
bdca520459 Added fvar support for metla as well as a ui for fvar. 2017-06-05 15:06:47 -07:00
David G Yu
dc950cf5fb Removed duplicate mtlVertexBuffer build config 2017-04-19 17:25:23 -07:00
Michael Harris
30cd2df37c Added Metal support 2017-04-19 16:49:53 -07:00
David G Yu
a725188081 Fixed Cpu Omp and GLXFB EvalStencils w/ deriv
Fixed a few bugs uncovered during testing.
2017-01-31 10:23:55 -08:00
David G Yu
63fdb39912 Improved XFB Evaluation of 1st and 2nd derivatives
Most GL implementations support a maximum of 4 transform
feedback buffer bindings. With the addition of 1st and 2nd
derivative evaluation up to 6 bindings might be required,
i.e. dst, du, dv, duu, duv, dvv.

This change extends the GLXFB Evaluator interface to allow
a client to specialize the evaluator when it is known that
(at least) the 1st derivative and 2nd derivative outputs
are interleaved together into shared buffers.

When this option is used, the maximum number of transform
feedback buffer bindings can be reduced to 3 instead of 6.
2017-01-30 12:12:00 -08:00
George ElKoura
a410a52f4e Merge pull request #924 from davidgyu/dev_osd_eval_deriv
Updated Osd Evaluator methods for derivative eval
2017-01-27 18:38:41 -08:00
David G Yu
8d3ba7372a Updated OsdMesh for 2nd partial deriv buffers 2017-01-27 17:14:27 -08:00
David G Yu
fe38ad8cda Added missing Osd Evaluator methods for deriv eval
Now that Far::LimitStencilTable and Far::PatchTable
support evaluation of 1st and 2nd derivatives the
Osd Evaluator API for evaluating stencils and patches
has been updated to match.
2017-01-27 17:14:18 -08:00
David G Yu
432b6b235f Updated doxygen comments for Osd Evaluator classes 2017-01-27 16:53:39 -08:00
barry
e3dd0f1798 Publicly exposed choice for smooth boundary patches at smooth corners:
- added Far::PatchTableFactory::Options::generateLegacySharpCornerPatches
    - legacy behavior of sharp patches at smooth corners preserved by default
    - added corresponding option bit to Osd::MeshBits
    - updated examples/glViewer with option
2017-01-27 16:22:04 -08:00
Takahito Tejima
044b25e818 Merge pull request #918 from davidgyu/dev_fix_spelling_731
Fixed spelling errors and typos in comments
2017-01-26 13:18:01 -08:00
David G Yu
66e8592ac6 Fixed program delete in Osd::GLComputeEvaluator
This fixes an inadvertant double delete of the previous GL progam
when compiling a compute kernel.
2017-01-25 17:00:33 -08:00
Thomas Thomassen
05352272b1 Fixed some typos in comments. 2017-01-24 22:48:48 -08:00
Mike Erwin
fc19cd2604 spelling phase 2
For completeness, ran files through an automated spell checker (Visual
Studio plugin) which caught several things missed while reading.
2017-01-24 22:48:44 -08:00
Mike Erwin
0beb654f0b spelling
Noticed a few typos when browsing comments. Proceeded with a "manual
spell check", reading all comments and tweaking spelling, grammar,
punctuation.

Didn't bother with Hbr library.

Comments only, no functional changes.
2017-01-11 12:40:49 -08:00
David G Yu
552e308266 Added OsdGetPatchIsRegular() for GLSL and HLSL 2016-10-17 15:25:17 -07:00
David G Yu
5ad64bc33e Addressed some FVar PatchTable API review notes
Fixed some inconsistencies with the methods added
to support face-varying patches.
2016-10-14 20:11:17 -07:00
barfowl
532013f5df Merge pull request #879 from davidgyu/patch_table_api_fixes
Fixed naming inconsistencies in Far::PatchTable
2016-10-11 22:12:08 -07:00
David G Yu
838fce27ab Exposed control for Gregory derivative weight eval
The symbol OPENSUBDIV_GREGORY_EVAL_TRUE_DERIVATIVES
determines the method used to compute derivative weights
for Gregory basis patches.

Setting this symbol during CMake configuration (and
hence during C++ and shader compilation) will enable
the use of true derivative weights.

The default behavior is to use a simpler approximation
for consistency with earlier releases.
2016-10-11 18:50:25 -07:00
David G Yu
df5d01ad3c Fixed naming inconsistencies in Far::PatchTable
The methods which return arrays of FVarPatchParam have
been made plural, e.g. GetFVarPatchParams(), for consistency
with the other methods in PatchTable.

Also fixed a missing doxygen tag.
2016-10-11 17:07:14 -07:00
David G. Yu
8257516427 Updated Osd mesh util classes for InfSharp patches
This adds some support to the Osd::*Mesh classes for
refining and populating infinitely sharp patches.
2016-09-30 10:56:22 -07:00
barfowl
39c53b234a Merge pull request #869 from davidgyu/cuda_build_fix
Fixed CUDA build with newer SDKs
2016-09-29 21:15:49 -07:00
David G Yu
c824dc34e0 Fixed CUDA build with newer SDKs
Recent CUDA SDKs no longer support the "compute_11"
gpu architecture. We now fallback to "compute_20"
instead for newer SDK versions. Additionally, this
behavior can be overriden using the new CMake list
variable OSD_CUDA_NVCC_FLAGS so that it is easier
for clients to target newer architectures and specify
additional arguments.
2016-09-29 21:04:42 -07:00
David G Yu
710da328f9 Fixed Osd::CudaEvaluator
- Fixed the size of a cudaMemcpy
- Fixed the use of local "static" storage
2016-09-29 20:27:43 -07:00
David G. Yu
6575a6e326 Updated Osd mesh util classes for FVar refinement
This adds some support to the Osd::*Mesh classes for
refining and populating face-varying patches.
2016-09-29 09:58:47 -07:00
David G. Yu
236afb2c06 Osd Varying and FaceVarying Patch Evaluation
Implemented EvalPatchesVarying and EvalPatchesFaceVarying
methods for Osd::*Evaluator classes, i.e. cpu, omp, tbb,
GLXFB, GLSLCompute, OpenCL, and CUDA.

Also, the GPU Kernel implementations have been updated to use
the common patchBasis implementation instead of re-implementing
methods to compute patch basis weights locally.
2016-09-29 09:56:15 -07:00
David G. Yu
552331f6d9 Added a common patchBasis implementation for Osd
This is used to compute patch basis weights for
the Osd::*Evaluator classes that are unable to
use the C++ implementation from far/patchBasis.h,
e.g. the GLSL, HLSL, OpenCL, and CUDA kernels.

Instead of duplicating this code for each different
kernel language, we share a single implementation
which is minimally adapted to accommodate specific
language restrictions and syntax.

This implementation can also be used by client
shader code executed while drawing, e.g. to
compute patch basis weights for evaluating varying
and face-varying patches.
2016-09-29 09:53:40 -07:00
David G. Yu
4e97cb2aba Reverted recent Far::PatchParam refactoring
This reverts most of the recent changes to the
organization of Far::PatchParam. In particular,
the core parameterization is no longer exposed
as a speparate PatchParamBase class.

We'll revisit this again in a later release, but
for now we will stick with a more straight
forward implementation.
2016-09-29 09:38:32 -07:00
David G Yu
6ae049e79c Updated Far internal patch basis methods
These methods now compute the patch basis in terms
of Far::PatchParamBase instead of Far::PatchParam
This allows these methods to be more easily reused
for evaluating patches for face-varying data.
2016-08-24 23:55:49 -07:00
David G. Yu
3e3695652f iso-646 fix for CUDA / CL / TBB 2016-06-25 14:23:55 -07:00
David G Yu
3d08e0ac27 Merge pull request #810 from thomthom/dev-iso646-fix-dx
iso-646 fix for DirectX project
2016-06-25 13:55:54 -07:00
Thomas Thomassen
b1e1ff31b4 Clean up DX, example and tutorials. 2016-06-25 10:30:50 +02:00
Thomas Thomassen
72610a3043 Glean up GLEW and GLFW. 2016-06-25 10:29:59 +02:00
Thomas Thomassen
aa0599b4bc Merge branch 'dev'
Conflicts:
	opensubdiv/far/patchTableFactory.cpp
2016-06-24 23:30:44 +02:00
George ElKoura
923d60ca74 Use cmake's folder feature on platforms that support it.
We now make use of folders where they are supported.  In particular, on Visual Studio, this produces much nicer solutions to navigate.
2016-06-09 17:04:26 -07:00
Thomas Thomassen
c422a79031 Rename and, or and not to &&, || and ! to address compilers that don't support them out of the box without extra headers. 2016-02-21 15:47:11 +01:00
Takahito Tejima
2adef0d2fd Merge pull request #782 from davidgyu/vs2015Fix1
Fixed build warnings (VS2015)
2016-02-05 17:00:48 -08:00
Takahito Tejima
4edcdbc1b7 Merge pull request #781 from davidgyu/perfFix
Tess shader performance fix
2016-02-05 17:00:26 -08:00
David G Yu
108c3a86cc Merge pull request #772 from xiao-deng/dev
Add events control to clVertexBuffer and clEvaluator
2016-02-05 16:56:56 -08:00
manuelk
20b6dd2aa3 Fix a minor build warning (trips MSVC 2015) 2016-02-05 15:30:59 -08:00
David G. Yu
301496bd3b Additional tess control/hull shader perf fixes
This change make the bspline patch tess control/hull shader revert to
control vertex mirroring for boundary edges when the patch sharpness is
zero. This change helps improve some shader codegen optimization and
L1 cache behavior on (at least) Kepler GPUs with recent drivers.
2016-02-05 14:53:13 -08:00