mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-20 20:55:42 +00:00
Handle weird unexplained case where texture dimensions query as 0x0x0
This commit is contained in:
@@ -472,6 +472,14 @@ void GLReplay::CacheTexture(ResourceId id)
|
||||
gl.glGetTextureLevelParameterivEXT(res.resource.name, levelQueryType, 0, eGL_TEXTURE_DEPTH, &depth);
|
||||
gl.glGetTextureLevelParameterivEXT(res.resource.name, levelQueryType, 0, eGL_TEXTURE_SAMPLES, &samples);
|
||||
|
||||
// the above queries sometimes come back 0, if we have dimensions from creation functions, use those
|
||||
if(width == 0 && res.width > 0)
|
||||
width = res.width;
|
||||
if(height == 0 && res.height > 0)
|
||||
height = res.height;
|
||||
if(depth == 0 && res.depth > 0)
|
||||
depth = res.depth;
|
||||
|
||||
if(res.width == 0 && width > 0)
|
||||
{
|
||||
RDCWARN("TextureData::width didn't get filled out, setting at last minute");
|
||||
|
||||
Reference in New Issue
Block a user