mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-19 09:19:05 +02:00
Vulkan: Correct size for tex mip level readback.
Used by the GE debugger to display the texture levels.
This commit is contained in:
1 parent
1dead5f095
commit
42d7226413
1 file changed
+7
@@ -1088,6 +1088,13 @@ bool TextureCacheVulkan::GetCurrentTextureDebug(GPUDebugBuffer &buffer, int leve
|
||||
|
||||
int w = texture->GetWidth();
|
||||
int h = texture->GetHeight();
|
||||
if (level > 0) {
|
||||
// In the future, maybe this could do something for 3D textures...
|
||||
if (level >= texture->GetNumMips())
|
||||
return false;
|
||||
w >>= level;
|
||||
h >>= level;
|
||||
}
|
||||
buffer.Allocate(w, h, bufferFormat);
|
||||
|
||||
renderManager->CopyImageToMemorySync(texture->GetImage(), level, 0, 0, w, h, drawFormat, (uint8_t *)buffer.GetData(), w, "GetCurrentTextureDebug");
|
||||
|
||||
Reference in new issue
Block a user