mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-24 15:36:33 +00:00
Fix mip info for rendering textures during remote replay
Textures are not cached during remote replay at client side, so do not try to use mips from empty texture cache.
This commit is contained in:
committed by
Baldur Karlsson
parent
c50902f030
commit
d22d744675
@@ -1826,7 +1826,7 @@ bool GLReplay::RenderTextureInternal(TextureDisplay cfg, int flags)
|
||||
loc = gl.glGetUniformLocation(customProg, "RENDERDOC_TexDim");
|
||||
if(loc >= 0)
|
||||
gl.glProgramUniform4ui(customProg, loc, texDetails.width, texDetails.height, texDetails.depth,
|
||||
m_CachedTextures[cfg.texid].mips);
|
||||
texDetails.mips);
|
||||
|
||||
loc = gl.glGetUniformLocation(customProg, "RENDERDOC_SelectedMip");
|
||||
if(loc >= 0)
|
||||
@@ -1868,7 +1868,7 @@ bool GLReplay::RenderTextureInternal(TextureDisplay cfg, int flags)
|
||||
GLint clampmaxlevel[4] = {};
|
||||
|
||||
if(cfg.texid != DebugData.CustomShaderTexID)
|
||||
clampmaxlevel[0] = GLint(m_CachedTextures[cfg.texid].mips - 1);
|
||||
clampmaxlevel[0] = GLint(texDetails.mips - 1);
|
||||
|
||||
gl.glGetTextureParameterivEXT(texname, target, eGL_TEXTURE_MAX_LEVEL, maxlevel);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user