| 269 | }; |
| 270 | |
| 271 | inline std::vector<uint8_t> convert_underlying_data_stride(const std::vector<uint8_t> &src_data, uint32_t src_stride, uint32_t dst_stride) |
| 272 | { |
| 273 | auto elem_count = to_u32(src_data.size()) / src_stride; |
| 274 | |
| 275 | std::vector<uint8_t> result(elem_count * dst_stride); |
| 276 | |
| 277 | for (uint32_t idxSrc = 0, idxDst = 0; |
| 278 | idxSrc < src_data.size() && idxDst < result.size(); |
| 279 | idxSrc += src_stride, idxDst += dst_stride) |
| 280 | { |
| 281 | std::copy(src_data.begin() + idxSrc, src_data.begin() + idxSrc + src_stride, result.begin() + idxDst); |
| 282 | } |
| 283 | |
| 284 | return result; |
| 285 | } |
| 286 | |
| 287 | inline void upload_image_to_gpu(vkb::core::CommandBufferC &command_buffer, vkb::core::BufferC &staging_buffer, sg::Image &image) |
| 288 | { |
no test coverage detected