mesa,intel: use _mesa_image_offset() for PBOs
authornobled <nobled@dreamwidth.org>
Wed, 19 Oct 2011 06:35:53 +0000 (06:35 +0000)
committernobled <nobled@dreamwidth.org>
Thu, 8 Dec 2011 21:23:59 +0000 (21:23 +0000)
commiteefff37060de8c2e98c687c9263e783dfe3ac8cc
tree3fda2ed799c06e0cdcdd07454aa04df0134ebfd6
parent4a2b9b53052a74e71aac59592e95e3910b5b7da5
mesa,intel: use _mesa_image_offset() for PBOs

This avoids forming invalid pointers needlessly, which even if
never dereferenced is undefined behavior. It also makes
_mesa_validate_pbo_access() more comprehensible.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/drivers/dri/intel/intel_pixel_read.c
src/mesa/main/pbo.c