Skip to content
Snippets Groups Projects
Commit c1df12c7 authored by Vanessa Karolek's avatar Vanessa Karolek
Browse files

[#92] adjust RTXModule::init, mention our actual problem in ASManager.cpp

parent 43e4a982
No related branches found
No related tags found
1 merge request!75Resolve "RTX-Module"
Pipeline #26919 failed
...@@ -12,6 +12,10 @@ namespace vkcv::rtx { ...@@ -12,6 +12,10 @@ namespace vkcv::rtx {
} }
void ASManager::buildBLAS(Buffer<uint8_t> &vertexBuffer, Buffer<uint8_t> &indexBuffer) { void ASManager::buildBLAS(Buffer<uint8_t> &vertexBuffer, Buffer<uint8_t> &indexBuffer) {
// INFO: Es scheint, dass wir einen DispatchLoaderDynamic brauchen, damit Funktionen wie .getBufferAddressKHR keine Linker Error schmeissen.
// Die Frage ist, wieso? und wie koennen wir das problem evtl. anders behandeln? Mit dem DispatchLoaderDynamic gehen zwar die Fehler weg,
// aber die Anwendung crasht...
vk::BufferDeviceAddressInfo vertexBufferDeviceAddressInfo(vertexBuffer.getVulkanHandle()); vk::BufferDeviceAddressInfo vertexBufferDeviceAddressInfo(vertexBuffer.getVulkanHandle());
vk::DeviceAddress vertexBufferAddress = m_core->getContext().getDevice().getBufferAddressKHR(vertexBufferDeviceAddressInfo); vk::DeviceAddress vertexBufferAddress = m_core->getContext().getDevice().getBufferAddressKHR(vertexBufferDeviceAddressInfo);
vk::DeviceOrHostAddressConstKHR vertexDeviceOrHostAddressConst(vertexBufferAddress); vk::DeviceOrHostAddressConstKHR vertexDeviceOrHostAddressConst(vertexBufferAddress);
......
...@@ -25,7 +25,8 @@ namespace vkcv::rtx { ...@@ -25,7 +25,8 @@ namespace vkcv::rtx {
void RTXModule::init(Core* core, Buffer<uint8_t> &vertexBuffer, Buffer<uint8_t> &indexBuffer) { void RTXModule::init(Core* core, Buffer<uint8_t> &vertexBuffer, Buffer<uint8_t> &indexBuffer) {
// build acceleration structures BLAS then TLAS --> see ASManager // build acceleration structures BLAS then TLAS --> see ASManager
// ASManager asManager(core); ASManager asManager(core);
asManager.buildBLAS(vertexBuffer, indexBuffer);
} }
......
...@@ -53,9 +53,6 @@ int main(int argc, const char** argv) { ...@@ -53,9 +53,6 @@ int main(int argc, const char** argv) {
deviceExtensions deviceExtensions
); );
// init RTXModule
// rtxModule.init(&core);
vkcv::scene::Scene scene = vkcv::scene::Scene::load(core, std::filesystem::path( vkcv::scene::Scene scene = vkcv::scene::Scene::load(core, std::filesystem::path(
argc > 1 ? argv[1] : "resources/Sponza/Sponza.gltf" argc > 1 ? argv[1] : "resources/Sponza/Sponza.gltf"
)); ));
...@@ -93,6 +90,9 @@ int main(int argc, const char** argv) { ...@@ -93,6 +90,9 @@ int main(int argc, const char** argv) {
indexBuffer.fill(mesh.vertexGroups[0].indexBuffer.data); indexBuffer.fill(mesh.vertexGroups[0].indexBuffer.data);
// init RTXModule
rtxModule.init(&core, vertexBuffer, indexBuffer);
const vkcv::AttachmentDescription present_color_attachment( const vkcv::AttachmentDescription present_color_attachment(
vkcv::AttachmentOperation::STORE, vkcv::AttachmentOperation::STORE,
vkcv::AttachmentOperation::CLEAR, vkcv::AttachmentOperation::CLEAR,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment