Make textures private (GPU only)

This commit is contained in:
David Chavez 2024-11-10 20:31:06 +01:00
parent ca6277c58f
commit 779d71d473
2 changed files with 4 additions and 8 deletions

View File

@ -847,12 +847,7 @@ namespace RT64 {
auto *metalInterface = dynamic_cast<RT64::MetalInterface *>(renderInterface);
metalInterface->assignDeviceToLayer(view);
// SDL_Window's handle can be used directly if needed
SDL_SysWMinfo wmInfo;
SDL_VERSION(&wmInfo.version);
SDL_GetWindowWMInfo(window, &wmInfo);
TestInitialize(renderInterface, { wmInfo.info.cocoa.window });
TestInitialize(renderInterface, { window });
TestResize();
bool running = true;

View File

@ -467,7 +467,7 @@ namespace RT64 {
}
void MetalBuffer::setName(const std::string &name) {
[this->buffer setLabel: [NSString stringWithUTF8String: name.c_str()]];
}
// MetalBufferFormattedView
@ -500,6 +500,7 @@ namespace RT64 {
}
descriptor.textureType = textureType;
descriptor.storageMode = MTLStorageModePrivate;
descriptor.pixelFormat = toMTL(desc.format);
descriptor.width = desc.width;
descriptor.height = desc.height;
@ -1923,4 +1924,4 @@ namespace RT64 {
std::unique_ptr<MetalInterface> createdInterface = std::make_unique<MetalInterface>();
return createdInterface->isValid() ? std::move(createdInterface) : nullptr;
}
};
};