mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-21 12:59:14 +12:00
add: render target caches
This commit is contained in:
parent
67e3a1d8eb
commit
53c9611ac2
4 changed files with 85 additions and 1 deletions
|
@ -18,6 +18,8 @@ RendererMTL::RendererMTL(GPU& gpu, const std::array<u32, regNum>& internalRegs,
|
|||
RendererMTL::~RendererMTL() {}
|
||||
|
||||
void RendererMTL::reset() {
|
||||
colorRenderTargetCache.reset();
|
||||
depthStencilRenderTargetCache.reset();
|
||||
textureCache.reset();
|
||||
|
||||
// TODO: implement
|
||||
|
@ -233,6 +235,8 @@ void RendererMTL::screenshot(const std::string& name) {
|
|||
}
|
||||
|
||||
void RendererMTL::deinitGraphicsContext() {
|
||||
colorRenderTargetCache.reset();
|
||||
depthStencilRenderTargetCache.reset();
|
||||
textureCache.reset();
|
||||
|
||||
// TODO: implement
|
||||
|
|
|
@ -12,7 +12,7 @@ void Texture::allocate() {
|
|||
descriptor->setPixelFormat(MTL::PixelFormatRGBA8Unorm);
|
||||
descriptor->setWidth(size.u());
|
||||
descriptor->setHeight(size.v());
|
||||
descriptor->setUsage(MTL::TextureUsageShaderRead | MTL::TextureUsageShaderWrite);
|
||||
descriptor->setUsage(MTL::TextureUsageShaderRead);
|
||||
descriptor->setStorageMode(MTL::StorageModeShared); // TODO: use private + staging buffers?
|
||||
texture = device->newTexture(descriptor);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue