From 7f6308b065f7ebc0c29b54b17316801fddc5f8f5 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 18 Dec 2019 17:34:13 +0000 Subject: [PATCH] When creating initial states for MSAA textures, don't copy to array * On serialise we get an MSAA texture ready for apply, so we can skip this step. --- renderdoc/driver/gl/gl_initstate.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/renderdoc/driver/gl/gl_initstate.cpp b/renderdoc/driver/gl/gl_initstate.cpp index 0328ab1b3..01adeace3 100644 --- a/renderdoc/driver/gl/gl_initstate.cpp +++ b/renderdoc/driver/gl/gl_initstate.cpp @@ -892,8 +892,10 @@ void GLResourceManager::PrepareTextureInitialContents(ResourceId liveid, Resourc (GLint *)&state.magFilter); } - // if this is an MSAA texture we now need to unpack to an array, ready to serialise - if(ms) + // if this is an MSAA texture then during capture we now need to unpack to an array, ready to + // serialise. When replaying, we come in here for 'creating' initial states so we want to keep + // it as MSAA + if(ms && IsCaptureMode(m_State)) { GLuint oldtex = 0; GL.glGetIntegerv(eGL_TEXTURE_BINDING_2D_ARRAY, (GLint *)&oldtex);