mirror of
https://github.com/zeldaret/botw
synced 2026-06-19 23:33:01 -04:00
18c60323a9
git subrepo clone https://github.com/open-ead/sead lib/sead subrepo: subdir: "lib/sead" merged: "1b66e825d" upstream: origin: "https://github.com/open-ead/sead" branch: "master" commit: "1b66e825d" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" git subrepo clone (merge) https://github.com/open-ead/nnheaders lib/NintendoSDK subrepo: subdir: "lib/NintendoSDK" merged: "9ee21399f" upstream: origin: "https://github.com/open-ead/nnheaders" branch: "master" commit: "9ee21399f" git-subrepo: version: "0.4.3" origin: "ssh://git@github.com/ingydotnet/git-subrepo" commit: "2f68596" git subrepo clone https://github.com/open-ead/agl lib/agl subrepo: subdir: "lib/agl" merged: "7c063271b" upstream: origin: "https://github.com/open-ead/agl" branch: "master" commit: "7c063271b" git-subrepo: version: "0.4.3" origin: "ssh://git@github.com/ingydotnet/git-subrepo" commit: "2f68596" git subrepo clone https://github.com/open-ead/EventFlow lib/EventFlow subrepo: subdir: "lib/EventFlow" merged: "c35d21b34" upstream: origin: "https://github.com/open-ead/EventFlow" branch: "master" commit: "c35d21b34" git-subrepo: version: "0.4.3" origin: "ssh://git@github.com/ingydotnet/git-subrepo" commit: "2f68596"
50 lines
1.3 KiB
C++
50 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <container/seadPtrArray.h>
|
|
#include <heap/seadDisposer.h>
|
|
#include <hostio/seadHostIONode.h>
|
|
#include <math/seadMathCalcCommon.h>
|
|
#include <prim/seadTypedBitFlag.h>
|
|
#include <thread/seadCriticalSection.h>
|
|
#include "aglGPUCommon.hpp"
|
|
|
|
namespace agl {
|
|
|
|
namespace detail {
|
|
class MemoryPool;
|
|
class MemoryPoolHeap;
|
|
} // namespace detail
|
|
|
|
class GPUMemBlockBase {
|
|
public:
|
|
explicit GPUMemBlockBase(sead::Heap* p_heap);
|
|
virtual ~GPUMemBlockBase();
|
|
|
|
void clear();
|
|
void freeBuffer();
|
|
void free();
|
|
void allocBuffer_(u64, sead::Heap*, s32, MemoryAttribute);
|
|
bool tryAllocBuffer_(u64, sead::Heap*, s32, MemoryAttribute);
|
|
void setBuffer_(u64, void*, void*, MemoryAttribute);
|
|
void setVirtual_(u64, sead::Heap*, MemoryAttribute, GPUMemVoidAddr, s32);
|
|
void addList(GPUMemBlockBase*);
|
|
void setMemoryPool(void*, u64, detail::MemoryPool*);
|
|
void setMemoryPoolHeap(void*, u64, detail::MemoryPoolHeap*);
|
|
u64 getByteOffset() const;
|
|
u64 getMemoryPoolType() const;
|
|
|
|
// TODO: the rest of the methods...
|
|
|
|
private:
|
|
void* mMemoryBuffer;
|
|
u64 mMemoryBufferSize;
|
|
detail::MemoryPool* mpMemoryPool;
|
|
detail::MemoryPoolHeap* mMemoryPoolHeap;
|
|
uint8_t mFlags;
|
|
GPUMemBlockBase* mpTail;
|
|
};
|
|
|
|
static_assert(sizeof(GPUMemBlockBase) == 0x38);
|
|
|
|
} // namespace agl
|