Merge pull request #107486 from Ivorforce/rendering-no-alloc-api

Use raw buffer pointers in `RenderingDevice` allocation APIs to avoid intermediary arrays
This commit is contained in:
Thaddeus Crews 2025-06-18 18:14:00 -05:00
commit ac6252c9c8
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
10 changed files with 71 additions and 81 deletions

View file

@ -91,6 +91,11 @@ public:
_FORCE_INLINE_ constexpr const T *begin() const { return _ptr; }
_FORCE_INLINE_ constexpr const T *end() const { return _ptr + _len; }
template <typename T1>
_FORCE_INLINE_ constexpr Span<T1> reinterpret() const {
return Span<T1>(reinterpret_cast<const T1 *>(_ptr), _len * sizeof(T) / sizeof(T1));
}
// Algorithms.
constexpr int64_t find(const T &p_val, uint64_t p_from = 0) const;
constexpr int64_t rfind(const T &p_val, uint64_t p_from) const;