i965: Ensure that intel_bufferobj_map_range meets alignment guarantees
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 20 Dec 2013 20:42:33 +0000 (12:42 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 20 Jan 2014 19:40:34 +0000 (11:40 -0800)
commit1ec663ab193e3dc87eb8729de4f0ecee7027961b
treecd50f4a85a4d5563e6f5360402d4f5c5e4a1f8f7
parentc2352a88ed6595f1138de23a96f3152cf7a76778
i965: Ensure that intel_bufferobj_map_range meets alignment guarantees

No piglit regressions on IVB.

With minor tweaks to the arb_map_buffer_alignment-map-invalidate-range
test (disable the extension check, set alignment to 64 instead of
querying), the i965 driver would fail the test without this patch (as
predicted by Eric).  With this patch, it passes.

v2: Remove MAX2(64, ...).  Suggested by Ken.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: Siavash Eliasi <siavashserver@gmail.com>
src/mesa/drivers/dri/i965/intel_buffer_objects.c