diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-05-18 19:16:10 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-05-27 13:07:15 +0300 |
commit | 7c0bea0d656eb4838ae2b5ebfed53cd1dae6cb12 (patch) | |
tree | a9b58585fc24289fd06c69e71ee5e36ad16dd3ac /intern/opensubdiv/CMakeLists.txt | |
parent | e490dc4346dba5f29dada59ef421dfff499d65a9 (diff) |
OpenSubdiv: Refactor, move device specific code to own files
Also, move all device files to own folder.
Makes it so checks for device availability are done in a localized
place.
Diffstat (limited to 'intern/opensubdiv/CMakeLists.txt')
-rw-r--r-- | intern/opensubdiv/CMakeLists.txt | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/intern/opensubdiv/CMakeLists.txt b/intern/opensubdiv/CMakeLists.txt index 13565a6ed28..3226d9e8931 100644 --- a/intern/opensubdiv/CMakeLists.txt +++ b/intern/opensubdiv/CMakeLists.txt @@ -50,11 +50,20 @@ if(WITH_OPENSUBDIV) ) list(APPEND SRC + internal/device/device_context_cuda.cc + internal/device/device_context_cuda.h + internal/device/device_context_glsl_compute.cc + internal/device/device_context_glsl_compute.h + internal/device/device_context_glsl_transform_feedback.cc + internal/device/device_context_glsl_transform_feedback.h + internal/device/device_context_opencl.cc + internal/device/device_context_opencl.h + internal/device/device_context_openmp.cc + internal/device/device_context_openmp.h + internal/opensubdiv.cc internal/opensubdiv_converter_factory.cc internal/opensubdiv_converter_internal.cc - internal/opensubdiv_device_context_cuda.cc - internal/opensubdiv_device_context_opencl.cc internal/opensubdiv_evaluator.cc internal/opensubdiv_evaluator_internal.cc internal/opensubdiv_topology_refiner.cc @@ -63,8 +72,6 @@ if(WITH_OPENSUBDIV) internal/opensubdiv_converter_factory.h internal/opensubdiv_converter_internal.h - internal/opensubdiv_device_context_cuda.h - internal/opensubdiv_device_context_opencl.h internal/opensubdiv_edge_map.h internal/opensubdiv_evaluator_internal.h internal/opensubdiv_internal.h @@ -83,10 +90,8 @@ if(WITH_OPENSUBDIV) endif() OPENSUBDIV_DEFINE_COMPONENT(OPENSUBDIV_HAS_OPENMP) - # TODO(sergey): OpenCL is not tested and totally unstable atm. - # OPENSUBDIV_DEFINE_COMPONENT(OPENSUBDIV_HAS_OPENCL) - # TODO(sergey): CUDA stays disabled for util it's ported to drievr API. - # OPENSUBDIV_DEFINE_COMPONENT(OPENSUBDIV_HAS_CUDA) + OPENSUBDIV_DEFINE_COMPONENT(OPENSUBDIV_HAS_OPENCL) + OPENSUBDIV_DEFINE_COMPONENT(OPENSUBDIV_HAS_CUDA) OPENSUBDIV_DEFINE_COMPONENT(OPENSUBDIV_HAS_GLSL_TRANSFORM_FEEDBACK) OPENSUBDIV_DEFINE_COMPONENT(OPENSUBDIV_HAS_GLSL_COMPUTE) @@ -97,21 +102,6 @@ if(WITH_OPENSUBDIV) add_definitions(-DNOMINMAX) add_definitions(-D_USE_MATH_DEFINES) endif() - - # TODO(sergey): Put CUEW back when CUDA is officially supported by OSD. - # if(OPENSUBDIV_HAS_CUDA) - # list(APPEND INC - # ../../extern/cuew/include - # ) - # add_definitions(-DOPENSUBDIV_HAS_CUEW) - # endif() - - if(OPENSUBDIV_HAS_OPENCL) - list(APPEND INC - ../../extern/clew/include - ) - add_definitions(-DOPENSUBDIV_HAS_CLEW) - endif() else() list(APPEND SRC stub/opensubdiv_stub.cc |