mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
# mips should be calculated as GL_TEXTURE_MAX_LEVEL + 1
This commit is contained in:
@@ -368,9 +368,14 @@ bool GLResourceManager::Serialise_InitialState(GLResource res)
|
||||
gl.glGetTexParameteriv(details.curType, eGL_TEXTURE_IMMUTABLE_FORMAT, &immut);
|
||||
|
||||
if(immut)
|
||||
{
|
||||
gl.glGetTexParameteriv(details.curType, eGL_TEXTURE_IMMUTABLE_LEVELS, (GLint *)&imgmips);
|
||||
}
|
||||
else
|
||||
{
|
||||
gl.glGetTexParameteriv(details.curType, eGL_TEXTURE_MAX_LEVEL, (GLint *)&imgmips);
|
||||
imgmips++;
|
||||
}
|
||||
|
||||
TextureStateInitialData *state = (TextureStateInitialData *)GetInitialContents(Id).blob;
|
||||
|
||||
|
||||
@@ -511,9 +511,9 @@ void GLReplay::CacheTexture(ResourceId id)
|
||||
else
|
||||
{
|
||||
// assuming complete texture
|
||||
GLint mips = 1;
|
||||
GLint mips = 0;
|
||||
gl.glGetTexParameteriv(target, eGL_TEXTURE_MAX_LEVEL, &mips);
|
||||
tex.mips = (uint32_t)mips;
|
||||
tex.mips = (uint32_t)mips + 1;
|
||||
}
|
||||
|
||||
tex.numSubresources = tex.mips*tex.arraysize;
|
||||
|
||||
Reference in New Issue
Block a user