From 4cd31908b4d832d8a1fb38274e2854678cbcc69a Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 14 Oct 2016 19:38:11 +0200 Subject: [PATCH] Update qrenderdoc for API changes --- qrenderdoc/Windows/Dialogs/TextureSaveDialog.cpp | 2 +- qrenderdoc/Windows/TextureViewer.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qrenderdoc/Windows/Dialogs/TextureSaveDialog.cpp b/qrenderdoc/Windows/Dialogs/TextureSaveDialog.cpp index 4d951bf08..c1f60e7d1 100644 --- a/qrenderdoc/Windows/Dialogs/TextureSaveDialog.cpp +++ b/qrenderdoc/Windows/Dialogs/TextureSaveDialog.cpp @@ -73,7 +73,7 @@ TextureSaveDialog::TextureSaveDialog(const FetchTexture &t, const TextureSave &s const char *cubeFaces[] = {"X+", "X-", "Y+", "Y-", "Z+", "Z-"}; - uint32_t numSlices = (qMax(1U, tex.depth) * tex.numSubresources) / tex.mips; + uint32_t numSlices = qMax(tex.arraysize, tex.depth); for(uint32_t i = 0; i < numSlices; i++) { diff --git a/qrenderdoc/Windows/TextureViewer.cpp b/qrenderdoc/Windows/TextureViewer.cpp index 0e5f7e128..53139c12b 100644 --- a/qrenderdoc/Windows/TextureViewer.cpp +++ b/qrenderdoc/Windows/TextureViewer.cpp @@ -1157,7 +1157,7 @@ void TextureViewer::UI_OnTextureSelectionChanged(bool newdraw) ui->sliceFace->clear(); - if(tex.numSubresources == tex.mips && tex.depth <= 1) + if(tex.arraysize == 1 && tex.depth <= 1) { ui->sliceFace->setEnabled(false); } @@ -1167,7 +1167,7 @@ void TextureViewer::UI_OnTextureSelectionChanged(bool newdraw) QString cubeFaces[] = {"X+", "X-", "Y+", "Y-", "Z+", "Z-"}; - uint32_t numSlices = (qMax(1U, tex.depth) * tex.numSubresources) / tex.mips; + uint32_t numSlices = tex.arraysize; // for 3D textures, display the number of slices at this mip if(tex.depth > 1)