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
40#include <initializer_list>
49template <
typename... Payload>
57 unsigned int rayFlags,
58 unsigned int SBToffset,
59 unsigned int SBTstride,
60 unsigned int missSBTIndex,
63 static_assert(
sizeof...( Payload ) <= 32,
"Only up to 32 payload values are allowed." );
69 "All payload parameters need to be unsigned int." );
73 float ox = rayOrigin.x, oy = rayOrigin.y, oz = rayOrigin.z;
74 float dx = rayDirection.x, dy = rayDirection.y, dz = rayDirection.z;
75 unsigned int p[33] = { 0, payload... };
76 int payloadSize = (int)
sizeof...( Payload );
79 "(%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,%"
81 "_optix_trace_typed_32,"
82 "(%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,%"
83 "59,%60,%61,%62,%63,%64,%65,%66,%67,%68,%69,%70,%71,%72,%73,%74,%75,%76,%77,%78,%79,%80);"
84 :
"=r"( p[1] ),
"=r"( p[2] ),
"=r"( p[3] ),
"=r"( p[4] ),
"=r"( p[5] ),
"=r"( p[6] ),
"=r"( p[7] ),
85 "=r"( p[8] ),
"=r"( p[9] ),
"=r"( p[10] ),
"=r"( p[11] ),
"=r"( p[12] ),
"=r"( p[13] ),
"=r"( p[14] ),
86 "=r"( p[15] ),
"=r"( p[16] ),
"=r"( p[17] ),
"=r"( p[18] ),
"=r"( p[19] ),
"=r"( p[20] ),
"=r"( p[21] ),
87 "=r"( p[22] ),
"=r"( p[23] ),
"=r"( p[24] ),
"=r"( p[25] ),
"=r"( p[26] ),
"=r"( p[27] ),
"=r"( p[28] ),
88 "=r"( p[29] ),
"=r"( p[30] ),
"=r"( p[31] ),
"=r"( p[32] )
89 :
"r"( type ),
"l"( handle ),
"f"( ox ),
"f"( oy ),
"f"( oz ),
"f"( dx ),
"f"( dy ),
"f"( dz ),
"f"( tmin ),
90 "f"( tmax ),
"f"( rayTime ),
"r"( visibilityMask ),
"r"( rayFlags ),
"r"( SBToffset ),
"r"( SBTstride ),
91 "r"( missSBTIndex ),
"r"( payloadSize ),
"r"( p[1] ),
"r"( p[2] ),
"r"( p[3] ),
"r"( p[4] ),
"r"( p[5] ),
92 "r"( p[6] ),
"r"( p[7] ),
"r"( p[8] ),
"r"( p[9] ),
"r"( p[10] ),
"r"( p[11] ),
"r"( p[12] ),
"r"( p[13] ),
93 "r"( p[14] ),
"r"( p[15] ),
"r"( p[16] ),
"r"( p[17] ),
"r"( p[18] ),
"r"( p[19] ),
"r"( p[20] ),
94 "r"( p[21] ),
"r"( p[22] ),
"r"( p[23] ),
"r"( p[24] ),
"r"( p[25] ),
"r"( p[26] ),
"r"( p[27] ),
95 "r"( p[28] ),
"r"( p[29] ),
"r"( p[30] ),
"r"( p[31] ),
"r"( p[32] )
97 unsigned int index = 1;
98 (void)std::initializer_list<unsigned int>{index, ( payload = p[index++] )...};
102template <
typename... Payload>
111 unsigned int rayFlags,
112 unsigned int SBToffset,
113 unsigned int SBTstride,
114 unsigned int missSBTIndex,
115 Payload&... payload )
120 static_assert(
sizeof...( Payload ) <= 32,
"Only up to 32 payload values are allowed." );
121#ifndef __CUDACC_RTC__
123 "All payload parameters need to be unsigned int." );
126 float ox = rayOrigin.x, oy = rayOrigin.y, oz = rayOrigin.z;
127 float dx = rayDirection.x, dy = rayDirection.y, dz = rayDirection.z;
128 unsigned int p[33] = {0, payload...};
129 int payloadSize = (int)
sizeof...( Payload );
133 "(%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,%"
135 "_optix_trace_typed_32,"
136 "(%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,%"
137 "59,%60,%61,%62,%63,%64,%65,%66,%67,%68,%69,%70,%71,%72,%73,%74,%75,%76,%77,%78,%79,%80);"
138 :
"=r"( p[1] ),
"=r"( p[2] ),
"=r"( p[3] ),
"=r"( p[4] ),
"=r"( p[5] ),
"=r"( p[6] ),
"=r"( p[7] ),
139 "=r"( p[8] ),
"=r"( p[9] ),
"=r"( p[10] ),
"=r"( p[11] ),
"=r"( p[12] ),
"=r"( p[13] ),
"=r"( p[14] ),
140 "=r"( p[15] ),
"=r"( p[16] ),
"=r"( p[17] ),
"=r"( p[18] ),
"=r"( p[19] ),
"=r"( p[20] ),
"=r"( p[21] ),
141 "=r"( p[22] ),
"=r"( p[23] ),
"=r"( p[24] ),
"=r"( p[25] ),
"=r"( p[26] ),
"=r"( p[27] ),
"=r"( p[28] ),
142 "=r"( p[29] ),
"=r"( p[30] ),
"=r"( p[31] ),
"=r"( p[32] )
143 :
"r"( type ),
"l"( handle ),
"f"( ox ),
"f"( oy ),
"f"( oz ),
"f"( dx ),
"f"( dy ),
"f"( dz ),
"f"( tmin ),
144 "f"( tmax ),
"f"( rayTime ),
"r"( visibilityMask ),
"r"( rayFlags ),
"r"( SBToffset ),
"r"( SBTstride ),
145 "r"( missSBTIndex ),
"r"( payloadSize ),
"r"( p[1] ),
"r"( p[2] ),
"r"( p[3] ),
"r"( p[4] ),
"r"( p[5] ),
146 "r"( p[6] ),
"r"( p[7] ),
"r"( p[8] ),
"r"( p[9] ),
"r"( p[10] ),
"r"( p[11] ),
"r"( p[12] ),
"r"( p[13] ),
147 "r"( p[14] ),
"r"( p[15] ),
"r"( p[16] ),
"r"( p[17] ),
"r"( p[18] ),
"r"( p[19] ),
"r"( p[20] ),
148 "r"( p[21] ),
"r"( p[22] ),
"r"( p[23] ),
"r"( p[24] ),
"r"( p[25] ),
"r"( p[26] ),
"r"( p[27] ),
149 "r"( p[28] ),
"r"( p[29] ),
"r"( p[30] ),
"r"( p[31] ),
"r"( p[32] )
151 unsigned int index = 1;
152 (void)std::initializer_list<unsigned int>{index, ( payload = p[index++] )...};
158 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 0 ),
"r"( p ) : );
163 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 1 ),
"r"( p ) : );
168 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 2 ),
"r"( p ) : );
173 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 3 ),
"r"( p ) : );
178 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 4 ),
"r"( p ) : );
183 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 5 ),
"r"( p ) : );
188 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 6 ),
"r"( p ) : );
193 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 7 ),
"r"( p ) : );
198 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 8 ),
"r"( p ) : );
203 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 9 ),
"r"( p ) : );
208 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 10 ),
"r"( p ) : );
213 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 11 ),
"r"( p ) : );
218 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 12 ),
"r"( p ) : );
223 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 13 ),
"r"( p ) : );
228 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 14 ),
"r"( p ) : );
233 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 15 ),
"r"( p ) : );
238 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 16 ),
"r"( p ) : );
243 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 17 ),
"r"( p ) : );
248 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 18 ),
"r"( p ) : );
253 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 19 ),
"r"( p ) : );
258 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 20 ),
"r"( p ) : );
263 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 21 ),
"r"( p ) : );
268 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 22 ),
"r"( p ) : );
273 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 23 ),
"r"( p ) : );
278 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 24 ),
"r"( p ) : );
283 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 25 ),
"r"( p ) : );
288 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 26 ),
"r"( p ) : );
293 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 27 ),
"r"( p ) : );
298 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 28 ),
"r"( p ) : );
303 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 29 ),
"r"( p ) : );
308 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 30 ),
"r"( p ) : );
313 asm volatile(
"call _optix_set_payload, (%0, %1);" : :
"r"( 31 ),
"r"( p ) : );
319 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 0 ) : );
326 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 1 ) : );
333 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 2 ) : );
340 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 3 ) : );
347 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 4 ) : );
354 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 5 ) : );
361 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 6 ) : );
368 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 7 ) : );
375 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 8 ) : );
382 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 9 ) : );
389 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 10 ) : );
396 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 11 ) : );
403 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 12 ) : );
410 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 13 ) : );
417 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 14 ) : );
424 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 15 ) : );
431 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 16 ) : );
438 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 17 ) : );
445 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 18 ) : );
452 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 19 ) : );
459 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 20 ) : );
466 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 21 ) : );
473 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 22 ) : );
480 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 23 ) : );
487 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 24 ) : );
494 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 25 ) : );
501 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 26 ) : );
508 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 27 ) : );
515 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 28 ) : );
522 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 29 ) : );
529 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 30 ) : );
536 asm volatile(
"call (%0), _optix_get_payload, (%1);" :
"=r"( result ) :
"r"( 31 ) : );
542 asm volatile(
"call _optix_set_payload_types, (%0);" : :
"r"( types ) : );
548 asm(
"call (%0), _optix_undef_value, ();" :
"=r"( u0 ) : );
555 asm(
"call (%0), _optix_get_world_ray_origin_x, ();" :
"=f"( f0 ) : );
556 asm(
"call (%0), _optix_get_world_ray_origin_y, ();" :
"=f"( f1 ) : );
557 asm(
"call (%0), _optix_get_world_ray_origin_z, ();" :
"=f"( f2 ) : );
558 return make_float3( f0, f1, f2 );
564 asm(
"call (%0), _optix_get_world_ray_direction_x, ();" :
"=f"( f0 ) : );
565 asm(
"call (%0), _optix_get_world_ray_direction_y, ();" :
"=f"( f1 ) : );
566 asm(
"call (%0), _optix_get_world_ray_direction_z, ();" :
"=f"( f2 ) : );
567 return make_float3( f0, f1, f2 );
573 asm(
"call (%0), _optix_get_object_ray_origin_x, ();" :
"=f"( f0 ) : );
574 asm(
"call (%0), _optix_get_object_ray_origin_y, ();" :
"=f"( f1 ) : );
575 asm(
"call (%0), _optix_get_object_ray_origin_z, ();" :
"=f"( f2 ) : );
576 return make_float3( f0, f1, f2 );
582 asm(
"call (%0), _optix_get_object_ray_direction_x, ();" :
"=f"( f0 ) : );
583 asm(
"call (%0), _optix_get_object_ray_direction_y, ();" :
"=f"( f1 ) : );
584 asm(
"call (%0), _optix_get_object_ray_direction_z, ();" :
"=f"( f2 ) : );
585 return make_float3( f0, f1, f2 );
591 asm(
"call (%0), _optix_get_ray_tmin, ();" :
"=f"( f0 ) : );
598 asm(
"call (%0), _optix_get_ray_tmax, ();" :
"=f"( f0 ) : );
605 asm(
"call (%0), _optix_get_ray_time, ();" :
"=f"( f0 ) : );
612 asm(
"call (%0), _optix_get_ray_flags, ();" :
"=r"( u0 ) : );
619 asm(
"call (%0), _optix_get_ray_visibility_mask, ();" :
"=r"( u0 ) : );
624 unsigned int instIdx )
626 unsigned long long handle;
627 asm(
"call (%0), _optix_get_instance_traversable_from_ias, (%1, %2);"
628 :
"=l"( handle ) :
"l"( ias ),
"r"( instIdx ) );
634 unsigned int primIdx,
635 unsigned int sbtGASIndex,
639 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8), _optix_get_triangle_vertex_data, "
640 "(%9, %10, %11, %12);"
641 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[1].x ),
"=f"( data[1].y ),
642 "=f"( data[1].z ),
"=f"( data[2].x ),
"=f"( data[2].y ),
"=f"( data[2].z )
643 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
649 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8), _optix_get_microtriangle_vertex_data, "
651 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[1].x ),
"=f"( data[1].y ),
652 "=f"( data[1].z ),
"=f"( data[2].x ),
"=f"( data[2].y ),
"=f"( data[2].z )
657 asm(
"call (%0, %1, %2, %3, %4, %5), _optix_get_microtriangle_barycentrics_data, "
659 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[1].x ),
"=f"( data[1].y ),
"=f"( data[2].x ),
"=f"( data[2].y )
664 unsigned int primIdx,
665 unsigned int sbtGASIndex,
669 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7), _optix_get_linear_curve_vertex_data, "
670 "(%8, %9, %10, %11);"
671 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w ),
672 "=f"( data[1].x ),
"=f"( data[1].y ),
"=f"( data[1].z ),
"=f"( data[1].w )
673 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
678 unsigned int primIdx,
679 unsigned int sbtGASIndex,
683 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11), _optix_get_quadratic_bspline_vertex_data, "
684 "(%12, %13, %14, %15);"
685 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w ),
686 "=f"( data[1].x ),
"=f"( data[1].y ),
"=f"( data[1].z ),
"=f"( data[1].w ),
687 "=f"( data[2].x ),
"=f"( data[2].y ),
"=f"( data[2].z ),
"=f"( data[2].w )
688 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
693 unsigned int primIdx,
694 unsigned int sbtGASIndex,
698 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15), "
699 "_optix_get_cubic_bspline_vertex_data, "
700 "(%16, %17, %18, %19);"
701 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w ),
702 "=f"( data[1].x ),
"=f"( data[1].y ),
"=f"( data[1].z ),
"=f"( data[1].w ),
703 "=f"( data[2].x ),
"=f"( data[2].y ),
"=f"( data[2].z ),
"=f"( data[2].w ),
704 "=f"( data[3].x ),
"=f"( data[3].y ),
"=f"( data[3].z ),
"=f"( data[3].w )
705 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
710 unsigned int primIdx,
711 unsigned int sbtGASIndex,
715 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15), "
716 "_optix_get_catmullrom_vertex_data, "
717 "(%16, %17, %18, %19);"
718 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w ),
"=f"( data[1].x ),
719 "=f"( data[1].y ),
"=f"( data[1].z ),
"=f"( data[1].w ),
"=f"( data[2].x ),
"=f"( data[2].y ),
720 "=f"( data[2].z ),
"=f"( data[2].w ),
"=f"( data[3].x ),
"=f"( data[3].y ),
"=f"( data[3].z ),
"=f"( data[3].w )
721 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
726 unsigned int primIdx,
727 unsigned int sbtGASIndex,
731 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15), "
732 "_optix_get_cubic_bezier_vertex_data, "
733 "(%16, %17, %18, %19);"
734 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w ),
"=f"( data[1].x ),
735 "=f"( data[1].y ),
"=f"( data[1].z ),
"=f"( data[1].w ),
"=f"( data[2].x ),
"=f"( data[2].y ),
736 "=f"( data[2].z ),
"=f"( data[2].w ),
"=f"( data[3].x ),
"=f"( data[3].y ),
"=f"( data[3].z ),
"=f"( data[3].w )
737 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
742 unsigned int primIdx,
743 unsigned int sbtGASIndex,
747 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11), _optix_get_ribbon_vertex_data, "
748 "(%12, %13, %14, %15);"
749 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w ),
"=f"( data[1].x ),
"=f"( data[1].y ),
750 "=f"( data[1].z ),
"=f"( data[1].w ),
"=f"( data[2].x ),
"=f"( data[2].y ),
"=f"( data[2].z ),
"=f"( data[2].w )
751 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
756 unsigned int primIdx,
757 unsigned int sbtGASIndex,
759 float2 ribbonParameters )
762 asm(
"call (%0, %1, %2), _optix_get_ribbon_normal, "
763 "(%3, %4, %5, %6, %7, %8);"
764 :
"=f"( normal.x ),
"=f"( normal.y ),
"=f"( normal.z )
765 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time ),
766 "f"( ribbonParameters.x ),
"f"( ribbonParameters.y )
772 unsigned int primIdx,
773 unsigned int sbtGASIndex,
777 asm(
"call (%0, %1, %2, %3), "
778 "_optix_get_sphere_data, "
780 :
"=f"( data[0].x ),
"=f"( data[0].y ),
"=f"( data[0].z ),
"=f"( data[0].w )
781 :
"l"( gas ),
"r"( primIdx ),
"r"( sbtGASIndex ),
"f"( time )
787 unsigned long long handle;
788 asm(
"call (%0), _optix_get_gas_traversable_handle, ();" :
"=l"( handle ) : );
795 asm(
"call (%0), _optix_get_gas_motion_time_begin, (%1);" :
"=f"( f0 ) :
"l"( handle ) : );
802 asm(
"call (%0), _optix_get_gas_motion_time_end, (%1);" :
"=f"( f0 ) :
"l"( handle ) : );
809 asm(
"call (%0), _optix_get_gas_motion_step_count, (%1);" :
"=r"( u0 ) :
"l"( handle ) : );
946 asm(
"call (%0), _optix_get_transform_list_size, ();" :
"=r"( u0 ) : );
952 unsigned long long u0;
953 asm(
"call (%0), _optix_get_transform_list_handle, (%1);" :
"=l"( u0 ) :
"r"( index ) : );
960 asm(
"call (%0), _optix_get_transform_type_from_handle, (%1);" :
"=r"( i0 ) :
"l"( handle ) : );
966 unsigned long long ptr;
967 asm(
"call (%0), _optix_get_static_transform_from_handle, (%1);" :
"=l"( ptr ) :
"l"( handle ) : );
973 unsigned long long ptr;
974 asm(
"call (%0), _optix_get_srt_motion_transform_from_handle, (%1);" :
"=l"( ptr ) :
"l"( handle ) : );
980 unsigned long long ptr;
981 asm(
"call (%0), _optix_get_matrix_motion_transform_from_handle, (%1);" :
"=l"( ptr ) :
"l"( handle ) : );
988 asm(
"call (%0), _optix_get_instance_id_from_handle, (%1);" :
"=r"( i0 ) :
"l"( handle ) : );
994 unsigned long long i0;
995 asm(
"call (%0), _optix_get_instance_child_from_handle, (%1);" :
"=l"( i0 ) :
"l"( handle ) : );
1001 unsigned long long ptr;
1002 asm(
"call (%0), _optix_get_instance_transform_from_handle, (%1);" :
"=l"( ptr ) :
"l"( handle ) : );
1003 return (
const float4*)ptr;
1008 unsigned long long ptr;
1009 asm(
"call (%0), _optix_get_instance_inverse_transform_from_handle, (%1);" :
"=l"( ptr ) :
"l"( handle ) : );
1010 return (
const float4*)ptr;
1017 "call (%0), _optix_report_intersection_0"
1020 :
"f"( hitT ),
"r"( hitKind )
1029 "call (%0), _optix_report_intersection_1"
1032 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 )
1037static __forceinline__ __device__
bool optixReportIntersection(
float hitT,
unsigned int hitKind,
unsigned int a0,
unsigned int a1 )
1041 "call (%0), _optix_report_intersection_2"
1042 ", (%1, %2, %3, %4);"
1044 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 )
1049static __forceinline__ __device__
bool optixReportIntersection(
float hitT,
unsigned int hitKind,
unsigned int a0,
unsigned int a1,
unsigned int a2 )
1053 "call (%0), _optix_report_intersection_3"
1054 ", (%1, %2, %3, %4, %5);"
1056 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 ),
"r"( a2 )
1062 unsigned int hitKind,
1070 "call (%0), _optix_report_intersection_4"
1071 ", (%1, %2, %3, %4, %5, %6);"
1073 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 ),
"r"( a2 ),
"r"( a3 )
1079 unsigned int hitKind,
1088 "call (%0), _optix_report_intersection_5"
1089 ", (%1, %2, %3, %4, %5, %6, %7);"
1091 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 ),
"r"( a2 ),
"r"( a3 ),
"r"( a4 )
1097 unsigned int hitKind,
1107 "call (%0), _optix_report_intersection_6"
1108 ", (%1, %2, %3, %4, %5, %6, %7, %8);"
1110 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 ),
"r"( a2 ),
"r"( a3 ),
"r"( a4 ),
"r"( a5 )
1116 unsigned int hitKind,
1127 "call (%0), _optix_report_intersection_7"
1128 ", (%1, %2, %3, %4, %5, %6, %7, %8, %9);"
1130 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 ),
"r"( a2 ),
"r"( a3 ),
"r"( a4 ),
"r"( a5 ),
"r"( a6 )
1136 unsigned int hitKind,
1148 "call (%0), _optix_report_intersection_8"
1149 ", (%1, %2, %3, %4, %5, %6, %7, %8, %9, %10);"
1151 :
"f"( hitT ),
"r"( hitKind ),
"r"( a0 ),
"r"( a1 ),
"r"( a2 ),
"r"( a3 ),
"r"( a4 ),
"r"( a5 ),
"r"( a6 ),
"r"( a7 )
1156#define OPTIX_DEFINE_optixGetAttribute_BODY( which ) \
1158 asm( "call (%0), _optix_get_attribute_" #which ", ();" : "=r"( ret ) : ); \
1201#undef OPTIX_DEFINE_optixGetAttribute_BODY
1205 asm volatile(
"call _optix_terminate_ray, ();" );
1210 asm volatile(
"call _optix_ignore_intersection, ();" );
1216 asm(
"call (%0), _optix_read_primitive_idx, ();" :
"=r"( u0 ) : );
1223 asm(
"call (%0), _optix_read_sbt_gas_idx, ();" :
"=r"( u0 ) : );
1230 asm(
"call (%0), _optix_read_instance_id, ();" :
"=r"( u0 ) : );
1237 asm(
"call (%0), _optix_read_instance_idx, ();" :
"=r"( u0 ) : );
1244 asm(
"call (%0), _optix_get_hit_kind, ();" :
"=r"( u0 ) : );
1251 asm(
"call (%0), _optix_get_primitive_type_from_hit_kind, (%1);" :
"=r"( u0 ) :
"r"( hitKind ) );
1258 asm(
"call (%0), _optix_get_backface_from_hit_kind, (%1);" :
"=r"( u0 ) :
"r"( hitKind ) );
1316 asm(
"call (%0), _optix_get_curve_parameter, ();" :
"=f"(f0) : );
1323 asm(
"call (%0, %1), _optix_get_ribbon_parameters, ();" :
"=f"( f0 ),
"=f"( f1 ) : );
1324 return make_float2( f0, f1 );
1330 asm(
"call (%0, %1), _optix_get_triangle_barycentrics, ();" :
"=f"( f0 ),
"=f"( f1 ) : );
1331 return make_float2( f0, f1 );
1336 unsigned int u0, u1, u2;
1337 asm(
"call (%0), _optix_get_launch_index_x, ();" :
"=r"( u0 ) : );
1338 asm(
"call (%0), _optix_get_launch_index_y, ();" :
"=r"( u1 ) : );
1339 asm(
"call (%0), _optix_get_launch_index_z, ();" :
"=r"( u2 ) : );
1340 return make_uint3( u0, u1, u2 );
1345 unsigned int u0, u1, u2;
1346 asm(
"call (%0), _optix_get_launch_dimension_x, ();" :
"=r"( u0 ) : );
1347 asm(
"call (%0), _optix_get_launch_dimension_y, ();" :
"=r"( u1 ) : );
1348 asm(
"call (%0), _optix_get_launch_dimension_z, ();" :
"=r"( u2 ) : );
1349 return make_uint3( u0, u1, u2 );
1354 unsigned long long ptr;
1355 asm(
"call (%0), _optix_get_sbt_data_ptr_64, ();" :
"=l"( ptr ) : );
1362 "call _optix_throw_exception_0, (%0);"
1364 :
"r"( exceptionCode )
1371 "call _optix_throw_exception_1, (%0, %1);"
1373 :
"r"( exceptionCode ),
"r"( exceptionDetail0 )
1377static __forceinline__ __device__
void optixThrowException(
int exceptionCode,
unsigned int exceptionDetail0,
unsigned int exceptionDetail1 )
1380 "call _optix_throw_exception_2, (%0, %1, %2);"
1382 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 )
1386static __forceinline__ __device__
void optixThrowException(
int exceptionCode,
unsigned int exceptionDetail0,
unsigned int exceptionDetail1,
unsigned int exceptionDetail2 )
1389 "call _optix_throw_exception_3, (%0, %1, %2, %3);"
1391 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 ),
"r"( exceptionDetail2 )
1395static __forceinline__ __device__
void optixThrowException(
int exceptionCode,
unsigned int exceptionDetail0,
unsigned int exceptionDetail1,
unsigned int exceptionDetail2,
unsigned int exceptionDetail3 )
1398 "call _optix_throw_exception_4, (%0, %1, %2, %3, %4);"
1400 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 ),
"r"( exceptionDetail2 ),
"r"( exceptionDetail3 )
1404static __forceinline__ __device__
void optixThrowException(
int exceptionCode,
unsigned int exceptionDetail0,
unsigned int exceptionDetail1,
unsigned int exceptionDetail2,
unsigned int exceptionDetail3,
unsigned int exceptionDetail4 )
1407 "call _optix_throw_exception_5, (%0, %1, %2, %3, %4, %5);"
1409 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 ),
"r"( exceptionDetail2 ),
"r"( exceptionDetail3 ),
"r"( exceptionDetail4 )
1413static __forceinline__ __device__
void optixThrowException(
int exceptionCode,
unsigned int exceptionDetail0,
unsigned int exceptionDetail1,
unsigned int exceptionDetail2,
unsigned int exceptionDetail3,
unsigned int exceptionDetail4,
unsigned int exceptionDetail5 )
1416 "call _optix_throw_exception_6, (%0, %1, %2, %3, %4, %5, %6);"
1418 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 ),
"r"( exceptionDetail2 ),
"r"( exceptionDetail3 ),
"r"( exceptionDetail4 ),
"r"( exceptionDetail5 )
1422static __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 )
1425 "call _optix_throw_exception_7, (%0, %1, %2, %3, %4, %5, %6, %7);"
1427 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 ),
"r"( exceptionDetail2 ),
"r"( exceptionDetail3 ),
"r"( exceptionDetail4 ),
"r"( exceptionDetail5 ),
"r"( exceptionDetail6 )
1431static __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 )
1434 "call _optix_throw_exception_8, (%0, %1, %2, %3, %4, %5, %6, %7, %8);"
1436 :
"r"( exceptionCode ),
"r"( exceptionDetail0 ),
"r"( exceptionDetail1 ),
"r"( exceptionDetail2 ),
"r"( exceptionDetail3 ),
"r"( exceptionDetail4 ),
"r"( exceptionDetail5 ),
"r"( exceptionDetail6 ),
"r"( exceptionDetail7 )
1443 asm(
"call (%0), _optix_get_exception_code, ();" :
"=r"( s0 ) : );
1447#define OPTIX_DEFINE_optixGetExceptionDetail_BODY( which ) \
1449 asm( "call (%0), _optix_get_exception_detail_" #which ", ();" : "=r"( ret ) : ); \
1492#undef OPTIX_DEFINE_optixGetExceptionDetail_BODY
1496 unsigned long long handle;
1497 asm(
"call (%0), _optix_get_exception_invalid_traversable, ();" :
"=l"( handle ) : );
1504 asm(
"call (%0), _optix_get_exception_invalid_sbt_offset, ();" :
"=r"( s0 ) : );
1510 float rayOriginX, rayOriginY, rayOriginZ, rayDirectionX, rayDirectionY, rayDirectionZ, tmin, tmax, rayTime;
1511 asm(
"call (%0, %1, %2, %3, %4, %5, %6, %7, %8), _optix_get_exception_invalid_ray, ();"
1512 :
"=f"( rayOriginX ),
"=f"( rayOriginY ),
"=f"( rayOriginZ ),
"=f"( rayDirectionX ),
"=f"( rayDirectionY ),
1513 "=f"( rayDirectionZ ),
"=f"( tmin ),
"=f"( tmax ),
"=f"( rayTime )
1515 OptixInvalidRayExceptionDetails ray;
1516 ray.origin = make_float3( rayOriginX, rayOriginY, rayOriginZ );
1517 ray.direction = make_float3( rayDirectionX, rayDirectionY, rayDirectionZ );
1526 unsigned int expected, actual, sbtIdx;
1527 unsigned long long calleeName;
1529 "call (%0, %1, %2, %3), _optix_get_exception_parameter_mismatch, ();"
1530 :
"=r"(expected),
"=r"(actual),
"=r"(sbtIdx),
"=l"(calleeName) : );
1531 OptixParameterMismatchExceptionDetails details;
1532 details.expectedParameterCount = expected;
1533 details.passedArgumentCount = actual;
1534 details.sbtIndex = sbtIdx;
1535 details.callableName = (
char*)calleeName;
1541 unsigned long long ptr;
1542 asm(
"call (%0), _optix_get_exception_line_info, ();" :
"=l"(ptr) : );
1546template <
typename ReturnT,
typename... ArgTypes>
1547static __forceinline__ __device__ ReturnT
optixDirectCall(
unsigned int sbtIndex, ArgTypes... args )
1549 unsigned long long func;
1550 asm(
"call (%0), _optix_call_direct_callable,(%1);" :
"=l"( func ) :
"r"( sbtIndex ) : );
1551 using funcT = ReturnT ( * )( ArgTypes... );
1552 funcT call = ( funcT )( func );
1553 return call( args... );
1556template <
typename ReturnT,
typename... ArgTypes>
1559 unsigned long long func;
1560 asm(
"call (%0), _optix_call_continuation_callable,(%1);" :
"=l"( func ) :
"r"( sbtIndex ) : );
1561 using funcT = ReturnT ( * )( ArgTypes... );
1562 funcT call = ( funcT )( func );
1563 return call( args... );
1566static __forceinline__ __device__ uint4
optixTexFootprint2D(
unsigned long long tex,
unsigned int texInfo,
float x,
float y,
unsigned int* singleMipLevel )
1569 unsigned long long resultPtr =
reinterpret_cast<unsigned long long>( &result );
1570 unsigned long long singleMipLevelPtr =
reinterpret_cast<unsigned long long>( singleMipLevel );
1573 "call _optix_tex_footprint_2d_v2"
1574 ", (%0, %1, %2, %3, %4, %5);"
1576 :
"l"( tex ),
"r"( texInfo ),
"r"( __float_as_uint( x ) ),
"r"( __float_as_uint( y ) ),
1577 "l"( singleMipLevelPtr ),
"l"( resultPtr )
1583 unsigned int texInfo,
1591 unsigned int* singleMipLevel )
1594 unsigned long long resultPtr =
reinterpret_cast<unsigned long long>( &result );
1595 unsigned long long singleMipLevelPtr =
reinterpret_cast<unsigned long long>( singleMipLevel );
1598 "call _optix_tex_footprint_2d_grad_v2"
1599 ", (%0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10);"
1601 :
"l"( tex ),
"r"( texInfo ),
"r"( __float_as_uint( x ) ),
"r"( __float_as_uint( y ) ),
1602 "r"( __float_as_uint( dPdx_x ) ),
"r"( __float_as_uint( dPdx_y ) ),
"r"( __float_as_uint( dPdy_x ) ),
1603 "r"( __float_as_uint( dPdy_y ) ),
"r"(
static_cast<unsigned int>( coarse ) ),
"l"( singleMipLevelPtr ),
"l"( resultPtr )
1609static __forceinline__ __device__ uint4
1610optixTexFootprint2DLod(
unsigned long long tex,
unsigned int texInfo,
float x,
float y,
float level,
bool coarse,
unsigned int* singleMipLevel )
1613 unsigned long long resultPtr =
reinterpret_cast<unsigned long long>( &result );
1614 unsigned long long singleMipLevelPtr =
reinterpret_cast<unsigned long long>( singleMipLevel );
1617 "call _optix_tex_footprint_2d_lod_v2"
1618 ", (%0, %1, %2, %3, %4, %5, %6, %7);"
1620 :
"l"( tex ),
"r"( texInfo ),
"r"( __float_as_uint( x ) ),
"r"( __float_as_uint( y ) ),
1621 "r"( __float_as_uint( level ) ),
"r"(
static_cast<unsigned int>( coarse ) ),
"l"( singleMipLevelPtr ),
"l"( resultPtr )
OptixTransformType
Transform.
Definition: optix_types.h:1831
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:708
OptixPayloadTypeID
Payload type identifiers.
Definition: optix_types.h:1958
@ OPTIX_HIT_KIND_TRIANGLE_BACK_FACE
Ray hit the triangle on the back face.
Definition: optix_types.h:323
@ OPTIX_HIT_KIND_TRIANGLE_FRONT_FACE
Ray hit the triangle on the front face.
Definition: optix_types.h:321
@ OPTIX_PRIMITIVE_TYPE_DISPLACED_MICROMESH_TRIANGLE
Triangle with an applied displacement micromap.
Definition: optix_types.h:728
@ OPTIX_PAYLOAD_TYPE_DEFAULT
Definition: optix_types.h:1959
static __forceinline__ __device__ void optixGetObjectToWorldTransformMatrix(float4 &m0, float4 &m1, float4 &m2)
Definition: optix_device_impl_transformations.h:361
static __forceinline__ __device__ float3 optixTransformPoint(const float4 &m0, const float4 &m1, const float4 &m2, const float3 &p)
Definition: optix_device_impl_transformations.h:392
static __forceinline__ __device__ float3 optixTransformVector(const float4 &m0, const float4 &m1, const float4 &m2, const float3 &v)
Definition: optix_device_impl_transformations.h:402
static __forceinline__ __device__ float3 optixTransformNormal(const float4 &m0, const float4 &m1, const float4 &m2, const float3 &n)
Definition: optix_device_impl_transformations.h:413
static __forceinline__ __device__ void optixGetWorldToObjectTransformMatrix(float4 &m0, float4 &m1, float4 &m2)
Definition: optix_device_impl_transformations.h:330
Definition: optix_device_impl.h:44
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_7()
Definition: optix_device_impl.h:1487
static __forceinline__ __device__ ReturnT optixContinuationCall(unsigned int sbtIndex, ArgTypes... args)
Definition: optix_device_impl.h:1557
static __forceinline__ __device__ void optixThrowException(int exceptionCode)
Definition: optix_device_impl.h:1359
static __forceinline__ __device__ unsigned int optixGetPayload_2()
Definition: optix_device_impl.h:330
static __forceinline__ __device__ void optixSetPayload_16(unsigned int p)
Definition: optix_device_impl.h:236
static __forceinline__ __device__ float3 optixTransformNormalFromWorldToObjectSpace(float3 normal)
Definition: optix_device_impl.h:903
static __forceinline__ __device__ unsigned int optixGetPayload_25()
Definition: optix_device_impl.h:491
static __forceinline__ __device__ unsigned int optixGetPayload_1()
Definition: optix_device_impl.h:323
static __forceinline__ __device__ unsigned int optixGetPayload_15()
Definition: optix_device_impl.h:421
static __forceinline__ __device__ OptixTraversableHandle optixGetGASTraversableHandle()
Definition: optix_device_impl.h:785
static __forceinline__ __device__ uint3 optixGetLaunchDimensions()
Definition: optix_device_impl.h:1343
static __forceinline__ __device__ void optixSetPayload_11(unsigned int p)
Definition: optix_device_impl.h:211
static __forceinline__ __device__ void optixSetPayloadTypes(unsigned int types)
Definition: optix_device_impl.h:540
static __forceinline__ __device__ void optixSetPayload_8(unsigned int p)
Definition: optix_device_impl.h:196
static __forceinline__ __device__ void optixSetPayload_5(unsigned int p)
Definition: optix_device_impl.h:181
static __forceinline__ __device__ unsigned int optixGetPayload_9()
Definition: optix_device_impl.h:379
static __forceinline__ __device__ void optixSetPayload_29(unsigned int p)
Definition: optix_device_impl.h:301
static __forceinline__ __device__ void optixSetPayload_14(unsigned int p)
Definition: optix_device_impl.h:226
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_2()
Definition: optix_device_impl.h:1462
static __forceinline__ __device__ unsigned int optixGetGASMotionStepCount(OptixTraversableHandle handle)
Definition: optix_device_impl.h:806
static __forceinline__ __device__ const OptixStaticTransform * optixGetStaticTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:964
static __forceinline__ __device__ void optixSetPayload_19(unsigned int p)
Definition: optix_device_impl.h:251
static __forceinline__ __device__ float3 optixGetWorldRayDirection()
Definition: optix_device_impl.h:561
static __forceinline__ __device__ float3 optixGetObjectRayOrigin()
Definition: optix_device_impl.h:570
static __forceinline__ __device__ OptixParameterMismatchExceptionDetails optixGetExceptionParameterMismatch()
Definition: optix_device_impl.h:1524
static __forceinline__ __device__ bool optixIsFrontFaceHit(unsigned int hitKind)
Definition: optix_device_impl.h:1262
static __forceinline__ __device__ unsigned int optixGetAttribute_4()
Definition: optix_device_impl.h:1181
static __forceinline__ __device__ unsigned int optixGetPayload_4()
Definition: optix_device_impl.h:344
static __forceinline__ __device__ void optixSetPayload_10(unsigned int p)
Definition: optix_device_impl.h:206
static __forceinline__ __device__ unsigned int optixGetPayload_18()
Definition: optix_device_impl.h:442
static __forceinline__ __device__ unsigned int optixGetAttribute_6()
Definition: optix_device_impl.h:1191
static __forceinline__ __device__ unsigned int optixGetAttribute_3()
Definition: optix_device_impl.h:1176
static __forceinline__ __device__ void optixSetPayload_20(unsigned int p)
Definition: optix_device_impl.h:256
static __forceinline__ __device__ void optixSetPayload_4(unsigned int p)
Definition: optix_device_impl.h:176
static __forceinline__ __device__ unsigned int optixGetPayload_5()
Definition: optix_device_impl.h:351
static __forceinline__ __device__ unsigned int optixGetPayload_22()
Definition: optix_device_impl.h:470
static __forceinline__ __device__ bool optixIsTriangleHit()
Definition: optix_device_impl.h:1283
static __forceinline__ __device__ void optixGetCubicBSplineVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[4])
Definition: optix_device_impl.h:692
static __forceinline__ __device__ unsigned int optixGetPayload_27()
Definition: optix_device_impl.h:505
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:1582
static __forceinline__ __device__ void optixSetPayload_6(unsigned int p)
Definition: optix_device_impl.h:186
static __forceinline__ __device__ unsigned int optixGetAttribute_1()
Definition: optix_device_impl.h:1166
static __forceinline__ __device__ bool optixIsTriangleBackFaceHit()
Definition: optix_device_impl.h:1293
static __forceinline__ __device__ unsigned int optixGetAttribute_5()
Definition: optix_device_impl.h:1186
static __forceinline__ __device__ void optixGetRibbonVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[3])
Definition: optix_device_impl.h:741
static __forceinline__ __device__ void optixSetPayload_25(unsigned int p)
Definition: optix_device_impl.h:281
static __forceinline__ __device__ unsigned int optixGetRayFlags()
Definition: optix_device_impl.h:609
static __forceinline__ __device__ float3 optixTransformPointFromObjectToWorldSpace(float3 point)
Definition: optix_device_impl.h:913
static __forceinline__ __device__ unsigned int optixGetPayload_26()
Definition: optix_device_impl.h:498
static __forceinline__ __device__ void optixSetPayload_17(unsigned int p)
Definition: optix_device_impl.h:241
static __forceinline__ __device__ void optixSetPayload_7(unsigned int p)
Definition: optix_device_impl.h:191
static __forceinline__ __device__ ReturnT optixDirectCall(unsigned int sbtIndex, ArgTypes... args)
Definition: optix_device_impl.h:1547
static __forceinline__ __device__ unsigned int optixGetPayload_30()
Definition: optix_device_impl.h:526
static __forceinline__ __device__ void optixSetPayload_28(unsigned int p)
Definition: optix_device_impl.h:296
static __forceinline__ __device__ OptixPrimitiveType optixGetPrimitiveType(unsigned int hitKind)
Definition: optix_device_impl.h:1248
static __forceinline__ __device__ float3 optixTransformVectorFromObjectToWorldSpace(float3 vec)
Definition: optix_device_impl.h:923
static __forceinline__ __device__ unsigned int optixGetInstanceId()
Definition: optix_device_impl.h:1227
static __forceinline__ __device__ char * optixGetExceptionLineInfo()
Definition: optix_device_impl.h:1539
static __forceinline__ __device__ void optixSetPayload_27(unsigned int p)
Definition: optix_device_impl.h:291
static __forceinline__ __device__ void optixSetPayload_2(unsigned int p)
Definition: optix_device_impl.h:166
static __forceinline__ __device__ void optixGetCatmullRomVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[4])
Definition: optix_device_impl.h:709
static __forceinline__ __device__ int optixGetExceptionCode()
Definition: optix_device_impl.h:1440
static __forceinline__ __device__ void optixSetPayload_12(unsigned int p)
Definition: optix_device_impl.h:216
static __forceinline__ __device__ void optixGetObjectToWorldTransformMatrix(float m[12])
Definition: optix_device_impl.h:848
static __forceinline__ __device__ unsigned int optixGetPayload_24()
Definition: optix_device_impl.h:484
static __forceinline__ __device__ unsigned int optixGetPayload_17()
Definition: optix_device_impl.h:435
static __forceinline__ __device__ float optixGetGASMotionTimeBegin(OptixTraversableHandle handle)
Definition: optix_device_impl.h:792
static __forceinline__ __device__ const OptixMatrixMotionTransform * optixGetMatrixMotionTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:978
static __forceinline__ __device__ void optixGetSphereData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[1])
Definition: optix_device_impl.h:771
static __forceinline__ __device__ unsigned int optixGetPayload_13()
Definition: optix_device_impl.h:407
static __forceinline__ __device__ uint4 optixTexFootprint2D(unsigned long long tex, unsigned int texInfo, float x, float y, unsigned int *singleMipLevel)
Definition: optix_device_impl.h:1566
static __forceinline__ __device__ void optixSetPayload_23(unsigned int p)
Definition: optix_device_impl.h:271
static __forceinline__ __device__ unsigned int optixGetAttribute_0()
Definition: optix_device_impl.h:1161
static __forceinline__ __device__ unsigned int optixGetPayload_10()
Definition: optix_device_impl.h:386
static __forceinline__ __device__ void optixGetQuadraticBSplineVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[3])
Definition: optix_device_impl.h:677
static __forceinline__ __device__ uint3 optixGetLaunchIndex()
Definition: optix_device_impl.h:1334
static __forceinline__ __device__ unsigned int optixGetPayload_31()
Definition: optix_device_impl.h:533
static __forceinline__ __device__ void optixSetPayload_24(unsigned int p)
Definition: optix_device_impl.h:276
static __forceinline__ __device__ void optixTerminateRay()
Definition: optix_device_impl.h:1203
static __forceinline__ __device__ OptixTraversableHandle optixGetInstanceTraversableFromIAS(OptixTraversableHandle ias, unsigned int instIdx)
Definition: optix_device_impl.h:623
static __forceinline__ __device__ int optixGetExceptionInvalidSbtOffset()
Definition: optix_device_impl.h:1501
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_6()
Definition: optix_device_impl.h:1482
static __forceinline__ __device__ unsigned int optixGetAttribute_7()
Definition: optix_device_impl.h:1196
static __forceinline__ __device__ unsigned int optixGetRayVisibilityMask()
Definition: optix_device_impl.h:616
static __forceinline__ __device__ void optixSetPayload_30(unsigned int p)
Definition: optix_device_impl.h:306
static __forceinline__ __device__ unsigned int optixGetInstanceIdFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:985
static __forceinline__ __device__ void optixGetLinearCurveVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[2])
Definition: optix_device_impl.h:663
static __forceinline__ __device__ unsigned int optixGetPayload_3()
Definition: optix_device_impl.h:337
static __forceinline__ __device__ bool optixReportIntersection(float hitT, unsigned int hitKind)
Definition: optix_device_impl.h:1013
static __forceinline__ __device__ unsigned int optixGetPayload_23()
Definition: optix_device_impl.h:477
static __forceinline__ __device__ unsigned int optixGetPayload_20()
Definition: optix_device_impl.h:456
static __forceinline__ __device__ OptixTraversableHandle optixGetTransformListHandle(unsigned int index)
Definition: optix_device_impl.h:950
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_0()
Definition: optix_device_impl.h:1452
static __forceinline__ __device__ unsigned int optixUndefinedValue()
Definition: optix_device_impl.h:545
#define OPTIX_DEFINE_optixGetAttribute_BODY(which)
Definition: optix_device_impl.h:1156
static __forceinline__ __device__ float2 optixGetRibbonParameters()
Definition: optix_device_impl.h:1320
static __forceinline__ __device__ void optixIgnoreIntersection()
Definition: optix_device_impl.h:1208
static __forceinline__ __device__ OptixInvalidRayExceptionDetails optixGetExceptionInvalidRay()
Definition: optix_device_impl.h:1508
static __forceinline__ __device__ float optixGetRayTmax()
Definition: optix_device_impl.h:595
static __forceinline__ __device__ float3 optixTransformNormalFromObjectToWorldSpace(float3 normal)
Definition: optix_device_impl.h:933
static __forceinline__ __device__ void optixGetCubicBezierVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[4])
Definition: optix_device_impl.h:725
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_1()
Definition: optix_device_impl.h:1457
static __forceinline__ __device__ float2 optixGetTriangleBarycentrics()
Definition: optix_device_impl.h:1327
static __forceinline__ __device__ float3 optixGetObjectRayDirection()
Definition: optix_device_impl.h:579
static __forceinline__ __device__ unsigned int optixGetPayload_6()
Definition: optix_device_impl.h:358
static __forceinline__ __device__ void optixSetPayload_9(unsigned int p)
Definition: optix_device_impl.h:201
static __forceinline__ __device__ void optixSetPayload_26(unsigned int p)
Definition: optix_device_impl.h:286
static __forceinline__ __device__ unsigned int optixGetPayload_11()
Definition: optix_device_impl.h:393
static __forceinline__ __device__ void optixGetMicroTriangleVertexData(float3 data[3])
Definition: optix_device_impl.h:647
static __forceinline__ __device__ void optixGetWorldToObjectTransformMatrix(float m[12])
Definition: optix_device_impl.h:813
static __forceinline__ __device__ unsigned int optixGetInstanceIndex()
Definition: optix_device_impl.h:1234
static __forceinline__ __device__ bool optixIsDisplacedMicromeshTriangleFrontFaceHit()
Definition: optix_device_impl.h:1303
static __forceinline__ __device__ float3 optixGetWorldRayOrigin()
Definition: optix_device_impl.h:552
static __forceinline__ __device__ void optixSetPayload_22(unsigned int p)
Definition: optix_device_impl.h:266
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:50
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:1610
static __forceinline__ __device__ unsigned int optixGetPrimitiveIndex()
Definition: optix_device_impl.h:1213
static __forceinline__ __device__ const float4 * optixGetInstanceTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:999
static __forceinline__ __device__ void optixSetPayload_3(unsigned int p)
Definition: optix_device_impl.h:171
static __forceinline__ __device__ bool optixIsBackFaceHit(unsigned int hitKind)
Definition: optix_device_impl.h:1255
static __forceinline__ __device__ unsigned int optixGetTransformListSize()
Definition: optix_device_impl.h:943
static __forceinline__ __device__ void optixSetPayload_18(unsigned int p)
Definition: optix_device_impl.h:246
static __forceinline__ __device__ bool optixIsDisplacedMicromeshTriangleHit()
Definition: optix_device_impl.h:1298
static __forceinline__ __device__ unsigned int optixGetSbtGASIndex()
Definition: optix_device_impl.h:1220
static __forceinline__ __device__ void optixSetPayload_21(unsigned int p)
Definition: optix_device_impl.h:261
static __forceinline__ __device__ bool optixIsDisplacedMicromeshTriangleBackFaceHit()
Definition: optix_device_impl.h:1308
static __forceinline__ __device__ void optixSetPayload_0(unsigned int p)
Definition: optix_device_impl.h:156
static __forceinline__ __device__ const OptixSRTMotionTransform * optixGetSRTMotionTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:971
static __forceinline__ __device__ unsigned int optixGetPayload_14()
Definition: optix_device_impl.h:414
static __forceinline__ __device__ CUdeviceptr optixGetSbtDataPointer()
Definition: optix_device_impl.h:1352
static __forceinline__ __device__ float3 optixGetRibbonNormal(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float2 ribbonParameters)
Definition: optix_device_impl.h:755
static __forceinline__ __device__ void optixGetMicroTriangleBarycentricsData(float2 data[3])
Definition: optix_device_impl.h:655
static __forceinline__ __device__ void optixSetPayload_1(unsigned int p)
Definition: optix_device_impl.h:161
static __forceinline__ __device__ void optixSetPayload_13(unsigned int p)
Definition: optix_device_impl.h:221
#define OPTIX_DEFINE_optixGetExceptionDetail_BODY(which)
Definition: optix_device_impl.h:1447
static __forceinline__ __device__ unsigned int optixGetPayload_21()
Definition: optix_device_impl.h:463
static __forceinline__ __device__ unsigned int optixGetPayload_8()
Definition: optix_device_impl.h:372
static __forceinline__ __device__ float optixGetCurveParameter()
Definition: optix_device_impl.h:1313
static __forceinline__ __device__ unsigned int optixGetPayload_19()
Definition: optix_device_impl.h:449
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_4()
Definition: optix_device_impl.h:1472
static __forceinline__ __device__ float3 optixTransformVectorFromWorldToObjectSpace(float3 vec)
Definition: optix_device_impl.h:893
static __forceinline__ __device__ void optixSetPayload_15(unsigned int p)
Definition: optix_device_impl.h:231
static __forceinline__ __device__ bool optixIsTriangleFrontFaceHit()
Definition: optix_device_impl.h:1288
static __forceinline__ __device__ unsigned int optixGetPayload_0()
Definition: optix_device_impl.h:316
static __forceinline__ __device__ float3 optixTransformPointFromWorldToObjectSpace(float3 point)
Definition: optix_device_impl.h:883
static __forceinline__ __device__ OptixTraversableHandle optixGetExceptionInvalidTraversable()
Definition: optix_device_impl.h:1494
static __forceinline__ __device__ unsigned int optixGetAttribute_2()
Definition: optix_device_impl.h:1171
static __forceinline__ __device__ unsigned int optixGetHitKind()
Definition: optix_device_impl.h:1241
static __forceinline__ __device__ unsigned int optixGetPayload_28()
Definition: optix_device_impl.h:512
static __forceinline__ __device__ unsigned int optixGetPayload_7()
Definition: optix_device_impl.h:365
static __forceinline__ __device__ void optixGetTriangleVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float3 data[3])
Definition: optix_device_impl.h:633
static __forceinline__ __device__ float optixGetGASMotionTimeEnd(OptixTraversableHandle handle)
Definition: optix_device_impl.h:799
static __forceinline__ __device__ float optixGetRayTmin()
Definition: optix_device_impl.h:588
static __forceinline__ __device__ float optixGetRayTime()
Definition: optix_device_impl.h:602
static __forceinline__ __device__ void optixSetPayload_31(unsigned int p)
Definition: optix_device_impl.h:311
static __forceinline__ __device__ unsigned int optixGetPayload_16()
Definition: optix_device_impl.h:428
static __forceinline__ __device__ OptixTransformType optixGetTransformTypeFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:957
static __forceinline__ __device__ const float4 * optixGetInstanceInverseTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:1006
static __forceinline__ __device__ unsigned int optixGetPayload_12()
Definition: optix_device_impl.h:400
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_5()
Definition: optix_device_impl.h:1477
static __forceinline__ __device__ unsigned int optixGetPayload_29()
Definition: optix_device_impl.h:519
static __forceinline__ __device__ OptixTraversableHandle optixGetInstanceChildFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:992
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_3()
Definition: optix_device_impl.h:1467
Definition: optix_device_impl.h:46