st/mesa: fix UBO offsets.

Reported and tested by degasus on #radeon.

Note: This is a candidate for the 9.1 branch

Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit cb12bf7606)
This commit is contained in:
Dave Airlie 2013-04-11 15:20:19 +10:00 committed by Ian Romanick
parent d1b4165fcf
commit 377213b3ee

View file

@ -195,6 +195,7 @@ static void st_bind_ubos(struct st_context *st,
pipe_resource_reference(&cb.buffer, st_obj->buffer);
cb.buffer_size = st_obj->buffer->width0 - binding->Offset;
cb.buffer_offset = binding->Offset;
st->pipe->set_constant_buffer(st->pipe, shader_type, 1 + i, &cb);
pipe_resource_reference(&cb.buffer, NULL);