Skip to content

Commit ea8ba93

Browse files
authored
Merge pull request #44 from GPUOpen-LibrariesAndSDKs/release-2.5
Release 2.5
2 parents aeda1c1 + c54ed92 commit ea8ba93

File tree

22 files changed

+162
-1056
lines changed

22 files changed

+162
-1056
lines changed

tools/premake5/linux64/premake5

-74.7 KB
Binary file not shown.

tools/premake5/win/premake5.exe

166 KB
Binary file not shown.

tutorials/00_context_creation/premake5.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ project "00_context_creation"
1212

1313
targetdir "../dist/bin/%{cfg.buildcfg}"
1414

15+
defines {"HIPRT_EXPORTS"}
16+

tutorials/02_scene_intersection/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ class Tutorial : public TutorialBase
8484
oroMemcpyHtoD( reinterpret_cast<oroDeviceptr>( sceneInput.instances ), &instance, sizeof( hiprtInstance ) ) );
8585

8686
hiprtFrameSRT frame;
87-
frame.translation = make_hiprtFloat3( 0.0f, 0.0f, 0.0f );
88-
frame.scale = make_hiprtFloat3( 0.5f, 0.5f, 0.5f );
89-
frame.rotation = make_hiprtFloat4( 0.0f, 0.0f, 1.0f, 0.0f );
87+
frame.translation = { 0.0f, 0.0f, 0.0f };
88+
frame.scale = { 0.5f, 0.5f, 0.5f };
89+
frame.rotation = { 0.0f, 0.0f, 1.0f, 0.0f };
9090
sceneInput.frameCount = 1;
9191
CHECK_ORO( oroMalloc( reinterpret_cast<oroDeviceptr*>( &sceneInput.instanceFrames ), sizeof( hiprtFrameSRT ) ) );
9292
CHECK_ORO(

tutorials/07_custom_bvh_import/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ void Tutorial::buildBvh( hiprtGeometryBuildInput& buildInput )
150150
{
151151
hiprtFloat4* ptr =
152152
reinterpret_cast<hiprtFloat4*>( primBoxesRaw.data() + i * buildInput.primitive.aabbList.aabbStride );
153-
primBoxes[i].m_min = make_hiprtFloat3( ptr[0] );
154-
primBoxes[i].m_max = make_hiprtFloat3( ptr[1] );
153+
primBoxes[i].m_min = make_float3( ptr[0] );
154+
primBoxes[i].m_max = make_float3( ptr[1] );
155155
}
156156
BvhBuilder::build( buildInput.primitive.aabbList.aabbCount, primBoxes, nodes );
157157
}

tutorials/09_motion_blur_srt/main.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -137,25 +137,25 @@ class Tutorial : public TutorialBase
137137

138138
constexpr float Offset = 0.3f;
139139
hiprtFrameSRT frames[5];
140-
frames[0].translation = make_hiprtFloat3( -0.25f, -Offset, 0.0f );
141-
frames[0].scale = make_hiprtFloat3( 1.0f, 1.0f, 1.0f );
142-
frames[0].rotation = make_hiprtFloat4( 0.0f, 0.0f, 1.0f, 0.0f );
140+
frames[0].translation = { -0.25f, -Offset, 0.0f };
141+
frames[0].scale = { 1.0f, 1.0f, 1.0f };
142+
frames[0].rotation = { 0.0f, 0.0f, 1.0f, 0.0f };
143143
frames[0].time = 0.0f;
144-
frames[1].translation = make_hiprtFloat3( 0.0f, -Offset, 0.0f );
145-
frames[1].scale = make_hiprtFloat3( 1.0f, 1.0f, 1.0f );
146-
frames[1].rotation = make_hiprtFloat4( 0.0f, 0.0f, 1.0f, 0.0f );
144+
frames[1].translation = { 0.0f, -Offset, 0.0f };
145+
frames[1].scale = { 1.0f, 1.0f, 1.0f };
146+
frames[1].rotation = { 0.0f, 0.0f, 1.0f, 0.0f };
147147
frames[1].time = 0.35f;
148-
frames[2].translation = make_hiprtFloat3( 0.25f, -Offset, 0.0f );
149-
frames[2].scale = make_hiprtFloat3( 1.0f, 1.0f, 1.0f );
150-
frames[2].rotation = make_hiprtFloat4( 0.0f, 0.0f, 1.0f, hiprt::Pi * 0.25f );
148+
frames[2].translation = { 0.25f, -Offset, 0.0f };
149+
frames[2].scale = { 1.0f, 1.0f, 1.0f };
150+
frames[2].rotation = { 0.0f, 0.0f, 1.0f, hiprt::Pi * 0.25f };
151151
frames[2].time = 1.0f;
152-
frames[3].translation = make_hiprtFloat3( 0.0f, Offset, 0.0f );
153-
frames[3].scale = make_hiprtFloat3( 1.0f, 1.0f, 1.0f );
154-
frames[3].rotation = make_hiprtFloat4( 0.0f, 0.0f, 1.0f, 0.f );
152+
frames[3].translation = { 0.0f, Offset, 0.0f };
153+
frames[3].scale = { 1.0f, 1.0f, 1.0f };
154+
frames[3].rotation = { 0.0f, 0.0f, 1.0f, 0.f };
155155
frames[3].time = 0.0f;
156-
frames[4].translation = make_hiprtFloat3( 0.0f, Offset, 0.0f );
157-
frames[4].scale = make_hiprtFloat3( 1.0f, 1.0f, 1.0f );
158-
frames[4].rotation = make_hiprtFloat4( 0.0f, 0.0f, 1.0f, hiprt::Pi * 0.5f );
156+
frames[4].translation = { 0.0f, Offset, 0.0f };
157+
frames[4].scale = { 1.0f, 1.0f, 1.0f };
158+
frames[4].rotation = { 0.0f, 0.0f, 1.0f, hiprt::Pi * 0.5f };
159159
frames[4].time = 1.0f;
160160

161161
sceneInput.frameCount = 5;

tutorials/11_multi_custom_intersection/main.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ class Tutorial : public TutorialBase
3131
constexpr uint32_t CircleTypeIndex = 1;
3232
constexpr uint32_t GeomTypesCount = 2;
3333

34-
hiprtFloat4 sphere = make_hiprtFloat4( -0.3f, 0.0f, 0.0f, 0.2f );
35-
hiprtFloat4 circle = make_hiprtFloat4( 0.3f, 0.0f, 0.0f, 0.2f );
34+
hiprtFloat4 sphere = { -0.3f, 0.0f, 0.0f, 0.2f };
35+
hiprtFloat4 circle = { 0.3f, 0.0f, 0.0f, 0.2f };
3636

3737
hiprtContext ctxt;
3838
CHECK_HIPRT( hiprtCreateContext( HIPRT_API_VERSION, m_ctxtInput, ctxt ) );
@@ -120,9 +120,9 @@ class Tutorial : public TutorialBase
120120

121121
std::vector<hiprtFrameSRT> frames;
122122
hiprtFrameSRT frame;
123-
frame.translation = make_hiprtFloat3( 0.0f, 0.0f, 0.0f );
124-
frame.scale = make_hiprtFloat3( 1.0f, 1.0f, 1.0f );
125-
frame.rotation = make_hiprtFloat4( 0.0f, 0.0f, 1.0f, 0.0f );
123+
frame.translation = { 0.0f, 0.0f, 0.0f };
124+
frame.scale = { 1.0f, 1.0f, 1.0f };
125+
frame.rotation = { 0.0f, 0.0f, 1.0f, 0.0f };
126126
for ( int i = 0; i < sceneInput.instanceCount; i++ )
127127
frames.push_back( frame );
128128

tutorials/13_concurrent_scene_build/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ class Tutorial : public TutorialBase
149149

150150
const float o = 0.05f;
151151
hiprtFrameSRT frames[2];
152-
frames[0].translation = make_hiprtFloat3( 0.0f, o, 0.0f );
153-
frames[0].scale = make_hiprtFloat3( 1.0f, 1.0f, 1.0f );
154-
frames[0].rotation = make_hiprtFloat4( 0.0f, 0.0f, 1.0f, 0.0f );
155-
frames[1].translation = make_hiprtFloat3( 0.0f, -o, 0.0f );
156-
frames[1].scale = make_hiprtFloat3( 1.0f, 1.0f, 1.0f );
157-
frames[1].rotation = make_hiprtFloat4( 0.0f, 0.0f, 1.0f, 0.0f );
152+
frames[0].translation = { 0.0f, o, 0.0f };
153+
frames[0].scale = { 1.0f, 1.0f, 1.0f };
154+
frames[0].rotation = { 0.0f, 0.0f, 1.0f, 0.0f };
155+
frames[1].translation = { 0.0f, -o, 0.0f };
156+
frames[1].scale = { 1.0f, 1.0f, 1.0f };
157+
frames[1].rotation = { 0.0f, 0.0f, 1.0f, 0.0f };
158158

159159
sceneInput.frameCount = 2;
160160
CHECK_ORO( oroMalloc(

tutorials/14_batch_build/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,12 @@ class Tutorial : public TutorialBase
135135

136136
const float o = 0.05f;
137137
hiprtFrameSRT frames[2];
138-
frames[0].translation = make_hiprtFloat3( 0.0f, o, 0.0f );
139-
frames[0].scale = make_hiprtFloat3( 1.0f, 1.0f, 1.0f );
140-
frames[0].rotation = make_hiprtFloat4( 0.0f, 0.0f, 1.0f, 0.0f );
141-
frames[1].translation = make_hiprtFloat3( 0.0f, -o, 0.0f );
142-
frames[1].scale = make_hiprtFloat3( 1.0f, 1.0f, 1.0f );
143-
frames[1].rotation = make_hiprtFloat4( 0.0f, 0.0f, 1.0f, 0.0f );
138+
frames[0].translation = { 0.0f, o, 0.0f };
139+
frames[0].scale = { 1.0f, 1.0f, 1.0f };
140+
frames[0].rotation = { 0.0f, 0.0f, 1.0f, 0.0f };
141+
frames[1].translation = { 0.0f, -o, 0.0f };
142+
frames[1].scale = { 1.0f, 1.0f, 1.0f };
143+
frames[1].rotation = { 0.0f, 0.0f, 1.0f, 0.0f };
144144

145145
sceneInput.frameCount = 2;
146146
CHECK_ORO( oroMalloc(

tutorials/15_multi_level_instancing/main.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,12 @@ class Tutorial : public TutorialBase
135135

136136
const float o = 0.05f;
137137
hiprtFrameSRT frames[2];
138-
frames[0].translation = make_hiprtFloat3( 0.0f, o, 0.0f );
139-
frames[0].scale = make_hiprtFloat3( 1.0f, 1.0f, 1.0f );
140-
frames[0].rotation = make_hiprtFloat4( 0.0f, 0.0f, 1.0f, 0.0f );
141-
frames[1].translation = make_hiprtFloat3( 0.0f, -o, 0.0f );
142-
frames[1].scale = make_hiprtFloat3( 1.0f, 1.0f, 1.0f );
143-
frames[1].rotation = make_hiprtFloat4( 0.0f, 0.0f, 1.0f, 0.0f );
138+
frames[0].translation = { 0.0f, o, 0.0f };
139+
frames[0].scale = { 1.0f, 1.0f, 1.0f };
140+
frames[0].rotation = { 0.0f, 0.0f, 1.0f, 0.0f };
141+
frames[1].translation = { 0.0f, -o, 0.0f };
142+
frames[1].scale = { 1.0f, 1.0f, 1.0f };
143+
frames[1].rotation = { 0.0f, 0.0f, 1.0f, 0.0f };
144144

145145
sceneInputMid.frameCount = 2;
146146
CHECK_ORO( oroMalloc(
@@ -185,12 +185,12 @@ class Tutorial : public TutorialBase
185185

186186
constexpr float Offset = 0.12f;
187187
hiprtFrameSRT frames[2];
188-
frames[0].translation = make_float3( 0.0f, Offset, 0.0f );
189-
frames[0].scale = make_float3( 1.0f, 1.0f, 1.0f );
190-
frames[0].rotation = make_float4( 0.0f, 0.0f, 1.0f, 0.0f );
191-
frames[1].translation = make_float3( 0.0f, -Offset, 0.0f );
192-
frames[1].scale = make_float3( 1.0f, 1.0f, 1.0f );
193-
frames[1].rotation = make_float4( 0.0f, 0.0f, 1.0f, 0.0f );
188+
frames[0].translation = { 0.0f, Offset, 0.0f };
189+
frames[0].scale = { 1.0f, 1.0f, 1.0f };
190+
frames[0].rotation = { 0.0f, 0.0f, 1.0f, 0.0f };
191+
frames[1].translation = { 0.0f, -Offset, 0.0f };
192+
frames[1].scale = { 1.0f, 1.0f, 1.0f };
193+
frames[1].rotation = { 0.0f, 0.0f, 1.0f, 0.0f };
194194

195195
sceneInputTop.frameCount = 2;
196196
CHECK_ORO( oroMalloc(

0 commit comments

Comments
 (0)