mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
If a buffer is somehow 0 bytes, create it as at least 4 bytes
* This is harmless padding and will avoid some errors on creation.
This commit is contained in:
@@ -1079,7 +1079,8 @@ bool GLResourceManager::Serialise_InitialState(SerialiserType &ser, ResourceId r
|
||||
{
|
||||
gl.glGenBuffers(1, &res.name);
|
||||
gl.glBindBuffer(eGL_COPY_WRITE_BUFFER, res.name);
|
||||
gl.glNamedBufferDataEXT(res.name, (GLsizeiptr)BufferContentsSize, NULL, eGL_STATIC_DRAW);
|
||||
gl.glNamedBufferDataEXT(res.name, (GLsizeiptr)RDCMAX(BufferContentsSize, 4U), NULL,
|
||||
eGL_STATIC_DRAW);
|
||||
BufferContents = (byte *)gl.glMapNamedBufferEXT(res.name, eGL_WRITE_ONLY);
|
||||
|
||||
SetInitialContents(
|
||||
|
||||
Reference in New Issue
Block a user