From a87ad2eac867b77a75e05ad48bb3ee622e5735d3 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Sun, 5 Mar 2023 21:00:21 +0100 Subject: Change freelist implementation --- include/api-test/vk-device.hpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'include/api-test/vk-device.hpp') diff --git a/include/api-test/vk-device.hpp b/include/api-test/vk-device.hpp index 9e42b38..ca5457a 100644 --- a/include/api-test/vk-device.hpp +++ b/include/api-test/vk-device.hpp @@ -7,7 +7,6 @@ #include "command-buffer.hpp" #include "freelist.hpp" -#include "handle.hpp" #include "vk-bindless.hpp" #include "vk-device-types.hpp" @@ -40,19 +39,14 @@ class vkdevice { handle create_semaphore(const semaphore_desc& desc); - void destroy_texture(const device_texture& texture); void destroy_texture(handle handle); - void destroy_buffer(const device_buffer& buffer); void destroy_buffer(handle handle); - void destroy_pipeline(const device_pipeline& pipeline); void destroy_pipeline(handle handle); - void destroy_semaphore(const device_semaphore& semaphore); void destroy_semaphore(handle handle); - void destroy_surface(const device_surface& surface); void destroy_surface(handle handle); template @@ -61,23 +55,23 @@ class vkdevice { } [[nodiscard]] inline device_texture& get_texture(handle handle) { - return textures[handle.id]; + return textures[handle]; } [[nodiscard]] inline const device_buffer& get_buffer(handle handle) const { - return buffers[handle.id]; + return buffers[handle]; } [[nodiscard]] inline const device_pipeline& get_pipeline(handle handle) const { - return pipelines[handle.id]; + return pipelines[handle]; } [[nodiscard]] inline device_surface& get_surface(handle handle) { - return surfaces[handle.id]; + return surfaces[handle]; } [[nodiscard]] inline device_semaphore& get_semaphore(handle handle) { - return semaphores[handle.id]; + return semaphores[handle]; } [[nodiscard]] inline const bindless_model& get_bindingmodel() const { -- cgit v1.3