anv/copy: Fix copying Images from Buffers with larger dimensions
authorNanley Chery <nanley.g.chery@intel.com>
Mon, 9 May 2016 18:45:07 +0000 (11:45 -0700)
committerNanley Chery <nanley.g.chery@intel.com>
Fri, 13 May 2016 21:08:57 +0000 (14:08 -0700)
commit6674d018f7eab899520c1459e569bdea3a6f4874
tree3573bcd91ffc9280fecd5088b054b702ff558957
parentff5c3126235804e963abaa94e5ea50d1295cdd5f
anv/copy: Fix copying Images from Buffers with larger dimensions

This function previously assumed that the Buffer and Image had matching
dimensions. However, it is possible to copy from a Buffer with larger
dimensions than the Image. Modify the copy function to enable this.

v2: Use ternary instead of MAX for setting bufferExtent (Jason Ekstrand)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95292
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Tested-by: Matthew Waters <matthew@centricular.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_meta_copy.c