mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 08:54:05 +00:00
wined3d: Clamp the bound buffer range to the buffer size.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53671
This commit is contained in:
parent
95b96a4a84
commit
09cafcc3b6
|
@ -4618,7 +4618,9 @@ static void state_cb(struct wined3d_context *context, const struct wined3d_state
|
|||
buffer = buffer_state->buffer;
|
||||
bo_gl = wined3d_bo_gl(buffer->buffer_object);
|
||||
GL_EXTCALL(glBindBufferRange(GL_UNIFORM_BUFFER, base + i,
|
||||
bo_gl->id, bo_gl->b.buffer_offset + buffer_state->offset, buffer_state->size));
|
||||
bo_gl->id, bo_gl->b.buffer_offset + buffer_state->offset,
|
||||
min(buffer_state->size, buffer->resource.size - buffer_state->offset)));
|
||||
|
||||
buffer->bo_user.valid = true;
|
||||
}
|
||||
checkGLcall("bind constant buffers");
|
||||
|
|
Loading…
Reference in a new issue