diff --git a/tests/framework/binding.cpp b/tests/framework/binding.cpp index a4e604f5392..79aaa647feb 100644 --- a/tests/framework/binding.cpp +++ b/tests/framework/binding.cpp @@ -807,18 +807,6 @@ void AccelerationStructure::destroy() noexcept { } AccelerationStructure::~AccelerationStructure() noexcept { destroy(); } -void AccelerationStructureKHR::destroy() noexcept { - if (!initialized()) { - return; - } - PFN_vkDestroyAccelerationStructureKHR vkDestroyAccelerationStructureKHR = - (PFN_vkDestroyAccelerationStructureKHR)vk::GetDeviceProcAddr(device(), "vkDestroyAccelerationStructureKHR"); - assert(vkDestroyAccelerationStructureKHR != nullptr); - vkDestroyAccelerationStructureKHR(device(), handle(), nullptr); - handle_ = VK_NULL_HANDLE; -} -AccelerationStructureKHR::~AccelerationStructureKHR() noexcept { destroy(); } - VkMemoryRequirements2 AccelerationStructure::memory_requirements() const { PFN_vkGetAccelerationStructureMemoryRequirementsNV vkGetAccelerationStructureMemoryRequirementsNV = (PFN_vkGetAccelerationStructureMemoryRequirementsNV)vk::GetDeviceProcAddr(device(), @@ -901,39 +889,6 @@ vk_testing::Buffer AccelerationStructure::create_scratch_buffer(const Device &de return vk_testing::Buffer(device, create_info, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, pNext); } -void AccelerationStructureKHR::init(const Device &dev, const VkAccelerationStructureCreateInfoKHR &info, bool init_memory) { - PFN_vkCreateAccelerationStructureKHR vkCreateAccelerationStructureKHR = - (PFN_vkCreateAccelerationStructureKHR)vk::GetDeviceProcAddr(dev.handle(), "vkCreateAccelerationStructureKHR"); - assert(vkCreateAccelerationStructureKHR != nullptr); - NON_DISPATCHABLE_HANDLE_INIT(vkCreateAccelerationStructureKHR, dev, &info); - info_ = info; -} - -vk_testing::Buffer AccelerationStructureKHR::create_scratch_buffer(const Device &device, - const VkBufferCreateInfo *pCreateInfo /*= nullptr*/, - bool buffer_device_address /*= false*/) const { - VkBufferCreateInfo create_info = {}; - create_info.size = 0; - if (pCreateInfo) { - create_info.sType = pCreateInfo->sType; - create_info.usage = pCreateInfo->usage; - create_info.size = pCreateInfo->size; - } else { - create_info.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; - create_info.usage = VK_BUFFER_USAGE_STORAGE_BUFFER_BIT; - if (buffer_device_address) create_info.usage |= VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT; - } - - auto alloc_flags = LvlInitStruct(); - void *pNext = nullptr; - if (buffer_device_address) { - alloc_flags.flags = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR; - pNext = &alloc_flags; - } - - return vk_testing::Buffer(device, create_info, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, pNext); -} - NON_DISPATCHABLE_HANDLE_DTOR(ShaderModule, vk::DestroyShaderModule) void ShaderModule::init(const Device &dev, const VkShaderModuleCreateInfo &info) { diff --git a/tests/framework/binding.h b/tests/framework/binding.h index 9a449c87f18..bb834309db7 100644 --- a/tests/framework/binding.h +++ b/tests/framework/binding.h @@ -733,32 +733,6 @@ class AccelerationStructure : public internal::NonDispHandle { - public: - explicit AccelerationStructureKHR(){}; - explicit AccelerationStructureKHR(const Device &dev, const VkAccelerationStructureCreateInfoKHR &info, - bool init_memory = true) { - init(dev, info, init_memory); - } - ~AccelerationStructureKHR() noexcept; - void destroy() noexcept; - - // vkCreateAccelerationStructureNV - void init(const Device &dev, const VkAccelerationStructureCreateInfoKHR &info, bool init_memory = true); - uint64_t opaque_handle() const { return opaque_handle_; } - - const VkAccelerationStructureCreateInfoKHR &info() const { return info_; } - - const VkDevice &dev() const { return device(); } - - [[nodiscard]] vk_testing::Buffer create_scratch_buffer(const Device &device, const VkBufferCreateInfo *pCreateInfo = nullptr, - bool buffer_device_address = false) const; - - private: - VkAccelerationStructureCreateInfoKHR info_; - uint64_t opaque_handle_; -}; - class ShaderModule : public internal::NonDispHandle { public: ~ShaderModule() noexcept; diff --git a/tests/framework/render.h b/tests/framework/render.h index a1a9e317aa2..78c941b5111 100644 --- a/tests/framework/render.h +++ b/tests/framework/render.h @@ -363,7 +363,6 @@ typedef vk_testing::Fence VkFenceObj; typedef vk_testing::Semaphore VkSemaphoreObj; typedef vk_testing::Buffer VkBufferObj; typedef vk_testing::AccelerationStructure VkAccelerationStructureObj; -typedef vk_testing::AccelerationStructureKHR VkAccelerationStructurekhrObj; class VkCommandPoolObj : public vk_testing::CommandPool { public: VkCommandPoolObj() : vk_testing::CommandPool(){};