29#if !defined( __OPTIX_INCLUDE_INTERNAL_HEADERS__ )
30#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.")
33#ifndef OPTIX_OPTIX_DEVICE_IMPL_H
34#define OPTIX_OPTIX_DEVICE_IMPL_H
39#include <initializer_list>
48template <
typename... Payload>
56 unsigned int rayFlags,
57 unsigned int SBToffset,
58 unsigned int SBTstride,
59 unsigned int missSBTIndex,
62 static_assert(
sizeof...( Payload ) <= 32,
"Only up to 32 payload values are allowed." );
68 "All payload parameters need to be unsigned int." );
72 float ox = rayOrigin.x, oy = rayOrigin.y, oz = rayOrigin.z;
73 float dx = rayDirection.x, dy = rayDirection.y, dz = rayDirection.z;
74 unsigned int p[33] = { 0, payload... };
75 int payloadSize = (int)
sizeof...( Payload );
78 "(%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,%"
80 "_optix_trace_typed_32,"
81 "(%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,%"
82 "59,%60,%61,%62,%63,%64,%65,%66,%67,%68,%69,%70,%71,%72,%73,%74,%75,%76,%77,%78,%79,%80);"
83 :
"=r"( p[1] ),
"=r"( p[2] ),
"=r"( p[3] ),
"=r"( p[4] ),
"=r"( p[5] ),
"=r"( p[6] ),
"=r"( p[7] ),
84 "=r"( p[8] ),
"=r"( p[9] ),
"=r"( p[10] ),
"=r"( p[11] ),
"=r"( p[12] ),
"=r"( p[13] ),
"=r"( p[14] ),
85 "=r"( p[15] ),
"=r"( p[16] ),
"=r"( p[17] ),
"=r"( p[18] ),
"=r"( p[19] ),
"=r"( p[20] ),
"=r"( p[21] ),
86 "=r"( p[22] ),
"=r"( p[23] ),
"=r"( p[24] ),
"=r"( p[25] ),
"=r"( p[26] ),
"=r"( p[27] ),
"=r"( p[28] ),
87 "=r"( p[29] ),
"=r"( p[30] ),
"=r"( p[31] ),
"=r"( p[32] )
88 :
"r"( type ),
"l"( handle ),
"f"( ox ),
"f"( oy ),
"f"( oz ),
"f"( dx ),
"f"( dy ),
"f"( dz ),
"f"( tmin ),
89 "f"( tmax ),
"f"( rayTime ),
"r"( visibilityMask ),
"r"( rayFlags ),
"r"( SBToffset ),
"r"( SBTstride ),
90 "r"( missSBTIndex ),
"r"( payloadSize ),
"r"( p[1] ),
"r"( p[2] ),
"r"( p[3] ),
"r"( p[4] ),
"r"( p[5] ),
91 "r"( p[6] ),
"r"( p[7] ),
"r"( p[8] ),
"r"( p[9] ),
"r"( p[10] ),
"r"( p[11] ),
"r"( p[12] ),
"r"( p[13] ),
92 "r"( p[14] ),
"r"( p[15] ),
"r"( p[16] ),
"r"( p[17] ),
"r"( p[18] ),
"r"( p[19] ),
"r"( p[20] ),
93 "r"( p[21] ),
"r"( p[22] ),
"r"( p[23] ),
"r"( p[24] ),
"r"( p[25] ),
"r"( p[26] ),
"r"( p[27] ),
94 "r"( p[28] ),
"r"( p[29] ),
"r"( p[30] ),
"r"( p[31] ),
"r"( p[32] )
96 unsigned int index = 1;
97 (void)std::initializer_list<unsigned int>{index, ( payload = p[index++] )...};
100template <
typename... Payload>
108 unsigned int rayFlags,
109 unsigned int SBToffset,
110 unsigned int SBTstride,
111 unsigned int missSBTIndex,
112 Payload&... payload )
114 static_assert(
sizeof...( Payload ) <= 32,
"Only up to 32 payload values are allowed." );
118#ifndef __CUDACC_RTC__
120 "All payload parameters need to be unsigned int." );
124 float ox = rayOrigin.x, oy = rayOrigin.y, oz = rayOrigin.z;
125 float dx = rayDirection.x, dy = rayDirection.y, dz = rayDirection.z;
126 unsigned int p[33] = {0, payload...};
127 int payloadSize = (int)
sizeof...( Payload );
130 "(%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,%"
132 "_optix_hitobject_traverse,"
133 "(%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,%"
134 "59,%60,%61,%62,%63,%64,%65,%66,%67,%68,%69,%70,%71,%72,%73,%74,%75,%76,%77,%78,%79,%80);"
135 :
"=r"( p[1] ),
"=r"( p[2] ),
"=r"( p[3] ),
"=r"( p[4] ),
"=r"( p[5] ),
"=r"( p[6] ),
"=r"( p[7] ),
136 "=r"( p[8] ),
"=r"( p[9] ),
"=r"( p[10] ),
"=r"( p[11] ),
"=r"( p[12] ),
"=r"( p[13] ),
"=r"( p[14] ),
137 "=r"( p[15] ),
"=r"( p[16] ),
"=r"( p[17] ),
"=r"( p[18] ),
"=r"( p[19] ),
"=r"( p[20] ),
"=r"( p[21] ),
138 "=r"( p[22] ),
"=r"( p[23] ),
"=r"( p[24] ),
"=r"( p[25] ),
"=r"( p[26] ),
"=r"( p[27] ),
"=r"( p[28] ),
139 "=r"( p[29] ),
"=r"( p[30] ),
"=r"( p[31] ),
"=r"( p[32] )
140 :
"r"( type ),
"l"( handle ),
"f"( ox ),
"f"( oy ),
"f"( oz ),
"f"( dx ),
"f"( dy ),
"f"( dz ),
"f"( tmin ),
141 "f"( tmax ),
"f"( rayTime ),
"r"( visibilityMask ),
"r"( rayFlags ),
"r"( SBToffset ),
"r"( SBTstride ),
142 "r"( missSBTIndex ),
"r"( payloadSize ),
"r"( p[1] ),
"r"( p[2] ),
"r"( p[3] ),
"r"( p[4] ),
"r"( p[5] ),
143 "r"( p[6] ),
"r"( p[7] ),
"r"( p[8] ),
"r"( p[9] ),
"r"( p[10] ),
"r"( p[11] ),
"r"( p[12] ),
"r"( p[13] ),
144 "r"( p[14] ),
"r"( p[15] ),
"r"( p[16] ),
"r"( p[17] ),
"r"( p[18] ),
"r"( p[19] ),
"r"( p[20] ),
145 "r"( p[21] ),
"r"( p[22] ),
"r"( p[23] ),
"r"( p[24] ),
"r"( p[25] ),
"r"( p[26] ),
"r"( p[27] ),
146 "r"( p[28] ),
"r"( p[29] ),
"r"( p[30] ),
"r"( p[31] ),
"r"( p[32] )
148 unsigned int index = 1;
149 (void)std::initializer_list<unsigned int>{index, ( payload = p[index++] )...};
152template <
typename... Payload>
161 unsigned int rayFlags,
162 unsigned int SBToffset,
163 unsigned int SBTstride,
164 unsigned int missSBTIndex,
165 Payload&... payload )
170 static_assert(
sizeof...( Payload ) <= 32,
"Only up to 32 payload values are allowed." );
171#ifndef __CUDACC_RTC__
173 "All payload parameters need to be unsigned int." );
176 float ox = rayOrigin.x, oy = rayOrigin.y, oz = rayOrigin.z;
177 float dx = rayDirection.x, dy = rayDirection.y, dz = rayDirection.z;
178 unsigned int p[33] = {0, payload...};
179 int payloadSize = (int)
sizeof...( Payload );
183 "(%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,%"
185 "_optix_trace_typed_32,"
186 "(%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,%"
187 "59,%60,%61,%62,%63,%64,%65,%66,%67,%68,%69,%70,%71,%72,%73,%74,%75,%76,%77,%78,%79,%80);"
188 :
"=r"( p[1] ),
"=r"( p[2] ),
"=r"( p[3] ),
"=r"( p[4] ),
"=r"( p[5] ),
"=r"( p[6] ),
"=r"( p[7] ),
189 "=r"( p[8] ),
"=r"( p[9] ),
"=r"( p[10] ),
"=r"( p[11] ),
"=r"( p[12] ),
"=r"( p[13] ),
"=r"( p[14] ),
190 "=r"( p[15] ),
"=r"( p[16] ),
"=r"( p[17] ),
"=r"( p[18] ),
"=r"( p[19] ),
"=r"( p[20] ),
"=r"( p[21] ),
191 "=r"( p[22] ),
"=r"( p[23] ),
"=r"( p[24] ),
"=r"( p[25] ),
"=r"( p[26] ),
"=r"( p[27] ),
"=r"( p[28] ),
192 "=r"( p[29] ),
"=r"( p[30] ),
"=r"( p[31] ),
"=r"( p[32] )
193 :
"r"( type ),
"l"( handle ),
"f"( ox ),
"f"( oy ),
"f"( oz ),
"f"( dx ),
"f"( dy ),
"f"( dz ),
"f"( tmin ),
194 "f"( tmax ),
"f"( rayTime ),
"r"( visibilityMask ),
"r"( rayFlags ),
"r"( SBToffset ),
"r"( SBTstride ),
195 "r"( missSBTIndex ),
"r"( payloadSize ),
"r"( p[1] ),
"r"( p[2] ),
"r"( p[3] ),
"r"( p[4] ),
"r"( p[5] ),
196 "r"( p[6] ),
"r"( p[7] ),
"r"( p[8] ),
"r"( p[9] ),
"r"( p[10] ),
"r"( p[11] ),
"r"( p[12] ),
"r"( p[13] ),
197 "r"( p[14] ),
"r"( p[15] ),
"r"( p[16] ),
"r"( p[17] ),
"r"( p[18] ),
"r"( p[19] ),
"r"( p[20] ),
198 "r"( p[21] ),
"r"( p[22] ),
"r"( p[23] ),
"r"( p[24] ),
"r"( p[25] ),
"r"( p[26] ),
"r"( p[27] ),
199 "r"( p[28] ),
"r"( p[29] ),
"r"( p[30] ),
"r"( p[31] ),
"r"( p[32] )
201 unsigned int index = 1;
202 (void)std::initializer_list<unsigned int>{index, ( payload = p[index++] )...};
205template <
typename... Payload>
214 unsigned int rayFlags,
215 unsigned int SBToffset,
216 unsigned int SBTstride,
217 unsigned int missSBTIndex,
218 Payload&... payload )
223 static_assert(
sizeof...( Payload ) <= 32,
"Only up to 32 payload values are allowed." );
224#ifndef __CUDACC_RTC__
226 "All payload parameters need to be unsigned int." );
229 float ox = rayOrigin.x, oy = rayOrigin.y, oz = rayOrigin.z;
230 float dx = rayDirection.x, dy = rayDirection.y, dz = rayDirection.z;
231 unsigned int p[33] = {0, payload...};
232 int payloadSize = (int)
sizeof...( Payload );
235 "(%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,%"
237 "_optix_hitobject_traverse,"
238 "(%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,%"
239 "59,%60,%61,%62,%63,%64,%65,%66,%67,%68,%69,%70,%71,%72,%73,%74,%75,%76,%77,%78,%79,%80);"
240 :
"=r"( p[1] ),
"=r"( p[2] ),
"=r"( p[3] ),
"=r"( p[4] ),
"=r"( p[5] ),
"=r"( p[6] ),
"=r"( p[7] ),
241 "=r"( p[8] ),
"=r"( p[9] ),
"=r"( p[10] ),
"=r"( p[11] ),
"=r"( p[12] ),
"=r"( p[13] ),
"=r"( p[14] ),
242 "=r"( p[15] ),
"=r"( p[16] ),
"=r"( p[17] ),
"=r"( p[18] ),
"=r"( p[19] ),
"=r"( p[20] ),
"=r"( p[21] ),
243 "=r"( p[22] ),
"=r"( p[23] ),
"=r"( p[24] ),
"=r"( p[25] ),
"=r"( p[26] ),
"=r"( p[27] ),
"=r"( p[28] ),
244 "=r"( p[29] ),
"=r"( p[30] ),
"=r"( p[31] ),
"=r"( p[32] )
245 :
"r"( type ),
"l"( handle ),
"f"( ox ),
"f"( oy ),
"f"( oz ),
"f"( dx ),
"f"( dy ),
"f"( dz ),
"f"( tmin ),
246 "f"( tmax ),
"f"( rayTime ),
"r"( visibilityMask ),
"r"( rayFlags ),
"r"( SBToffset ),
"r"( SBTstride ),
247 "r"( missSBTIndex ),
"r"( payloadSize ),
"r"( p[1] ),
"r"( p[2] ),
"r"( p[3] ),
"r"( p[4] ),
"r"( p[5] ),
248 "r"( p[6] ),
"r"( p[7] ),
"r"( p[8] ),
"r"( p[9] ),
"r"( p[10] ),
"r"( p[11] ),
"r"( p[12] ),
"r"( p[13] ),
249 "r"( p[14] ),
"r"( p[15] ),
"r"( p[16] ),
"r"( p[17] ),
"r"( p[18] ),
"r"( p[19] ),
"r"( p[20] ),
250 "r"( p[21] ),
"r"( p[22] ),
"r"( p[23] ),
"r"( p[24] ),
"r"( p[25] ),
"r"( p[26] ),
"r"( p[27] ),
251 "r"( p[28] ),
"r"( p[29] ),
"r"( p[30] ),
"r"( p[31] ),
"r"( p[32] )
253 unsigned int index = 1;
254 (void)std::initializer_list<unsigned int>{index, ( payload = p[index++] )...};
257static __forceinline__ __device__
void optixReorder(
unsigned int coherenceHint,
unsigned int numCoherenceHintBits )
262 "_optix_hitobject_reorder,"
265 :
"r"( coherenceHint ),
"r"( numCoherenceHintBits )
271 unsigned int coherenceHint = 0;
272 unsigned int numCoherenceHintBits = 0;
276 "_optix_hitobject_reorder,"
279 :
"r"( coherenceHint ),
"r"( numCoherenceHintBits )
283template <
typename... Payload>
289 static_assert(
sizeof...( Payload ) <= 32,
"Only up to 32 payload values are allowed." );
290#ifndef __CUDACC_RTC__
292 "All payload parameters need to be unsigned int." );
295 unsigned int p[33] = {0, payload...};
296 int payloadSize = (int)
sizeof...( Payload );
300 "(%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,%"
302 "_optix_hitobject_invoke,"
303 "(%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,%"
304 "59,%60,%61,%62,%63,%64,%65);"
305 :
"=r"( p[1] ),
"=r"( p[2] ),
"=r"( p[3] ),
"=r"( p[4] ),
"=r"( p[5] ),
"=r"( p[6] ),
"=r"( p[7] ),
306 "=r"( p[8] ),
"=r"( p[9] ),
"=r"( p[10] ),
"=r"( p[11] ),
"=r"( p[12] ),
"=r"( p[13] ),
"=r"( p[14] ),
307 "=r"( p[15] ),
"=r"( p[16] ),
"=r"( p[17] ),
"=r"( p[18] ),
"=r"( p[19] ),
"=r"( p[20] ),
"=r"( p[21] ),
308 "=r"( p[22] ),
"=r"( p[23] ),
"=r"( p[24] ),
"=r"( p[25] ),
"=r"( p[26] ),
"=r"( p[27] ),
"=r"( p[28] ),
309 "=r"( p[29] ),
"=r"( p[30] ),
"=r"( p[31] ),
"=r"( p[32] )
310 :
"r"( type ),
"r"( payloadSize ),
"r"( p[1] ),
"r"( p[2] ),
311 "r"( p[3] ),
"r"( p[4] ),
"r"( p[5] ),
"r"( p[6] ),
"r"( p[7] ),
"r"( p[8] ),
"r"( p[9] ),
"r"( p[10] ),
312 "r"( p[11] ),
"r"( p[12] ),
"r"( p[13] ),
"r"( p[14] ),
"r"( p[15] ),
"r"( p[16] ),
"r"( p[17] ),
313 "r"( p[18] ),
"r"( p[19] ),
"r"( p[20] ),
"r"( p[21] ),
"r"( p[22] ),
"r"( p[23] ),
"r"( p[24] ),
314 "r"( p[25] ),
"r"( p[26] ),
"r"( p[27] ),
"r"( p[28] ),
"r"( p[29] ),
"r"( p[30] ),
"r"( p[31] ),
"r"( p[32] )
317 unsigned int index = 1;
318 (void)std::initializer_list<unsigned int>{index, ( payload = p[index++] )...};
321template <
typename... Payload>
322static __forceinline__ __device__
void optixInvoke( Payload&... payload )
327 static_assert(
sizeof...( Payload ) <= 32,
"Only up to 32 payload values are allowed." );
328#ifndef __CUDACC_RTC__
330 "All payload parameters need to be unsigned int." );
334 unsigned int p[33] = {0, payload...};
335 int payloadSize = (int)
sizeof...( Payload );
339 "(%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,%"
341 "_optix_hitobject_invoke,"
342 "(%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,%"
343 "59,%60,%61,%62,%63,%64,%65);"
344 :
"=r"( p[1] ),
"=r"( p[2] ),
"=r"( p[3] ),
"=r"( p[4] ),
"=r"( p[5] ),
"=r"( p[6] ),
"=r"( p[7] ),
345 "=r"( p[8] ),
"=r"( p[9] ),
"=r"( p[10] ),
"=r"( p[11] ),
"=r"( p[12] ),
"=r"( p[13] ),
"=r"( p[14] ),
346 "=r"( p[15] ),
"=r"( p[16] ),
"=r"( p[17] ),
"=r"( p[18] ),
"=r"( p[19] ),
"=r"( p[20] ),
"=r"( p[21] ),
347 "=r"( p[22] ),
"=r"( p[23] ),
"=r"( p[24] ),
"=r"( p[25] ),
"=r"( p[26] ),
"=r"( p[27] ),
"=r"( p[28] ),
348 "=r"( p[29] ),
"=r"( p[30] ),
"=r"( p[31] ),
"=r"( p[32] )
349 :
"r"( type ),
"r"( payloadSize ),
"r"( p[1] ),
"r"( p[2] ),
350 "r"( p[3] ),
"r"( p[4] ),
"r"( p[5] ),
"r"( p[6] ),
"r"( p[7] ),
"r"( p[8] ),
"r"( p[9] ),
"r"( p[10] ),
351 "r"( p[11] ),
"r"( p[12] ),
"r"( p[13] ),
"r"( p[14] ),
"r"( p[15] ),
"r"( p[16] ),
"r"( p[17] ),
352 "r"( p[18] ),
"r"( p[19] ),
"r"( p[20] ),
"r"( p[21] ),
"r"( p[22] ),
"r"( p[23] ),
"r"( p[24] ),
353 "r"( p[25] ),
"r"( p[26] ),
"r"( p[27] ),
"r"( p[28] ),
"r"( p[29] ),
"r"( p[30] ),
"r"( p[31] ),
"r"( p[32] )
356 unsigned int index = 1;
357 (void)std::initializer_list<unsigned int>{index, ( payload = p[index++] )...};
360template <
typename... RegAttributes>
367 unsigned int sbtOffset,
368 unsigned int sbtStride,
369 unsigned int instIdx,
370 unsigned int sbtGASIdx,
371 unsigned int primIdx,
372 unsigned int hitKind,
373 RegAttributes... regAttributes )
378 static_assert(
sizeof...( RegAttributes ) <= 8,
"Only up to 8 register attribute values are allowed." );
379#ifndef __CUDACC_RTC__
382 "All register attribute parameters need to be unsigned int." );
385 float ox = rayOrigin.x, oy = rayOrigin.y, oz = rayOrigin.z;
386 float dx = rayDirection.x, dy = rayDirection.y, dz = rayDirection.z;
387 unsigned int a[9] = {0, regAttributes...};
388 int attrSize = (int)
sizeof...( RegAttributes );
391 unsigned int numTransforms = 0;
396 "_optix_hitobject_make_hit,"
397 "(%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);"
399 :
"l"( handle ),
"f"( ox ),
"f"( oy ),
"f"( oz ),
"f"( dx ),
"f"( dy ),
"f"( dz ),
"f"( tmin ),
"f"( tmax ),
400 "f"( rayTime ),
"r"( sbtOffset ),
"r"( sbtStride ),
"r"( instIdx ),
"l"( transforms ),
"r"( numTransforms ),
401 "r"( sbtGASIdx ),
"r"( primIdx ),
"r"( hitKind ),
"r"( attrSize ),
"r"( a[1] ),
"r"( a[2] ),
"r"( a[3] ),
402 "r"( a[4] ),
"r"( a[5] ),
"r"( a[6] ),
"r"( a[7] ),
"r"( a[8] )
406template <
typename... RegAttributes>
413 unsigned int sbtOffset,
414 unsigned int sbtStride,
415 unsigned int instIdx,
417 unsigned int numTransforms,
418 unsigned int sbtGASIdx,
419 unsigned int primIdx,
420 unsigned int hitKind,
421 RegAttributes... regAttributes )
426 static_assert(
sizeof...( RegAttributes ) <= 8,
"Only up to 8 register attribute values are allowed." );
427#ifndef __CUDACC_RTC__
430 "All register attribute parameters need to be unsigned int." );
433 float ox = rayOrigin.x, oy = rayOrigin.y, oz = rayOrigin.z;
434 float dx = rayDirection.x, dy = rayDirection.y, dz = rayDirection.z;
435 unsigned int a[9] = {0, regAttributes...};
436 int attrSize = (int)
sizeof...( RegAttributes );
441 "_optix_hitobject_make_hit,"
442 "(%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);"
444 :
"l"( handle ),
"f"( ox ),
"f"( oy ),
"f"( oz ),
"f"( dx ),
"f"( dy ),
"f"( dz ),
"f"( tmin ),
"f"( tmax ),
445 "f"( rayTime ),
"r"( sbtOffset ),
"r"( sbtStride ),
"r"( instIdx ),
"l"( transforms ),
"r"( numTransforms ),
446 "r"( sbtGASIdx ),
"r"( primIdx ),
"r"( hitKind ),
"r"( attrSize ),
"r"( a[1] ),
"r"( a[2] ),
"r"( a[3] ),
447 "r"( a[4] ),
"r"( a[5] ),
"r"( a[6] ),
"r"( a[7] ),
"r"( a[8] )
451template <
typename... RegAttributes>
458 unsigned int sbtRecordIndex,
459 unsigned int instIdx,
461 unsigned int numTransforms,
462 unsigned int sbtGASIdx,
463 unsigned int primIdx,
464 unsigned int hitKind,
465 RegAttributes... regAttributes )
470 static_assert(
sizeof...( RegAttributes ) <= 8,
"Only up to 8 register attribute values are allowed." );
471#ifndef __CUDACC_RTC__
474 "All register attribute parameters need to be unsigned int." );
477 float ox = rayOrigin.x, oy = rayOrigin.y, oz = rayOrigin.z;
478 float dx = rayDirection.x, dy = rayDirection.y, dz = rayDirection.z;
479 unsigned int a[9] = {0, regAttributes...};
480 int attrSize = (int)
sizeof...( RegAttributes );
485 "_optix_hitobject_make_hit_with_record,"
486 "(%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);"
488 :
"l"( handle ),
"f"( ox ),
"f"( oy ),
"f"( oz ),
"f"( dx ),
"f"( dy ),
"f"( dz ),
"f"( tmin ),
"f"( tmax ),
489 "f"( rayTime ),
"r"( sbtRecordIndex ),
"r"( instIdx ),
"l"( transforms ),
"r"( numTransforms ),
490 "r"( sbtGASIdx ),
"r"( primIdx ),
"r"( hitKind ),
"r"( attrSize ),
"r"( a[1] ),
"r"( a[2] ),
"r"( a[3] ),
491 "r"( a[4] ),
"r"( a[5] ),
"r"( a[6] ),
"r"( a[7] ),
"r"( a[8] )
502 float ox = rayOrigin.x, oy = rayOrigin.y, oz = rayOrigin.z;
503 float dx = rayDirection.x, dy = rayDirection.y, dz = rayDirection.z;
508 "_optix_hitobject_make_miss,"
509 "(%0,%1,%2,%3,%4,%5,%6,%7,%8,%9);"
511 :
"r"( missSBTIndex ),
"f"( ox ),
"f"( oy ),
"f"( oz ),
"f"( dx ),
"f"( dy ),
"f"( dz ),
"f"( tmin ),
512 "f"( tmax ),
"f"( rayTime )
521 "_optix_hitobject_make_nop,"
532 "call (%0), _optix_hitobject_is_hit,"
544 "call (%0), _optix_hitobject_is_miss,"
556 "call (%0), _optix_hitobject_is_nop,"
568 "call (%0), _optix_hitobject_get_instance_id,"
580 "call (%0), _optix_hitobject_get_instance_idx,"
592 "call (%0), _optix_hitobject_get_primitive_idx,"
604 "call (%0), _optix_hitobject_get_transform_list_size,"
614 unsigned long long result;
616 "call (%0), _optix_hitobject_get_transform_list_handle,"
628 "call (%0), _optix_hitobject_get_sbt_gas_idx,"
640 "call (%0), _optix_hitobject_get_hitkind,"
652 "call (%0), _optix_hitobject_get_world_ray_origin_x,"
658 "call (%0), _optix_hitobject_get_world_ray_origin_y,"
664 "call (%0), _optix_hitobject_get_world_ray_origin_z,"
669 return make_float3( x, y, z );
676 "call (%0), _optix_hitobject_get_world_ray_direction_x,"
682 "call (%0), _optix_hitobject_get_world_ray_direction_y,"
688 "call (%0), _optix_hitobject_get_world_ray_direction_z,"
693 return make_float3( x, y, z );
700 "call (%0), _optix_hitobject_get_ray_tmin,"
712 "call (%0), _optix_hitobject_get_ray_tmax,"
724 "call (%0), _optix_hitobject_get_ray_time,"
736 "call (%0), _optix_hitobject_get_attribute,"
748 "call (%0), _optix_hitobject_get_attribute,"
760 "call (%0), _optix_hitobject_get_attribute,"
772 "call (%0), _optix_hitobject_get_attribute,"
784 "call (%0), _optix_hitobject_get_attribute,"
796 "call (%0), _optix_hitobject_get_attribute,"
808 "call (%0), _optix_hitobject_get_attribute,"
820 "call (%0), _optix_hitobject_get_attribute,"
832 "call (%0), _optix_hitobject_get_sbt_record_index,"
842 unsigned long long ptr;
844 "call (%0), _optix_hitobject_get_sbt_data_pointer,"
854 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 0 ),
"r"( p ) : );
859 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 1 ),
"r"( p ) : );
864 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 2 ),
"r"( p ) : );
869 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 3 ),
"r"( p ) : );
874 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 4 ),
"r"( p ) : );
879 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 5 ),
"r"( p ) : );
884 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 6 ),
"r"( p ) : );
889 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 7 ),
"r"( p ) : );
894 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 8 ),
"r"( p ) : );
899 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 9 ),
"r"( p ) : );
904 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 10 ),
"r"( p ) : );
909 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 11 ),
"r"( p ) : );
914 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 12 ),
"r"( p ) : );
919 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 13 ),
"r"( p ) : );
924 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 14 ),
"r"( p ) : );
929 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 15 ),
"r"( p ) : );
934 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 16 ),
"r"( p ) : );
939 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 17 ),
"r"( p ) : );
944 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 18 ),
"r"( p ) : );
949 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 19 ),
"r"( p ) : );
954 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 20 ),
"r"( p ) : );
959 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 21 ),
"r"( p ) : );
964 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 22 ),
"r"( p ) : );
969 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 23 ),
"r"( p ) : );
974 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 24 ),
"r"( p ) : );
979 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 25 ),
"r"( p ) : );
984 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 26 ),
"r"( p ) : );
989 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 27 ),
"r"( p ) : );
994 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 28 ),
"r"( p ) : );
999 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 29 ),
"r"( p ) : );
1004 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 30 ),
"r"( p ) : );
1009 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 31 ),
"r"( p ) : );
1014 unsigned int result;
1015 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 0 ) : );
1021 unsigned int result;
1022 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 1 ) : );
1028 unsigned int result;
1029 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 2 ) : );
1035 unsigned int result;
1036 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 3 ) : );
1042 unsigned int result;
1043 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 4 ) : );
1049 unsigned int result;
1050 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 5 ) : );
1056 unsigned int result;
1057 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 6 ) : );
1063 unsigned int result;
1064 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 7 ) : );
1070 unsigned int result;
1071 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 8 ) : );
1077 unsigned int result;
1078 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 9 ) : );
1084 unsigned int result;
1085 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 10 ) : );
1091 unsigned int result;
1092 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 11 ) : );
1098 unsigned int result;
1099 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 12 ) : );
1105 unsigned int result;
1106 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 13 ) : );
1112 unsigned int result;
1113 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 14 ) : );
1119 unsigned int result;
1120 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 15 ) : );
1126 unsigned int result;
1127 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 16 ) : );
1133 unsigned int result;
1134 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 17 ) : );
1140 unsigned int result;
1141 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 18 ) : );
1147 unsigned int result;
1148 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 19 ) : );
1154 unsigned int result;
1155 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 20 ) : );
1161 unsigned int result;
1162 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 21 ) : );
1168 unsigned int result;
1169 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 22 ) : );
1175 unsigned int result;
1176 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 23 ) : );
1182 unsigned int result;
1183 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 24 ) : );
1189 unsigned int result;
1190 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 25 ) : );
1196 unsigned int result;
1197 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 26 ) : );
1203 unsigned int result;
1204 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 27 ) : );
1210 unsigned int result;
1211 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 28 ) : );
1217 unsigned int result;
1218 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 29 ) : );
1224 unsigned int result;
1225 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 30 ) : );
1231 unsigned int result;
1232 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 31 ) : );
1238 asm volatile(
"call _optix_set_payload_types, (%0);" : :
"r"( types ) : );
1244 asm(
"call (%0), _optix_undef_value, ();" :
"=r"( u0 ) : );
1251 asm(
"call (%0), _optix_get_world_ray_origin_x, ();" :
"=f"( f0 ) : );
1252 asm(
"call (%0), _optix_get_world_ray_origin_y, ();" :
"=f"( f1 ) : );
1253 asm(
"call (%0), _optix_get_world_ray_origin_z, ();" :
"=f"( f2 ) : );
1254 return make_float3( f0, f1, f2 );
1260 asm(
"call (%0), _optix_get_world_ray_direction_x, ();" :
"=f"( f0 ) : );
1261 asm(
"call (%0), _optix_get_world_ray_direction_y, ();" :
"=f"( f1 ) : );
1262 asm(
"call (%0), _optix_get_world_ray_direction_z, ();" :
"=f"( f2 ) : );
1263 return make_float3( f0, f1, f2 );
1269 asm(
"call (%0), _optix_get_object_ray_origin_x, ();" :
"=f"( f0 ) : );
1270 asm(
"call (%0), _optix_get_object_ray_origin_y, ();" :
"=f"( f1 ) : );
1271 asm(
"call (%0), _optix_get_object_ray_origin_z, ();" :
"=f"( f2 ) : );
1272 return make_float3( f0, f1, f2 );
1278 asm(
"call (%0), _optix_get_object_ray_direction_x, ();" :
"=f"( f0 ) : );
1279 asm(
"call (%0), _optix_get_object_ray_direction_y, ();" :
"=f"( f1 ) : );
1280 asm(
"call (%0), _optix_get_object_ray_direction_z, ();" :
"=f"( f2 ) : );
1281 return make_float3( f0, f1, f2 );
1287 asm(
"call (%0), _optix_get_ray_tmin, ();" :
"=f"( f0 ) : );
1294 asm(
"call (%0), _optix_get_ray_tmax, ();" :
"=f"( f0 ) : );
1301 asm(
"call (%0), _optix_get_ray_time, ();" :
"=f"( f0 ) : );
1308 asm(
"call (%0), _optix_get_ray_flags, ();" :
"=r"( u0 ) : );
1315 asm(
"call (%0), _optix_get_ray_visibility_mask, ();" :
"=r"( u0 ) : );
1320 unsigned int instIdx )
1322 unsigned long long handle;
1323 asm(
"call (%0), _optix_get_instance_traversable_from_ias, (%1, %2);"
1324 :
"=l"( handle ) :
"l"( ias ),
"r"( instIdx ) );
1330 unsigned int primIdx,
1331 unsigned int sbtGASIndex,
1335 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8), _optix_get_triangle_vertex_data, "
1336 "(%9, %10, %11, %12);"
1337 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[1].x ),
"=f"( data[1].y ),
1338 "=f"( data[1].z ),
"=f"( data[2].x ),
"=f"( data[2].y ),
"=f"( data[2].z )
1339 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
1345 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8), _optix_get_microtriangle_vertex_data, "
1347 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[1].x ),
"=f"( data[1].y ),
1348 "=f"( data[1].z ),
"=f"( data[2].x ),
"=f"( data[2].y ),
"=f"( data[2].z )
1353 asm(
"call (%0, %1, %2, %3, %4, %5), _optix_get_microtriangle_barycentrics_data, "
1355 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[1].x ),
"=f"( data[1].y ),
"=f"( data[2].x ),
"=f"( data[2].y )
1360 unsigned int primIdx,
1361 unsigned int sbtGASIndex,
1365 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7), _optix_get_linear_curve_vertex_data, "
1366 "(%8, %9, %10, %11);"
1367 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w ),
1368 "=f"( data[1].x ),
"=f"( data[1].y ),
"=f"( data[1].z ),
"=f"( data[1].w )
1369 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
1374 unsigned int primIdx,
1375 unsigned int sbtGASIndex,
1379 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11), _optix_get_quadratic_bspline_vertex_data, "
1380 "(%12, %13, %14, %15);"
1381 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w ),
1382 "=f"( data[1].x ),
"=f"( data[1].y ),
"=f"( data[1].z ),
"=f"( data[1].w ),
1383 "=f"( data[2].x ),
"=f"( data[2].y ),
"=f"( data[2].z ),
"=f"( data[2].w )
1384 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
1389 unsigned int primIdx,
1390 unsigned int sbtGASIndex,
1394 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15), "
1395 "_optix_get_cubic_bspline_vertex_data, "
1396 "(%16, %17, %18, %19);"
1397 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w ),
1398 "=f"( data[1].x ),
"=f"( data[1].y ),
"=f"( data[1].z ),
"=f"( data[1].w ),
1399 "=f"( data[2].x ),
"=f"( data[2].y ),
"=f"( data[2].z ),
"=f"( data[2].w ),
1400 "=f"( data[3].x ),
"=f"( data[3].y ),
"=f"( data[3].z ),
"=f"( data[3].w )
1401 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
1406 unsigned int primIdx,
1407 unsigned int sbtGASIndex,
1411 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15), "
1412 "_optix_get_catmullrom_vertex_data, "
1413 "(%16, %17, %18, %19);"
1414 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w ),
"=f"( data[1].x ),
1415 "=f"( data[1].y ),
"=f"( data[1].z ),
"=f"( data[1].w ),
"=f"( data[2].x ),
"=f"( data[2].y ),
1416 "=f"( data[2].z ),
"=f"( data[2].w ),
"=f"( data[3].x ),
"=f"( data[3].y ),
"=f"( data[3].z ),
"=f"( data[3].w )
1417 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
1422 unsigned int primIdx,
1423 unsigned int sbtGASIndex,
1427 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15), "
1428 "_optix_get_cubic_bezier_vertex_data, "
1429 "(%16, %17, %18, %19);"
1430 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w ),
"=f"( data[1].x ),
1431 "=f"( data[1].y ),
"=f"( data[1].z ),
"=f"( data[1].w ),
"=f"( data[2].x ),
"=f"( data[2].y ),
1432 "=f"( data[2].z ),
"=f"( data[2].w ),
"=f"( data[3].x ),
"=f"( data[3].y ),
"=f"( data[3].z ),
"=f"( data[3].w )
1433 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
1438 unsigned int primIdx,
1439 unsigned int sbtGASIndex,
1443 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11), _optix_get_ribbon_vertex_data, "
1444 "(%12, %13, %14, %15);"
1445 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w ),
"=f"( data[1].x ),
"=f"( data[1].y ),
1446 "=f"( data[1].z ),
"=f"( data[1].w ),
"=f"( data[2].x ),
"=f"( data[2].y ),
"=f"( data[2].z ),
"=f"( data[2].w )
1447 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
1452 unsigned int primIdx,
1453 unsigned int sbtGASIndex,
1455 float2 ribbonParameters )
1458 asm(
"call (%0, %1, %2), _optix_get_ribbon_normal, "
1459 "(%3, %4, %5, %6, %7, %8);"
1460 :
"=f"( normal.x ),
"=f"( normal.y ),
"=f"( normal.z )
1461 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time ),
1462 "f"( ribbonParameters.x ),
"f"( ribbonParameters.y )
1468 unsigned int primIdx,
1469 unsigned int sbtGASIndex,
1473 asm(
"call (%0, %1, %2, %3), "
1474 "_optix_get_sphere_data, "
1476 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w )
1477 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
1483 unsigned long long handle;
1484 asm(
"call (%0), _optix_get_gas_traversable_handle, ();" :
"=l"( handle ) : );
1491 asm(
"call (%0), _optix_get_gas_motion_time_begin, (%1);" :
"=f"( f0 ) :
"l"( handle ) : );
1498 asm(
"call (%0), _optix_get_gas_motion_time_end, (%1);" :
"=f"( f0 ) :
"l"( handle ) : );
1505 asm(
"call (%0), _optix_get_gas_motion_step_count, (%1);" :
"=r"( u0 ) :
"l"( handle ) : );
1642 asm(
"call (%0), _optix_get_transform_list_size, ();" :
"=r"( u0 ) : );
1648 unsigned long long u0;
1649 asm(
"call (%0), _optix_get_transform_list_handle, (%1);" :
"=l"( u0 ) :
"r"( index ) : );
1656 asm(
"call (%0), _optix_get_transform_type_from_handle, (%1);" :
"=r"( i0 ) :
"l"( handle ) : );
1662 unsigned long long ptr;
1663 asm(
"call (%0), _optix_get_static_transform_from_handle, (%1);" :
"=l"( ptr ) :
"l"( handle ) : );
1669 unsigned long long ptr;
1670 asm(
"call (%0), _optix_get_srt_motion_transform_from_handle, (%1);" :
"=l"( ptr ) :
"l"( handle ) : );
1676 unsigned long long ptr;
1677 asm(
"call (%0), _optix_get_matrix_motion_transform_from_handle, (%1);" :
"=l"( ptr ) :
"l"( handle ) : );
1684 asm(
"call (%0), _optix_get_instance_id_from_handle, (%1);" :
"=r"( i0 ) :
"l"( handle ) : );
1690 unsigned long long i0;
1691 asm(
"call (%0), _optix_get_instance_child_from_handle, (%1);" :
"=l"( i0 ) :
"l"( handle ) : );
1697 unsigned long long ptr;
1698 asm(
"call (%0), _optix_get_instance_transform_from_handle, (%1);" :
"=l"( ptr ) :
"l"( handle ) : );
1699 return (
const float4*)ptr;
1704 unsigned long long ptr;
1705 asm(
"call (%0), _optix_get_instance_inverse_transform_from_handle, (%1);" :
"=l"( ptr ) :
"l"( handle ) : );
1706 return (
const float4*)ptr;
1713 "call (%0), _optix_report_intersection_0"
1716 :
"f"( hitT ),
"r"( hitKind )
1725 "call (%0), _optix_report_intersection_1"
1728 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 )
1733static __forceinline__ __device__
bool optixReportIntersection(
float hitT,
unsigned int hitKind,
unsigned int a0,
unsigned int a1 )
1737 "call (%0), _optix_report_intersection_2"
1738 ", (%1, %2, %3, %4);"
1740 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 )
1745static __forceinline__ __device__
bool optixReportIntersection(
float hitT,
unsigned int hitKind,
unsigned int a0,
unsigned int a1,
unsigned int a2 )
1749 "call (%0), _optix_report_intersection_3"
1750 ", (%1, %2, %3, %4, %5);"
1752 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 ),
"r"( a2 )
1758 unsigned int hitKind,
1766 "call (%0), _optix_report_intersection_4"
1767 ", (%1, %2, %3, %4, %5, %6);"
1769 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 ),
"r"( a2 ),
"r"( a3 )
1775 unsigned int hitKind,
1784 "call (%0), _optix_report_intersection_5"
1785 ", (%1, %2, %3, %4, %5, %6, %7);"
1787 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 ),
"r"( a2 ),
"r"( a3 ),
"r"( a4 )
1793 unsigned int hitKind,
1803 "call (%0), _optix_report_intersection_6"
1804 ", (%1, %2, %3, %4, %5, %6, %7, %8);"
1806 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 ),
"r"( a2 ),
"r"( a3 ),
"r"( a4 ),
"r"( a5 )
1812 unsigned int hitKind,
1823 "call (%0), _optix_report_intersection_7"
1824 ", (%1, %2, %3, %4, %5, %6, %7, %8, %9);"
1826 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 ),
"r"( a2 ),
"r"( a3 ),
"r"( a4 ),
"r"( a5 ),
"r"( a6 )
1832 unsigned int hitKind,
1844 "call (%0), _optix_report_intersection_8"
1845 ", (%1, %2, %3, %4, %5, %6, %7, %8, %9, %10);"
1847 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 ),
"r"( a2 ),
"r"( a3 ),
"r"( a4 ),
"r"( a5 ),
"r"( a6 ),
"r"( a7 )
1852#define OPTIX_DEFINE_optixGetAttribute_BODY( which ) \
1854 asm( "call (%0), _optix_get_attribute_" #which ", ();" : "=r"( ret ) : ); \
1897#undef OPTIX_DEFINE_optixGetAttribute_BODY
1901 asm volatile(
"call _optix_terminate_ray, ();" );
1906 asm volatile(
"call _optix_ignore_intersection, ();" );
1912 asm(
"call (%0), _optix_read_primitive_idx, ();" :
"=r"( u0 ) : );
1919 asm(
"call (%0), _optix_read_sbt_gas_idx, ();" :
"=r"( u0 ) : );
1926 asm(
"call (%0), _optix_read_instance_id, ();" :
"=r"( u0 ) : );
1933 asm(
"call (%0), _optix_read_instance_idx, ();" :
"=r"( u0 ) : );
1940 asm(
"call (%0), _optix_get_hit_kind, ();" :
"=r"( u0 ) : );
1947 asm(
"call (%0), _optix_get_primitive_type_from_hit_kind, (%1);" :
"=r"( u0 ) :
"r"( hitKind ) );
1954 asm(
"call (%0), _optix_get_backface_from_hit_kind, (%1);" :
"=r"( u0 ) :
"r"( hitKind ) );
2012 asm(
"call (%0), _optix_get_curve_parameter, ();" :
"=f"(f0) : );
2019 asm(
"call (%0, %1), _optix_get_ribbon_parameters, ();" :
"=f"( f0 ),
"=f"( f1 ) : );
2020 return make_float2( f0, f1 );
2026 asm(
"call (%0, %1), _optix_get_triangle_barycentrics, ();" :
"=f"( f0 ),
"=f"( f1 ) : );
2027 return make_float2( f0, f1 );
2032 unsigned int u0, u1, u2;
2033 asm(
"call (%0), _optix_get_launch_index_x, ();" :
"=r"( u0 ) : );
2034 asm(
"call (%0), _optix_get_launch_index_y, ();" :
"=r"( u1 ) : );
2035 asm(
"call (%0), _optix_get_launch_index_z, ();" :
"=r"( u2 ) : );
2036 return make_uint3( u0, u1, u2 );
2041 unsigned int u0, u1, u2;
2042 asm(
"call (%0), _optix_get_launch_dimension_x, ();" :
"=r"( u0 ) : );
2043 asm(
"call (%0), _optix_get_launch_dimension_y, ();" :
"=r"( u1 ) : );
2044 asm(
"call (%0), _optix_get_launch_dimension_z, ();" :
"=r"( u2 ) : );
2045 return make_uint3( u0, u1, u2 );
2050 unsigned long long ptr;
2051 asm(
"call (%0), _optix_get_sbt_data_ptr_64, ();" :
"=l"( ptr ) : );
2058 "call _optix_throw_exception_0, (%0);"
2060 :
"r"( exceptionCode )
2067 "call _optix_throw_exception_1, (%0, %1);"
2069 :
"r"( exceptionCode ),
"r"( exceptionDetail0 )
2073static __forceinline__ __device__
void optixThrowException(
int exceptionCode,
unsigned int exceptionDetail0,
unsigned int exceptionDetail1 )
2076 "call _optix_throw_exception_2, (%0, %1, %2);"
2078 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 )
2082static __forceinline__ __device__
void optixThrowException(
int exceptionCode,
unsigned int exceptionDetail0,
unsigned int exceptionDetail1,
unsigned int exceptionDetail2 )
2085 "call _optix_throw_exception_3, (%0, %1, %2, %3);"
2087 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 ),
"r"( exceptionDetail2 )
2091static __forceinline__ __device__
void optixThrowException(
int exceptionCode,
unsigned int exceptionDetail0,
unsigned int exceptionDetail1,
unsigned int exceptionDetail2,
unsigned int exceptionDetail3 )
2094 "call _optix_throw_exception_4, (%0, %1, %2, %3, %4);"
2096 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 ),
"r"( exceptionDetail2 ),
"r"( exceptionDetail3 )
2100static __forceinline__ __device__
void optixThrowException(
int exceptionCode,
unsigned int exceptionDetail0,
unsigned int exceptionDetail1,
unsigned int exceptionDetail2,
unsigned int exceptionDetail3,
unsigned int exceptionDetail4 )
2103 "call _optix_throw_exception_5, (%0, %1, %2, %3, %4, %5);"
2105 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 ),
"r"( exceptionDetail2 ),
"r"( exceptionDetail3 ),
"r"( exceptionDetail4 )
2109static __forceinline__ __device__
void optixThrowException(
int exceptionCode,
unsigned int exceptionDetail0,
unsigned int exceptionDetail1,
unsigned int exceptionDetail2,
unsigned int exceptionDetail3,
unsigned int exceptionDetail4,
unsigned int exceptionDetail5 )
2112 "call _optix_throw_exception_6, (%0, %1, %2, %3, %4, %5, %6);"
2114 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 ),
"r"( exceptionDetail2 ),
"r"( exceptionDetail3 ),
"r"( exceptionDetail4 ),
"r"( exceptionDetail5 )
2118static __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 )
2121 "call _optix_throw_exception_7, (%0, %1, %2, %3, %4, %5, %6, %7);"
2123 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 ),
"r"( exceptionDetail2 ),
"r"( exceptionDetail3 ),
"r"( exceptionDetail4 ),
"r"( exceptionDetail5 ),
"r"( exceptionDetail6 )
2127static __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 )
2130 "call _optix_throw_exception_8, (%0, %1, %2, %3, %4, %5, %6, %7, %8);"
2132 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 ),
"r"( exceptionDetail2 ),
"r"( exceptionDetail3 ),
"r"( exceptionDetail4 ),
"r"( exceptionDetail5 ),
"r"( exceptionDetail6 ),
"r"( exceptionDetail7 )
2139 asm(
"call (%0), _optix_get_exception_code, ();" :
"=r"( s0 ) : );
2143#define OPTIX_DEFINE_optixGetExceptionDetail_BODY( which ) \
2145 asm( "call (%0), _optix_get_exception_detail_" #which ", ();" : "=r"( ret ) : ); \
2188#undef OPTIX_DEFINE_optixGetExceptionDetail_BODY
2193 unsigned long long ptr;
2194 asm(
"call (%0), _optix_get_exception_line_info, ();" :
"=l"(ptr) : );
2198template <
typename ReturnT,
typename... ArgTypes>
2199static __forceinline__ __device__ ReturnT
optixDirectCall(
unsigned int sbtIndex, ArgTypes... args )
2201 unsigned long long func;
2202 asm(
"call (%0), _optix_call_direct_callable,(%1);" :
"=l"( func ) :
"r"( sbtIndex ) : );
2203 using funcT = ReturnT ( * )( ArgTypes... );
2204 funcT call = ( funcT )( func );
2205 return call( args... );
2208template <
typename ReturnT,
typename... ArgTypes>
2211 unsigned long long func;
2212 asm(
"call (%0), _optix_call_continuation_callable,(%1);" :
"=l"( func ) :
"r"( sbtIndex ) : );
2213 using funcT = ReturnT ( * )( ArgTypes... );
2214 funcT call = ( funcT )( func );
2215 return call( args... );
2218static __forceinline__ __device__ uint4
optixTexFootprint2D(
unsigned long long tex,
unsigned int texInfo,
float x,
float y,
unsigned int* singleMipLevel )
2221 unsigned long long resultPtr =
reinterpret_cast<unsigned long long>( &result );
2222 unsigned long long singleMipLevelPtr =
reinterpret_cast<unsigned long long>( singleMipLevel );
2225 "call _optix_tex_footprint_2d_v2"
2226 ", (%0, %1, %2, %3, %4, %5);"
2228 :
"l"( tex ),
"r"( texInfo ),
"r"( __float_as_uint( x ) ),
"r"( __float_as_uint( y ) ),
2229 "l"( singleMipLevelPtr ),
"l"( resultPtr )
2235 unsigned int texInfo,
2243 unsigned int* singleMipLevel )
2246 unsigned long long resultPtr =
reinterpret_cast<unsigned long long>( &result );
2247 unsigned long long singleMipLevelPtr =
reinterpret_cast<unsigned long long>( singleMipLevel );
2250 "call _optix_tex_footprint_2d_grad_v2"
2251 ", (%0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10);"
2253 :
"l"( tex ),
"r"( texInfo ),
"r"( __float_as_uint( x ) ),
"r"( __float_as_uint( y ) ),
2254 "r"( __float_as_uint( dPdx_x ) ),
"r"( __float_as_uint( dPdx_y ) ),
"r"( __float_as_uint( dPdy_x ) ),
2255 "r"( __float_as_uint( dPdy_y ) ),
"r"(
static_cast<unsigned int>( coarse ) ),
"l"( singleMipLevelPtr ),
"l"( resultPtr )
2261static __forceinline__ __device__ uint4
2262optixTexFootprint2DLod(
unsigned long long tex,
unsigned int texInfo,
float x,
float y,
float level,
bool coarse,
unsigned int* singleMipLevel )
2265 unsigned long long resultPtr =
reinterpret_cast<unsigned long long>( &result );
2266 unsigned long long singleMipLevelPtr =
reinterpret_cast<unsigned long long>( singleMipLevel );
2269 "call _optix_tex_footprint_2d_lod_v2"
2270 ", (%0, %1, %2, %3, %4, %5, %6, %7);"
2272 :
"l"( tex ),
"r"( texInfo ),
"r"( __float_as_uint( x ) ),
"r"( __float_as_uint( y ) ),
2273 "r"( __float_as_uint( level ) ),
"r"(
static_cast<unsigned int>( coarse ) ),
"l"( singleMipLevelPtr ),
"l"( resultPtr )
OptixTransformType
Transform.
Definition: optix_types.h:1855
unsigned long long CUdeviceptr
CUDA device pointer.
Definition: optix_types.h:52
unsigned int OptixVisibilityMask
Visibility mask.
Definition: optix_types.h:80
unsigned long long OptixTraversableHandle
Traversable handle.
Definition: optix_types.h:77
OptixPrimitiveType
Builtin primitive types.
Definition: optix_types.h:727
OptixPayloadTypeID
Payload type identifiers.
Definition: optix_types.h:1982
@ OPTIX_HIT_KIND_TRIANGLE_BACK_FACE
Ray hit the triangle on the back face.
Definition: optix_types.h:342
@ OPTIX_HIT_KIND_TRIANGLE_FRONT_FACE
Ray hit the triangle on the front face.
Definition: optix_types.h:340
@ OPTIX_PRIMITIVE_TYPE_DISPLACED_MICROMESH_TRIANGLE
Triangle with an applied displacement micromap.
Definition: optix_types.h:747
@ OPTIX_PAYLOAD_TYPE_DEFAULT
Definition: optix_types.h:1983
static __forceinline__ __device__ void optixGetObjectToWorldTransformMatrix(float4 &m0, float4 &m1, float4 &m2)
Definition: optix_device_impl_transformations.h:369
static __forceinline__ __device__ float3 optixTransformPoint(const float4 &m0, const float4 &m1, const float4 &m2, const float3 &p)
Definition: optix_device_impl_transformations.h:400
static __forceinline__ __device__ float3 optixTransformVector(const float4 &m0, const float4 &m1, const float4 &m2, const float3 &v)
Definition: optix_device_impl_transformations.h:410
static __forceinline__ __device__ float3 optixTransformNormal(const float4 &m0, const float4 &m1, const float4 &m2, const float3 &n)
Definition: optix_device_impl_transformations.h:421
static __forceinline__ __device__ void optixGetWorldToObjectTransformMatrix(float4 &m0, float4 &m1, float4 &m2)
Definition: optix_device_impl_transformations.h:338
Definition: optix_device_impl.h:43
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_7()
Definition: optix_device_impl.h:2183
static __forceinline__ __device__ ReturnT optixContinuationCall(unsigned int sbtIndex, ArgTypes... args)
Definition: optix_device_impl.h:2209
static __forceinline__ __device__ void optixThrowException(int exceptionCode)
Definition: optix_device_impl.h:2055
static __forceinline__ __device__ unsigned int optixGetPayload_2()
Definition: optix_device_impl.h:1026
static __forceinline__ __device__ void optixSetPayload_16(unsigned int p)
Definition: optix_device_impl.h:932
static __forceinline__ __device__ float3 optixTransformNormalFromWorldToObjectSpace(float3 normal)
Definition: optix_device_impl.h:1599
static __forceinline__ __device__ unsigned int optixGetPayload_25()
Definition: optix_device_impl.h:1187
static __forceinline__ __device__ unsigned int optixGetPayload_1()
Definition: optix_device_impl.h:1019
static __forceinline__ __device__ unsigned int optixGetPayload_15()
Definition: optix_device_impl.h:1117
static __forceinline__ __device__ OptixTraversableHandle optixGetGASTraversableHandle()
Definition: optix_device_impl.h:1481
static __forceinline__ __device__ unsigned int optixHitObjectGetSbtGASIndex()
Definition: optix_device_impl.h:624
static __forceinline__ __device__ uint3 optixGetLaunchDimensions()
Definition: optix_device_impl.h:2039
static __forceinline__ __device__ void optixSetPayload_11(unsigned int p)
Definition: optix_device_impl.h:907
static __forceinline__ __device__ void optixSetPayloadTypes(unsigned int types)
Definition: optix_device_impl.h:1236
static __forceinline__ __device__ void optixSetPayload_8(unsigned int p)
Definition: optix_device_impl.h:892
static __forceinline__ __device__ void optixSetPayload_5(unsigned int p)
Definition: optix_device_impl.h:877
static __forceinline__ __device__ unsigned int optixGetPayload_9()
Definition: optix_device_impl.h:1075
static __forceinline__ __device__ void optixSetPayload_29(unsigned int p)
Definition: optix_device_impl.h:997
static __forceinline__ __device__ void optixSetPayload_14(unsigned int p)
Definition: optix_device_impl.h:922
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_2()
Definition: optix_device_impl.h:2158
static __forceinline__ __device__ unsigned int optixGetGASMotionStepCount(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1502
static __forceinline__ __device__ const OptixStaticTransform * optixGetStaticTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1660
static __forceinline__ __device__ void optixSetPayload_19(unsigned int p)
Definition: optix_device_impl.h:947
static __forceinline__ __device__ float3 optixGetWorldRayDirection()
Definition: optix_device_impl.h:1257
static __forceinline__ __device__ float3 optixGetObjectRayOrigin()
Definition: optix_device_impl.h:1266
static __forceinline__ __device__ bool optixIsFrontFaceHit(unsigned int hitKind)
Definition: optix_device_impl.h:1958
static __forceinline__ __device__ unsigned int optixGetAttribute_4()
Definition: optix_device_impl.h:1877
static __forceinline__ __device__ unsigned int optixGetPayload_4()
Definition: optix_device_impl.h:1040
static __forceinline__ __device__ void optixSetPayload_10(unsigned int p)
Definition: optix_device_impl.h:902
static __forceinline__ __device__ unsigned int optixGetPayload_18()
Definition: optix_device_impl.h:1138
static __forceinline__ __device__ bool optixHitObjectIsHit()
Definition: optix_device_impl.h:528
static __forceinline__ __device__ unsigned int optixGetAttribute_6()
Definition: optix_device_impl.h:1887
static __forceinline__ __device__ void optixMakeNopHitObject()
Definition: optix_device_impl.h:516
static __forceinline__ __device__ unsigned int optixGetAttribute_3()
Definition: optix_device_impl.h:1872
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_4()
Definition: optix_device_impl.h:780
static __forceinline__ __device__ void optixSetPayload_20(unsigned int p)
Definition: optix_device_impl.h:952
static __forceinline__ __device__ void optixSetPayload_4(unsigned int p)
Definition: optix_device_impl.h:872
static __forceinline__ __device__ unsigned int optixGetPayload_5()
Definition: optix_device_impl.h:1047
static __forceinline__ __device__ unsigned int optixGetPayload_22()
Definition: optix_device_impl.h:1166
static __forceinline__ __device__ bool optixIsTriangleHit()
Definition: optix_device_impl.h:1979
static __forceinline__ __device__ void optixGetCubicBSplineVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[4])
Definition: optix_device_impl.h:1388
static __forceinline__ __device__ unsigned int optixGetPayload_27()
Definition: optix_device_impl.h:1201
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:2234
static __forceinline__ __device__ void optixSetPayload_6(unsigned int p)
Definition: optix_device_impl.h:882
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:452
static __forceinline__ __device__ float3 optixHitObjectGetWorldRayDirection()
Definition: optix_device_impl.h:672
static __forceinline__ __device__ unsigned int optixGetAttribute_1()
Definition: optix_device_impl.h:1862
static __forceinline__ __device__ bool optixIsTriangleBackFaceHit()
Definition: optix_device_impl.h:1989
static __forceinline__ __device__ unsigned int optixGetAttribute_5()
Definition: optix_device_impl.h:1882
static __forceinline__ __device__ OptixTraversableHandle optixHitObjectGetTransformListHandle(unsigned int index)
Definition: optix_device_impl.h:612
static __forceinline__ __device__ void optixGetRibbonVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[3])
Definition: optix_device_impl.h:1437
static __forceinline__ __device__ void optixSetPayload_25(unsigned int p)
Definition: optix_device_impl.h:977
static __forceinline__ __device__ unsigned int optixGetRayFlags()
Definition: optix_device_impl.h:1305
static __forceinline__ __device__ unsigned int optixHitObjectGetInstanceId()
Definition: optix_device_impl.h:564
static __forceinline__ __device__ unsigned int optixHitObjectGetSbtRecordIndex()
Definition: optix_device_impl.h:828
static __forceinline__ __device__ float3 optixTransformPointFromObjectToWorldSpace(float3 point)
Definition: optix_device_impl.h:1609
static __forceinline__ __device__ unsigned int optixGetPayload_26()
Definition: optix_device_impl.h:1194
static __forceinline__ __device__ void optixMakeMissHitObject(unsigned int missSBTIndex, float3 rayOrigin, float3 rayDirection, float tmin, float tmax, float rayTime)
Definition: optix_device_impl.h:495
static __forceinline__ __device__ void optixSetPayload_17(unsigned int p)
Definition: optix_device_impl.h:937
static __forceinline__ __device__ void optixSetPayload_7(unsigned int p)
Definition: optix_device_impl.h:887
static __forceinline__ __device__ ReturnT optixDirectCall(unsigned int sbtIndex, ArgTypes... args)
Definition: optix_device_impl.h:2199
static __forceinline__ __device__ unsigned int optixGetPayload_30()
Definition: optix_device_impl.h:1222
static __forceinline__ __device__ void optixSetPayload_28(unsigned int p)
Definition: optix_device_impl.h:992
static __forceinline__ __device__ OptixPrimitiveType optixGetPrimitiveType(unsigned int hitKind)
Definition: optix_device_impl.h:1944
static __forceinline__ __device__ float3 optixTransformVectorFromObjectToWorldSpace(float3 vec)
Definition: optix_device_impl.h:1619
static __forceinline__ __device__ unsigned int optixGetInstanceId()
Definition: optix_device_impl.h:1923
static __forceinline__ __device__ char * optixGetExceptionLineInfo()
Definition: optix_device_impl.h:2191
static __forceinline__ __device__ void optixSetPayload_27(unsigned int p)
Definition: optix_device_impl.h:987
static __forceinline__ __device__ void optixSetPayload_2(unsigned int p)
Definition: optix_device_impl.h:862
static __forceinline__ __device__ void optixGetCatmullRomVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[4])
Definition: optix_device_impl.h:1405
static __forceinline__ __device__ int optixGetExceptionCode()
Definition: optix_device_impl.h:2136
static __forceinline__ __device__ void optixSetPayload_12(unsigned int p)
Definition: optix_device_impl.h:912
static __forceinline__ __device__ void optixGetObjectToWorldTransformMatrix(float m[12])
Definition: optix_device_impl.h:1544
static __forceinline__ __device__ unsigned int optixGetPayload_24()
Definition: optix_device_impl.h:1180
static __forceinline__ __device__ unsigned int optixGetPayload_17()
Definition: optix_device_impl.h:1131
static __forceinline__ __device__ float optixGetGASMotionTimeBegin(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1488
static __forceinline__ __device__ float optixHitObjectGetRayTmax()
Definition: optix_device_impl.h:708
static __forceinline__ __device__ const OptixMatrixMotionTransform * optixGetMatrixMotionTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1674
static __forceinline__ __device__ void optixGetSphereData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[1])
Definition: optix_device_impl.h:1467
static __forceinline__ __device__ unsigned int optixGetPayload_13()
Definition: optix_device_impl.h:1103
static __forceinline__ __device__ uint4 optixTexFootprint2D(unsigned long long tex, unsigned int texInfo, float x, float y, unsigned int *singleMipLevel)
Definition: optix_device_impl.h:2218
static __forceinline__ __device__ void optixSetPayload_23(unsigned int p)
Definition: optix_device_impl.h:967
static __forceinline__ __device__ unsigned int optixGetAttribute_0()
Definition: optix_device_impl.h:1857
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_6()
Definition: optix_device_impl.h:804
static __forceinline__ __device__ float optixHitObjectGetRayTmin()
Definition: optix_device_impl.h:696
static __forceinline__ __device__ unsigned int optixGetPayload_10()
Definition: optix_device_impl.h:1082
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_1()
Definition: optix_device_impl.h:744
static __forceinline__ __device__ void optixGetQuadraticBSplineVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[3])
Definition: optix_device_impl.h:1373
static __forceinline__ __device__ uint3 optixGetLaunchIndex()
Definition: optix_device_impl.h:2030
static __forceinline__ __device__ unsigned int optixGetPayload_31()
Definition: optix_device_impl.h:1229
static __forceinline__ __device__ void optixSetPayload_24(unsigned int p)
Definition: optix_device_impl.h:972
static __forceinline__ __device__ void optixTerminateRay()
Definition: optix_device_impl.h:1899
static __forceinline__ __device__ OptixTraversableHandle optixGetInstanceTraversableFromIAS(OptixTraversableHandle ias, unsigned int instIdx)
Definition: optix_device_impl.h:1319
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_0()
Definition: optix_device_impl.h:732
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_6()
Definition: optix_device_impl.h:2178
static __forceinline__ __device__ unsigned int optixGetAttribute_7()
Definition: optix_device_impl.h:1892
static __forceinline__ __device__ bool optixHitObjectIsNop()
Definition: optix_device_impl.h:552
static __forceinline__ __device__ unsigned int optixGetRayVisibilityMask()
Definition: optix_device_impl.h:1312
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_2()
Definition: optix_device_impl.h:756
static __forceinline__ __device__ void optixSetPayload_30(unsigned int p)
Definition: optix_device_impl.h:1002
static __forceinline__ __device__ unsigned int optixGetInstanceIdFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1681
static __forceinline__ __device__ unsigned int optixHitObjectGetInstanceIndex()
Definition: optix_device_impl.h:576
static __forceinline__ __device__ void optixGetLinearCurveVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[2])
Definition: optix_device_impl.h:1359
static __forceinline__ __device__ unsigned int optixGetPayload_3()
Definition: optix_device_impl.h:1033
static __forceinline__ __device__ float optixHitObjectGetRayTime()
Definition: optix_device_impl.h:720
static __forceinline__ __device__ bool optixReportIntersection(float hitT, unsigned int hitKind)
Definition: optix_device_impl.h:1709
static __forceinline__ __device__ unsigned int optixGetPayload_23()
Definition: optix_device_impl.h:1173
static __forceinline__ __device__ unsigned int optixGetPayload_20()
Definition: optix_device_impl.h:1152
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_3()
Definition: optix_device_impl.h:768
static __forceinline__ __device__ OptixTraversableHandle optixGetTransformListHandle(unsigned int index)
Definition: optix_device_impl.h:1646
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_0()
Definition: optix_device_impl.h:2148
static __forceinline__ __device__ unsigned int optixUndefinedValue()
Definition: optix_device_impl.h:1241
#define OPTIX_DEFINE_optixGetAttribute_BODY(which)
Definition: optix_device_impl.h:1852
static __forceinline__ __device__ float2 optixGetRibbonParameters()
Definition: optix_device_impl.h:2016
static __forceinline__ __device__ unsigned int optixHitObjectGetTransformListSize()
Definition: optix_device_impl.h:600
static __forceinline__ __device__ void optixIgnoreIntersection()
Definition: optix_device_impl.h:1904
static __forceinline__ __device__ float optixGetRayTmax()
Definition: optix_device_impl.h:1291
static __forceinline__ __device__ CUdeviceptr optixHitObjectGetSbtDataPointer()
Definition: optix_device_impl.h:840
static __forceinline__ __device__ float3 optixTransformNormalFromObjectToWorldSpace(float3 normal)
Definition: optix_device_impl.h:1629
static __forceinline__ __device__ void optixGetCubicBezierVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[4])
Definition: optix_device_impl.h:1421
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_1()
Definition: optix_device_impl.h:2153
static __forceinline__ __device__ float2 optixGetTriangleBarycentrics()
Definition: optix_device_impl.h:2023
static __forceinline__ __device__ float3 optixHitObjectGetWorldRayOrigin()
Definition: optix_device_impl.h:648
static __forceinline__ __device__ float3 optixGetObjectRayDirection()
Definition: optix_device_impl.h:1275
static __forceinline__ __device__ unsigned int optixGetPayload_6()
Definition: optix_device_impl.h:1054
static __forceinline__ __device__ void optixSetPayload_9(unsigned int p)
Definition: optix_device_impl.h:897
static __forceinline__ __device__ void optixSetPayload_26(unsigned int p)
Definition: optix_device_impl.h:982
static __forceinline__ __device__ unsigned int optixGetPayload_11()
Definition: optix_device_impl.h:1089
static __forceinline__ __device__ void optixGetMicroTriangleVertexData(float3 data[3])
Definition: optix_device_impl.h:1343
static __forceinline__ __device__ unsigned int optixHitObjectGetHitKind()
Definition: optix_device_impl.h:636
static __forceinline__ __device__ bool optixHitObjectIsMiss()
Definition: optix_device_impl.h:540
static __forceinline__ __device__ void optixGetWorldToObjectTransformMatrix(float m[12])
Definition: optix_device_impl.h:1509
static __forceinline__ __device__ unsigned int optixGetInstanceIndex()
Definition: optix_device_impl.h:1930
static __forceinline__ __device__ bool optixIsDisplacedMicromeshTriangleFrontFaceHit()
Definition: optix_device_impl.h:1999
static __forceinline__ __device__ float3 optixGetWorldRayOrigin()
Definition: optix_device_impl.h:1248
static __forceinline__ __device__ void optixSetPayload_22(unsigned int p)
Definition: optix_device_impl.h:962
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_5()
Definition: optix_device_impl.h:792
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:49
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:2262
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:101
static __forceinline__ __device__ unsigned int optixGetPrimitiveIndex()
Definition: optix_device_impl.h:1909
static __forceinline__ __device__ const float4 * optixGetInstanceTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1695
static __forceinline__ __device__ void optixSetPayload_3(unsigned int p)
Definition: optix_device_impl.h:867
static __forceinline__ __device__ bool optixIsBackFaceHit(unsigned int hitKind)
Definition: optix_device_impl.h:1951
static __forceinline__ __device__ unsigned int optixGetTransformListSize()
Definition: optix_device_impl.h:1639
static __forceinline__ __device__ void optixSetPayload_18(unsigned int p)
Definition: optix_device_impl.h:942
static __forceinline__ __device__ void optixInvoke(OptixPayloadTypeID type, Payload &... payload)
Definition: optix_device_impl.h:284
static __forceinline__ __device__ bool optixIsDisplacedMicromeshTriangleHit()
Definition: optix_device_impl.h:1994
static __forceinline__ __device__ unsigned int optixGetSbtGASIndex()
Definition: optix_device_impl.h:1916
static __forceinline__ __device__ unsigned int optixHitObjectGetPrimitiveIndex()
Definition: optix_device_impl.h:588
static __forceinline__ __device__ void optixSetPayload_21(unsigned int p)
Definition: optix_device_impl.h:957
static __forceinline__ __device__ bool optixIsDisplacedMicromeshTriangleBackFaceHit()
Definition: optix_device_impl.h:2004
static __forceinline__ __device__ void optixSetPayload_0(unsigned int p)
Definition: optix_device_impl.h:852
static __forceinline__ __device__ const OptixSRTMotionTransform * optixGetSRTMotionTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1667
static __forceinline__ __device__ unsigned int optixGetPayload_14()
Definition: optix_device_impl.h:1110
static __forceinline__ __device__ CUdeviceptr optixGetSbtDataPointer()
Definition: optix_device_impl.h:2048
static __forceinline__ __device__ float3 optixGetRibbonNormal(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float2 ribbonParameters)
Definition: optix_device_impl.h:1451
static __forceinline__ __device__ void optixGetMicroTriangleBarycentricsData(float2 data[3])
Definition: optix_device_impl.h:1351
static __forceinline__ __device__ void optixSetPayload_1(unsigned int p)
Definition: optix_device_impl.h:857
static __forceinline__ __device__ void optixSetPayload_13(unsigned int p)
Definition: optix_device_impl.h:917
#define OPTIX_DEFINE_optixGetExceptionDetail_BODY(which)
Definition: optix_device_impl.h:2143
static __forceinline__ __device__ unsigned int optixGetPayload_21()
Definition: optix_device_impl.h:1159
static __forceinline__ __device__ unsigned int optixGetPayload_8()
Definition: optix_device_impl.h:1068
static __forceinline__ __device__ float optixGetCurveParameter()
Definition: optix_device_impl.h:2009
static __forceinline__ __device__ unsigned int optixGetPayload_19()
Definition: optix_device_impl.h:1145
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_4()
Definition: optix_device_impl.h:2168
static __forceinline__ __device__ float3 optixTransformVectorFromWorldToObjectSpace(float3 vec)
Definition: optix_device_impl.h:1589
static __forceinline__ __device__ void optixSetPayload_15(unsigned int p)
Definition: optix_device_impl.h:927
static __forceinline__ __device__ bool optixIsTriangleFrontFaceHit()
Definition: optix_device_impl.h:1984
static __forceinline__ __device__ unsigned int optixGetPayload_0()
Definition: optix_device_impl.h:1012
static __forceinline__ __device__ float3 optixTransformPointFromWorldToObjectSpace(float3 point)
Definition: optix_device_impl.h:1579
static __forceinline__ __device__ unsigned int optixGetAttribute_2()
Definition: optix_device_impl.h:1867
static __forceinline__ __device__ unsigned int optixGetHitKind()
Definition: optix_device_impl.h:1937
static __forceinline__ __device__ unsigned int optixGetPayload_28()
Definition: optix_device_impl.h:1208
static __forceinline__ __device__ unsigned int optixGetPayload_7()
Definition: optix_device_impl.h:1061
static __forceinline__ __device__ void optixGetTriangleVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float3 data[3])
Definition: optix_device_impl.h:1329
static __forceinline__ __device__ float optixGetGASMotionTimeEnd(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1495
static __forceinline__ __device__ float optixGetRayTmin()
Definition: optix_device_impl.h:1284
static __forceinline__ __device__ void optixReorder(unsigned int coherenceHint, unsigned int numCoherenceHintBits)
Definition: optix_device_impl.h:257
static __forceinline__ __device__ float optixGetRayTime()
Definition: optix_device_impl.h:1298
static __forceinline__ __device__ void optixSetPayload_31(unsigned int p)
Definition: optix_device_impl.h:1007
static __forceinline__ __device__ unsigned int optixGetPayload_16()
Definition: optix_device_impl.h:1124
static __forceinline__ __device__ OptixTransformType optixGetTransformTypeFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1653
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:361
static __forceinline__ __device__ const float4 * optixGetInstanceInverseTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1702
static __forceinline__ __device__ unsigned int optixGetPayload_12()
Definition: optix_device_impl.h:1096
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_5()
Definition: optix_device_impl.h:2173
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_7()
Definition: optix_device_impl.h:816
static __forceinline__ __device__ unsigned int optixGetPayload_29()
Definition: optix_device_impl.h:1215
static __forceinline__ __device__ OptixTraversableHandle optixGetInstanceChildFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1688
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_3()
Definition: optix_device_impl.h:2163
Definition: optix_device_impl.h:45