NTrace
GPU ray tracing framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CPURenderer.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2009-2010 NVIDIA Corporation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include "cuda/CPURenderer.hpp"
18 
19 using namespace FW;
20 
21 //------------------------------------------------------------------------
22 
24 : Renderer(Renderer::tBVH, env),
25 m_layout(BVHLayout_CPU)
26 {
27  m_platform = Platform("CPU");
29 }
30 
31 //------------------------------------------------------------------------
32 
34 {
35 }
36 
37 //------------------------------------------------------------------------
38 
40 {
41  m_params = params;
42 }
43 
44 //------------------------------------------------------------------------
45 
47 {
49 
50  // Clean up the previous batch.
51 
52  if (m_batchRays && !m_newBatch)
54  //m_batchRays = NULL;
55 
56  // Generate new batch.
57 
58  U32 randomSeed = (m_enableRandom) ? m_random.getU32() : 0;
59  switch (m_params.rayType)
60  {
61  case RayType_Primary:
62  case RayType_Textured:
64  if (!m_newBatch)
65  return false;
66  m_newBatch = false;
68  break;
69 
70  case RayType_AO:
72  return false;
74  break;
75 
76  case RayType_Diffuse:
78  return false;
81  break;
82 
83  default:
84  FW_ASSERT(false);
85  return false;
86  }
87 
88  // Sort rays.
89 
92  return true;
93 }
94 
95 //------------------------------------------------------------------------
96 
98 {
100  ((CudaBVH*)m_accelStruct)->setTraceParams(&m_platform, m_scene);
101  Timer timer(true);
102  if(stats == NULL)
103  {
104  RayStats stats;
105  if(m_buildParams.empty_boxes.getSize())
106  {
107  //m_bvh->trace(*m_batchRays, *m_emptybvh, &stats);
108  ((CudaBVH*)m_accelStruct)->trace(*m_batchRays, m_visibility, m_buildParams.empty_boxes, &stats);
109  }
110  else
111  {
112  ((CudaBVH*)m_accelStruct)->trace(*m_batchRays, m_visibility, m_buildParams.twoTrees, &stats);
113  }
114  }
115  else
116  {
117  if(m_buildParams.empty_boxes.getSize())
118  {
119  //m_bvh->trace(*m_batchRays, *m_emptybvh, stats);
120  ((CudaBVH*)m_accelStruct)->trace(*m_batchRays, m_visibility, m_buildParams.empty_boxes, ((CudaBVH*)m_accelStruct)->m_stats);
121  }
122  else
123  {
124  ((CudaBVH*)m_accelStruct)->trace(*m_batchRays, m_visibility, m_buildParams.twoTrees, ((CudaBVH*)m_accelStruct)->m_stats);
125  }
126  }
127  return timer.getElapsed(); // Trace time in seconds
128 }
129 
130 //------------------------------------------------------------------------
131 
133 {
135 
136 /* if(m_params.rayType == RayType_PathTracing)
137  {
138  if(m_secondaryIndex == 1) // Camera ray
139  m_shader.addEmittedLight(m_scene, &m_primaryRays);
140 
141  if((m_secondaryIndex % 2) == 0) // Shadow ray
142  m_shader.evaluateBSDF(m_scene, &m_primaryRays, m_batchRays);
143  return;
144  }*/
145 
147  S32 firstPrimary = m_batchStart / numRaysPerPrimary;
148 
149  for(S32 i = 0; i < m_batchRays->getSize()/numRaysPerPrimary; i++)
150  {
151  int primaryID = m_primaryRays.getIDForSlot(firstPrimary + i);
152  const S32* batchSlots = (const S32*)m_batchRays->getIDToSlotBuffer().getMutablePtr() + ((m_params.rayType == RayType_Primary) ? primaryID : i * numRaysPerPrimary);
153 
154  U32& pixel = ((U32*)m_image->getBuffer().getMutablePtr())[primaryID];
155  Vec4f bgColor = Vec4f(0.2f, 0.4f, 0.8f, 1.0f);
156 
157  //if(m_firstPass)
158  // pixel = 0;
159 
160  // Accumulate color from each ray in the batch.
161 
162  Vec4f color = Vec4f(0.0f);
163  F32 stat = 0.0f;
164  for (int j = 0; j < numRaysPerPrimary; j++)
165  {
166  const RayResult& result = m_batchRays->getResultForSlot(batchSlots[j]);
167  int tri = result.id;
168 
169  /*switch(m_params.colorMode)
170  {
171  case ColorMode_Shaded:*/
172  if (tri == -1)
173  color += (m_params.rayType == RayType_Primary) ? bgColor : Vec4f(1.0f);
174  else
175  //color += (m_params.rayType == RayType_Shadow || m_params.rayType == RayType_AO) ? Vec4f(0.0f) : Vec4f::fromABGR(m_scene->getTriangle(tri).shadedColor);
176  color += (m_params.rayType == RayType_AO) ? Vec4f(0.0f) : ((Vec4f*)(m_scene->getTriShadedColorBuffer().getPtr()))[tri];
177  /*break;
178 
179  case ColorMode_PseudoNodes:
180  stat += (float)(result.padB & 0xFFFF);
181  break;
182 
183  case ColorMode_PseudoTris:
184  stat += (float)(result.padB >> 16);
185  //break;
186 
187  case ColorMode_Distance:
188  stat = max(stat, result.padA);
189  break;
190 
191  case ColorMode_DepthMap:
192  stat = max(stat, result.t);
193  break;
194 
195  default:
196  FW_ASSERT(0);
197  }*/
198  }
199 
200  const RayResult& primaryResult = m_primaryRays.getResultForSlot(firstPrimary + i);
201 
202  /*if(m_params.colorMode == ColorMode_Shaded)
203  {*/
204  color *= 1.0f / (F32)numRaysPerPrimary;
205 
206  // Diffuse: modulate with primary hit color.
207 
208  int tri = primaryResult.id;
209  //if (m_params.rayType == RayType_Shadow) color *= (tri == -1) ? bgColor : Vec4f::fromABGR(m_scene->getTriangle(tri).shadedColor);
210  if (m_params.rayType == RayType_AO && tri == -1) color = bgColor;
211  if (m_params.rayType == RayType_Diffuse) color *= (tri == -1) ? bgColor : ((Vec4f*)(m_scene->getTriMaterialColorBuffer().getPtr()))[tri];//Vec4f::fromABGR(m_scene->getTriangle(tri).materialColor);
212 
213  // Get color from the previous iterations and add the color for this iteration
214  Vec4f pixelColor;
215  //float coeficient = (m_params.rayType == RayType_Shadow) ? 1.0f/m_params.lights.getSize() : 1.0f;
216  float coeficient = 1.0f;
217  pixelColor.fromABGR(pixel);
218  color = pixelColor + color*coeficient;
219  //if(m_finalPass)
220  // color += Vec4f(0.1f, 0.1f, 0.1f, 1.0f); // +Ambient light
221  color.w = 1.0f;
222 
223  // Write result.
224  pixel = color.toABGR();
225  /*}
226  else
227  {
228  stat = *(float*)(&pixel) + stat; // pixel holds number of OPs accumulated so far
229 
230  if(m_finalPass)
231  {
232  switch(m_params.colorMode)
233  {
234  case ColorMode_PseudoNodes:
235  color = getPseudoColor(stat + (m_params.rayType != 0 ? primaryResult.padB & 0xFFFF : 0.0f), 0.0f, 150.0f);
236  break;
237 
238  case ColorMode_PseudoTris:
239  color = getPseudoColor(stat + (m_params.rayType != 0 ? primaryResult.padB >> 16 : 0.0f), 0.0f, 75.0f);
240  break;
241 
242  case ColorMode_Distance:
243  //color = getDistanceColor(max(stat, primaryResult.padA), 0.0f, m_cameraFar);
244  color = getDistanceColor(primaryResult.padA, 0.0f, m_cameraFar);
245  break;
246 
247  case ColorMode_DepthMap:
248  //color = getDistanceColor(max(stat, primaryResult.t), 0.0f, m_cameraFar);
249  color = getDistanceColor(primaryResult.t, 0.0f, m_cameraFar);
250  break;
251  }
252 
253  // Write result.
254  pixel = color.toABGR();
255  }
256  else
257  {
258  // Write partial result.
259  pixel = *(U32*)(&stat);
260  }
261  }*/
262  }
263 
264  // Write the bargraph
265  //if(m_finalPass && m_params.colorMode != ColorMode_Shaded)
266  {
267  Vec4f color;
268  Vec2i pos;
269  for(pos.y = 0; pos.y < m_image->getSize().y; pos.y++)
270  {
271  /*switch(m_params.colorMode)
272  {
273  case ColorMode_PseudoNodes:
274  case ColorMode_PseudoTris:
275  color = getPseudoColor((F32)pos.y, 0.0f, (F32)m_image->getSize().y);
276  break;
277  case ColorMode_Distance:
278  case ColorMode_DepthMap:*/
279  color = getDistanceColor((F32)pos.y, 0.0f, (F32)m_image->getSize().y);
280  /* break;
281  }*/
282 
283  for(pos.x = m_image->getSize().x - 10; pos.x < m_image->getSize().x; pos.x++)
284  {
285  if(pos.x < m_image->getSize().x - 8)
286  m_image->setVec4f(pos, Vec4f(0.0f, 0.0f, 0.0f, 1.0f));
287  else
288  m_image->setVec4f(pos, color);
289  }
290  }
291  }
292 }
293 
294 //------------------------------------------------------------------------
295 
297 {
298  return 0;
299  /* // Casting primary rays => no degenerates.
300 
301  if (m_params.rayType == RayType_Primary)
302  return m_primaryRays.getSize();
303 
304  // Compile kernel.
305 
306  CudaModule* module = m_compiler.compile();
307 
308  // Set input and output.
309 
310  CountHitsInput& in = *(CountHitsInput*)module->getGlobal("c_CountHitsInput").getMutablePtr();
311  in.numRays = m_primaryRays.getSize();
312  in.rayResults = m_primaryRays.getResultBuffer().getCudaPtr();
313  in.raysPerThread = 32;
314  module->getGlobal("g_CountHitsOutput").clear();
315 
316  // Count primary ray hits.
317 
318  module->getKernel("countHitsKernel").launch(
319  (in.numRays - 1) / in.raysPerThread + 1,
320  Vec2i(CountHits_BlockWidth, CountHits_BlockHeight));
321 
322  int numHits = *(S32*)module->getGlobal("g_CountHitsOutput").getPtr();
323 
324  // numSecondary = secondaryPerPrimary * primaryHits
325 
326  return numHits * m_params.numSamples;*/
327 }
328 
329 //------------------------------------------------------------------------
330 
331 /*S32 CPURenderer::incrementNumRays(void)
332 {
333  int numHits = 0;
334  // Casting primary rays => no degenerates.
335 
336  if (m_params.rayType == RayType_Primary || (m_params.rayType == RayType_PathTracing && m_secondaryIndex == 0))
337  {
338  m_rayCount += m_primaryRays.getSize();
339  return m_primaryRays.getSize();
340  }
341 
342  for(S32 i=0;i<m_primaryRays.getSize();i++)
343  {
344  const RayResult& result = m_primaryRays.getResultForSlot(i);
345 
346  if(result.hit())
347  numHits++;
348  }
349 
350  // numSecondary = secondaryPerPrimary * primaryHits
351 
352  int samples = (m_params.rayType == RayType_PathTracing) ? 1 : m_params.numSamples;
353  m_rayCount += numHits * samples;
354  return numHits;
355 }
356 
357 //------------------------------------------------------------------------
358 
359 Buffer& CPURenderer::getVisibleTriangles(S32 triangleCount, bool setValue, S32 initValue)
360 {
361  Buffer &vis = m_visibility;
362  //S64 bitSize = (triangleCount + sizeof(U32) - 1) / sizeof(U32); // Round up to CPU machine word
363  S64 bitSize = triangleCount*sizeof(S32);
364 
365  // Initialize the buffer if needed
366  vis.resize(bitSize);
367 
368  if(setValue)
369  vis.clear(initValue);
370 
371  // Return the buffer
372  return vis;
373 }*/
374 
375 //------------------------------------------------------------------------
376 
378 {
379  Vec4f val(1.0f);
380 
381  if (value < minVal) value = minVal;
382  if (value > maxVal) value = maxVal;
383 
384  float ratio = (value - minVal)/(maxVal - minVal);
385 
386  const float MAX_COLOR_VALUE = 0.98f;
387 
388  switch ((int)((ratio)*3.9999f)) {
389  case 0:
390  FW_ASSERT(ratio <= 0.25f);
391  val.x = 0.0f; // red
392  val.y = ratio * 4.0f * MAX_COLOR_VALUE; // green
393  val.z = MAX_COLOR_VALUE; // blue
394  break;
395  case 1:
396  FW_ASSERT( (ratio >= 0.25f) && (ratio <= 0.5f) );
397  val.x = 0.0f; // red
398  val.y = MAX_COLOR_VALUE; // green
399  val.z = MAX_COLOR_VALUE * (1.0f - 4.0f*(ratio-0.25f)); // blue
400  break;
401  case 2:
402  FW_ASSERT( (ratio >= 0.5f) && (ratio <= 0.75f) );
403  val.x = (ratio-0.5f) * 4.0f * MAX_COLOR_VALUE; // red
404  val.y = MAX_COLOR_VALUE; // green
405  val.z = 0.0f; // blue
406  break;
407  case 3:
408  FW_ASSERT( (ratio >= 0.75f) && (ratio <= 1.f) );
409  val.x = MAX_COLOR_VALUE; // red
410  val.y = MAX_COLOR_VALUE * (1.0f - 4.0f*(ratio-0.75f)); // green
411  val.z = 0.0f; // blue
412  break;
413  default:
414  FW_ASSERT(0);
415  break;
416  }
417 
418  /*if (value < minVal) value = minVal;
419  if (value > maxVal) value = maxVal;
420 
421  float valueI = 1.0f - value;
422  const float MAX_COLOR_VALUE = 0.999f;
423 
424  switch ((int)(value*4.0f)) {
425  case 0:
426  val.x = MAX_COLOR_VALUE; // red
427  val.y = valueI*MAX_COLOR_VALUE; // green
428  val.z = 0.f; // blue
429  break;
430  case 1:
431  val.x = (1.0f - valueI)*MAX_COLOR_VALUE; // red
432  val.y = MAX_COLOR_VALUE; // green
433  val.z = 0.f; // blue
434  break;
435  case 2:
436  val.x = 0.f; // red
437  val.y = MAX_COLOR_VALUE; // green
438  val.z = valueI*MAX_COLOR_VALUE; // blue
439  break;
440  case 3:
441  val.x = 0.f; // red
442  val.y = (1.0f - valueI)*MAX_COLOR_VALUE; // green
443  val.z = MAX_COLOR_VALUE; // blue
444  break;
445  default:
446  val.x = valueI * MAX_COLOR_VALUE; // red
447  val.y = 0.f; // green
448  val.z = MAX_COLOR_VALUE; // blue
449  break;
450  }*/
451 
452  return val;
453 }
454 
455 //------------------------------------------------------------------------
456 
458 {
459  Vec4f val(1.0f);
460 
461  if (value < minVal) value = minVal;
462  if (value > maxVal) value = maxVal;
463 
464  float ratio = (value - minVal)/(maxVal - minVal);
465  // The first color - corresponding to minimum
466  const float minColorRed = 0.0f;
467  const float minColorGreen = 0.0f;
468  const float minColorBlue = 0.0f;
469  // The second color - corresponding to maximum
470  const float maxColorRed = 1.0f;
471  const float maxColorGreen = 1.0f;
472  const float maxColorBlue = 1.0f;
473 
474  val.x = maxColorRed * ratio + (1.0f-ratio)*minColorRed; // red
475  val.y = maxColorGreen * ratio + (1.0f-ratio)*minColorGreen; // green
476  val.z = maxColorBlue * ratio + (1.0f-ratio)*minColorBlue; // blue
477 
478  return val;
479 }
480 
481 //------------------------------------------------------------------------
Buffer & getTriMaterialColorBuffer(void)
Returns material color buffer.
Definition: Scene.hpp:89
S32 getSize() const
Gets size of the buffer (number of rays).
Definition: RayBuffer.hpp:52
#define NULL
Definition: Defs.hpp:39
Params m_params
Definition: Renderer.hpp:132
Array< AABB > empty_boxes
Information about boxes with no triangles inside.
Definition: BVH.hpp:116
Cuda BVH class.
Definition: CudaBVH.hpp:93
void setLeafPreferences(S32 minSize, S32 maxSize)
Sets leaf size preferences (desired number of triangles in one leaf node).
Definition: Platform.hpp:147
Image * m_image
Definition: Renderer.hpp:139
S32 getIDForSlot(S32 slot) const
Gets an id for a given ray slot.
Definition: RayBuffer.hpp:138
RayBuffer * m_batchRays
Definition: Renderer.hpp:145
S32 m_batchStart
Definition: Renderer.hpp:146
Buffer & getIDToSlotBuffer()
Gets buffer mapping ids to slots.
Definition: RayBuffer.hpp:179
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction int int grid_height CUevent unsigned int Flags CUevent hEvent CUevent hEvent CUstream unsigned int Flags CUstream hStream GLuint bufferobj unsigned int CUdevice dev CUdeviceptr unsigned int CUmodule const char name CUdeviceptr unsigned int bytesize CUdeviceptr dptr void unsigned int bytesize void CUdeviceptr unsigned int ByteCount CUarray unsigned int CUdeviceptr unsigned int ByteCount CUarray unsigned int const void unsigned int ByteCount CUarray unsigned int CUarray unsigned int unsigned int ByteCount void CUarray unsigned int unsigned int CUstream hStream const CUDA_MEMCPY2D pCopy CUdeviceptr const void unsigned int CUstream hStream const CUDA_MEMCPY2D CUstream hStream CUdeviceptr unsigned char unsigned int N CUdeviceptr unsigned int unsigned int N CUdeviceptr unsigned int unsigned short unsigned int unsigned int Height CUarray const CUDA_ARRAY_DESCRIPTOR pAllocateArray CUarray const CUDA_ARRAY3D_DESCRIPTOR pAllocateArray unsigned int CUtexref CUdeviceptr unsigned int bytes CUcontext unsigned int CUdevice device GLenum texture GLenum GLuint buffer GLenum GLuint renderbuffer GLenum GLsizeiptr const GLvoid GLenum usage GLuint shader GLenum type GLsizei const GLuint framebuffers GLsizei const GLuint renderbuffers GLuint v GLuint v GLenum GLenum GLenum GLuint GLint level GLsizei GLuint framebuffers GLuint const GLchar name GLenum GLintptr GLsizeiptr GLvoid data GLuint GLenum GLint param GLuint GLenum GLint param GLhandleARB programObj GLenum GLenum GLsizei GLsizei height GLenum GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid pixels GLint GLsizei const GLfloat value GLint GLfloat GLfloat v1 GLint GLfloat GLfloat GLfloat v2 GLint GLsizei const GLfloat value GLint GLsizei GLboolean const GLfloat value GLuint program GLuint GLfloat GLfloat GLfloat z GLuint GLint GLenum GLboolean GLsizei const GLvoid pointer GLuint GLuint const GLchar name GLenum GLsizei GLenum GLsizei GLsizei height GLenum GLuint renderbuffer GLenum GLenum GLint * params
Definition: DLLImports.inl:373
virtual bool nextBatch(void)
Definition: CPURenderer.cpp:46
U32 toABGR(void) const
Definition: Math.cpp:45
F32 traceBatch(void)
Definition: Renderer.cpp:364
Scene * m_scene
Definition: Renderer.hpp:137
CPURenderer(Environment *env)
Definition: CPURenderer.cpp:23
virtual int getTotalNumRays(void)
Structure holding ray statistics. Also provides print to the console. These statistics are used in a ...
Definition: BVH.hpp:45
const U8 * getPtr(S64 ofs=0)
Definition: Buffer.hpp:106
RayBuffer m_primaryRays
Definition: Renderer.hpp:141
Buffer & getTriShadedColorBuffer(void)
Returns shaded color buffer.
Definition: Scene.hpp:96
float F32
Definition: Defs.hpp:89
Vec4f getPseudoColor(F32 value, F32 minVal, F32 maxVal)
U8 * getMutablePtr(S64 ofs=0)
Definition: Buffer.hpp:110
void setVec4f(const Vec2i &pos, const Vec4f &value)
Definition: Image.cpp:406
virtual void updateResult(void)
#define FW_ASSERT(X)
Definition: Defs.hpp:67
signed int S32
Definition: Defs.hpp:88
unsigned int U32
Definition: Defs.hpp:85
Buffer & getBuffer(void) const
Definition: Image.hpp:148
const Vec2i & getSize(void) const
Definition: Image.hpp:143
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction f
Definition: DLLImports.inl:88
virtual void setParams(const Params &params)
Definition: CPURenderer.cpp:39
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value
Definition: DLLImports.inl:84
const RayResult & getResultForSlot(S32 slot) const
Gets a ray result assigned to a given slot.
Definition: RayBuffer.hpp:103
RayBuffer m_secondaryRays
Definition: Renderer.hpp:142
virtual ~CPURenderer(void)
Definition: CPURenderer.cpp:33
Class holding various SAH and batch processing parameters.
Definition: Platform.hpp:46
U32 getU32(void)
Definition: Random.hpp:51
static Vec4f fromABGR(U32 abgr)
Definition: Math.cpp:34
RayGen m_raygen
Definition: Renderer.hpp:129
bool aoCPU(RayBuffer &orays, RayBuffer &irays, Scene &scene, int numSamples, float maxDist, bool &newBatch, U32 randomSeed=0)
Generates ao rays on the CPU. Batches rays if necessary.
Definition: RayGen.cpp:232
Vec4f getDistanceColor(F32 value, F32 minVal, F32 maxVal)
BVH::BuildParams m_buildParams
Definition: Renderer.hpp:128
void setNeedClosestHit(bool c)
Sets whether the closet hit is needed.
Definition: RayBuffer.hpp:144
Platform m_platform
Definition: Renderer.hpp:127
bool m_newBatch
Definition: Renderer.hpp:144
F32 getElapsed(void)
Definition: Timer.hpp:44
bool m_enableRandom
Definition: Renderer.hpp:134
void mortonSort()
Performs morton sort.
Definition: RayBuffer.cpp:103
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction int int grid_height CUevent unsigned int Flags CUevent hEvent CUevent hEvent CUstream unsigned int Flags CUstream hStream GLuint bufferobj unsigned int CUdevice dev CUdeviceptr unsigned int CUmodule const char name CUdeviceptr unsigned int bytesize CUdeviceptr dptr void unsigned int bytesize void CUdeviceptr unsigned int ByteCount CUarray unsigned int CUdeviceptr unsigned int ByteCount CUarray unsigned int const void unsigned int ByteCount CUarray unsigned int CUarray unsigned int unsigned int ByteCount void CUarray unsigned int unsigned int CUstream hStream const CUDA_MEMCPY2D pCopy CUdeviceptr const void unsigned int CUstream hStream const CUDA_MEMCPY2D CUstream hStream CUdeviceptr unsigned char unsigned int N CUdeviceptr unsigned int unsigned int N CUdeviceptr unsigned int unsigned short unsigned int unsigned int Height CUarray const CUDA_ARRAY_DESCRIPTOR pAllocateArray CUarray const CUDA_ARRAY3D_DESCRIPTOR pAllocateArray unsigned int CUtexref CUdeviceptr unsigned int bytes CUcontext unsigned int CUdevice device GLenum texture GLenum GLuint buffer GLenum GLuint renderbuffer GLenum GLsizeiptr const GLvoid GLenum usage GLuint shader GLenum type GLsizei const GLuint framebuffers GLsizei const GLuint renderbuffers GLuint v GLuint v GLenum GLenum GLenum GLuint GLint level GLsizei GLuint framebuffers GLuint const GLchar name GLenum GLintptr GLsizeiptr GLvoid data GLuint GLenum GLint param GLuint GLenum GLint param GLhandleARB programObj GLenum GLenum GLsizei GLsizei height GLenum GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid pixels GLint GLsizei const GLfloat value GLint GLfloat GLfloat v1 GLint GLfloat GLfloat GLfloat v2 GLint GLsizei const GLfloat value GLint GLsizei GLboolean const GLfloat value GLuint program GLuint GLfloat GLfloat GLfloat z GLuint GLint GLenum GLboolean GLsizei const GLvoid pointer GLuint GLuint color
Definition: DLLImports.inl:367
CudaAS * m_accelStruct
Definition: Renderer.hpp:148
Random m_random
Definition: Renderer.hpp:130
bool twoTrees
Flag whether to build BVH from two separate trees.
Definition: BVH.hpp:121