2012-06-09 20:40:48 +00:00
|
|
|
#
|
2013-09-26 19:04:57 +00:00
|
|
|
# Copyright 2013 Pixar
|
2012-06-09 20:40:48 +00:00
|
|
|
#
|
2013-09-26 19:04:57 +00:00
|
|
|
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
|
|
|
# with the following modification; you may not use this file except in
|
|
|
|
# compliance with the Apache License and the following modification to it:
|
|
|
|
# Section 6. Trademarks. is deleted and replaced with:
|
2012-06-09 20:40:48 +00:00
|
|
|
#
|
2013-09-26 19:04:57 +00:00
|
|
|
# 6. Trademarks. This License does not grant permission to use the trade
|
|
|
|
# names, trademarks, service marks, or product names of the Licensor
|
|
|
|
# and its affiliates, except as required to comply with Section 4(c) of
|
|
|
|
# the License and to reproduce the content of the NOTICE file.
|
2012-06-09 20:40:48 +00:00
|
|
|
#
|
2013-09-26 19:04:57 +00:00
|
|
|
# You may obtain a copy of the Apache License at
|
2012-06-09 20:40:48 +00:00
|
|
|
#
|
2013-09-26 19:04:57 +00:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2012-06-09 20:40:48 +00:00
|
|
|
#
|
2013-09-26 19:04:57 +00:00
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the Apache License with the above modification is
|
|
|
|
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
# KIND, either express or implied. See the Apache License for the specific
|
|
|
|
# language governing permissions and limitations under the Apache License.
|
2012-06-09 20:40:48 +00:00
|
|
|
#
|
|
|
|
|
2012-06-09 21:22:57 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2012-12-20 18:25:41 +00:00
|
|
|
|
2012-06-09 20:40:48 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# source & headers
|
2012-12-11 01:15:13 +00:00
|
|
|
set(CPU_SOURCE_FILES
|
2015-05-09 00:31:26 +00:00
|
|
|
cpuEvaluator.cpp
|
2012-06-09 00:06:35 +00:00
|
|
|
cpuKernel.cpp
|
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-26 04:51:55 +00:00
|
|
|
cpuPatchTable.cpp
|
2012-12-11 01:15:13 +00:00
|
|
|
cpuVertexBuffer.cpp
|
|
|
|
)
|
|
|
|
|
2014-04-09 20:43:38 +00:00
|
|
|
set(GPU_SOURCE_FILES )
|
2012-06-09 00:06:35 +00:00
|
|
|
|
2014-04-09 20:43:38 +00:00
|
|
|
set(INC_FILES )
|
2012-06-09 20:40:48 +00:00
|
|
|
|
2012-06-19 19:34:26 +00:00
|
|
|
set(PRIVATE_HEADER_FILES
|
2012-12-11 01:15:13 +00:00
|
|
|
cpuKernel.h
|
2012-06-19 19:34:26 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(PUBLIC_HEADER_FILES
|
2015-05-29 16:21:14 +00:00
|
|
|
bufferDescriptor.h
|
2015-05-09 00:31:26 +00:00
|
|
|
cpuEvaluator.h
|
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-26 04:51:55 +00:00
|
|
|
cpuPatchTable.h
|
2012-12-11 01:15:13 +00:00
|
|
|
cpuVertexBuffer.h
|
2012-06-09 00:06:35 +00:00
|
|
|
mesh.h
|
2012-12-11 01:15:13 +00:00
|
|
|
nonCopyable.h
|
2013-06-10 22:54:40 +00:00
|
|
|
opengl.h
|
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-26 04:51:55 +00:00
|
|
|
types.h
|
2012-06-09 00:06:35 +00:00
|
|
|
)
|
|
|
|
|
2016-09-29 16:53:40 +00:00
|
|
|
list(APPEND KERNEL_FILES
|
Improved patch basis eval for Osd to match Far
This updates the patch basis evaluation functions in Osd
to match recent changes to far/patchBasis.
This also exposes a common facility for dealing with PatchCoord,
PatchArray, and PatchParam. These are exposed as global functions
operating on struct data, since C++ style class methods are not
supported by all of the Osd shader and kernel execution envirionments.
Changes:
- Merged far/patchBasis.cpp to osd/patchBasisCommon{,Types,Eval}.h
- Exposed PatchCoord, PatchArray, and PatchParam to Osd kernels
- exposed OsdEvaluatePatchBasis and OsdEvaluatePatchBasisNormalized
- Updated CPU, TBB, Omp, CUDA, OpenCL, GLSL, HLSL, and Metal evaluators
- Updated glFVarViewer
2018-10-30 07:37:25 +00:00
|
|
|
patchBasisCommonTypes.h
|
2016-09-29 16:53:40 +00:00
|
|
|
patchBasisCommon.h
|
Improved patch basis eval for Osd to match Far
This updates the patch basis evaluation functions in Osd
to match recent changes to far/patchBasis.
This also exposes a common facility for dealing with PatchCoord,
PatchArray, and PatchParam. These are exposed as global functions
operating on struct data, since C++ style class methods are not
supported by all of the Osd shader and kernel execution envirionments.
Changes:
- Merged far/patchBasis.cpp to osd/patchBasisCommon{,Types,Eval}.h
- Exposed PatchCoord, PatchArray, and PatchParam to Osd kernels
- exposed OsdEvaluatePatchBasis and OsdEvaluatePatchBasisNormalized
- Updated CPU, TBB, Omp, CUDA, OpenCL, GLSL, HLSL, and Metal evaluators
- Updated glFVarViewer
2018-10-30 07:37:25 +00:00
|
|
|
patchBasisCommonEval.h
|
2016-09-29 16:53:40 +00:00
|
|
|
)
|
|
|
|
|
2013-07-05 22:36:54 +00:00
|
|
|
set(DOXY_HEADER_FILES ${PUBLIC_HEADER_FILES})
|
|
|
|
|
2012-08-04 02:51:27 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2013-08-15 23:11:33 +00:00
|
|
|
set(OPENMP_PUBLIC_HEADERS
|
2015-05-09 00:31:26 +00:00
|
|
|
ompEvaluator.h
|
2013-07-05 22:36:54 +00:00
|
|
|
ompKernel.h
|
|
|
|
)
|
2013-08-15 23:11:33 +00:00
|
|
|
|
2014-09-05 22:07:46 +00:00
|
|
|
if(OPENMP_FOUND )
|
2012-12-11 01:15:13 +00:00
|
|
|
list(APPEND CPU_SOURCE_FILES
|
2015-05-09 00:31:26 +00:00
|
|
|
ompEvaluator.cpp
|
2012-12-11 01:15:13 +00:00
|
|
|
ompKernel.cpp
|
|
|
|
)
|
2013-07-05 22:36:54 +00:00
|
|
|
|
|
|
|
list(APPEND PUBLIC_HEADER_FILES ${OPENMP_PUBLIC_HEADERS})
|
|
|
|
|
2012-06-14 00:37:56 +00:00
|
|
|
if (CMAKE_COMPILER_IS_GNUCXX)
|
2014-04-09 20:43:38 +00:00
|
|
|
list(APPEND PLATFORM_CPU_LIBRARIES gomp)
|
2012-06-14 00:37:56 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2013-07-05 22:36:54 +00:00
|
|
|
list(APPEND DOXY_HEADER_FILES ${OPENMP_PUBLIC_HEADERS})
|
|
|
|
|
2013-08-15 23:11:33 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2014-09-05 22:07:46 +00:00
|
|
|
set(TBB_PUBLIC_HEADERS
|
2015-05-09 00:31:26 +00:00
|
|
|
tbbEvaluator.h
|
2014-09-05 22:07:46 +00:00
|
|
|
tbbKernel.h
|
|
|
|
)
|
|
|
|
|
2013-08-15 23:11:33 +00:00
|
|
|
if( TBB_FOUND )
|
2014-04-09 20:43:38 +00:00
|
|
|
include_directories("${TBB_INCLUDE_DIR}")
|
|
|
|
|
2013-08-15 23:11:33 +00:00
|
|
|
list(APPEND CPU_SOURCE_FILES
|
2015-05-09 00:31:26 +00:00
|
|
|
tbbEvaluator.cpp
|
2013-08-15 23:11:33 +00:00
|
|
|
tbbKernel.cpp
|
|
|
|
)
|
2014-09-05 22:07:46 +00:00
|
|
|
|
|
|
|
list(APPEND PUBLIC_HEADER_FILES ${TBB_PUBLIC_HEADERS})
|
|
|
|
|
2013-08-15 23:11:33 +00:00
|
|
|
if (CMAKE_COMPILER_IS_GNUCXX)
|
2014-04-09 20:43:38 +00:00
|
|
|
list(APPEND PLATFORM_CPU_LIBRARIES gomp)
|
2013-08-15 23:11:33 +00:00
|
|
|
endif()
|
|
|
|
|
2014-04-12 01:33:11 +00:00
|
|
|
list(APPEND PLATFORM_CPU_LIBRARIES
|
|
|
|
${TBB_LIBRARIES}
|
|
|
|
)
|
2013-08-15 23:11:33 +00:00
|
|
|
endif()
|
|
|
|
|
2014-09-05 22:07:46 +00:00
|
|
|
list(APPEND DOXY_HEADER_FILES ${TBB_PUBLIC_HEADERS})
|
2013-07-05 22:36:54 +00:00
|
|
|
|
2012-06-09 20:40:48 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2012-08-04 02:51:27 +00:00
|
|
|
# GL code & dependencies
|
2013-07-05 22:36:54 +00:00
|
|
|
set(GL_PUBLIC_HEADERS
|
|
|
|
cpuGLVertexBuffer.h
|
2015-05-20 21:36:57 +00:00
|
|
|
glLegacyGregoryPatchTable.h
|
|
|
|
glPatchTable.h
|
2013-07-05 22:36:54 +00:00
|
|
|
glVertexBuffer.h
|
|
|
|
glMesh.h
|
2015-05-14 00:35:46 +00:00
|
|
|
glslPatchShaderSource.h
|
2013-07-05 22:36:54 +00:00
|
|
|
)
|
|
|
|
|
2016-07-26 19:41:18 +00:00
|
|
|
if( (NOT NO_OPENGL) AND (OPENGL_FOUND OR OPENGLES_FOUND) )
|
2012-12-11 01:15:13 +00:00
|
|
|
list(APPEND GPU_SOURCE_FILES
|
|
|
|
cpuGLVertexBuffer.cpp
|
2015-05-20 21:36:57 +00:00
|
|
|
glLegacyGregoryPatchTable.cpp
|
|
|
|
glPatchTable.cpp
|
2012-12-11 01:15:13 +00:00
|
|
|
glVertexBuffer.cpp
|
2015-05-14 00:35:46 +00:00
|
|
|
glslPatchShaderSource.cpp
|
2012-12-11 01:15:13 +00:00
|
|
|
)
|
2013-07-05 22:36:54 +00:00
|
|
|
list(APPEND PUBLIC_HEADER_FILES ${GL_PUBLIC_HEADERS})
|
2012-12-20 18:25:41 +00:00
|
|
|
if ( OPENGL_FOUND )
|
|
|
|
list(APPEND KERNEL_FILES
|
|
|
|
glslPatchCommon.glsl
|
2019-01-19 02:17:38 +00:00
|
|
|
glslPatchCommonTess.glsl
|
2019-01-19 02:18:45 +00:00
|
|
|
glslPatchBoxSplineTriangle.glsl
|
2013-06-24 19:03:57 +00:00
|
|
|
glslPatchBSpline.glsl
|
2012-12-20 18:25:41 +00:00
|
|
|
glslPatchGregory.glsl
|
2015-04-08 01:34:05 +00:00
|
|
|
glslPatchGregoryBasis.glsl
|
2019-01-19 02:18:45 +00:00
|
|
|
glslPatchGregoryTriangle.glsl
|
2019-01-19 02:15:43 +00:00
|
|
|
glslPatchLegacy.glsl
|
2012-12-20 18:25:41 +00:00
|
|
|
)
|
|
|
|
endif()
|
2012-12-11 01:15:13 +00:00
|
|
|
endif()
|
|
|
|
|
2013-07-05 22:36:54 +00:00
|
|
|
list(APPEND DOXY_HEADER_FILES ${GL_PUBLIC_HEADERS})
|
|
|
|
|
2012-12-11 01:15:13 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# OpenGL 4.2 dependencies
|
|
|
|
# note : (GLSL transform feedback kernels require GL 4.2)
|
2013-07-05 22:36:54 +00:00
|
|
|
set(GL_4_2_PUBLIC_HEADERS
|
2015-05-09 00:31:26 +00:00
|
|
|
glXFBEvaluator.h
|
2013-07-05 22:36:54 +00:00
|
|
|
)
|
|
|
|
|
2012-12-11 01:15:13 +00:00
|
|
|
if( OPENGL_4_2_FOUND )
|
|
|
|
list(APPEND GPU_SOURCE_FILES
|
2015-05-09 00:31:26 +00:00
|
|
|
glXFBEvaluator.cpp
|
2012-12-11 01:15:13 +00:00
|
|
|
)
|
2013-07-05 22:36:54 +00:00
|
|
|
list(APPEND PUBLIC_HEADER_FILES ${GL_4_2_PUBLIC_HEADERS})
|
2014-04-12 01:33:11 +00:00
|
|
|
list(APPEND KERNEL_FILES
|
2015-05-09 00:31:26 +00:00
|
|
|
glslXFBKernel.glsl
|
2014-04-12 01:33:11 +00:00
|
|
|
)
|
|
|
|
list(APPEND PLATFORM_GPU_LIBRARIES
|
2020-03-03 23:05:41 +00:00
|
|
|
${OPENGL_LOADER_LIBRARIES}
|
2014-04-12 01:33:11 +00:00
|
|
|
)
|
2012-12-11 01:15:13 +00:00
|
|
|
endif()
|
|
|
|
|
2013-07-05 22:36:54 +00:00
|
|
|
list(APPEND DOXY_HEADER_FILES ${GL_4_2_PUBLIC_HEADERS})
|
|
|
|
|
2014-09-05 22:07:46 +00:00
|
|
|
|
2012-12-11 01:15:13 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# OpenGL 4.3 dependencies
|
|
|
|
# note : (GLSL compute shader kernels require GL 4.3)
|
2013-07-05 22:36:54 +00:00
|
|
|
set(GL_4_3_PUBLIC_HEADERS
|
2015-05-09 00:31:26 +00:00
|
|
|
glComputeEvaluator.h
|
2013-07-05 22:36:54 +00:00
|
|
|
)
|
|
|
|
|
2012-12-11 01:15:13 +00:00
|
|
|
if( OPENGL_4_3_FOUND )
|
|
|
|
list(APPEND GPU_SOURCE_FILES
|
2015-05-09 00:31:26 +00:00
|
|
|
glComputeEvaluator.cpp
|
2012-06-09 00:06:35 +00:00
|
|
|
)
|
2013-07-05 22:36:54 +00:00
|
|
|
list(APPEND PUBLIC_HEADER_FILES ${GL_4_3_PUBLIC_HEADERS})
|
2014-04-12 01:33:11 +00:00
|
|
|
list(APPEND KERNEL_FILES
|
|
|
|
glslComputeKernel.glsl
|
|
|
|
)
|
|
|
|
list(APPEND PLATFORM_GPU_LIBRARIES
|
2020-03-03 23:05:41 +00:00
|
|
|
${OPENGL_LOADER_LIBRARIES}
|
2014-04-12 01:33:11 +00:00
|
|
|
)
|
2012-12-11 01:15:13 +00:00
|
|
|
endif()
|
|
|
|
|
2013-07-05 22:36:54 +00:00
|
|
|
list(APPEND DOXY_HEADER_FILES ${GL_4_3_PUBLIC_HEADERS})
|
|
|
|
|
2012-12-11 01:15:13 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# DX11 code & dependencies
|
2013-07-05 22:36:54 +00:00
|
|
|
set(DXSDK_PUBLIC_HEADERS
|
|
|
|
cpuD3D11VertexBuffer.h
|
2015-05-09 00:31:26 +00:00
|
|
|
d3d11ComputeEvaluator.h
|
2015-05-20 21:36:57 +00:00
|
|
|
d3d11LegacyGregoryPatchTable.h
|
|
|
|
d3d11PatchTable.h
|
2013-07-05 22:36:54 +00:00
|
|
|
d3d11VertexBuffer.h
|
|
|
|
d3d11Mesh.h
|
2015-05-14 00:35:46 +00:00
|
|
|
hlslPatchShaderSource.h
|
2013-07-05 22:36:54 +00:00
|
|
|
)
|
2012-12-11 01:15:13 +00:00
|
|
|
if( DXSDK_FOUND )
|
|
|
|
list(APPEND GPU_SOURCE_FILES
|
|
|
|
cpuD3D11VertexBuffer.cpp
|
2015-05-09 00:31:26 +00:00
|
|
|
d3d11ComputeEvaluator.cpp
|
2015-05-20 21:36:57 +00:00
|
|
|
d3d11LegacyGregoryPatchTable.cpp
|
|
|
|
d3d11PatchTable.cpp
|
2012-12-11 01:15:13 +00:00
|
|
|
d3d11VertexBuffer.cpp
|
2015-05-14 00:35:46 +00:00
|
|
|
hlslPatchShaderSource.cpp
|
2012-12-11 01:15:13 +00:00
|
|
|
)
|
2013-07-05 22:36:54 +00:00
|
|
|
list(APPEND PUBLIC_HEADER_FILES ${DXSDK_PUBLIC_HEADERS})
|
2012-12-11 01:15:13 +00:00
|
|
|
list(APPEND KERNEL_FILES
|
2012-12-13 18:22:30 +00:00
|
|
|
hlslComputeKernel.hlsl
|
2012-12-11 01:15:13 +00:00
|
|
|
hlslPatchCommon.hlsl
|
2019-04-25 00:51:39 +00:00
|
|
|
hlslPatchCommonTess.hlsl
|
2019-04-25 01:16:14 +00:00
|
|
|
hlslPatchBoxSplineTriangle.hlsl
|
2013-06-24 19:03:57 +00:00
|
|
|
hlslPatchBSpline.hlsl
|
2012-12-11 01:15:13 +00:00
|
|
|
hlslPatchGregory.hlsl
|
2015-05-20 17:49:45 +00:00
|
|
|
hlslPatchGregoryBasis.hlsl
|
2019-04-25 01:16:14 +00:00
|
|
|
hlslPatchGregoryTriangle.hlsl
|
2019-04-24 23:39:40 +00:00
|
|
|
hlslPatchLegacy.hlsl
|
2012-12-11 01:15:13 +00:00
|
|
|
)
|
2014-04-12 01:33:11 +00:00
|
|
|
list(APPEND PLATFORM_GPU_LIBRARIES
|
|
|
|
${DXSDK_LIBRARIES}
|
|
|
|
)
|
2012-06-09 20:40:48 +00:00
|
|
|
endif()
|
|
|
|
|
2013-07-05 22:36:54 +00:00
|
|
|
list(APPEND DOXY_HEADER_FILES ${DXSDK_PUBLIC_HEADERS})
|
|
|
|
|
2016-07-26 19:41:18 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Metal code & dependencies
|
|
|
|
set(METAL_PUBLIC_HEADERS
|
|
|
|
mtlVertexBuffer.h
|
|
|
|
mtlComputeEvaluator.h
|
|
|
|
mtlLegacyGregoryPatchTable.h
|
|
|
|
mtlPatchTable.h
|
|
|
|
mtlMesh.h
|
|
|
|
mtlPatchShaderSource.h
|
|
|
|
mtlCommon.h
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
if( METAL_FOUND )
|
|
|
|
set(METAL_SOURCE_FILES
|
|
|
|
mtlVertexBuffer.mm
|
|
|
|
mtlComputeEvaluator.mm
|
|
|
|
mtlLegacyGregoryPatchTable.mm
|
|
|
|
mtlPatchTable.mm
|
|
|
|
mtlVertexBuffer.mm
|
|
|
|
mtlPatchShaderSource.mm
|
|
|
|
)
|
|
|
|
|
|
|
|
set_source_files_properties(
|
|
|
|
${METAL_SOURCE_FILES}
|
|
|
|
PROPERTIES
|
|
|
|
COMPILE_FLAGS
|
|
|
|
"-fobjc-arc")
|
|
|
|
|
|
|
|
list(APPEND GPU_SOURCE_FILES ${METAL_SOURCE_FILES})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
list(APPEND PUBLIC_HEADER_FILES ${METAL_PUBLIC_HEADERS})
|
|
|
|
list(APPEND KERNEL_FILES
|
|
|
|
mtlComputeKernel.metal
|
|
|
|
mtlPatchCommon.metal
|
2019-05-24 20:37:54 +00:00
|
|
|
mtlPatchCommonTess.metal
|
2019-05-25 02:56:09 +00:00
|
|
|
mtlPatchBoxSplineTriangle.metal
|
2016-07-26 19:41:18 +00:00
|
|
|
mtlPatchBSpline.metal
|
|
|
|
mtlPatchGregory.metal
|
|
|
|
mtlPatchGregoryBasis.metal
|
2019-05-25 02:56:09 +00:00
|
|
|
mtlPatchGregoryTriangle.metal
|
2019-05-23 01:40:58 +00:00
|
|
|
mtlPatchLegacy.metal
|
2016-07-26 19:41:18 +00:00
|
|
|
)
|
|
|
|
list(APPEND PLATFORM_GPU_LIBRARIES
|
|
|
|
${METAL_LIBRARIES}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
list(APPEND DOXY_HEADER_FILES ${METAL_PUBLIC_HEADERS})
|
|
|
|
|
2012-06-16 23:03:52 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2012-08-04 02:51:27 +00:00
|
|
|
# OpenCL code & dependencies
|
2013-07-05 22:36:54 +00:00
|
|
|
set(OPENCL_PUBLIC_HEADERS
|
2015-05-09 00:31:26 +00:00
|
|
|
clEvaluator.h
|
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-26 04:51:55 +00:00
|
|
|
clPatchTable.h
|
2013-07-05 22:36:54 +00:00
|
|
|
clVertexBuffer.h
|
2014-05-21 08:10:45 +00:00
|
|
|
opencl.h
|
2013-07-05 22:36:54 +00:00
|
|
|
)
|
2014-09-05 22:07:46 +00:00
|
|
|
|
2012-06-21 01:20:41 +00:00
|
|
|
if ( OPENCL_FOUND )
|
2012-12-11 01:15:13 +00:00
|
|
|
list(APPEND GPU_SOURCE_FILES
|
2015-05-09 00:31:26 +00:00
|
|
|
clEvaluator.cpp
|
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-26 04:51:55 +00:00
|
|
|
clPatchTable.cpp
|
2012-12-11 01:15:13 +00:00
|
|
|
clVertexBuffer.cpp
|
2012-06-16 23:03:52 +00:00
|
|
|
)
|
2013-07-05 22:36:54 +00:00
|
|
|
list(APPEND PUBLIC_HEADER_FILES ${OPENCL_PUBLIC_HEADERS})
|
2012-06-16 23:03:52 +00:00
|
|
|
list(APPEND KERNEL_FILES
|
|
|
|
clKernel.cl
|
|
|
|
)
|
2013-07-26 21:07:14 +00:00
|
|
|
list(APPEND PLATFORM_GPU_LIBRARIES
|
2012-06-16 23:03:52 +00:00
|
|
|
${OPENCL_LIBRARIES}
|
|
|
|
)
|
2014-04-09 20:43:38 +00:00
|
|
|
include_directories( "${OPENCL_INCLUDE_DIRS}" )
|
2012-12-11 01:15:13 +00:00
|
|
|
if ( OPENGL_FOUND )
|
2014-04-09 20:43:38 +00:00
|
|
|
list(APPEND GPU_SOURCE_FILES clGLVertexBuffer.cpp)
|
|
|
|
list(APPEND PUBLIC_HEADER_FILES clGLVertexBuffer.h)
|
2012-12-11 01:15:13 +00:00
|
|
|
endif()
|
2014-04-17 23:47:48 +00:00
|
|
|
|
2015-06-02 23:20:41 +00:00
|
|
|
if ( OPENCL_D3D11_INTEROP_FOUND )
|
2015-04-29 18:51:12 +00:00
|
|
|
list(APPEND GPU_SOURCE_FILES
|
|
|
|
clD3D11VertexBuffer.cpp
|
|
|
|
)
|
|
|
|
list(APPEND PUBLIC_HEADER_FILES
|
|
|
|
clD3D11VertexBuffer.h
|
|
|
|
)
|
|
|
|
endif()
|
2012-06-16 23:03:52 +00:00
|
|
|
endif()
|
|
|
|
|
2013-07-05 22:36:54 +00:00
|
|
|
list(APPEND DOXY_HEADER_FILES ${OPENCL_PUBLIC_HEADERS})
|
|
|
|
|
2012-06-09 21:22:57 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2012-08-04 02:51:27 +00:00
|
|
|
# CUDA code & dependencies
|
2013-07-05 22:36:54 +00:00
|
|
|
set(CUDA_PUBLIC_HEADERS
|
2015-05-09 00:31:26 +00:00
|
|
|
cudaEvaluator.h
|
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-26 04:51:55 +00:00
|
|
|
cudaPatchTable.h
|
2013-07-05 22:36:54 +00:00
|
|
|
cudaVertexBuffer.h
|
|
|
|
)
|
2014-09-05 22:07:46 +00:00
|
|
|
|
2012-06-09 21:22:57 +00:00
|
|
|
if( CUDA_FOUND )
|
2012-12-11 01:15:13 +00:00
|
|
|
list(APPEND GPU_SOURCE_FILES
|
2015-05-09 00:31:26 +00:00
|
|
|
cudaEvaluator.cpp
|
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-26 04:51:55 +00:00
|
|
|
cudaPatchTable.cpp
|
2012-12-11 01:15:13 +00:00
|
|
|
cudaVertexBuffer.cpp
|
2012-06-09 21:22:57 +00:00
|
|
|
)
|
2013-07-05 22:36:54 +00:00
|
|
|
list(APPEND PUBLIC_HEADER_FILES ${CUDA_PUBLIC_HEADERS})
|
2014-09-05 22:07:46 +00:00
|
|
|
list(APPEND CUDA_KERNEL_FILES
|
|
|
|
osd/cudaKernel.cu
|
2012-06-09 21:22:57 +00:00
|
|
|
)
|
2014-09-05 22:07:46 +00:00
|
|
|
set (CUDA_KERNEL_FILES ${CUDA_KERNEL_FILES} PARENT_SCOPE)
|
2012-12-11 01:15:13 +00:00
|
|
|
if ( OPENGL_FOUND )
|
|
|
|
list(APPEND GPU_SOURCE_FILES
|
|
|
|
cudaGLVertexBuffer.cpp
|
|
|
|
)
|
|
|
|
list(APPEND PUBLIC_HEADER_FILES
|
|
|
|
cudaGLVertexBuffer.h
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if( DXSDK_FOUND )
|
|
|
|
list(APPEND GPU_SOURCE_FILES
|
|
|
|
cudaD3D11VertexBuffer.cpp
|
|
|
|
)
|
|
|
|
list(APPEND PUBLIC_HEADER_FILES
|
|
|
|
cudaD3D11VertexBuffer.h
|
|
|
|
)
|
2013-08-15 23:11:33 +00:00
|
|
|
endif()
|
2012-06-09 21:22:57 +00:00
|
|
|
endif()
|
|
|
|
|
2013-07-05 22:36:54 +00:00
|
|
|
list(APPEND DOXY_HEADER_FILES ${CUDA_PUBLIC_HEADERS})
|
2012-06-09 21:22:57 +00:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2012-08-04 02:51:27 +00:00
|
|
|
|
2019-08-17 23:44:30 +00:00
|
|
|
osd_stringify("${KERNEL_FILES}" INC_FILES)
|
2014-01-04 00:59:26 +00:00
|
|
|
|
2014-04-09 20:43:38 +00:00
|
|
|
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
|
2012-06-09 20:40:48 +00:00
|
|
|
|
2012-06-09 21:22:57 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2012-06-09 20:40:48 +00:00
|
|
|
source_group("Kernels" FILES ${KERNEL_FILES})
|
2012-06-21 01:20:41 +00:00
|
|
|
|
2012-06-09 20:40:48 +00:00
|
|
|
source_group("Inc" FILES ${INC_FILES})
|
2012-06-09 00:06:35 +00:00
|
|
|
|
2014-09-05 22:07:46 +00:00
|
|
|
# Compile objs first for both the CPU and GPU libs -----
|
|
|
|
add_library(osd_cpu_obj
|
|
|
|
OBJECT
|
|
|
|
${CPU_SOURCE_FILES}
|
|
|
|
${PRIVATE_HEADER_FILES}
|
|
|
|
${PUBLIC_HEADER_FILES}
|
|
|
|
)
|
2013-07-12 01:55:17 +00:00
|
|
|
|
2016-06-10 00:04:26 +00:00
|
|
|
set_target_properties(osd_cpu_obj
|
|
|
|
PROPERTIES
|
|
|
|
FOLDER "opensubdiv"
|
|
|
|
)
|
|
|
|
|
2015-07-16 05:55:14 +00:00
|
|
|
if( GPU_SOURCE_FILES )
|
|
|
|
add_library(osd_gpu_obj
|
|
|
|
OBJECT
|
|
|
|
${GPU_SOURCE_FILES}
|
|
|
|
${PRIVATE_HEADER_FILES}
|
|
|
|
${PUBLIC_HEADER_FILES}
|
|
|
|
${INC_FILES}
|
|
|
|
)
|
2016-06-10 00:04:26 +00:00
|
|
|
set_target_properties(osd_gpu_obj
|
|
|
|
PROPERTIES
|
|
|
|
FOLDER "opensubdiv"
|
|
|
|
)
|
2015-07-16 05:55:14 +00:00
|
|
|
endif()
|
2012-06-21 01:20:41 +00:00
|
|
|
|
2019-08-17 23:44:30 +00:00
|
|
|
osd_add_doxy_headers( "${DOXY_HEADER_FILES}" )
|
2012-06-21 01:20:41 +00:00
|
|
|
|
2014-04-09 20:43:38 +00:00
|
|
|
install(
|
2014-09-05 22:07:46 +00:00
|
|
|
FILES
|
2014-04-09 20:43:38 +00:00
|
|
|
${PUBLIC_HEADER_FILES}
|
|
|
|
DESTINATION
|
|
|
|
"${CMAKE_INCDIR_BASE}/osd"
|
|
|
|
PERMISSIONS
|
|
|
|
OWNER_READ
|
|
|
|
GROUP_READ
|
|
|
|
WORLD_READ )
|
2012-06-11 13:55:06 +00:00
|
|
|
|
2012-12-20 18:25:41 +00:00
|
|
|
if (ANDROID)
|
2014-04-09 20:43:38 +00:00
|
|
|
install(
|
|
|
|
FILES
|
|
|
|
Android.mk
|
|
|
|
DESTINATION
|
|
|
|
"${LIBRARY_OUTPUT_PATH_ROOT}"
|
|
|
|
PERMISSIONS
|
|
|
|
OWNER_READ
|
|
|
|
GROUP_READ
|
|
|
|
WORLD_READ )
|
2012-12-20 18:25:41 +00:00
|
|
|
endif()
|
|
|
|
|
2012-06-09 21:22:57 +00:00
|
|
|
#-------------------------------------------------------------------------------
|