Handle missing/unsized formats on replay

* This can happen if someone binds an uncreated texture (!).
This commit is contained in:
baldurk
2015-02-25 22:22:32 +00:00
parent ae9e9e8f9f
commit fae5aabcce
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -1035,6 +1035,9 @@ bool GLReplay::RenderTextureInternal(TextureDisplay cfg, bool blendAlpha)
auto &texDetails = m_pDriver->m_Textures[cfg.texid];
if(texDetails.internalFormat == eGL_NONE)
return false;
bool renderbuffer = false;
int intIdx = 0;
+1
View File
@@ -1454,6 +1454,7 @@ void GLReplay::SavePipelineState()
GLenum levelQueryType = target == eGL_TEXTURE_CUBE_MAP ? eGL_TEXTURE_CUBE_MAP_POSITIVE_X : target;
GLenum fmt = eGL_NONE;
gl.glGetTexLevelParameteriv(levelQueryType, 0, eGL_TEXTURE_INTERNAL_FORMAT, (GLint *)&fmt);
fmt = GetSizedFormat(gl.GetHookset(), target, fmt);
if(IsDepthStencilFormat(fmt))
{
GLint depthMode;