mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 09:30:44 +00:00
Minor-hack around applications that resize MS textures with non-storage
* We can safely use the non-DSA function since this always happens in the texture chunk, not during capture (we do not support mid-capture texture resizes for obvious reasons).
This commit is contained in:
@@ -5166,12 +5166,23 @@ bool WrappedOpenGL::Serialise_glTextureStorage2DMultisampleEXT(SerialiserType &s
|
||||
m_Textures[liveId].emulated = emulated;
|
||||
m_Textures[liveId].mipsValid = 1;
|
||||
|
||||
if(target != eGL_NONE)
|
||||
GL.glTextureStorage2DMultisampleEXT(texture.name, target, samples, internalformat, width,
|
||||
height, fixedsamplelocations);
|
||||
// some applications may resize MSAA textures using old-style functions, so we can't promote to
|
||||
// storage DSA (and a non-storage DSA does not exist so can't be emulated)...
|
||||
if(gl_CurChunk == GLChunk::glTexImage2DMultisample)
|
||||
{
|
||||
GL.glBindTexture(eGL_TEXTURE_2D_MULTISAMPLE, texture.name);
|
||||
GL.glTexImage2DMultisample(eGL_TEXTURE_2D_MULTISAMPLE, samples, internalformat, width, height,
|
||||
fixedsamplelocations);
|
||||
}
|
||||
else
|
||||
GL.glTextureStorage2DMultisample(texture.name, samples, internalformat, width, height,
|
||||
fixedsamplelocations);
|
||||
{
|
||||
if(target != eGL_NONE)
|
||||
GL.glTextureStorage2DMultisampleEXT(texture.name, target, samples, internalformat, width,
|
||||
height, fixedsamplelocations);
|
||||
else
|
||||
GL.glTextureStorage2DMultisample(texture.name, samples, internalformat, width, height,
|
||||
fixedsamplelocations);
|
||||
}
|
||||
|
||||
AddResourceInitChunk(texture);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user