softgpu: Detect binner alloc fail and bail.

This commit is contained in:
Unknown W. Brackets committed 2023-01-01 06:59:14 -08:00
1 parent d65c7fb05e
commit be84bc9934
9 files changed
+41 -2

No files matched your search

+6
View File
@@ -42,6 +42,8 @@
TransformUnit::TransformUnit() {
decoded_ = (u8 *)AllocateMemoryPages(TRANSFORM_BUF_SIZE, MEM_PROT_READ | MEM_PROT_WRITE);
if (!decoded_)
return;
binner_ = new BinManager();
}
@@ -50,6 +52,10 @@ TransformUnit::~TransformUnit() {
delete binner_;
}
bool TransformUnit::IsStarted() {
return binner_ && decoded_;
}
SoftwareDrawEngine::SoftwareDrawEngine() {
// All this is a LOT of memory, need to see if we can cut down somehow. Used for splines.
decoded = (u8 *)AllocateMemoryPages(DECODED_VERTEX_BUFFER_SIZE, MEM_PROT_READ | MEM_PROT_WRITE);