OSDN Git Service

i965: Refactor tiled memcpy functions and move them into their own file
authorSisinty Sasmita Patra <sisinty.patra@intel.com>
Fri, 12 Dec 2014 19:28:05 +0000 (11:28 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 27 Jan 2015 01:29:34 +0000 (17:29 -0800)
commit009be40b7d9e882ce95f6f76523f8f6d1c21238c
treeb2d04e33c42a8b68eda1c74b854d89831c6e79e6
parentf883aac06ee9f609273722772b7dd15debaf4f11
i965: Refactor tiled memcpy functions and move them into their own file

This commit refactors the tiled_memcpy code in intel_tex_subimage.c and
moves it into its own file intel_tiled_memcpy files.  Also, xtile_copy and
ytile_copy are renamed to linear_to_xtiled and linear_to_ytiled
respectively.  The *_faster functions are similarly renamed.

There was also a bit of logic to select between the the libc provided
memcpy function and our custom memcpy that does an RGBA -> BGRA swizzle.
This was moved into an intel_get_memcpy function so that rgba8_copy can
live (and be inlined) in intel_tiled_memcpy.c.

v2: Jason Ekstrand <jason.ekstrand@intel.com>
   - Better commit message
   - Fix up the copyright on the intel_tiled_memcpy files
   - Various whitespace fixes
   - Moved a bunch of stuff that did not need to be exposed from
     intel_tiled_memcpy.h to intel_tiled_memcpy.c
   - Added proper documentation for intel_get_memcpy
   - Incorperated the ptrdiff_t tweaks from commit 225a09790

v3: Jason Ekstrand <jason.ekstrand@intel.com>
   - Fixed a comment
   - Move the tile size constants into the .c file

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
src/mesa/drivers/dri/i965/Makefile.sources
src/mesa/drivers/dri/i965/intel_tex_subimage.c
src/mesa/drivers/dri/i965/intel_tiled_memcpy.c [new file with mode: 0644]
src/mesa/drivers/dri/i965/intel_tiled_memcpy.h [new file with mode: 0644]