Don't divide by zero if texbuffer comes back with unknown format

This commit is contained in:
baldurk
2018-05-03 15:34:53 +01:00
parent b1008ceb82
commit 2c084b478e
+1 -1
View File
@@ -486,7 +486,7 @@ void GLReplay::CacheTexture(ResourceId id)
gl.glGetTextureLevelParameterivEXT(res.resource.name, levelQueryType, 0,
eGL_TEXTURE_BUFFER_SIZE, (GLint *)&tex.byteSize);
tex.width = uint32_t(tex.byteSize / (tex.format.compByteWidth * tex.format.compCount));
tex.width = uint32_t(tex.byteSize / RDCMAX(1, tex.format.compByteWidth * tex.format.compCount));
m_CachedTextures[id] = tex;
return;