softpipe: don't ignore pipe_constant_buffer::buffer_offset
authorBrian Paul <brianp@vmware.com>
Thu, 25 Jul 2013 15:13:47 +0000 (09:13 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 31 Jul 2013 12:53:48 +0000 (06:53 -0600)
commit99c42d11a245d6709b33353c2d88e2640f6d101e
tree48ede654f94cc8b1ed9f6acf6bad701cb988c183
parent089ef37eab8270adcb3e4ad96ee9e26e116461a3
softpipe: don't ignore pipe_constant_buffer::buffer_offset

This was never a problem since the Mesa state tracker always gives
us a user-space constant buffer with buffer_offset=0.  But if another
state tracker ever gave us a "HW" constant buffer with non-zero
buffer_offset we'd mis-render.

Also, use the correct buffer size.  And move an assertion to the
top of the function.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/drivers/softpipe/sp_state_shader.c