From de047d1b6d2184997b95aa2490b7aca5d6151baa Mon Sep 17 00:00:00 2001 From: William Grzybowski Date: Wed, 7 Aug 2013 22:22:17 +0000 Subject: [PATCH] graphics/luxrays: Accelerate the ray intersection process by using GPUs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LuxRays is library dedicated to accelerate the ray intersection process by using GPUs. Uses a Data Parallel Model: it doesn't reduce the time spent to trace a single ray but it is able to trace many thousands of rays in parallel. Supports Hybrid CPU/GPU mode where only the ray intersection task is off load to the GPUs while everything else run on the CPU and can be written with usual tools and languages. WWW: http://www.luxrender.net/wiki/LuxRays PR: ports/181019 Submitted by: Natacha Porté --- graphics/Makefile | 1 + graphics/luxrays/Makefile | 32 ++++++++ graphics/luxrays/distinfo | 2 + graphics/luxrays/files/patch-CMakeLists.txt | 11 +++ ...atch-include-luxrays-core-geometry-frame.h | 16 ++++ .../patch-samples-benchsimple-CMakeLists.txt | 8 ++ graphics/luxrays/pkg-descr | 11 +++ graphics/luxrays/pkg-plist | 79 +++++++++++++++++++ 8 files changed, 160 insertions(+) create mode 100644 graphics/luxrays/Makefile create mode 100644 graphics/luxrays/distinfo create mode 100644 graphics/luxrays/files/patch-CMakeLists.txt create mode 100644 graphics/luxrays/files/patch-include-luxrays-core-geometry-frame.h create mode 100644 graphics/luxrays/files/patch-samples-benchsimple-CMakeLists.txt create mode 100644 graphics/luxrays/pkg-descr create mode 100644 graphics/luxrays/pkg-plist diff --git a/graphics/Makefile b/graphics/Makefile index 270c2e0f1feb..fdd9d5664495 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -574,6 +574,7 @@ SUBDIR += lprof-devel SUBDIR += lua-gd SUBDIR += luminance + SUBDIR += luxrays SUBDIR += luxrender SUBDIR += mahotas SUBDIR += makehuman diff --git a/graphics/luxrays/Makefile b/graphics/luxrays/Makefile new file mode 100644 index 000000000000..b16e6251a450 --- /dev/null +++ b/graphics/luxrays/Makefile @@ -0,0 +1,32 @@ +# Created by: Natacha Porté +# $FreeBSD$ + +PORTNAME= luxrays +PORTVERSION= 1.2.1 +CATEGORIES= graphics +MASTER_SITES= http://src.luxrender.net/luxrays/archive/ +DISTNAME= ${HG_NODEID} +DIST_SUBDIR= luxrender + +MAINTAINER= natbsd@instinctive.eu +COMMENT= Accelerate the ray intersection process by using GPUs + +LICENSE= GPLv3 + +BUILD_DEPENDS= ${LOCALBASE}/lib/libfreeimage.a:${PORTSDIR}/graphics/freeimage +LIB_DEPENDS= boost_thread:${PORTSDIR}/devel/boost-libs + +HG_NODEID= 475fbf15f0ca + +USES= bison cmake +USE_BZIP2= yes +USE_GL= glew glut +WRKSRC= ${WRKDIR}/luxrays-${HG_NODEID} + +CMAKE_ARGS= -DLUXRAYS_DISABLE_OPENCL:BOOL=ON + +do-install: + (cd ${WRKSRC}/include && ${COPYTREE_SHARE} . ${PREFIX}/include) + ${INSTALL_DATA} ${WRKSRC}/lib/libluxrays.a ${PREFIX}/lib + +.include diff --git a/graphics/luxrays/distinfo b/graphics/luxrays/distinfo new file mode 100644 index 000000000000..65654490f6eb --- /dev/null +++ b/graphics/luxrays/distinfo @@ -0,0 +1,2 @@ +SHA256 (luxrender/475fbf15f0ca.tar.bz2) = 6643669befeb3c607fcd80ab82979a47fbbb60da97246bbfabe536d13dedfe8f +SIZE (luxrender/475fbf15f0ca.tar.bz2) = 55765775 diff --git a/graphics/luxrays/files/patch-CMakeLists.txt b/graphics/luxrays/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..fa1fa3bf098b --- /dev/null +++ b/graphics/luxrays/files/patch-CMakeLists.txt @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2013-08-04 12:25:45.415147716 +0200 ++++ CMakeLists.txt 2013-08-04 12:26:52.319147148 +0200 +@@ -142,7 +142,7 @@ + message(WARNING "SLG2 requires OpenCL support, not building") + endif(NOT LUXRAYS_DISABLE_OPENCL) + +- add_subdirectory(samples/smallluxgpu3) ++ # add_subdirectory(samples/smallluxgpu3) + endif(OPENGL_FOUND AND GLUT_FOUND AND GLEW_FOUND) + + diff --git a/graphics/luxrays/files/patch-include-luxrays-core-geometry-frame.h b/graphics/luxrays/files/patch-include-luxrays-core-geometry-frame.h new file mode 100644 index 000000000000..56fb882f8628 --- /dev/null +++ b/graphics/luxrays/files/patch-include-luxrays-core-geometry-frame.h @@ -0,0 +1,16 @@ +--- include/luxrays/core/geometry/frame.h.orig 2013-08-04 12:00:53.496371213 +0200 ++++ include/luxrays/core/geometry/frame.h 2013-08-04 12:01:10.695167535 +0200 +@@ -44,11 +44,11 @@ + SetFromZ(z); + } + +- Frame(const Normal &z) { ++ Frame(const luxrays::Normal &z) { + SetFromZ(Vector(z)); + } + +- void SetFromZ(const Normal &z) { ++ void SetFromZ(const luxrays::Normal &z) { + SetFromZ(Vector(z)); + } + diff --git a/graphics/luxrays/files/patch-samples-benchsimple-CMakeLists.txt b/graphics/luxrays/files/patch-samples-benchsimple-CMakeLists.txt new file mode 100644 index 000000000000..99735bb48d02 --- /dev/null +++ b/graphics/luxrays/files/patch-samples-benchsimple-CMakeLists.txt @@ -0,0 +1,8 @@ +--- samples/benchsimple/CMakeLists.txt.orig 2013-08-04 12:21:54.850147165 +0200 ++++ samples/benchsimple/CMakeLists.txt 2013-08-04 12:22:17.696646898 +0200 +@@ -23,4 +23,4 @@ + link_directories (${LuxRays_LIB_DIR}) + + add_executable(benchsimple benchsimple.cpp) +-target_link_libraries(benchsimple luxrays) ++target_link_libraries(benchsimple luxrays pthread) diff --git a/graphics/luxrays/pkg-descr b/graphics/luxrays/pkg-descr new file mode 100644 index 000000000000..caa8c838994a --- /dev/null +++ b/graphics/luxrays/pkg-descr @@ -0,0 +1,11 @@ +LuxRays is library dedicated to accelerate the ray intersection process by +using GPUs. + +Uses a Data Parallel Model: it doesn't reduce the time spent to trace a single +ray but it is able to trace many thousands of rays in parallel. + +Supports Hybrid CPU/GPU mode where only the ray intersection task is off load +to the GPUs while everything else run on the CPU and can be written with usual +tools and languages. + +WWW: http://www.luxrender.net/wiki/LuxRays diff --git a/graphics/luxrays/pkg-plist b/graphics/luxrays/pkg-plist new file mode 100644 index 000000000000..8df231d42847 --- /dev/null +++ b/graphics/luxrays/pkg-plist @@ -0,0 +1,79 @@ +include/luxrays/accelerators/bvhaccel.h +include/luxrays/accelerators/mqbvhaccel.h +include/luxrays/accelerators/qbvhaccel.h +include/luxrays/cfg.h +include/luxrays/core/accelerator.h +include/luxrays/core/context.h +include/luxrays/core/dataset.h +include/luxrays/core/device.h +include/luxrays/core/epsilon.h +include/luxrays/core/geometry/bbox.h +include/luxrays/core/geometry/bsphere.h +include/luxrays/core/geometry/frame.h +include/luxrays/core/geometry/frame.h.orig +include/luxrays/core/geometry/matrix4x4.h +include/luxrays/core/geometry/normal.h +include/luxrays/core/geometry/point.h +include/luxrays/core/geometry/ray.h +include/luxrays/core/geometry/raybuffer.h +include/luxrays/core/geometry/transform.h +include/luxrays/core/geometry/triangle.h +include/luxrays/core/geometry/uv.h +include/luxrays/core/geometry/vector.h +include/luxrays/core/geometry/vector_normal.h +include/luxrays/core/intersectiondevice.h +include/luxrays/core/trianglemesh.h +include/luxrays/core/utils.h +include/luxrays/core/virtualdevice.h +include/luxrays/kernels/kernels.h +include/luxrays/luxrays.h +include/luxrays/opencl/device.h +include/luxrays/opencl/intersectiondevice.h +include/luxrays/opencl/opencl.h +include/luxrays/opencl/utils.h +include/luxrays/utils/convtest/convtest.h +include/luxrays/utils/convtest/pdiff/lpyramid.h +include/luxrays/utils/convtest/pdiff/metric.h +include/luxrays/utils/core/atomic.h +include/luxrays/utils/core/exttrianglemesh.h +include/luxrays/utils/core/mc.h +include/luxrays/utils/core/randomgen.h +include/luxrays/utils/core/spectrum.h +include/luxrays/utils/film/film.h +include/luxrays/utils/film/filter.h +include/luxrays/utils/film/framebuffer.h +include/luxrays/utils/film/tonemapping.h +include/luxrays/utils/plymesh/LICENSE +include/luxrays/utils/plymesh/rply.h +include/luxrays/utils/properties.h +include/luxrays/utils/sampler/sampler.h +include/luxrays/utils/sdl/bsdf.h +include/luxrays/utils/sdl/bsdfevents.h +include/luxrays/utils/sdl/camera.h +include/luxrays/utils/sdl/data/rgbD65_32.h +include/luxrays/utils/sdl/data/rgbE_32.h +include/luxrays/utils/sdl/data/sun_spect.h +include/luxrays/utils/sdl/data/xyzbasis.h +include/luxrays/utils/sdl/extmeshcache.h +include/luxrays/utils/sdl/light.h +include/luxrays/utils/sdl/material.h +include/luxrays/utils/sdl/scene.h +include/luxrays/utils/sdl/sdl.h +include/luxrays/utils/sdl/spd.h +include/luxrays/utils/sdl/texmap.h +lib/libluxrays.a +@dirrm include/luxrays/utils/sdl/data +@dirrm include/luxrays/utils/sdl +@dirrm include/luxrays/utils/sampler +@dirrm include/luxrays/utils/plymesh +@dirrm include/luxrays/utils/film +@dirrm include/luxrays/utils/core +@dirrm include/luxrays/utils/convtest/pdiff +@dirrm include/luxrays/utils/convtest +@dirrm include/luxrays/utils +@dirrm include/luxrays/opencl +@dirrm include/luxrays/kernels +@dirrm include/luxrays/core/geometry +@dirrm include/luxrays/core +@dirrm include/luxrays/accelerators +@dirrm include/luxrays