Ignore buffers that don't have a type

* This won't be a problem eventually as these buffers aren't referenced
  so will be dropped from the log in most cases.
This commit is contained in:
Baldur Karlsson
2014-06-24 15:49:14 +01:00
parent 2357921180
commit 20e045cc12
+13
View File
@@ -484,6 +484,16 @@ FetchBuffer GLReplay::GetBuffer(ResourceId id)
ret.ID = m_pDriver->GetResourceManager()->GetOriginalID(id);
if(res.curType == eGL_UNKNOWN_ENUM)
{
ret.byteSize = 0;
ret.creationFlags = 0;
ret.customName = false;
ret.length = 0;
ret.structureSize = 0;
return ret;
}
gl.glBindBuffer(res.curType, res.resource.name);
ret.structureSize = 0;
@@ -501,6 +511,9 @@ FetchBuffer GLReplay::GetBuffer(ResourceId id)
case eGL_UNIFORM_BUFFER:
ret.creationFlags = eBufferCreate_CB;
break;
case eGL_PIXEL_PACK_BUFFER:
case eGL_COPY_WRITE_BUFFER:
break;
default:
RDCERR("Unexpected buffer type %hs", ToStr::Get(res.curType).c_str());
}