mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Fix GLES initial state readback of compressed cubemaps
This commit is contained in:
@@ -781,6 +781,9 @@ void GLResourceManager::PrepareTextureInitialContents(ResourceId liveid, Resourc
|
||||
{
|
||||
size_t size = GetCompressedByteSize(w, h, d, details.internalFormat);
|
||||
|
||||
if(details.curType == eGL_TEXTURE_CUBE_MAP)
|
||||
size /= 6;
|
||||
|
||||
byte *buf = new byte[size];
|
||||
|
||||
if(IsGLES)
|
||||
@@ -1475,8 +1478,11 @@ bool GLResourceManager::Serialise_InitialState(SerialiserType &ser, ResourceId r
|
||||
{
|
||||
if(IsGLES)
|
||||
{
|
||||
details.compressedData[i].resize(size);
|
||||
memcpy(details.compressedData[i].data(), scratchBuf, size);
|
||||
size_t startOffs =
|
||||
IsCubeFace(targets[trg]) ? CubeTargetIndex(targets[trg]) * size : 0;
|
||||
|
||||
details.compressedData[i].resize(startOffs + size);
|
||||
memcpy(details.compressedData[i].data() + startOffs, scratchBuf, size);
|
||||
}
|
||||
|
||||
if(TextureState.dim == 1)
|
||||
|
||||
Reference in New Issue
Block a user