adding post processing

This commit is contained in:
2025-05-31 18:03:36 +02:00
parent 88fead6cfc
commit 4319c4096b
18 changed files with 244 additions and 11 deletions

View File

@@ -26,6 +26,21 @@ namespace Scop
return buffer;
}
inline void Allocate(std::size_t size)
{
if(m_data != nullptr)
FatalError("cannot allocate an already allocated CPU buffer");
try
{
m_data = std::make_shared<std::uint8_t[]>(size);
m_size = size;
}
catch(...)
{
FatalError("memory allocation for a CPU buffer failed");
}
}
inline bool Empty() const { return m_size == 0; }
[[nodiscard]] inline std::size_t GetSize() const noexcept { return m_size; }