Skip to content

Commit

Permalink
WIP: vulkan kernels for new bvh traversal
Browse files Browse the repository at this point in the history
  • Loading branch information
gboisse committed Jan 22, 2018
1 parent c916bc3 commit 353d828
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 3 deletions.
6 changes: 3 additions & 3 deletions RadeonRays/src/intersector/intersector_lds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ namespace RadeonRays
if (device->GetPlatform() == Calc::Platform::kVulkan)
{
// TODO: implement vulkan kernels (gboisse)
if (m_gpudata->bvh_prog.executable == nullptr)
m_gpuData->executable = m_device->CompileExecutable(g_bvh2_vulkan, std::strlen(g_bvh2_vulkan), buildopts.c_str());
if (m_gpuData->bvh_prog.executable == nullptr)
m_gpuData->bvh_prog.executable = m_device->CompileExecutable(g_bvh2_vulkan, std::strlen(g_bvh2_vulkan), buildopts.c_str());
if (m_gpuData->qbvh_prog.executable == nullptr)
m_gpuData->executable = m_device->CompileExecutable(g_bvh2_fp16_vulkan, std::strlen(g_bvh2_fp16_vulkan), buildopts.c_str());
m_gpuData->qbvh_prog.executable = m_device->CompileExecutable(g_bvh2_fp16_vulkan, std::strlen(g_bvh2_fp16_vulkan), buildopts.c_str());
}
#endif
#endif
Expand Down
27 changes: 27 additions & 0 deletions RadeonRays/src/kernels/GLSL/bvh2.comp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#version 430

// Note Anvil define system assumes first line is alway a #version so don't rearrange

//
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//

layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
27 changes: 27 additions & 0 deletions RadeonRays/src/kernels/GLSL/bvh2_fp16.comp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#version 430

// Note Anvil define system assumes first line is alway a #version so don't rearrange

//
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//

layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;

0 comments on commit 353d828

Please sign in to comment.