st/mesa: fix UBO offsets.
authorDave Airlie <airlied@redhat.com>
Thu, 11 Apr 2013 05:20:19 +0000 (15:20 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 11 Apr 2013 05:20:19 +0000 (15:20 +1000)
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>
src/mesa/state_tracker/st_atom_constbuf.c

index 56ba96fe3628ddedf3cabf790d6253441b730e7e..ed69166f6b58aac4ef6805d36284b83d21bcc92d 100644 (file)
@@ -197,6 +197,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;
 
       cso_set_constant_buffer(st->cso_context, shader_type, 1 + i, &cb);
       pipe_resource_reference(&cb.buffer, NULL);