1 // Copyright 2024 The Amber Authors. 2 // Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. 3 // 4 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // you may not use this file except in compliance with the License. 6 // You may obtain a copy of the License at 7 // 8 // http://www.apache.org/licenses/LICENSE-2.0 9 // 10 // Unless required by applicable law or agreed to in writing, software 11 // distributed under the License is distributed on an "AS IS" BASIS, 12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 // See the License for the specific language governing permissions and 14 // limitations under the License. 15 16 #ifndef SRC_VULKAN_SBT_H_ 17 #define SRC_VULKAN_SBT_H_ 18 19 #include <memory> 20 #include <vector> 21 22 #include "src/acceleration_structure.h" 23 #include "src/vulkan/device.h" 24 #include "src/vulkan/transfer_buffer.h" 25 26 namespace amber { 27 namespace vulkan { 28 29 class SBT { 30 public: 31 explicit SBT(Device* device); 32 ~SBT(); 33 34 Result Create(amber::SBT* sbt, VkPipeline pipeline); getBuffer()35 TransferBuffer* getBuffer() { return buffer_.get(); } 36 37 private: 38 Device* device_ = nullptr; 39 std::unique_ptr<TransferBuffer> buffer_; 40 }; 41 42 } // namespace vulkan 43 } // namespace amber 44 45 #endif // SRC_VULKAN_SBT_H_ 46