Fixes for structured exporting multisampled textures on GL

This commit is contained in:
baldurk
2021-01-28 15:49:28 +00:00
parent 22636f673b
commit 263cf0778f
2 changed files with 15 additions and 4 deletions
+8
View File
@@ -1573,6 +1573,14 @@ bool GLResourceManager::Serialise_InitialState(SerialiserType &ser, ResourceId i
targets[0] = eGL_TEXTURE_2D_ARRAY;
}
}
else if(IsStructuredExporting(m_State))
{
if(TextureState.samples > 1)
{
copySlices = RDCMAX(1U, TextureState.depth) * TextureState.samples;
texDim = 3;
}
}
else if(ser.IsWriting())
{
// on writing, bind the prepared texture with initial contents to grab
@@ -429,10 +429,13 @@ bool WrappedOpenGL::Serialise_wglDXLockObjectsNV(SerialiserType &ser, GLResource
SERIALISE_ELEMENT_LOCAL(height, details.height).Hidden();
SERIALISE_ELEMENT_LOCAL(depth, details.depth).Hidden();
RDCASSERT(internalFormat == details.internalFormat, internalFormat, details.internalFormat);
RDCASSERT(width == details.width, width, details.width);
RDCASSERT(height == details.height, height, details.height);
RDCASSERT(depth == details.depth, depth, details.depth);
if(!IsStructuredExporting(m_State))
{
RDCASSERT(internalFormat == details.internalFormat, internalFormat, details.internalFormat);
RDCASSERT(width == details.width, width, details.width);
RDCASSERT(height == details.height, height, details.height);
RDCASSERT(depth == details.depth, depth, details.depth);
}
GLenum fmt = GetBaseFormat(internalFormat);
GLenum type = GetDataType(internalFormat);