20#if !defined( __OPTIX_INCLUDE_INTERNAL_HEADERS__ )
21#error("optix_device_impl.h is an internal header file and must not be used directly. Please use optix_device.h or optix.h instead.")
24#ifndef OPTIX_OPTIX_DEVICE_IMPL_H
25#define OPTIX_OPTIX_DEVICE_IMPL_H
30#include <initializer_list>
39template <
typename... Payload>
47 unsigned int rayFlags,
48 unsigned int SBToffset,
49 unsigned int SBTstride,
50 unsigned int missSBTIndex,
53 static_assert(
sizeof...( Payload ) <= 32,
"Only up to 32 payload values are allowed." );
59 "All payload parameters need to be unsigned int." );
63 float ox = rayOrigin.x, oy = rayOrigin.y, oz = rayOrigin.z;
64 float dx = rayDirection.x, dy = rayDirection.y, dz = rayDirection.z;
65 unsigned int p[33] = { 0, payload... };
66 int payloadSize = (int)
sizeof...( Payload );
69 "(%0,%1,%2,%3,%4,%5,%6,%7,%8,%9,%10,%11,%12,%13,%14,%15,%16,%17,%18,%19,%20,%21,%22,%23,%24,%25,%26,%27,%28,%"
71 "_optix_trace_typed_32,"
72 "(%32,%33,%34,%35,%36,%37,%38,%39,%40,%41,%42,%43,%44,%45,%46,%47,%48,%49,%50,%51,%52,%53,%54,%55,%56,%57,%58,%"
73 "59,%60,%61,%62,%63,%64,%65,%66,%67,%68,%69,%70,%71,%72,%73,%74,%75,%76,%77,%78,%79,%80);"
74 :
"=r"( p[1] ),
"=r"( p[2] ),
"=r"( p[3] ),
"=r"( p[4] ),
"=r"( p[5] ),
"=r"( p[6] ),
"=r"( p[7] ),
75 "=r"( p[8] ),
"=r"( p[9] ),
"=r"( p[10] ),
"=r"( p[11] ),
"=r"( p[12] ),
"=r"( p[13] ),
"=r"( p[14] ),
76 "=r"( p[15] ),
"=r"( p[16] ),
"=r"( p[17] ),
"=r"( p[18] ),
"=r"( p[19] ),
"=r"( p[20] ),
"=r"( p[21] ),
77 "=r"( p[22] ),
"=r"( p[23] ),
"=r"( p[24] ),
"=r"( p[25] ),
"=r"( p[26] ),
"=r"( p[27] ),
"=r"( p[28] ),
78 "=r"( p[29] ),
"=r"( p[30] ),
"=r"( p[31] ),
"=r"( p[32] )
79 :
"r"( type ),
"l"( handle ),
"f"( ox ),
"f"( oy ),
"f"( oz ),
"f"( dx ),
"f"( dy ),
"f"( dz ),
"f"( tmin ),
80 "f"( tmax ),
"f"( rayTime ),
"r"( visibilityMask ),
"r"( rayFlags ),
"r"( SBToffset ),
"r"( SBTstride ),
81 "r"( missSBTIndex ),
"r"( payloadSize ),
"r"( p[1] ),
"r"( p[2] ),
"r"( p[3] ),
"r"( p[4] ),
"r"( p[5] ),
82 "r"( p[6] ),
"r"( p[7] ),
"r"( p[8] ),
"r"( p[9] ),
"r"( p[10] ),
"r"( p[11] ),
"r"( p[12] ),
"r"( p[13] ),
83 "r"( p[14] ),
"r"( p[15] ),
"r"( p[16] ),
"r"( p[17] ),
"r"( p[18] ),
"r"( p[19] ),
"r"( p[20] ),
84 "r"( p[21] ),
"r"( p[22] ),
"r"( p[23] ),
"r"( p[24] ),
"r"( p[25] ),
"r"( p[26] ),
"r"( p[27] ),
85 "r"( p[28] ),
"r"( p[29] ),
"r"( p[30] ),
"r"( p[31] ),
"r"( p[32] )
87 unsigned int index = 1;
88 (void)std::initializer_list<unsigned int>{index, ( payload = p[index++] )...};
91template <
typename... Payload>
99 unsigned int rayFlags,
100 unsigned int SBToffset,
101 unsigned int SBTstride,
102 unsigned int missSBTIndex,
103 Payload&... payload )
105 static_assert(
sizeof...( Payload ) <= 32,
"Only up to 32 payload values are allowed." );
109#ifndef __CUDACC_RTC__
111 "All payload parameters need to be unsigned int." );
115 float ox = rayOrigin.x, oy = rayOrigin.y, oz = rayOrigin.z;
116 float dx = rayDirection.x, dy = rayDirection.y, dz = rayDirection.z;
117 unsigned int p[33] = {0, payload...};
118 int payloadSize = (int)
sizeof...( Payload );
121 "(%0,%1,%2,%3,%4,%5,%6,%7,%8,%9,%10,%11,%12,%13,%14,%15,%16,%17,%18,%19,%20,%21,%22,%23,%24,%25,%26,%27,%28,%"
123 "_optix_hitobject_traverse,"
124 "(%32,%33,%34,%35,%36,%37,%38,%39,%40,%41,%42,%43,%44,%45,%46,%47,%48,%49,%50,%51,%52,%53,%54,%55,%56,%57,%58,%"
125 "59,%60,%61,%62,%63,%64,%65,%66,%67,%68,%69,%70,%71,%72,%73,%74,%75,%76,%77,%78,%79,%80);"
126 :
"=r"( p[1] ),
"=r"( p[2] ),
"=r"( p[3] ),
"=r"( p[4] ),
"=r"( p[5] ),
"=r"( p[6] ),
"=r"( p[7] ),
127 "=r"( p[8] ),
"=r"( p[9] ),
"=r"( p[10] ),
"=r"( p[11] ),
"=r"( p[12] ),
"=r"( p[13] ),
"=r"( p[14] ),
128 "=r"( p[15] ),
"=r"( p[16] ),
"=r"( p[17] ),
"=r"( p[18] ),
"=r"( p[19] ),
"=r"( p[20] ),
"=r"( p[21] ),
129 "=r"( p[22] ),
"=r"( p[23] ),
"=r"( p[24] ),
"=r"( p[25] ),
"=r"( p[26] ),
"=r"( p[27] ),
"=r"( p[28] ),
130 "=r"( p[29] ),
"=r"( p[30] ),
"=r"( p[31] ),
"=r"( p[32] )
131 :
"r"( type ),
"l"( handle ),
"f"( ox ),
"f"( oy ),
"f"( oz ),
"f"( dx ),
"f"( dy ),
"f"( dz ),
"f"( tmin ),
132 "f"( tmax ),
"f"( rayTime ),
"r"( visibilityMask ),
"r"( rayFlags ),
"r"( SBToffset ),
"r"( SBTstride ),
133 "r"( missSBTIndex ),
"r"( payloadSize ),
"r"( p[1] ),
"r"( p[2] ),
"r"( p[3] ),
"r"( p[4] ),
"r"( p[5] ),
134 "r"( p[6] ),
"r"( p[7] ),
"r"( p[8] ),
"r"( p[9] ),
"r"( p[10] ),
"r"( p[11] ),
"r"( p[12] ),
"r"( p[13] ),
135 "r"( p[14] ),
"r"( p[15] ),
"r"( p[16] ),
"r"( p[17] ),
"r"( p[18] ),
"r"( p[19] ),
"r"( p[20] ),
136 "r"( p[21] ),
"r"( p[22] ),
"r"( p[23] ),
"r"( p[24] ),
"r"( p[25] ),
"r"( p[26] ),
"r"( p[27] ),
137 "r"( p[28] ),
"r"( p[29] ),
"r"( p[30] ),
"r"( p[31] ),
"r"( p[32] )
139 unsigned int index = 1;
140 (void)std::initializer_list<unsigned int>{index, ( payload = p[index++] )...};
143template <
typename... Payload>
152 unsigned int rayFlags,
153 unsigned int SBToffset,
154 unsigned int SBTstride,
155 unsigned int missSBTIndex,
156 Payload&... payload )
161 static_assert(
sizeof...( Payload ) <= 32,
"Only up to 32 payload values are allowed." );
162#ifndef __CUDACC_RTC__
164 "All payload parameters need to be unsigned int." );
167 float ox = rayOrigin.x, oy = rayOrigin.y, oz = rayOrigin.z;
168 float dx = rayDirection.x, dy = rayDirection.y, dz = rayDirection.z;
169 unsigned int p[33] = {0, payload...};
170 int payloadSize = (int)
sizeof...( Payload );
174 "(%0,%1,%2,%3,%4,%5,%6,%7,%8,%9,%10,%11,%12,%13,%14,%15,%16,%17,%18,%19,%20,%21,%22,%23,%24,%25,%26,%27,%28,%"
176 "_optix_trace_typed_32,"
177 "(%32,%33,%34,%35,%36,%37,%38,%39,%40,%41,%42,%43,%44,%45,%46,%47,%48,%49,%50,%51,%52,%53,%54,%55,%56,%57,%58,%"
178 "59,%60,%61,%62,%63,%64,%65,%66,%67,%68,%69,%70,%71,%72,%73,%74,%75,%76,%77,%78,%79,%80);"
179 :
"=r"( p[1] ),
"=r"( p[2] ),
"=r"( p[3] ),
"=r"( p[4] ),
"=r"( p[5] ),
"=r"( p[6] ),
"=r"( p[7] ),
180 "=r"( p[8] ),
"=r"( p[9] ),
"=r"( p[10] ),
"=r"( p[11] ),
"=r"( p[12] ),
"=r"( p[13] ),
"=r"( p[14] ),
181 "=r"( p[15] ),
"=r"( p[16] ),
"=r"( p[17] ),
"=r"( p[18] ),
"=r"( p[19] ),
"=r"( p[20] ),
"=r"( p[21] ),
182 "=r"( p[22] ),
"=r"( p[23] ),
"=r"( p[24] ),
"=r"( p[25] ),
"=r"( p[26] ),
"=r"( p[27] ),
"=r"( p[28] ),
183 "=r"( p[29] ),
"=r"( p[30] ),
"=r"( p[31] ),
"=r"( p[32] )
184 :
"r"( type ),
"l"( handle ),
"f"( ox ),
"f"( oy ),
"f"( oz ),
"f"( dx ),
"f"( dy ),
"f"( dz ),
"f"( tmin ),
185 "f"( tmax ),
"f"( rayTime ),
"r"( visibilityMask ),
"r"( rayFlags ),
"r"( SBToffset ),
"r"( SBTstride ),
186 "r"( missSBTIndex ),
"r"( payloadSize ),
"r"( p[1] ),
"r"( p[2] ),
"r"( p[3] ),
"r"( p[4] ),
"r"( p[5] ),
187 "r"( p[6] ),
"r"( p[7] ),
"r"( p[8] ),
"r"( p[9] ),
"r"( p[10] ),
"r"( p[11] ),
"r"( p[12] ),
"r"( p[13] ),
188 "r"( p[14] ),
"r"( p[15] ),
"r"( p[16] ),
"r"( p[17] ),
"r"( p[18] ),
"r"( p[19] ),
"r"( p[20] ),
189 "r"( p[21] ),
"r"( p[22] ),
"r"( p[23] ),
"r"( p[24] ),
"r"( p[25] ),
"r"( p[26] ),
"r"( p[27] ),
190 "r"( p[28] ),
"r"( p[29] ),
"r"( p[30] ),
"r"( p[31] ),
"r"( p[32] )
192 unsigned int index = 1;
193 (void)std::initializer_list<unsigned int>{index, ( payload = p[index++] )...};
196template <
typename... Payload>
205 unsigned int rayFlags,
206 unsigned int SBToffset,
207 unsigned int SBTstride,
208 unsigned int missSBTIndex,
209 Payload&... payload )
214 static_assert(
sizeof...( Payload ) <= 32,
"Only up to 32 payload values are allowed." );
215#ifndef __CUDACC_RTC__
217 "All payload parameters need to be unsigned int." );
220 float ox = rayOrigin.x, oy = rayOrigin.y, oz = rayOrigin.z;
221 float dx = rayDirection.x, dy = rayDirection.y, dz = rayDirection.z;
222 unsigned int p[33] = {0, payload...};
223 int payloadSize = (int)
sizeof...( Payload );
226 "(%0,%1,%2,%3,%4,%5,%6,%7,%8,%9,%10,%11,%12,%13,%14,%15,%16,%17,%18,%19,%20,%21,%22,%23,%24,%25,%26,%27,%28,%"
228 "_optix_hitobject_traverse,"
229 "(%32,%33,%34,%35,%36,%37,%38,%39,%40,%41,%42,%43,%44,%45,%46,%47,%48,%49,%50,%51,%52,%53,%54,%55,%56,%57,%58,%"
230 "59,%60,%61,%62,%63,%64,%65,%66,%67,%68,%69,%70,%71,%72,%73,%74,%75,%76,%77,%78,%79,%80);"
231 :
"=r"( p[1] ),
"=r"( p[2] ),
"=r"( p[3] ),
"=r"( p[4] ),
"=r"( p[5] ),
"=r"( p[6] ),
"=r"( p[7] ),
232 "=r"( p[8] ),
"=r"( p[9] ),
"=r"( p[10] ),
"=r"( p[11] ),
"=r"( p[12] ),
"=r"( p[13] ),
"=r"( p[14] ),
233 "=r"( p[15] ),
"=r"( p[16] ),
"=r"( p[17] ),
"=r"( p[18] ),
"=r"( p[19] ),
"=r"( p[20] ),
"=r"( p[21] ),
234 "=r"( p[22] ),
"=r"( p[23] ),
"=r"( p[24] ),
"=r"( p[25] ),
"=r"( p[26] ),
"=r"( p[27] ),
"=r"( p[28] ),
235 "=r"( p[29] ),
"=r"( p[30] ),
"=r"( p[31] ),
"=r"( p[32] )
236 :
"r"( type ),
"l"( handle ),
"f"( ox ),
"f"( oy ),
"f"( oz ),
"f"( dx ),
"f"( dy ),
"f"( dz ),
"f"( tmin ),
237 "f"( tmax ),
"f"( rayTime ),
"r"( visibilityMask ),
"r"( rayFlags ),
"r"( SBToffset ),
"r"( SBTstride ),
238 "r"( missSBTIndex ),
"r"( payloadSize ),
"r"( p[1] ),
"r"( p[2] ),
"r"( p[3] ),
"r"( p[4] ),
"r"( p[5] ),
239 "r"( p[6] ),
"r"( p[7] ),
"r"( p[8] ),
"r"( p[9] ),
"r"( p[10] ),
"r"( p[11] ),
"r"( p[12] ),
"r"( p[13] ),
240 "r"( p[14] ),
"r"( p[15] ),
"r"( p[16] ),
"r"( p[17] ),
"r"( p[18] ),
"r"( p[19] ),
"r"( p[20] ),
241 "r"( p[21] ),
"r"( p[22] ),
"r"( p[23] ),
"r"( p[24] ),
"r"( p[25] ),
"r"( p[26] ),
"r"( p[27] ),
242 "r"( p[28] ),
"r"( p[29] ),
"r"( p[30] ),
"r"( p[31] ),
"r"( p[32] )
244 unsigned int index = 1;
245 (void)std::initializer_list<unsigned int>{index, ( payload = p[index++] )...};
248static __forceinline__ __device__
void optixReorder(
unsigned int coherenceHint,
unsigned int numCoherenceHintBits )
253 "_optix_hitobject_reorder,"
256 :
"r"( coherenceHint ),
"r"( numCoherenceHintBits )
262 unsigned int coherenceHint = 0;
263 unsigned int numCoherenceHintBits = 0;
267 "_optix_hitobject_reorder,"
270 :
"r"( coherenceHint ),
"r"( numCoherenceHintBits )
274template <
typename... Payload>
280 static_assert(
sizeof...( Payload ) <= 32,
"Only up to 32 payload values are allowed." );
281#ifndef __CUDACC_RTC__
283 "All payload parameters need to be unsigned int." );
286 unsigned int p[33] = {0, payload...};
287 int payloadSize = (int)
sizeof...( Payload );
291 "(%0,%1,%2,%3,%4,%5,%6,%7,%8,%9,%10,%11,%12,%13,%14,%15,%16,%17,%18,%19,%20,%21,%22,%23,%24,%25,%26,%27,%28,%"
293 "_optix_hitobject_invoke,"
294 "(%32,%33,%34,%35,%36,%37,%38,%39,%40,%41,%42,%43,%44,%45,%46,%47,%48,%49,%50,%51,%52,%53,%54,%55,%56,%57,%58,%"
295 "59,%60,%61,%62,%63,%64,%65);"
296 :
"=r"( p[1] ),
"=r"( p[2] ),
"=r"( p[3] ),
"=r"( p[4] ),
"=r"( p[5] ),
"=r"( p[6] ),
"=r"( p[7] ),
297 "=r"( p[8] ),
"=r"( p[9] ),
"=r"( p[10] ),
"=r"( p[11] ),
"=r"( p[12] ),
"=r"( p[13] ),
"=r"( p[14] ),
298 "=r"( p[15] ),
"=r"( p[16] ),
"=r"( p[17] ),
"=r"( p[18] ),
"=r"( p[19] ),
"=r"( p[20] ),
"=r"( p[21] ),
299 "=r"( p[22] ),
"=r"( p[23] ),
"=r"( p[24] ),
"=r"( p[25] ),
"=r"( p[26] ),
"=r"( p[27] ),
"=r"( p[28] ),
300 "=r"( p[29] ),
"=r"( p[30] ),
"=r"( p[31] ),
"=r"( p[32] )
301 :
"r"( type ),
"r"( payloadSize ),
"r"( p[1] ),
"r"( p[2] ),
302 "r"( p[3] ),
"r"( p[4] ),
"r"( p[5] ),
"r"( p[6] ),
"r"( p[7] ),
"r"( p[8] ),
"r"( p[9] ),
"r"( p[10] ),
303 "r"( p[11] ),
"r"( p[12] ),
"r"( p[13] ),
"r"( p[14] ),
"r"( p[15] ),
"r"( p[16] ),
"r"( p[17] ),
304 "r"( p[18] ),
"r"( p[19] ),
"r"( p[20] ),
"r"( p[21] ),
"r"( p[22] ),
"r"( p[23] ),
"r"( p[24] ),
305 "r"( p[25] ),
"r"( p[26] ),
"r"( p[27] ),
"r"( p[28] ),
"r"( p[29] ),
"r"( p[30] ),
"r"( p[31] ),
"r"( p[32] )
308 unsigned int index = 1;
309 (void)std::initializer_list<unsigned int>{index, ( payload = p[index++] )...};
312template <
typename... Payload>
313static __forceinline__ __device__
void optixInvoke( Payload&... payload )
318 static_assert(
sizeof...( Payload ) <= 32,
"Only up to 32 payload values are allowed." );
319#ifndef __CUDACC_RTC__
321 "All payload parameters need to be unsigned int." );
325 unsigned int p[33] = {0, payload...};
326 int payloadSize = (int)
sizeof...( Payload );
330 "(%0,%1,%2,%3,%4,%5,%6,%7,%8,%9,%10,%11,%12,%13,%14,%15,%16,%17,%18,%19,%20,%21,%22,%23,%24,%25,%26,%27,%28,%"
332 "_optix_hitobject_invoke,"
333 "(%32,%33,%34,%35,%36,%37,%38,%39,%40,%41,%42,%43,%44,%45,%46,%47,%48,%49,%50,%51,%52,%53,%54,%55,%56,%57,%58,%"
334 "59,%60,%61,%62,%63,%64,%65);"
335 :
"=r"( p[1] ),
"=r"( p[2] ),
"=r"( p[3] ),
"=r"( p[4] ),
"=r"( p[5] ),
"=r"( p[6] ),
"=r"( p[7] ),
336 "=r"( p[8] ),
"=r"( p[9] ),
"=r"( p[10] ),
"=r"( p[11] ),
"=r"( p[12] ),
"=r"( p[13] ),
"=r"( p[14] ),
337 "=r"( p[15] ),
"=r"( p[16] ),
"=r"( p[17] ),
"=r"( p[18] ),
"=r"( p[19] ),
"=r"( p[20] ),
"=r"( p[21] ),
338 "=r"( p[22] ),
"=r"( p[23] ),
"=r"( p[24] ),
"=r"( p[25] ),
"=r"( p[26] ),
"=r"( p[27] ),
"=r"( p[28] ),
339 "=r"( p[29] ),
"=r"( p[30] ),
"=r"( p[31] ),
"=r"( p[32] )
340 :
"r"( type ),
"r"( payloadSize ),
"r"( p[1] ),
"r"( p[2] ),
341 "r"( p[3] ),
"r"( p[4] ),
"r"( p[5] ),
"r"( p[6] ),
"r"( p[7] ),
"r"( p[8] ),
"r"( p[9] ),
"r"( p[10] ),
342 "r"( p[11] ),
"r"( p[12] ),
"r"( p[13] ),
"r"( p[14] ),
"r"( p[15] ),
"r"( p[16] ),
"r"( p[17] ),
343 "r"( p[18] ),
"r"( p[19] ),
"r"( p[20] ),
"r"( p[21] ),
"r"( p[22] ),
"r"( p[23] ),
"r"( p[24] ),
344 "r"( p[25] ),
"r"( p[26] ),
"r"( p[27] ),
"r"( p[28] ),
"r"( p[29] ),
"r"( p[30] ),
"r"( p[31] ),
"r"( p[32] )
347 unsigned int index = 1;
348 (void)std::initializer_list<unsigned int>{index, ( payload = p[index++] )...};
351template <
typename... RegAttributes>
358 unsigned int sbtOffset,
359 unsigned int sbtStride,
360 unsigned int instIdx,
361 unsigned int sbtGASIdx,
362 unsigned int primIdx,
363 unsigned int hitKind,
364 RegAttributes... regAttributes )
369 static_assert(
sizeof...( RegAttributes ) <= 8,
"Only up to 8 register attribute values are allowed." );
370#ifndef __CUDACC_RTC__
373 "All register attribute parameters need to be unsigned int." );
376 float ox = rayOrigin.x, oy = rayOrigin.y, oz = rayOrigin.z;
377 float dx = rayDirection.x, dy = rayDirection.y, dz = rayDirection.z;
378 unsigned int a[9] = {0, regAttributes...};
379 int attrSize = (int)
sizeof...( RegAttributes );
382 unsigned int numTransforms = 0;
387 "_optix_hitobject_make_hit,"
388 "(%0,%1,%2,%3,%4,%5,%6,%7,%8,%9,%10,%11,%12,%13,%14,%15,%16,%17,%18,%19,%20,%21,%22,%23,%24,%25,%26);"
390 :
"l"( handle ),
"f"( ox ),
"f"( oy ),
"f"( oz ),
"f"( dx ),
"f"( dy ),
"f"( dz ),
"f"( tmin ),
"f"( tmax ),
391 "f"( rayTime ),
"r"( sbtOffset ),
"r"( sbtStride ),
"r"( instIdx ),
"l"( transforms ),
"r"( numTransforms ),
392 "r"( sbtGASIdx ),
"r"( primIdx ),
"r"( hitKind ),
"r"( attrSize ),
"r"( a[1] ),
"r"( a[2] ),
"r"( a[3] ),
393 "r"( a[4] ),
"r"( a[5] ),
"r"( a[6] ),
"r"( a[7] ),
"r"( a[8] )
397template <
typename... RegAttributes>
404 unsigned int sbtOffset,
405 unsigned int sbtStride,
406 unsigned int instIdx,
408 unsigned int numTransforms,
409 unsigned int sbtGASIdx,
410 unsigned int primIdx,
411 unsigned int hitKind,
412 RegAttributes... regAttributes )
417 static_assert(
sizeof...( RegAttributes ) <= 8,
"Only up to 8 register attribute values are allowed." );
418#ifndef __CUDACC_RTC__
421 "All register attribute parameters need to be unsigned int." );
424 float ox = rayOrigin.x, oy = rayOrigin.y, oz = rayOrigin.z;
425 float dx = rayDirection.x, dy = rayDirection.y, dz = rayDirection.z;
426 unsigned int a[9] = {0, regAttributes...};
427 int attrSize = (int)
sizeof...( RegAttributes );
432 "_optix_hitobject_make_hit,"
433 "(%0,%1,%2,%3,%4,%5,%6,%7,%8,%9,%10,%11,%12,%13,%14,%15,%16,%17,%18,%19,%20,%21,%22,%23,%24,%25,%26);"
435 :
"l"( handle ),
"f"( ox ),
"f"( oy ),
"f"( oz ),
"f"( dx ),
"f"( dy ),
"f"( dz ),
"f"( tmin ),
"f"( tmax ),
436 "f"( rayTime ),
"r"( sbtOffset ),
"r"( sbtStride ),
"r"( instIdx ),
"l"( transforms ),
"r"( numTransforms ),
437 "r"( sbtGASIdx ),
"r"( primIdx ),
"r"( hitKind ),
"r"( attrSize ),
"r"( a[1] ),
"r"( a[2] ),
"r"( a[3] ),
438 "r"( a[4] ),
"r"( a[5] ),
"r"( a[6] ),
"r"( a[7] ),
"r"( a[8] )
442template <
typename... RegAttributes>
449 unsigned int sbtRecordIndex,
450 unsigned int instIdx,
452 unsigned int numTransforms,
453 unsigned int sbtGASIdx,
454 unsigned int primIdx,
455 unsigned int hitKind,
456 RegAttributes... regAttributes )
461 static_assert(
sizeof...( RegAttributes ) <= 8,
"Only up to 8 register attribute values are allowed." );
462#ifndef __CUDACC_RTC__
465 "All register attribute parameters need to be unsigned int." );
468 float ox = rayOrigin.x, oy = rayOrigin.y, oz = rayOrigin.z;
469 float dx = rayDirection.x, dy = rayDirection.y, dz = rayDirection.z;
470 unsigned int a[9] = {0, regAttributes...};
471 int attrSize = (int)
sizeof...( RegAttributes );
476 "_optix_hitobject_make_hit_with_record,"
477 "(%0,%1,%2,%3,%4,%5,%6,%7,%8,%9,%10,%11,%12,%13,%14,%15,%16,%17,%18,%19,%20,%21,%22,%23,%24,%25);"
479 :
"l"( handle ),
"f"( ox ),
"f"( oy ),
"f"( oz ),
"f"( dx ),
"f"( dy ),
"f"( dz ),
"f"( tmin ),
"f"( tmax ),
480 "f"( rayTime ),
"r"( sbtRecordIndex ),
"r"( instIdx ),
"l"( transforms ),
"r"( numTransforms ),
481 "r"( sbtGASIdx ),
"r"( primIdx ),
"r"( hitKind ),
"r"( attrSize ),
"r"( a[1] ),
"r"( a[2] ),
"r"( a[3] ),
482 "r"( a[4] ),
"r"( a[5] ),
"r"( a[6] ),
"r"( a[7] ),
"r"( a[8] )
493 float ox = rayOrigin.x, oy = rayOrigin.y, oz = rayOrigin.z;
494 float dx = rayDirection.x, dy = rayDirection.y, dz = rayDirection.z;
499 "_optix_hitobject_make_miss,"
500 "(%0,%1,%2,%3,%4,%5,%6,%7,%8,%9);"
502 :
"r"( missSBTIndex ),
"f"( ox ),
"f"( oy ),
"f"( oz ),
"f"( dx ),
"f"( dy ),
"f"( dz ),
"f"( tmin ),
503 "f"( tmax ),
"f"( rayTime )
512 "_optix_hitobject_make_nop,"
523 "call (%0), _optix_hitobject_is_hit,"
535 "call (%0), _optix_hitobject_is_miss,"
547 "call (%0), _optix_hitobject_is_nop,"
559 "call (%0), _optix_hitobject_get_instance_id,"
571 "call (%0), _optix_hitobject_get_instance_idx,"
583 "call (%0), _optix_hitobject_get_primitive_idx,"
595 "call (%0), _optix_hitobject_get_transform_list_size,"
605 unsigned long long result;
607 "call (%0), _optix_hitobject_get_transform_list_handle,"
619 "call (%0), _optix_hitobject_get_sbt_gas_idx,"
631 "call (%0), _optix_hitobject_get_hitkind,"
643 "call (%0), _optix_hitobject_get_world_ray_origin_x,"
649 "call (%0), _optix_hitobject_get_world_ray_origin_y,"
655 "call (%0), _optix_hitobject_get_world_ray_origin_z,"
660 return make_float3( x, y, z );
667 "call (%0), _optix_hitobject_get_world_ray_direction_x,"
673 "call (%0), _optix_hitobject_get_world_ray_direction_y,"
679 "call (%0), _optix_hitobject_get_world_ray_direction_z,"
684 return make_float3( x, y, z );
691 "call (%0), _optix_hitobject_get_ray_tmin,"
703 "call (%0), _optix_hitobject_get_ray_tmax,"
715 "call (%0), _optix_hitobject_get_ray_time,"
727 "call (%0), _optix_hitobject_get_attribute,"
739 "call (%0), _optix_hitobject_get_attribute,"
751 "call (%0), _optix_hitobject_get_attribute,"
763 "call (%0), _optix_hitobject_get_attribute,"
775 "call (%0), _optix_hitobject_get_attribute,"
787 "call (%0), _optix_hitobject_get_attribute,"
799 "call (%0), _optix_hitobject_get_attribute,"
811 "call (%0), _optix_hitobject_get_attribute,"
823 "call (%0), _optix_hitobject_get_sbt_record_index,"
833 unsigned long long ptr;
835 "call (%0), _optix_hitobject_get_sbt_data_pointer,"
845 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 0 ),
"r"( p ) : );
850 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 1 ),
"r"( p ) : );
855 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 2 ),
"r"( p ) : );
860 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 3 ),
"r"( p ) : );
865 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 4 ),
"r"( p ) : );
870 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 5 ),
"r"( p ) : );
875 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 6 ),
"r"( p ) : );
880 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 7 ),
"r"( p ) : );
885 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 8 ),
"r"( p ) : );
890 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 9 ),
"r"( p ) : );
895 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 10 ),
"r"( p ) : );
900 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 11 ),
"r"( p ) : );
905 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 12 ),
"r"( p ) : );
910 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 13 ),
"r"( p ) : );
915 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 14 ),
"r"( p ) : );
920 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 15 ),
"r"( p ) : );
925 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 16 ),
"r"( p ) : );
930 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 17 ),
"r"( p ) : );
935 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 18 ),
"r"( p ) : );
940 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 19 ),
"r"( p ) : );
945 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 20 ),
"r"( p ) : );
950 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 21 ),
"r"( p ) : );
955 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 22 ),
"r"( p ) : );
960 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 23 ),
"r"( p ) : );
965 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 24 ),
"r"( p ) : );
970 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 25 ),
"r"( p ) : );
975 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 26 ),
"r"( p ) : );
980 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 27 ),
"r"( p ) : );
985 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 28 ),
"r"( p ) : );
990 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 29 ),
"r"( p ) : );
995 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 30 ),
"r"( p ) : );
1000 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 31 ),
"r"( p ) : );
1005 unsigned int result;
1006 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 0 ) : );
1012 unsigned int result;
1013 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 1 ) : );
1019 unsigned int result;
1020 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 2 ) : );
1026 unsigned int result;
1027 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 3 ) : );
1033 unsigned int result;
1034 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 4 ) : );
1040 unsigned int result;
1041 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 5 ) : );
1047 unsigned int result;
1048 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 6 ) : );
1054 unsigned int result;
1055 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 7 ) : );
1061 unsigned int result;
1062 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 8 ) : );
1068 unsigned int result;
1069 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 9 ) : );
1075 unsigned int result;
1076 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 10 ) : );
1082 unsigned int result;
1083 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 11 ) : );
1089 unsigned int result;
1090 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 12 ) : );
1096 unsigned int result;
1097 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 13 ) : );
1103 unsigned int result;
1104 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 14 ) : );
1110 unsigned int result;
1111 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 15 ) : );
1117 unsigned int result;
1118 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 16 ) : );
1124 unsigned int result;
1125 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 17 ) : );
1131 unsigned int result;
1132 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 18 ) : );
1138 unsigned int result;
1139 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 19 ) : );
1145 unsigned int result;
1146 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 20 ) : );
1152 unsigned int result;
1153 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 21 ) : );
1159 unsigned int result;
1160 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 22 ) : );
1166 unsigned int result;
1167 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 23 ) : );
1173 unsigned int result;
1174 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 24 ) : );
1180 unsigned int result;
1181 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 25 ) : );
1187 unsigned int result;
1188 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 26 ) : );
1194 unsigned int result;
1195 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 27 ) : );
1201 unsigned int result;
1202 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 28 ) : );
1208 unsigned int result;
1209 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 29 ) : );
1215 unsigned int result;
1216 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 30 ) : );
1222 unsigned int result;
1223 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 31 ) : );
1229 asm volatile(
"call _optix_set_payload_types, (%0);" : :
"r"( types ) : );
1235 asm(
"call (%0), _optix_undef_value, ();" :
"=r"( u0 ) : );
1242 asm(
"call (%0), _optix_get_world_ray_origin_x, ();" :
"=f"( f0 ) : );
1243 asm(
"call (%0), _optix_get_world_ray_origin_y, ();" :
"=f"( f1 ) : );
1244 asm(
"call (%0), _optix_get_world_ray_origin_z, ();" :
"=f"( f2 ) : );
1245 return make_float3( f0, f1, f2 );
1251 asm(
"call (%0), _optix_get_world_ray_direction_x, ();" :
"=f"( f0 ) : );
1252 asm(
"call (%0), _optix_get_world_ray_direction_y, ();" :
"=f"( f1 ) : );
1253 asm(
"call (%0), _optix_get_world_ray_direction_z, ();" :
"=f"( f2 ) : );
1254 return make_float3( f0, f1, f2 );
1260 asm(
"call (%0), _optix_get_object_ray_origin_x, ();" :
"=f"( f0 ) : );
1261 asm(
"call (%0), _optix_get_object_ray_origin_y, ();" :
"=f"( f1 ) : );
1262 asm(
"call (%0), _optix_get_object_ray_origin_z, ();" :
"=f"( f2 ) : );
1263 return make_float3( f0, f1, f2 );
1269 asm(
"call (%0), _optix_get_object_ray_direction_x, ();" :
"=f"( f0 ) : );
1270 asm(
"call (%0), _optix_get_object_ray_direction_y, ();" :
"=f"( f1 ) : );
1271 asm(
"call (%0), _optix_get_object_ray_direction_z, ();" :
"=f"( f2 ) : );
1272 return make_float3( f0, f1, f2 );
1278 asm(
"call (%0), _optix_get_ray_tmin, ();" :
"=f"( f0 ) : );
1285 asm(
"call (%0), _optix_get_ray_tmax, ();" :
"=f"( f0 ) : );
1292 asm(
"call (%0), _optix_get_ray_time, ();" :
"=f"( f0 ) : );
1299 asm(
"call (%0), _optix_get_ray_flags, ();" :
"=r"( u0 ) : );
1306 asm(
"call (%0), _optix_get_ray_visibility_mask, ();" :
"=r"( u0 ) : );
1311 unsigned int instIdx )
1313 unsigned long long handle;
1314 asm(
"call (%0), _optix_get_instance_traversable_from_ias, (%1, %2);"
1315 :
"=l"( handle ) :
"l"( ias ),
"r"( instIdx ) );
1321 unsigned int primIdx,
1322 unsigned int sbtGASIndex,
1326 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8), _optix_get_triangle_vertex_data, "
1327 "(%9, %10, %11, %12);"
1328 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[1].x ),
"=f"( data[1].y ),
1329 "=f"( data[1].z ),
"=f"( data[2].x ),
"=f"( data[2].y ),
"=f"( data[2].z )
1330 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
1336 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8), _optix_get_microtriangle_vertex_data, "
1338 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[1].x ),
"=f"( data[1].y ),
1339 "=f"( data[1].z ),
"=f"( data[2].x ),
"=f"( data[2].y ),
"=f"( data[2].z )
1344 asm(
"call (%0, %1, %2, %3, %4, %5), _optix_get_microtriangle_barycentrics_data, "
1346 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[1].x ),
"=f"( data[1].y ),
"=f"( data[2].x ),
"=f"( data[2].y )
1351 unsigned int primIdx,
1352 unsigned int sbtGASIndex,
1356 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7), _optix_get_linear_curve_vertex_data, "
1357 "(%8, %9, %10, %11);"
1358 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w ),
1359 "=f"( data[1].x ),
"=f"( data[1].y ),
"=f"( data[1].z ),
"=f"( data[1].w )
1360 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
1365 unsigned int primIdx,
1366 unsigned int sbtGASIndex,
1370 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11), _optix_get_quadratic_bspline_vertex_data, "
1371 "(%12, %13, %14, %15);"
1372 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w ),
1373 "=f"( data[1].x ),
"=f"( data[1].y ),
"=f"( data[1].z ),
"=f"( data[1].w ),
1374 "=f"( data[2].x ),
"=f"( data[2].y ),
"=f"( data[2].z ),
"=f"( data[2].w )
1375 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
1380 unsigned int primIdx,
1381 unsigned int sbtGASIndex,
1385 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15), "
1386 "_optix_get_cubic_bspline_vertex_data, "
1387 "(%16, %17, %18, %19);"
1388 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w ),
1389 "=f"( data[1].x ),
"=f"( data[1].y ),
"=f"( data[1].z ),
"=f"( data[1].w ),
1390 "=f"( data[2].x ),
"=f"( data[2].y ),
"=f"( data[2].z ),
"=f"( data[2].w ),
1391 "=f"( data[3].x ),
"=f"( data[3].y ),
"=f"( data[3].z ),
"=f"( data[3].w )
1392 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
1397 unsigned int primIdx,
1398 unsigned int sbtGASIndex,
1402 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15), "
1403 "_optix_get_catmullrom_vertex_data, "
1404 "(%16, %17, %18, %19);"
1405 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w ),
"=f"( data[1].x ),
1406 "=f"( data[1].y ),
"=f"( data[1].z ),
"=f"( data[1].w ),
"=f"( data[2].x ),
"=f"( data[2].y ),
1407 "=f"( data[2].z ),
"=f"( data[2].w ),
"=f"( data[3].x ),
"=f"( data[3].y ),
"=f"( data[3].z ),
"=f"( data[3].w )
1408 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
1413 unsigned int primIdx,
1414 unsigned int sbtGASIndex,
1418 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15), "
1419 "_optix_get_cubic_bezier_vertex_data, "
1420 "(%16, %17, %18, %19);"
1421 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w ),
"=f"( data[1].x ),
1422 "=f"( data[1].y ),
"=f"( data[1].z ),
"=f"( data[1].w ),
"=f"( data[2].x ),
"=f"( data[2].y ),
1423 "=f"( data[2].z ),
"=f"( data[2].w ),
"=f"( data[3].x ),
"=f"( data[3].y ),
"=f"( data[3].z ),
"=f"( data[3].w )
1424 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
1429 unsigned int primIdx,
1430 unsigned int sbtGASIndex,
1434 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11), _optix_get_ribbon_vertex_data, "
1435 "(%12, %13, %14, %15);"
1436 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w ),
"=f"( data[1].x ),
"=f"( data[1].y ),
1437 "=f"( data[1].z ),
"=f"( data[1].w ),
"=f"( data[2].x ),
"=f"( data[2].y ),
"=f"( data[2].z ),
"=f"( data[2].w )
1438 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
1443 unsigned int primIdx,
1444 unsigned int sbtGASIndex,
1446 float2 ribbonParameters )
1449 asm(
"call (%0, %1, %2), _optix_get_ribbon_normal, "
1450 "(%3, %4, %5, %6, %7, %8);"
1451 :
"=f"( normal.x ),
"=f"( normal.y ),
"=f"( normal.z )
1452 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time ),
1453 "f"( ribbonParameters.x ),
"f"( ribbonParameters.y )
1459 unsigned int primIdx,
1460 unsigned int sbtGASIndex,
1464 asm(
"call (%0, %1, %2, %3), "
1465 "_optix_get_sphere_data, "
1467 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w )
1468 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
1474 unsigned long long handle;
1475 asm(
"call (%0), _optix_get_gas_traversable_handle, ();" :
"=l"( handle ) : );
1482 asm(
"call (%0), _optix_get_gas_motion_time_begin, (%1);" :
"=f"( f0 ) :
"l"( handle ) : );
1489 asm(
"call (%0), _optix_get_gas_motion_time_end, (%1);" :
"=f"( f0 ) :
"l"( handle ) : );
1496 asm(
"call (%0), _optix_get_gas_motion_step_count, (%1);" :
"=r"( u0 ) :
"l"( handle ) : );
1633 asm(
"call (%0), _optix_get_transform_list_size, ();" :
"=r"( u0 ) : );
1639 unsigned long long u0;
1640 asm(
"call (%0), _optix_get_transform_list_handle, (%1);" :
"=l"( u0 ) :
"r"( index ) : );
1647 asm(
"call (%0), _optix_get_transform_type_from_handle, (%1);" :
"=r"( i0 ) :
"l"( handle ) : );
1653 unsigned long long ptr;
1654 asm(
"call (%0), _optix_get_static_transform_from_handle, (%1);" :
"=l"( ptr ) :
"l"( handle ) : );
1660 unsigned long long ptr;
1661 asm(
"call (%0), _optix_get_srt_motion_transform_from_handle, (%1);" :
"=l"( ptr ) :
"l"( handle ) : );
1667 unsigned long long ptr;
1668 asm(
"call (%0), _optix_get_matrix_motion_transform_from_handle, (%1);" :
"=l"( ptr ) :
"l"( handle ) : );
1675 asm(
"call (%0), _optix_get_instance_id_from_handle, (%1);" :
"=r"( i0 ) :
"l"( handle ) : );
1681 unsigned long long i0;
1682 asm(
"call (%0), _optix_get_instance_child_from_handle, (%1);" :
"=l"( i0 ) :
"l"( handle ) : );
1688 unsigned long long ptr;
1689 asm(
"call (%0), _optix_get_instance_transform_from_handle, (%1);" :
"=l"( ptr ) :
"l"( handle ) : );
1690 return (
const float4*)ptr;
1695 unsigned long long ptr;
1696 asm(
"call (%0), _optix_get_instance_inverse_transform_from_handle, (%1);" :
"=l"( ptr ) :
"l"( handle ) : );
1697 return (
const float4*)ptr;
1702 unsigned long long ptr;
1703 asm(
"call (%0), _optix_get_gas_ptr_from_handle, (%1);" :
"=l"( ptr ) :
"l"( handle ) : );
1710 "call (%0), _optix_report_intersection_0"
1713 :
"f"( hitT ),
"r"( hitKind )
1722 "call (%0), _optix_report_intersection_1"
1725 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 )
1730static __forceinline__ __device__
bool optixReportIntersection(
float hitT,
unsigned int hitKind,
unsigned int a0,
unsigned int a1 )
1734 "call (%0), _optix_report_intersection_2"
1735 ", (%1, %2, %3, %4);"
1737 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 )
1742static __forceinline__ __device__
bool optixReportIntersection(
float hitT,
unsigned int hitKind,
unsigned int a0,
unsigned int a1,
unsigned int a2 )
1746 "call (%0), _optix_report_intersection_3"
1747 ", (%1, %2, %3, %4, %5);"
1749 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 ),
"r"( a2 )
1755 unsigned int hitKind,
1763 "call (%0), _optix_report_intersection_4"
1764 ", (%1, %2, %3, %4, %5, %6);"
1766 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 ),
"r"( a2 ),
"r"( a3 )
1772 unsigned int hitKind,
1781 "call (%0), _optix_report_intersection_5"
1782 ", (%1, %2, %3, %4, %5, %6, %7);"
1784 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 ),
"r"( a2 ),
"r"( a3 ),
"r"( a4 )
1790 unsigned int hitKind,
1800 "call (%0), _optix_report_intersection_6"
1801 ", (%1, %2, %3, %4, %5, %6, %7, %8);"
1803 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 ),
"r"( a2 ),
"r"( a3 ),
"r"( a4 ),
"r"( a5 )
1809 unsigned int hitKind,
1820 "call (%0), _optix_report_intersection_7"
1821 ", (%1, %2, %3, %4, %5, %6, %7, %8, %9);"
1823 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 ),
"r"( a2 ),
"r"( a3 ),
"r"( a4 ),
"r"( a5 ),
"r"( a6 )
1829 unsigned int hitKind,
1841 "call (%0), _optix_report_intersection_8"
1842 ", (%1, %2, %3, %4, %5, %6, %7, %8, %9, %10);"
1844 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 ),
"r"( a2 ),
"r"( a3 ),
"r"( a4 ),
"r"( a5 ),
"r"( a6 ),
"r"( a7 )
1849#define OPTIX_DEFINE_optixGetAttribute_BODY( which ) \
1851 asm( "call (%0), _optix_get_attribute_" #which ", ();" : "=r"( ret ) : ); \
1894#undef OPTIX_DEFINE_optixGetAttribute_BODY
1898 asm volatile(
"call _optix_terminate_ray, ();" );
1903 asm volatile(
"call _optix_ignore_intersection, ();" );
1909 asm(
"call (%0), _optix_read_primitive_idx, ();" :
"=r"( u0 ) : );
1916 asm(
"call (%0), _optix_read_sbt_gas_idx, ();" :
"=r"( u0 ) : );
1923 asm(
"call (%0), _optix_read_instance_id, ();" :
"=r"( u0 ) : );
1930 asm(
"call (%0), _optix_read_instance_idx, ();" :
"=r"( u0 ) : );
1937 asm(
"call (%0), _optix_get_hit_kind, ();" :
"=r"( u0 ) : );
1944 asm(
"call (%0), _optix_get_primitive_type_from_hit_kind, (%1);" :
"=r"( u0 ) :
"r"( hitKind ) );
1951 asm(
"call (%0), _optix_get_backface_from_hit_kind, (%1);" :
"=r"( u0 ) :
"r"( hitKind ) );
2009 asm(
"call (%0), _optix_get_curve_parameter, ();" :
"=f"(f0) : );
2016 asm(
"call (%0, %1), _optix_get_ribbon_parameters, ();" :
"=f"( f0 ),
"=f"( f1 ) : );
2017 return make_float2( f0, f1 );
2023 asm(
"call (%0, %1), _optix_get_triangle_barycentrics, ();" :
"=f"( f0 ),
"=f"( f1 ) : );
2024 return make_float2( f0, f1 );
2029 unsigned int u0, u1, u2;
2030 asm(
"call (%0), _optix_get_launch_index_x, ();" :
"=r"( u0 ) : );
2031 asm(
"call (%0), _optix_get_launch_index_y, ();" :
"=r"( u1 ) : );
2032 asm(
"call (%0), _optix_get_launch_index_z, ();" :
"=r"( u2 ) : );
2033 return make_uint3( u0, u1, u2 );
2038 unsigned int u0, u1, u2;
2039 asm(
"call (%0), _optix_get_launch_dimension_x, ();" :
"=r"( u0 ) : );
2040 asm(
"call (%0), _optix_get_launch_dimension_y, ();" :
"=r"( u1 ) : );
2041 asm(
"call (%0), _optix_get_launch_dimension_z, ();" :
"=r"( u2 ) : );
2042 return make_uint3( u0, u1, u2 );
2047 unsigned long long ptr;
2048 asm(
"call (%0), _optix_get_sbt_data_ptr_64, ();" :
"=l"( ptr ) : );
2055 "call _optix_throw_exception_0, (%0);"
2057 :
"r"( exceptionCode )
2064 "call _optix_throw_exception_1, (%0, %1);"
2066 :
"r"( exceptionCode ),
"r"( exceptionDetail0 )
2070static __forceinline__ __device__
void optixThrowException(
int exceptionCode,
unsigned int exceptionDetail0,
unsigned int exceptionDetail1 )
2073 "call _optix_throw_exception_2, (%0, %1, %2);"
2075 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 )
2079static __forceinline__ __device__
void optixThrowException(
int exceptionCode,
unsigned int exceptionDetail0,
unsigned int exceptionDetail1,
unsigned int exceptionDetail2 )
2082 "call _optix_throw_exception_3, (%0, %1, %2, %3);"
2084 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 ),
"r"( exceptionDetail2 )
2088static __forceinline__ __device__
void optixThrowException(
int exceptionCode,
unsigned int exceptionDetail0,
unsigned int exceptionDetail1,
unsigned int exceptionDetail2,
unsigned int exceptionDetail3 )
2091 "call _optix_throw_exception_4, (%0, %1, %2, %3, %4);"
2093 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 ),
"r"( exceptionDetail2 ),
"r"( exceptionDetail3 )
2097static __forceinline__ __device__
void optixThrowException(
int exceptionCode,
unsigned int exceptionDetail0,
unsigned int exceptionDetail1,
unsigned int exceptionDetail2,
unsigned int exceptionDetail3,
unsigned int exceptionDetail4 )
2100 "call _optix_throw_exception_5, (%0, %1, %2, %3, %4, %5);"
2102 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 ),
"r"( exceptionDetail2 ),
"r"( exceptionDetail3 ),
"r"( exceptionDetail4 )
2106static __forceinline__ __device__
void optixThrowException(
int exceptionCode,
unsigned int exceptionDetail0,
unsigned int exceptionDetail1,
unsigned int exceptionDetail2,
unsigned int exceptionDetail3,
unsigned int exceptionDetail4,
unsigned int exceptionDetail5 )
2109 "call _optix_throw_exception_6, (%0, %1, %2, %3, %4, %5, %6);"
2111 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 ),
"r"( exceptionDetail2 ),
"r"( exceptionDetail3 ),
"r"( exceptionDetail4 ),
"r"( exceptionDetail5 )
2115static __forceinline__ __device__
void optixThrowException(
int exceptionCode,
unsigned int exceptionDetail0,
unsigned int exceptionDetail1,
unsigned int exceptionDetail2,
unsigned int exceptionDetail3,
unsigned int exceptionDetail4,
unsigned int exceptionDetail5,
unsigned int exceptionDetail6 )
2118 "call _optix_throw_exception_7, (%0, %1, %2, %3, %4, %5, %6, %7);"
2120 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 ),
"r"( exceptionDetail2 ),
"r"( exceptionDetail3 ),
"r"( exceptionDetail4 ),
"r"( exceptionDetail5 ),
"r"( exceptionDetail6 )
2124static __forceinline__ __device__
void optixThrowException(
int exceptionCode,
unsigned int exceptionDetail0,
unsigned int exceptionDetail1,
unsigned int exceptionDetail2,
unsigned int exceptionDetail3,
unsigned int exceptionDetail4,
unsigned int exceptionDetail5,
unsigned int exceptionDetail6,
unsigned int exceptionDetail7 )
2127 "call _optix_throw_exception_8, (%0, %1, %2, %3, %4, %5, %6, %7, %8);"
2129 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 ),
"r"( exceptionDetail2 ),
"r"( exceptionDetail3 ),
"r"( exceptionDetail4 ),
"r"( exceptionDetail5 ),
"r"( exceptionDetail6 ),
"r"( exceptionDetail7 )
2136 asm(
"call (%0), _optix_get_exception_code, ();" :
"=r"( s0 ) : );
2140#define OPTIX_DEFINE_optixGetExceptionDetail_BODY( which ) \
2142 asm( "call (%0), _optix_get_exception_detail_" #which ", ();" : "=r"( ret ) : ); \
2185#undef OPTIX_DEFINE_optixGetExceptionDetail_BODY
2190 unsigned long long ptr;
2191 asm(
"call (%0), _optix_get_exception_line_info, ();" :
"=l"(ptr) : );
2195template <
typename ReturnT,
typename... ArgTypes>
2196static __forceinline__ __device__ ReturnT
optixDirectCall(
unsigned int sbtIndex, ArgTypes... args )
2198 unsigned long long func;
2199 asm(
"call (%0), _optix_call_direct_callable,(%1);" :
"=l"( func ) :
"r"( sbtIndex ) : );
2200 using funcT = ReturnT ( * )( ArgTypes... );
2201 funcT call = ( funcT )( func );
2202 return call( args... );
2205template <
typename ReturnT,
typename... ArgTypes>
2208 unsigned long long func;
2209 asm(
"call (%0), _optix_call_continuation_callable,(%1);" :
"=l"( func ) :
"r"( sbtIndex ) : );
2210 using funcT = ReturnT ( * )( ArgTypes... );
2211 funcT call = ( funcT )( func );
2212 return call( args... );
2215static __forceinline__ __device__ uint4
optixTexFootprint2D(
unsigned long long tex,
unsigned int texInfo,
float x,
float y,
unsigned int* singleMipLevel )
2218 unsigned long long resultPtr =
reinterpret_cast<unsigned long long>( &result );
2219 unsigned long long singleMipLevelPtr =
reinterpret_cast<unsigned long long>( singleMipLevel );
2222 "call _optix_tex_footprint_2d_v2"
2223 ", (%0, %1, %2, %3, %4, %5);"
2225 :
"l"( tex ),
"r"( texInfo ),
"r"( __float_as_uint( x ) ),
"r"( __float_as_uint( y ) ),
2226 "l"( singleMipLevelPtr ),
"l"( resultPtr )
2232 unsigned int texInfo,
2240 unsigned int* singleMipLevel )
2243 unsigned long long resultPtr =
reinterpret_cast<unsigned long long>( &result );
2244 unsigned long long singleMipLevelPtr =
reinterpret_cast<unsigned long long>( singleMipLevel );
2247 "call _optix_tex_footprint_2d_grad_v2"
2248 ", (%0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10);"
2250 :
"l"( tex ),
"r"( texInfo ),
"r"( __float_as_uint( x ) ),
"r"( __float_as_uint( y ) ),
2251 "r"( __float_as_uint( dPdx_x ) ),
"r"( __float_as_uint( dPdx_y ) ),
"r"( __float_as_uint( dPdy_x ) ),
2252 "r"( __float_as_uint( dPdy_y ) ),
"r"(
static_cast<unsigned int>( coarse ) ),
"l"( singleMipLevelPtr ),
"l"( resultPtr )
2258static __forceinline__ __device__ uint4
2259optixTexFootprint2DLod(
unsigned long long tex,
unsigned int texInfo,
float x,
float y,
float level,
bool coarse,
unsigned int* singleMipLevel )
2262 unsigned long long resultPtr =
reinterpret_cast<unsigned long long>( &result );
2263 unsigned long long singleMipLevelPtr =
reinterpret_cast<unsigned long long>( singleMipLevel );
2266 "call _optix_tex_footprint_2d_lod_v2"
2267 ", (%0, %1, %2, %3, %4, %5, %6, %7);"
2269 :
"l"( tex ),
"r"( texInfo ),
"r"( __float_as_uint( x ) ),
"r"( __float_as_uint( y ) ),
2270 "r"( __float_as_uint( level ) ),
"r"(
static_cast<unsigned int>( coarse ) ),
"l"( singleMipLevelPtr ),
"l"( resultPtr )
OptixTransformType
Transform.
Definition: optix_types.h:1850
unsigned long long CUdeviceptr
CUDA device pointer.
Definition: optix_types.h:43
unsigned int OptixVisibilityMask
Visibility mask.
Definition: optix_types.h:71
unsigned long long OptixTraversableHandle
Traversable handle.
Definition: optix_types.h:68
OptixPrimitiveType
Builtin primitive types.
Definition: optix_types.h:721
OptixPayloadTypeID
Payload type identifiers.
Definition: optix_types.h:1977
@ OPTIX_HIT_KIND_TRIANGLE_BACK_FACE
Ray hit the triangle on the back face.
Definition: optix_types.h:334
@ OPTIX_HIT_KIND_TRIANGLE_FRONT_FACE
Ray hit the triangle on the front face.
Definition: optix_types.h:332
@ OPTIX_PRIMITIVE_TYPE_DISPLACED_MICROMESH_TRIANGLE
Triangle with an applied displacement micromap.
Definition: optix_types.h:741
@ OPTIX_PAYLOAD_TYPE_DEFAULT
Definition: optix_types.h:1978
static __forceinline__ __device__ void optixGetObjectToWorldTransformMatrix(float4 &m0, float4 &m1, float4 &m2)
Definition: optix_device_impl_transformations.h:357
static __forceinline__ __device__ float3 optixTransformPoint(const float4 &m0, const float4 &m1, const float4 &m2, const float3 &p)
Definition: optix_device_impl_transformations.h:388
static __forceinline__ __device__ float3 optixTransformVector(const float4 &m0, const float4 &m1, const float4 &m2, const float3 &v)
Definition: optix_device_impl_transformations.h:398
static __forceinline__ __device__ float3 optixTransformNormal(const float4 &m0, const float4 &m1, const float4 &m2, const float3 &n)
Definition: optix_device_impl_transformations.h:409
static __forceinline__ __device__ void optixGetWorldToObjectTransformMatrix(float4 &m0, float4 &m1, float4 &m2)
Definition: optix_device_impl_transformations.h:326
Definition: optix_device_impl.h:34
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_7()
Definition: optix_device_impl.h:2180
static __forceinline__ __device__ ReturnT optixContinuationCall(unsigned int sbtIndex, ArgTypes... args)
Definition: optix_device_impl.h:2206
static __forceinline__ __device__ void optixThrowException(int exceptionCode)
Definition: optix_device_impl.h:2052
static __forceinline__ __device__ unsigned int optixGetPayload_2()
Definition: optix_device_impl.h:1017
static __forceinline__ __device__ void optixSetPayload_16(unsigned int p)
Definition: optix_device_impl.h:923
static __forceinline__ __device__ float3 optixTransformNormalFromWorldToObjectSpace(float3 normal)
Definition: optix_device_impl.h:1590
static __forceinline__ __device__ unsigned int optixGetPayload_25()
Definition: optix_device_impl.h:1178
static __forceinline__ __device__ unsigned int optixGetPayload_1()
Definition: optix_device_impl.h:1010
static __forceinline__ __device__ unsigned int optixGetPayload_15()
Definition: optix_device_impl.h:1108
static __forceinline__ __device__ OptixTraversableHandle optixGetGASTraversableHandle()
Definition: optix_device_impl.h:1472
static __forceinline__ __device__ unsigned int optixHitObjectGetSbtGASIndex()
Definition: optix_device_impl.h:615
static __forceinline__ __device__ uint3 optixGetLaunchDimensions()
Definition: optix_device_impl.h:2036
static __forceinline__ __device__ void optixSetPayload_11(unsigned int p)
Definition: optix_device_impl.h:898
static __forceinline__ __device__ void optixSetPayloadTypes(unsigned int types)
Definition: optix_device_impl.h:1227
static __forceinline__ __device__ void optixSetPayload_8(unsigned int p)
Definition: optix_device_impl.h:883
static __forceinline__ __device__ void optixSetPayload_5(unsigned int p)
Definition: optix_device_impl.h:868
static __forceinline__ __device__ unsigned int optixGetPayload_9()
Definition: optix_device_impl.h:1066
static __forceinline__ __device__ void optixSetPayload_29(unsigned int p)
Definition: optix_device_impl.h:988
static __forceinline__ __device__ void optixSetPayload_14(unsigned int p)
Definition: optix_device_impl.h:913
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_2()
Definition: optix_device_impl.h:2155
static __forceinline__ __device__ unsigned int optixGetGASMotionStepCount(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1493
static __forceinline__ __device__ const OptixStaticTransform * optixGetStaticTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1651
static __forceinline__ __device__ void optixSetPayload_19(unsigned int p)
Definition: optix_device_impl.h:938
static __forceinline__ __device__ float3 optixGetWorldRayDirection()
Definition: optix_device_impl.h:1248
static __forceinline__ __device__ float3 optixGetObjectRayOrigin()
Definition: optix_device_impl.h:1257
static __forceinline__ __device__ bool optixIsFrontFaceHit(unsigned int hitKind)
Definition: optix_device_impl.h:1955
static __forceinline__ __device__ unsigned int optixGetAttribute_4()
Definition: optix_device_impl.h:1874
static __forceinline__ __device__ unsigned int optixGetPayload_4()
Definition: optix_device_impl.h:1031
static __forceinline__ __device__ void optixSetPayload_10(unsigned int p)
Definition: optix_device_impl.h:893
static __forceinline__ __device__ unsigned int optixGetPayload_18()
Definition: optix_device_impl.h:1129
static __forceinline__ __device__ bool optixHitObjectIsHit()
Definition: optix_device_impl.h:519
static __forceinline__ __device__ unsigned int optixGetAttribute_6()
Definition: optix_device_impl.h:1884
static __forceinline__ __device__ void optixMakeNopHitObject()
Definition: optix_device_impl.h:507
static __forceinline__ __device__ unsigned int optixGetAttribute_3()
Definition: optix_device_impl.h:1869
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_4()
Definition: optix_device_impl.h:771
static __forceinline__ __device__ void optixSetPayload_20(unsigned int p)
Definition: optix_device_impl.h:943
static __forceinline__ __device__ void optixSetPayload_4(unsigned int p)
Definition: optix_device_impl.h:863
static __forceinline__ __device__ unsigned int optixGetPayload_5()
Definition: optix_device_impl.h:1038
static __forceinline__ __device__ unsigned int optixGetPayload_22()
Definition: optix_device_impl.h:1157
static __forceinline__ __device__ bool optixIsTriangleHit()
Definition: optix_device_impl.h:1976
static __forceinline__ __device__ void optixGetCubicBSplineVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[4])
Definition: optix_device_impl.h:1379
static __forceinline__ __device__ unsigned int optixGetPayload_27()
Definition: optix_device_impl.h:1192
static __forceinline__ __device__ uint4 optixTexFootprint2DGrad(unsigned long long tex, unsigned int texInfo, float x, float y, float dPdx_x, float dPdx_y, float dPdy_x, float dPdy_y, bool coarse, unsigned int *singleMipLevel)
Definition: optix_device_impl.h:2231
static __forceinline__ __device__ void optixSetPayload_6(unsigned int p)
Definition: optix_device_impl.h:873
static __forceinline__ __device__ void optixMakeHitObjectWithRecord(OptixTraversableHandle handle, float3 rayOrigin, float3 rayDirection, float tmin, float tmax, float rayTime, unsigned int sbtRecordIndex, unsigned int instIdx, const OptixTraversableHandle *transforms, unsigned int numTransforms, unsigned int sbtGASIdx, unsigned int primIdx, unsigned int hitKind, RegAttributes... regAttributes)
Definition: optix_device_impl.h:443
static __forceinline__ __device__ float3 optixHitObjectGetWorldRayDirection()
Definition: optix_device_impl.h:663
static __forceinline__ __device__ unsigned int optixGetAttribute_1()
Definition: optix_device_impl.h:1859
static __forceinline__ __device__ bool optixIsTriangleBackFaceHit()
Definition: optix_device_impl.h:1986
static __forceinline__ __device__ unsigned int optixGetAttribute_5()
Definition: optix_device_impl.h:1879
static __forceinline__ __device__ OptixTraversableHandle optixHitObjectGetTransformListHandle(unsigned int index)
Definition: optix_device_impl.h:603
static __forceinline__ __device__ void optixGetRibbonVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[3])
Definition: optix_device_impl.h:1428
static __forceinline__ __device__ void optixSetPayload_25(unsigned int p)
Definition: optix_device_impl.h:968
static __forceinline__ __device__ unsigned int optixGetRayFlags()
Definition: optix_device_impl.h:1296
static __forceinline__ __device__ unsigned int optixHitObjectGetInstanceId()
Definition: optix_device_impl.h:555
static __forceinline__ __device__ unsigned int optixHitObjectGetSbtRecordIndex()
Definition: optix_device_impl.h:819
static __forceinline__ __device__ float3 optixTransformPointFromObjectToWorldSpace(float3 point)
Definition: optix_device_impl.h:1600
static __forceinline__ __device__ unsigned int optixGetPayload_26()
Definition: optix_device_impl.h:1185
static __forceinline__ __device__ void optixMakeMissHitObject(unsigned int missSBTIndex, float3 rayOrigin, float3 rayDirection, float tmin, float tmax, float rayTime)
Definition: optix_device_impl.h:486
static __forceinline__ __device__ void optixSetPayload_17(unsigned int p)
Definition: optix_device_impl.h:928
static __forceinline__ __device__ void optixSetPayload_7(unsigned int p)
Definition: optix_device_impl.h:878
static __forceinline__ __device__ ReturnT optixDirectCall(unsigned int sbtIndex, ArgTypes... args)
Definition: optix_device_impl.h:2196
static __forceinline__ __device__ unsigned int optixGetPayload_30()
Definition: optix_device_impl.h:1213
static __forceinline__ __device__ void optixSetPayload_28(unsigned int p)
Definition: optix_device_impl.h:983
static __forceinline__ __device__ OptixPrimitiveType optixGetPrimitiveType(unsigned int hitKind)
Definition: optix_device_impl.h:1941
static __forceinline__ __device__ float3 optixTransformVectorFromObjectToWorldSpace(float3 vec)
Definition: optix_device_impl.h:1610
static __forceinline__ __device__ unsigned int optixGetInstanceId()
Definition: optix_device_impl.h:1920
static __forceinline__ __device__ char * optixGetExceptionLineInfo()
Definition: optix_device_impl.h:2188
static __forceinline__ __device__ void optixSetPayload_27(unsigned int p)
Definition: optix_device_impl.h:978
static __forceinline__ __device__ void optixSetPayload_2(unsigned int p)
Definition: optix_device_impl.h:853
static __forceinline__ __device__ void optixGetCatmullRomVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[4])
Definition: optix_device_impl.h:1396
static __forceinline__ __device__ int optixGetExceptionCode()
Definition: optix_device_impl.h:2133
static __forceinline__ __device__ void optixSetPayload_12(unsigned int p)
Definition: optix_device_impl.h:903
static __forceinline__ __device__ void optixGetObjectToWorldTransformMatrix(float m[12])
Definition: optix_device_impl.h:1535
static __forceinline__ __device__ unsigned int optixGetPayload_24()
Definition: optix_device_impl.h:1171
static __forceinline__ __device__ unsigned int optixGetPayload_17()
Definition: optix_device_impl.h:1122
static __forceinline__ __device__ float optixGetGASMotionTimeBegin(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1479
static __forceinline__ __device__ float optixHitObjectGetRayTmax()
Definition: optix_device_impl.h:699
static __forceinline__ __device__ const OptixMatrixMotionTransform * optixGetMatrixMotionTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1665
static __forceinline__ __device__ void optixGetSphereData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[1])
Definition: optix_device_impl.h:1458
static __forceinline__ __device__ unsigned int optixGetPayload_13()
Definition: optix_device_impl.h:1094
static __forceinline__ __device__ uint4 optixTexFootprint2D(unsigned long long tex, unsigned int texInfo, float x, float y, unsigned int *singleMipLevel)
Definition: optix_device_impl.h:2215
static __forceinline__ __device__ void optixSetPayload_23(unsigned int p)
Definition: optix_device_impl.h:958
static __forceinline__ __device__ unsigned int optixGetAttribute_0()
Definition: optix_device_impl.h:1854
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_6()
Definition: optix_device_impl.h:795
static __forceinline__ __device__ float optixHitObjectGetRayTmin()
Definition: optix_device_impl.h:687
static __forceinline__ __device__ unsigned int optixGetPayload_10()
Definition: optix_device_impl.h:1073
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_1()
Definition: optix_device_impl.h:735
static __forceinline__ __device__ void optixGetQuadraticBSplineVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[3])
Definition: optix_device_impl.h:1364
static __forceinline__ __device__ uint3 optixGetLaunchIndex()
Definition: optix_device_impl.h:2027
static __forceinline__ __device__ unsigned int optixGetPayload_31()
Definition: optix_device_impl.h:1220
static __forceinline__ __device__ void optixSetPayload_24(unsigned int p)
Definition: optix_device_impl.h:963
static __forceinline__ __device__ void optixTerminateRay()
Definition: optix_device_impl.h:1896
static __forceinline__ __device__ OptixTraversableHandle optixGetInstanceTraversableFromIAS(OptixTraversableHandle ias, unsigned int instIdx)
Definition: optix_device_impl.h:1310
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_0()
Definition: optix_device_impl.h:723
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_6()
Definition: optix_device_impl.h:2175
static __forceinline__ __device__ unsigned int optixGetAttribute_7()
Definition: optix_device_impl.h:1889
static __forceinline__ __device__ bool optixHitObjectIsNop()
Definition: optix_device_impl.h:543
static __forceinline__ __device__ unsigned int optixGetRayVisibilityMask()
Definition: optix_device_impl.h:1303
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_2()
Definition: optix_device_impl.h:747
static __forceinline__ __device__ void optixSetPayload_30(unsigned int p)
Definition: optix_device_impl.h:993
static __forceinline__ __device__ unsigned int optixGetInstanceIdFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1672
static __forceinline__ __device__ unsigned int optixHitObjectGetInstanceIndex()
Definition: optix_device_impl.h:567
static __forceinline__ __device__ void optixGetLinearCurveVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[2])
Definition: optix_device_impl.h:1350
static __forceinline__ __device__ unsigned int optixGetPayload_3()
Definition: optix_device_impl.h:1024
static __forceinline__ __device__ float optixHitObjectGetRayTime()
Definition: optix_device_impl.h:711
static __forceinline__ __device__ bool optixReportIntersection(float hitT, unsigned int hitKind)
Definition: optix_device_impl.h:1706
static __forceinline__ __device__ unsigned int optixGetPayload_23()
Definition: optix_device_impl.h:1164
static __forceinline__ __device__ unsigned int optixGetPayload_20()
Definition: optix_device_impl.h:1143
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_3()
Definition: optix_device_impl.h:759
static __forceinline__ __device__ OptixTraversableHandle optixGetTransformListHandle(unsigned int index)
Definition: optix_device_impl.h:1637
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_0()
Definition: optix_device_impl.h:2145
static __forceinline__ __device__ unsigned int optixUndefinedValue()
Definition: optix_device_impl.h:1232
#define OPTIX_DEFINE_optixGetAttribute_BODY(which)
Definition: optix_device_impl.h:1849
static __forceinline__ __device__ float2 optixGetRibbonParameters()
Definition: optix_device_impl.h:2013
static __forceinline__ __device__ unsigned int optixHitObjectGetTransformListSize()
Definition: optix_device_impl.h:591
static __forceinline__ __device__ void optixIgnoreIntersection()
Definition: optix_device_impl.h:1901
static __forceinline__ __device__ float optixGetRayTmax()
Definition: optix_device_impl.h:1282
static __forceinline__ __device__ CUdeviceptr optixHitObjectGetSbtDataPointer()
Definition: optix_device_impl.h:831
static __forceinline__ __device__ float3 optixTransformNormalFromObjectToWorldSpace(float3 normal)
Definition: optix_device_impl.h:1620
static __forceinline__ __device__ void optixGetCubicBezierVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[4])
Definition: optix_device_impl.h:1412
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_1()
Definition: optix_device_impl.h:2150
static __forceinline__ __device__ float2 optixGetTriangleBarycentrics()
Definition: optix_device_impl.h:2020
static __forceinline__ __device__ float3 optixHitObjectGetWorldRayOrigin()
Definition: optix_device_impl.h:639
static __forceinline__ __device__ float3 optixGetObjectRayDirection()
Definition: optix_device_impl.h:1266
static __forceinline__ __device__ unsigned int optixGetPayload_6()
Definition: optix_device_impl.h:1045
static __forceinline__ __device__ void optixSetPayload_9(unsigned int p)
Definition: optix_device_impl.h:888
static __forceinline__ __device__ void optixSetPayload_26(unsigned int p)
Definition: optix_device_impl.h:973
static __forceinline__ __device__ unsigned int optixGetPayload_11()
Definition: optix_device_impl.h:1080
static __forceinline__ __device__ void optixGetMicroTriangleVertexData(float3 data[3])
Definition: optix_device_impl.h:1334
static __forceinline__ __device__ unsigned int optixHitObjectGetHitKind()
Definition: optix_device_impl.h:627
static __forceinline__ __device__ bool optixHitObjectIsMiss()
Definition: optix_device_impl.h:531
static __forceinline__ __device__ void optixGetWorldToObjectTransformMatrix(float m[12])
Definition: optix_device_impl.h:1500
static __forceinline__ __device__ unsigned int optixGetInstanceIndex()
Definition: optix_device_impl.h:1927
static __forceinline__ __device__ bool optixIsDisplacedMicromeshTriangleFrontFaceHit()
Definition: optix_device_impl.h:1996
static __forceinline__ __device__ float3 optixGetWorldRayOrigin()
Definition: optix_device_impl.h:1239
static __forceinline__ __device__ void optixSetPayload_22(unsigned int p)
Definition: optix_device_impl.h:953
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_5()
Definition: optix_device_impl.h:783
static __forceinline__ __device__ void optixTrace(OptixTraversableHandle handle, float3 rayOrigin, float3 rayDirection, float tmin, float tmax, float rayTime, OptixVisibilityMask visibilityMask, unsigned int rayFlags, unsigned int SBToffset, unsigned int SBTstride, unsigned int missSBTIndex, Payload &... payload)
Definition: optix_device_impl.h:40
static __forceinline__ __device__ uint4 optixTexFootprint2DLod(unsigned long long tex, unsigned int texInfo, float x, float y, float level, bool coarse, unsigned int *singleMipLevel)
Definition: optix_device_impl.h:2259
static __forceinline__ __device__ void optixTraverse(OptixTraversableHandle handle, float3 rayOrigin, float3 rayDirection, float tmin, float tmax, float rayTime, OptixVisibilityMask visibilityMask, unsigned int rayFlags, unsigned int SBToffset, unsigned int SBTstride, unsigned int missSBTIndex, Payload &... payload)
Definition: optix_device_impl.h:92
static __forceinline__ __device__ unsigned int optixGetPrimitiveIndex()
Definition: optix_device_impl.h:1906
static __forceinline__ __device__ const float4 * optixGetInstanceTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1686
static __forceinline__ __device__ void optixSetPayload_3(unsigned int p)
Definition: optix_device_impl.h:858
static __forceinline__ __device__ bool optixIsBackFaceHit(unsigned int hitKind)
Definition: optix_device_impl.h:1948
static __forceinline__ __device__ unsigned int optixGetTransformListSize()
Definition: optix_device_impl.h:1630
static __forceinline__ __device__ void optixSetPayload_18(unsigned int p)
Definition: optix_device_impl.h:933
static __forceinline__ __device__ void optixInvoke(OptixPayloadTypeID type, Payload &... payload)
Definition: optix_device_impl.h:275
static __forceinline__ __device__ bool optixIsDisplacedMicromeshTriangleHit()
Definition: optix_device_impl.h:1991
static __forceinline__ __device__ unsigned int optixGetSbtGASIndex()
Definition: optix_device_impl.h:1913
static __forceinline__ __device__ unsigned int optixHitObjectGetPrimitiveIndex()
Definition: optix_device_impl.h:579
static __forceinline__ __device__ void optixSetPayload_21(unsigned int p)
Definition: optix_device_impl.h:948
static __forceinline__ __device__ bool optixIsDisplacedMicromeshTriangleBackFaceHit()
Definition: optix_device_impl.h:2001
static __forceinline__ __device__ void optixSetPayload_0(unsigned int p)
Definition: optix_device_impl.h:843
static __forceinline__ __device__ const OptixSRTMotionTransform * optixGetSRTMotionTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1658
static __forceinline__ __device__ unsigned int optixGetPayload_14()
Definition: optix_device_impl.h:1101
static __forceinline__ __device__ CUdeviceptr optixGetSbtDataPointer()
Definition: optix_device_impl.h:2045
static __forceinline__ __device__ float3 optixGetRibbonNormal(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float2 ribbonParameters)
Definition: optix_device_impl.h:1442
static __forceinline__ __device__ void optixGetMicroTriangleBarycentricsData(float2 data[3])
Definition: optix_device_impl.h:1342
static __forceinline__ __device__ void optixSetPayload_1(unsigned int p)
Definition: optix_device_impl.h:848
static __forceinline__ __device__ void optixSetPayload_13(unsigned int p)
Definition: optix_device_impl.h:908
#define OPTIX_DEFINE_optixGetExceptionDetail_BODY(which)
Definition: optix_device_impl.h:2140
static __forceinline__ __device__ unsigned int optixGetPayload_21()
Definition: optix_device_impl.h:1150
static __device__ __forceinline__ CUdeviceptr optixGetGASPointerFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1700
static __forceinline__ __device__ unsigned int optixGetPayload_8()
Definition: optix_device_impl.h:1059
static __forceinline__ __device__ float optixGetCurveParameter()
Definition: optix_device_impl.h:2006
static __forceinline__ __device__ unsigned int optixGetPayload_19()
Definition: optix_device_impl.h:1136
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_4()
Definition: optix_device_impl.h:2165
static __forceinline__ __device__ float3 optixTransformVectorFromWorldToObjectSpace(float3 vec)
Definition: optix_device_impl.h:1580
static __forceinline__ __device__ void optixSetPayload_15(unsigned int p)
Definition: optix_device_impl.h:918
static __forceinline__ __device__ bool optixIsTriangleFrontFaceHit()
Definition: optix_device_impl.h:1981
static __forceinline__ __device__ unsigned int optixGetPayload_0()
Definition: optix_device_impl.h:1003
static __forceinline__ __device__ float3 optixTransformPointFromWorldToObjectSpace(float3 point)
Definition: optix_device_impl.h:1570
static __forceinline__ __device__ unsigned int optixGetAttribute_2()
Definition: optix_device_impl.h:1864
static __forceinline__ __device__ unsigned int optixGetHitKind()
Definition: optix_device_impl.h:1934
static __forceinline__ __device__ unsigned int optixGetPayload_28()
Definition: optix_device_impl.h:1199
static __forceinline__ __device__ unsigned int optixGetPayload_7()
Definition: optix_device_impl.h:1052
static __forceinline__ __device__ void optixGetTriangleVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float3 data[3])
Definition: optix_device_impl.h:1320
static __forceinline__ __device__ float optixGetGASMotionTimeEnd(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1486
static __forceinline__ __device__ float optixGetRayTmin()
Definition: optix_device_impl.h:1275
static __forceinline__ __device__ void optixReorder(unsigned int coherenceHint, unsigned int numCoherenceHintBits)
Definition: optix_device_impl.h:248
static __forceinline__ __device__ float optixGetRayTime()
Definition: optix_device_impl.h:1289
static __forceinline__ __device__ void optixSetPayload_31(unsigned int p)
Definition: optix_device_impl.h:998
static __forceinline__ __device__ unsigned int optixGetPayload_16()
Definition: optix_device_impl.h:1115
static __forceinline__ __device__ OptixTransformType optixGetTransformTypeFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1644
static __forceinline__ __device__ void optixMakeHitObject(OptixTraversableHandle handle, float3 rayOrigin, float3 rayDirection, float tmin, float tmax, float rayTime, unsigned int sbtOffset, unsigned int sbtStride, unsigned int instIdx, unsigned int sbtGASIdx, unsigned int primIdx, unsigned int hitKind, RegAttributes... regAttributes)
Definition: optix_device_impl.h:352
static __forceinline__ __device__ const float4 * optixGetInstanceInverseTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1693
static __forceinline__ __device__ unsigned int optixGetPayload_12()
Definition: optix_device_impl.h:1087
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_5()
Definition: optix_device_impl.h:2170
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_7()
Definition: optix_device_impl.h:807
static __forceinline__ __device__ unsigned int optixGetPayload_29()
Definition: optix_device_impl.h:1206
static __forceinline__ __device__ OptixTraversableHandle optixGetInstanceChildFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1679
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_3()
Definition: optix_device_impl.h:2160
Definition: optix_device_impl.h:36