softpipe/buffer: load only as many components as the the buffer resource type provides
Otherwise we risk to read past the end of the buffer. In addition, change the loop counters to unsigned to be consistent with the types. Fixes: afa8707b softpipe: add SSBO/shader atomics support. Signed-off-by:Gert Wollny <gert.wollny@collabora.com> Reviewed-by:
Dave Airlie <airlied@redhat.com> (cherry picked from commit 865b9dda)