Check bindpoint isn't -1 (for non-buffer-backed uniforms)

This commit is contained in:
Baldur Karlsson
2014-08-08 11:15:16 +01:00
parent 0c5a549633
commit e19daa58e3
+9 -5
View File
@@ -372,13 +372,17 @@ namespace renderdocui.Code
if(s.ShaderDetails != null && BindPoint < s.ShaderDetails.ConstantBlocks.Length)
{
var b = m_GL.UniformBuffers[s.ShaderDetails.ConstantBlocks[BindPoint].bindPoint];
if(s.ShaderDetails.ConstantBlocks[BindPoint].bindPoint >= 0 &&
s.ShaderDetails.ConstantBlocks[BindPoint].bindPoint < m_GL.UniformBuffers.Length)
{
var b = m_GL.UniformBuffers[s.ShaderDetails.ConstantBlocks[BindPoint].bindPoint];
buf = b.Resource;
ByteOffset = (uint)b.Offset;
ByteSize = (uint)b.Size;
buf = b.Resource;
ByteOffset = (uint)b.Offset;
ByteSize = (uint)b.Size;
return;
return;
}
}
}
}