Commit Graph

1026 Commits

Author SHA1 Message Date
barry
2d33a6ebf4 Adding VSpan to standardize representation of partial rings around vertices:
- added definition and gathering method to Vtr::Level
    - extended Far::EndCap...PatchFactories with VSpan[4] for patch corners
    - extended Far::EndCapGregoryPatchFactory to avoid last level assumption
    - adapted Far::PatchTableFactory to use above extensions
    - extended Far::GregoryBasis to recognize VSpan corners
    - simplified Far::GregoryBasis treatement of boundaries
    - fixed bug in Far::GregoryBasis related to smooth corners
2016-07-13 18:16:11 -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
barfowl
4808b50785 Fixed Chaikin-related bug subdividing edge sharpness:
- child sharpness should retain parent sharpness when not semi-sharp
2016-03-30 18:32:55 -07:00
David G Yu
799b26bba3 Release 3.0.5 2016-03-25 15:15:29 -07:00
David G Yu
841f573224 Fixed residual memory consumed by end cap stencils
An earlier change improved transient memory used during the construction
of end cap stencil tables but could leave unused capacity in the internal
containers of the resulting stencil tables. This change adds an additional
internal factory helper method which trims this storage.
2016-03-16 14:44:47 -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
David G Yu
4690519424 Release 3.0.4 2016-02-10 16:50:43 -08:00
Takahito Tejima
72bd9f00ad Merge pull request #777 from davidgyu/refineLevelsFix
Fixed tutorial use of refined levels.
2016-02-05 17:01:31 -08: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
David G. Yu
71fcb67509 Tessellation shader performance improvement
Re-organized the single-crease patch code path in the tessellation
control/hull shaders to improve performance in the case where no patches
have non-zero crease sharpnesses.
2016-01-29 15:31:48 -08:00
David G. Yu
86026a9fe8 Shader performance workaround
Changed a couple of local 4x4 matrices to global uniforms to
work around a performance problem on recent GL drivers.

There are two local 4x4 float matrices with constant initializers
in the function OsdComputePerPatchVertexBSpline(...). Changing
these from local variables to global initialized uniforms improves
performance dramatically on recent NVIDIA drivers (e.g. 361.48 windows).

There is no such difference with Direct3D, but this change updates
the shader code for both implementations for consistency.
2016-01-29 15:31:38 -08:00
David G Yu
3aaf491dda Fixed Far::TopologyRefiner::GetNumLevels()
This method now returns the number of _farLevels where previously
it returned the number of _levels. This is primarily a semantic
difference, as the two containers should have equal size. But this
method is intended to accompany Far::TopologyRefiner::GetLevel()
which returns a reference to an element in _farLevels;
2016-01-22 17:38:58 -08:00
manuelk
4746ab4bc9 Surround D3D10_SHADER_RESOURCES_MAY_ALIAS with #ifdef to avoid build errors with some versions of D3D SDK
Fixes #773
2016-01-13 11:33:38 -08:00
David G. Yu
67a07044d7 Improved fix for stencil table construction
My previous fix added some defensive logic in case the
local point stencil table was empty when attempting to
append local point stencils to an existing stencil table.

This change fixes Far::PatchTableFactory to not return
empty local point stencil tables when there are no local
point stencils. This behavior is now more consistent with
earlier releases.

We will leave the earlier defensive logic in place as well.
2015-12-11 14:37:39 -08:00
Jeremy Cowles
b3213df0a1 Merge pull request #761 from davidgyu/stencilFactoryFix
Fixed potential crash in Far::StencilTableFactory
2015-12-11 10:56:29 -08:00
xiao-deng
73b5883d02 Add events control to clVertexBuffer and clEvaluator 2015-11-23 17:54:03 +08:00
David G. Yu
d1b9e45c13 Fixed potential crash in Far::StencilTableFactory
Now StencilTableFactory::AppendLocalPointStencilTable() does
nothing when the localPointStencilTable is empty. This avoids
a potential crash (failed assertion) when both the baseStencilTable
and the localPointStencilTable are empty, as is the case for
simple geometry like the all-quads torus regression test shape.
2015-11-18 18:57:47 -08:00
David G. Yu
c588e95e13 Disabled fractional spacing w/o screen space tess
For now, the common patch shader code supports fractional spacing
modes only when screen-space tessellation is also enabled.

It's possible to relax this restriction, but that requires changing
the client shader interface.
2015-11-18 18:54:19 -08:00
Jeremy Cowles
cf7135eb2a Merge pull request #756 from davidgyu/limitStencilFix
Added missing LimitStencil accessor methods
2015-10-30 13:21:33 -07:00
Jeremy Cowles
53696858c7 Merge pull request #755 from takahito-tejima/gregory
Reduce the transient memory consumption in endcap construction.
2015-10-30 13:21:14 -07:00
David G Yu
b9a7d40559 Added missing LimitStencil accessor methods
Now Far::LimitStencilTable provides proper accessor
methods for retrieving individual LimitStencils from
the table.
2015-10-26 14:17:53 -07:00
David G. Yu
b0d612f837 Restored support for fractional tessellation
This change includes support for both fractional_even_spacing
and fractional_odd_spacing.

The implementation follows the existing pattern of re-parameterizing
the tessellation domain only along transition boundary edges. This
allows for crack-free tessellation, but it might be better to
consistently re-parameterize all of the outer edges of all patches,
which also would be required for numerically watertight tessellation.

This is implemented in a way that requires no changes to the client
shader API. It should be more efficient to move some computations to
the control/hull shaders and reduce divergence in the execution of
eval/domain shaders.
2015-10-23 15:24:35 -07:00
Takahito Tejima
024da1f729 Reduce the transient memory consumption in endcap construction.
- instead of accumulating GregoryBasis::Point (fixed size stencils
  backed by stackbuffer), pack the stencils into StencilTable as they
  are evaluated
- use single integer for varying stencils of patch points, not
  a GregoryBasis::Point
- cap the reserved stencil entry size.
2015-10-23 15:05:02 -07:00
jcowles
9f0e49edc6 Release 3.0.3 2015-10-05 16:27:09 -07:00
Jeremy Cowles
caaff5d85b Merge pull request #748 from davidgyu/assertFix
Fixed out of bounds mem access for OMP and TBB
2015-09-30 13:41:53 -07:00
David G. Yu
6bbf0f78ce Fixed out of bounds mem access for OMP and TBB 2015-09-30 13:26:35 -07:00
David G. Yu
287441118e Fixed double to float conversion warnings 2015-09-30 13:15:42 -07:00
Takahito Tejima
f5810bac97 Fix windows build 2015-09-30 11:20:03 -07:00
barfowl
0aea00a2e8 Improved patch approximations around non-manifold features
- use regular corner patches around non-manifold verts that were sharpened
2015-09-22 17:26:09 -07:00
Jeremy Cowles
f744e20c4b Merge pull request #742 from anshuarya/dev
Set layout to std430 for GLSL Compute kernel
2015-09-21 23:50:56 -07:00
Takahito Tejima
007a2e8885 Removing debug code that mistakenly slipped into glPatchTable.cpp.
Also use GL_ARRAY_BUFFER for the binding point of updating indices instead of GL_ELEMENT_ARRAY_BUFFER
2015-09-21 14:33:11 -07:00
Anshu Arya
4be4b25cc9 Set layout to std430 for GLSL Compute kernel
Fixes corrupted mesh issues with GLSL Compute
on AMD platforms.
2015-09-21 09:01:47 -07:00
Jeremy Cowles
fb4f3f6a62 Merge pull request #741 from takahito-tejima/bspline
optimize PatchTableFactory::Create performance

The primary hesitation here is that this change alters the approximation for BSpline end caps, however the consensus is that BSpline end caps were already the most extreme approximation, so it makes sense to sacrifice quality for speed.

Reviewed by David, Barry, George and myself.
2015-09-20 22:51:30 -07:00
Jeremy Cowles
84ff9d3604 Merge pull request #728 from significant-bit/win32-lean
use WIN32_LEAN_AND_MEAN properly
2015-09-20 22:36:25 -07:00
Takahito Tejima
37bce3be14 Fix the reserve size for BSpline patch (16, not 20) 2015-09-17 15:14:54 -07:00
Takahito Tejima
c380a0d67e BSpline endcap optimization. 2015-09-16 15:32:50 -07:00
Takahito Tejima
5e96a9ba31 GregoryBasis optimization. Replace arithmetic operators which uses a temporary
object.
2015-09-16 15:28:58 -07:00
Takahito Tejima
0e91dcd177 Optimize gregory basis endcap generation.
- replace std::vector with vtr::StackBuffer in GregoryBasis::Point
- remote getQuadOffsets call from ProtoBasis
- rewrite some inefficient code in the endcap generation.

Note that this is a temporary remedy for the performance issue in 3.0.
We'll fix it again in the later release.
2015-09-16 15:28:55 -07:00
Sergey Sharybin
b25c0dd777 Fix GLSL program being deleted twice in GLSL Compute controller
GLSL programs used by stencil and patch kernels were freed from
both GLSL Compute Evaluator and from kernel classes themselves.
2015-09-10 20:00:42 +05:00
Mike Erwin
585858c1e4 use WIN32_LEAN_AND_MEAN properly
Misspelled W32_LEAN_AND_MEAN in osd/opengl.h had no effect on windows.h.

Also added to example code wherever windows.h is included.
2015-08-07 17:45:41 -04:00
David G Yu
6c437ae077 Release 3.0.2 2015-08-05 18:21:20 -07:00