| 152 | } |
| 153 | template <typename T> |
| 154 | void remember_ids(daxa_CommandRecorder self, T id) |
| 155 | { |
| 156 | if constexpr (std::is_same_v<daxa_BufferId, T>) |
| 157 | { |
| 158 | self->command_arena->used_buffers.push_back(std::bit_cast<BufferId>(id)); |
| 159 | } |
| 160 | if constexpr (std::is_same_v<daxa_ImageId, T>) |
| 161 | { |
| 162 | self->command_arena->used_images.push_back(std::bit_cast<ImageId>(id)); |
| 163 | } |
| 164 | if constexpr (std::is_same_v<daxa_ImageViewId, T>) |
| 165 | { |
| 166 | self->command_arena->used_image_views.push_back(std::bit_cast<ImageViewId>(id)); |
| 167 | } |
| 168 | if constexpr (std::is_same_v<daxa_SamplerId, T>) |
| 169 | { |
| 170 | self->command_arena->used_samplers.push_back(std::bit_cast<SamplerId>(id)); |
| 171 | } |
| 172 | if constexpr (std::is_same_v<daxa_TlasId, T>) |
| 173 | { |
| 174 | self->command_arena->used_tlass.push_back(std::bit_cast<TlasId>(id)); |
| 175 | } |
| 176 | if constexpr (std::is_same_v<daxa_BlasId, T>) |
| 177 | { |
| 178 | self->command_arena->used_blass.push_back(std::bit_cast<BlasId>(id)); |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | template <typename... Args> |
| 183 | auto check_ids(daxa_CommandRecorder self, Args... args) -> daxa_Result |