mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-09 13:50:05 +00:00
including the correct version file so namespaces work
This commit is contained in:
parent
6df116b236
commit
fe5e1fd9a1
@ -154,6 +154,9 @@ if( CUDA_FOUND )
|
||||
list(APPEND KERNEL_FILES
|
||||
cudaKernel.cu
|
||||
)
|
||||
add_definitions(
|
||||
-DOPENSUBDIV_HAS_CUDA
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
|
@ -54,6 +54,7 @@
|
||||
// exclude the implied warranties of merchantability, fitness for
|
||||
// a particular purpose and non-infringement.
|
||||
//
|
||||
#include "../version.h"
|
||||
#include "../osd/cpuDispatcher.h"
|
||||
#include "../osd/cpuKernel.h"
|
||||
|
||||
@ -201,6 +202,24 @@ OsdCpuKernelDispatcher::UnmapVaryingBuffer() {
|
||||
void
|
||||
OsdCpuKernelDispatcher::Synchronize() { }
|
||||
|
||||
|
||||
void
|
||||
OsdCpuKernelDispatcher::ApplyBilinearFaceVerticesKernel( FarMesh<OsdVertex> * mesh, int offset, int level, int start, int end, void * data) const {
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
OsdCpuKernelDispatcher::ApplyBilinearEdgeVerticesKernel( FarMesh<OsdVertex> * mesh, int offset, int level, int start, int end, void * data) const {
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
OsdCpuKernelDispatcher::ApplyBilinearVertexVerticesKernel( FarMesh<OsdVertex> * mesh, int offset, int level, int start, int end, void * data) const {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
OsdCpuKernelDispatcher::ApplyCatmarkFaceVerticesKernel( FarMesh<OsdVertex> * mesh, int offset, int level, int start, int end, void * data) const {
|
||||
|
||||
|
@ -57,6 +57,7 @@
|
||||
#ifndef OSD_CPU_DISPATCHER_H
|
||||
#define OSD_CPU_DISPATCHER_H
|
||||
|
||||
#include "../version.h"
|
||||
#include "../osd/kernelDispatcher.h"
|
||||
|
||||
#include <GL/glew.h>
|
||||
@ -75,6 +76,14 @@ public:
|
||||
OsdCpuKernelDispatcher(int levels, int numVertexElements, int numVaryingElements);
|
||||
virtual ~OsdCpuKernelDispatcher();
|
||||
|
||||
|
||||
virtual void ApplyBilinearFaceVerticesKernel(FarMesh<OsdVertex> * mesh, int offset, int level, int start, int end, void * data) const;
|
||||
|
||||
virtual void ApplyBilinearEdgeVerticesKernel(FarMesh<OsdVertex> * mesh, int offset, int level, int start, int end, void * data) const;
|
||||
|
||||
virtual void ApplyBilinearVertexVerticesKernel(FarMesh<OsdVertex> * mesh, int offset, int level, int start, int end, void * data) const;
|
||||
|
||||
|
||||
virtual void ApplyCatmarkFaceVerticesKernel(FarMesh<OsdVertex> * mesh, int offset, int level, int start, int end, void * data) const;
|
||||
|
||||
virtual void ApplyCatmarkEdgeVerticesKernel(FarMesh<OsdVertex> * mesh, int offset, int level, int start, int end, void * data) const;
|
||||
@ -83,12 +92,14 @@ public:
|
||||
|
||||
virtual void ApplyCatmarkVertexVerticesKernelA(FarMesh<OsdVertex> * mesh, int offset, bool pass, int level, int start, int end, void * data) const;
|
||||
|
||||
|
||||
virtual void ApplyLoopEdgeVerticesKernel(FarMesh<OsdVertex> * mesh, int offset, int level, int start, int end, void * data) const;
|
||||
|
||||
virtual void ApplyLoopVertexVerticesKernelB(FarMesh<OsdVertex> * mesh, int offset, int level, int start, int end, void * data) const;
|
||||
|
||||
virtual void ApplyLoopVertexVerticesKernelA(FarMesh<OsdVertex> * mesh, int offset, bool pass, int level, int start, int end, void * data) const;
|
||||
|
||||
|
||||
virtual void CopyTable(int tableIndex, size_t size, const void *ptr);
|
||||
|
||||
virtual void BeginLaunchKernel();
|
||||
|
@ -56,6 +56,7 @@
|
||||
//
|
||||
#include <math.h>
|
||||
|
||||
#include "../version.h"
|
||||
#include "../osd/cpuKernel.h"
|
||||
|
||||
namespace OpenSubdiv {
|
||||
|
@ -57,6 +57,8 @@
|
||||
#ifndef OSD_CPU_KERNEL_H
|
||||
#define OSD_CPU_KERNEL_H
|
||||
|
||||
#include "../version.h"
|
||||
|
||||
namespace OpenSubdiv {
|
||||
namespace OPENSUBDIV_VERSION {
|
||||
|
||||
|
@ -54,24 +54,29 @@
|
||||
// exclude the implied warranties of merchantability, fitness for
|
||||
// a particular purpose and non-infringement.
|
||||
//
|
||||
#include "../version.h"
|
||||
#include "../osd/cudaDispatcher.h"
|
||||
|
||||
#include <cuda_runtime.h>
|
||||
#include <cuda_gl_interop.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
void OsdCudaComputeFace(float *vertex, float *varying, int numUserVertexElements, int numVaryingElements, int *F_IT, int *F_ITa, int offset, int start, int end);
|
||||
|
||||
void OsdCudaComputeEdge(float *vertex, float *varying, int numUserVertexElements, int numVaryingElements, int *E_IT, float *E_W, int offset, int start, int end);
|
||||
|
||||
void OsdCudaComputeVertexA(float *vertex, float *varying, int numUserVertexElements, int numVaryingElements, int *V_ITa, float *V_W, int offset, int start, int end, int pass);
|
||||
|
||||
void OsdCudaComputeVertexB(float *vertex, float *varying, int numUserVertexElements, int numVaryingElements, int *V_ITa, int *V_IT, float *V_W, int offset, int start, int end);
|
||||
|
||||
void OsdCudaComputeLoopVertexB(float *vertex, float *varying, int numUserVertexElements, int numVaryingElements, int *V_ITa, int *V_IT, float *V_W, int offset, int start, int end);
|
||||
|
||||
}
|
||||
|
||||
namespace OpenSubdiv {
|
||||
namespace OPENSUBDIV_VERSION {
|
||||
|
||||
extern void OsdCudaComputeFace(float *vertex, float *varying, int numUserVertexElements, int numVaryingElements, int *F_IT, int *F_ITa, int offset, int start, int end);
|
||||
|
||||
extern void OsdCudaComputeEdge(float *vertex, float *varying, int numUserVertexElements, int numVaryingElements, int *E_IT, float *E_W, int offset, int start, int end);
|
||||
|
||||
extern void OsdCudaComputeVertexA(float *vertex, float *varying, int numUserVertexElements, int numVaryingElements, int *V_ITa, float *V_W, int offset, int start, int end, int pass);
|
||||
|
||||
extern void OsdCudaComputeVertexB(float *vertex, float *varying, int numUserVertexElements, int numVaryingElements, int *V_ITa, int *V_IT, float *V_W, int offset, int start, int end);
|
||||
|
||||
extern void OsdCudaComputeLoopVertexB(float *vertex, float *varying, int numUserVertexElements, int numVaryingElements, int *V_ITa, int *V_IT, float *V_W, int offset, int start, int end);
|
||||
|
||||
|
||||
OsdCudaKernelDispatcher::DeviceTable::~DeviceTable() {
|
||||
|
||||
|
@ -57,6 +57,7 @@
|
||||
#ifndef OSD_CUDA_DISPATCHER_H
|
||||
#define OSD_CUDA_DISPATCHER_H
|
||||
|
||||
#include "../version.h"
|
||||
#include "../osd/kernelDispatcher.h"
|
||||
|
||||
#include <GL/glew.h>
|
||||
|
@ -495,14 +495,18 @@ computeLoopVertexB(float *fVertex, int numVertexElements, float *fVaryings, int
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
||||
#include "../version.h"
|
||||
|
||||
#define OPT_KERNEL(NUM_USER_VERTEX_ELEMENTS, NUM_VARYING_ELEMENTS, KERNEL, X, Y, ARG) \
|
||||
if(numUserVertexElements == NUM_USER_VERTEX_ELEMENTS && \
|
||||
numVaryingElements == NUM_VARYING_ELEMENTS) \
|
||||
{ KERNEL<NUM_USER_VERTEX_ELEMENTS, NUM_VARYING_ELEMENTS><<<X,Y>>>ARG; \
|
||||
return; }
|
||||
|
||||
extern "C" {
|
||||
|
||||
void OsdCudaComputeFace(float *vertex, float *varying,
|
||||
int numUserVertexElements, int numVaryingElements,
|
||||
int numUserVertexElements, int numVaryingElements,
|
||||
int *F_IT, int *F_ITa, int offset, int start, int end)
|
||||
{
|
||||
//computeFace<3, 0><<<512,32>>>(vertex, varying, F_IT, F_ITa, offset, start, end);
|
||||
@ -571,3 +575,5 @@ void OsdCudaComputeLoopVertexB(float *vertex, float *varying,
|
||||
computeLoopVertexB<<<512, 32>>>(vertex, 3+numUserVertexElements, varying, numVaryingElements,
|
||||
V_ITa, V_IT, V_W, offset, start, end);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,3 +1,61 @@
|
||||
//
|
||||
// Copyright (C) Pixar. All rights reserved.
|
||||
//
|
||||
// This license governs use of the accompanying software. If you
|
||||
// use the software, you accept this license. If you do not accept
|
||||
// the license, do not use the software.
|
||||
//
|
||||
// 1. Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and
|
||||
// "distribution" have the same meaning here as under U.S.
|
||||
// copyright law. A "contribution" is the original software, or
|
||||
// any additions or changes to the software.
|
||||
// A "contributor" is any person or entity that distributes its
|
||||
// contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read
|
||||
// directly on its contribution.
|
||||
//
|
||||
// 2. Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license,
|
||||
// including the license conditions and limitations in section 3,
|
||||
// each contributor grants you a non-exclusive, worldwide,
|
||||
// royalty-free copyright license to reproduce its contribution,
|
||||
// prepare derivative works of its contribution, and distribute
|
||||
// its contribution or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license,
|
||||
// including the license conditions and limitations in section 3,
|
||||
// each contributor grants you a non-exclusive, worldwide,
|
||||
// royalty-free license under its licensed patents to make, have
|
||||
// made, use, sell, offer for sale, import, and/or otherwise
|
||||
// dispose of its contribution in the software or derivative works
|
||||
// of the contribution in the software.
|
||||
//
|
||||
// 3. Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you
|
||||
// rights to use any contributor's name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over
|
||||
// patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends
|
||||
// automatically.
|
||||
// (C) If you distribute any portion of the software, you must
|
||||
// retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source
|
||||
// code form, you may do so only under this license by including a
|
||||
// complete copy of this license with your distribution. If you
|
||||
// distribute any portion of the software in compiled or object
|
||||
// code form, you may only do so under a license that complies
|
||||
// with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of
|
||||
// using it. The contributors give no express warranties,
|
||||
// guarantees or conditions. You may have additional consumer
|
||||
// rights under your local laws which this license cannot change.
|
||||
// To the extent permitted under your local laws, the contributors
|
||||
// exclude the implied warranties of merchantability, fitness for
|
||||
// a particular purpose and non-infringement.
|
||||
//
|
||||
#include "../version.h"
|
||||
|
||||
#include <GL/glew.h>
|
||||
|
||||
namespace OpenSubdiv {
|
||||
|
@ -54,7 +54,7 @@
|
||||
// exclude the implied warranties of merchantability, fitness for
|
||||
// a particular purpose and non-infringement.
|
||||
//
|
||||
|
||||
#include "../version.h"
|
||||
#include "../osd/glslDispatcher.h"
|
||||
#include "../osd/local.h"
|
||||
|
||||
|
@ -57,6 +57,7 @@
|
||||
#ifndef OSD_GLSL_DISPATCHER_H
|
||||
#define OSD_GLSL_DISPATCHER_H
|
||||
|
||||
#include "../version.h"
|
||||
#include "../osd/kernelDispatcher.h"
|
||||
|
||||
namespace OpenSubdiv {
|
||||
|
@ -54,7 +54,7 @@
|
||||
// exclude the implied warranties of merchantability, fitness for
|
||||
// a particular purpose and non-infringement.
|
||||
//
|
||||
|
||||
#include "../version.h"
|
||||
#include "../osd/kernelDispatcher.h"
|
||||
|
||||
#include <GL/glew.h>
|
||||
|
@ -59,6 +59,7 @@
|
||||
|
||||
#include "vertex.h"
|
||||
|
||||
#include "../version.h"
|
||||
#include "../far/dispatcher.h"
|
||||
|
||||
#include <GL/glew.h>
|
||||
|
@ -56,6 +56,7 @@
|
||||
//
|
||||
#include <string.h>
|
||||
|
||||
#include "../version.h"
|
||||
#include "../osd/mesh.h"
|
||||
#include "../osd/local.h"
|
||||
#include "../osd/dump.cpp"
|
||||
|
@ -61,6 +61,7 @@
|
||||
#include <vector>
|
||||
#include <GL/glew.h>
|
||||
|
||||
#include "../version.h"
|
||||
#include "../osd/vertex.h"
|
||||
|
||||
#include "../far/mesh.h"
|
||||
|
@ -1,6 +1,8 @@
|
||||
#ifndef GSD_VERTEX_H
|
||||
#define GSD_VERTEX_H
|
||||
|
||||
#include "../version.h"
|
||||
|
||||
namespace OpenSubdiv {
|
||||
namespace OPENSUBDIV_VERSION {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user