From d906e23f32ed9aebfdb48e46b8c453c114d881ad Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 24 Feb 2021 12:08:15 +0000 Subject: [PATCH] Store original texture details in image viewer, rather than patched * If we need to patch the details we use that for proxy texture upload, but we still want to return the original details to the replay. --- renderdoc/core/image_viewer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/renderdoc/core/image_viewer.cpp b/renderdoc/core/image_viewer.cpp index caba56ea6..11646b957 100644 --- a/renderdoc/core/image_viewer.cpp +++ b/renderdoc/core/image_viewer.cpp @@ -762,13 +762,14 @@ void ImageViewer::RefreshFile() } } + m_TexDetails = texDetails; + if(m_TextureID == ResourceId()) CreateProxyTexture(texDetails, read_data); if(m_TextureID == ResourceId()) RDCERR("Couldn't create proxy texture for image file"); - m_TexDetails = texDetails; m_TexDetails.resourceId = m_TextureID; m_TexDetails.byteSize = fileSize;