remove useless texture member variables

This commit is contained in:
Samuliak 2025-01-12 18:02:36 +01:00
parent 388bbe2586
commit aec7a182ce
No known key found for this signature in database
5 changed files with 8 additions and 19 deletions

View file

@ -351,8 +351,8 @@ void MetalRenderer::HandleScreenshotRequest(LatteTextureView* texView, bool padV
int width, height;
texMtl->GetEffectiveSize(width, height, 0);
uint32 bytesPerRow = GetMtlTextureBytesPerRow(texMtl->format, texMtl->IsDepth(), width);
uint32 size = GetMtlTextureBytesPerImage(texMtl->format, texMtl->IsDepth(), height, bytesPerRow);
uint32 bytesPerRow = GetMtlTextureBytesPerRow(texMtl->format, texMtl->isDepth, width);
uint32 size = GetMtlTextureBytesPerImage(texMtl->format, texMtl->isDepth, height, bytesPerRow);
// TODO: get a buffer from the memory manager
MTL::Buffer* buffer = m_device->newBuffer(size, MTL::ResourceStorageModeShared);
@ -670,9 +670,9 @@ void MetalRenderer::texture_loadSlice(LatteTexture* hostTexture, sint32 width, s
sliceIndex = 0;
}
size_t bytesPerRow = GetMtlTextureBytesPerRow(textureMtl->GetFormat(), textureMtl->IsDepth(), width);
size_t bytesPerRow = GetMtlTextureBytesPerRow(textureMtl->format, textureMtl->isDepth, width);
// No need to set bytesPerImage for 3D textures, since we always load just one slice
//size_t bytesPerImage = GetMtlTextureBytesPerImage(textureMtl->GetFormat(), textureMtl->IsDepth(), height, bytesPerRow);
//size_t bytesPerImage = GetMtlTextureBytesPerImage(textureMtl->GetFormat(), textureMtl->isDepth, height, bytesPerRow);
//if (m_isAppleGPU)
//{
// textureMtl->GetTexture()->replaceRegion(MTL::Region(0, 0, offsetZ, width, height, 1), mipIndex, sliceIndex, pixelData, bytesPerRow, 0);