Commit a8e8204b authored by Erik Faye-Lund 's avatar Erik Faye-Lund
Browse files

gallium/u_vbuf: support NULL-resources

It's legal for a buffer-object to have a NULL-resource, but let's just
skip over it, as there's nothing to do.
Signed-off-by: Erik Faye-Lund 's avatarErik Faye-Lund <>
Reviewed-by: default avatarMarek Olšák <>
parent 0607ceb6
......@@ -418,6 +418,9 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
unsigned size = vb->stride ? num_vertices * vb->stride
: sizeof(double)*4;
if (!vb->buffer.resource)
if (offset + size > vb->buffer.resource->width0) {
/* Don't try to map past end of buffer. This often happens when
* we're translating an attribute that's at offset > 0 from the
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment