i965: Implemente a tiled fast-path for glReadPixels and glGetTexImage

Graphics / Mesa 3D Graphics Library / Mesa - Sisinty Sasmita Patra [intel.com] - 26 January 2015 19:29 UTC

Added intel_readpixels_tiled_mempcpy and intel_gettexsubimage_tiled_mempcpy functions. These are the fast paths for glReadPixels and glGetTexImage.

On chrome, using the RoboHornet 2D Canvas toDataURL test, this patch cuts amount of time spent in glReadPixels by more than half and reduces the time of the entire test by 10%.

v2: Jason Ekstrand- Refactor to make the functions look more like the old intel_tex_subimage_tiled_memcpy- Don't export the readpixels_tiled_memcpy function- Fix some pointer arithmatic bugs in partial image downloads (using ReadPixels with a non-zero x or y offset)- Fix a bug when ReadPixels is performed on an FBO wrapping a texture miplevel other than zero.

v3: Jason Ekstrand- Better documentation fot the *_tiled_memcpy functions- Add target restrictions for renderbuffers wrapping textures

v4: Jason Ekstrand- Only check the return value of brw_bo_map for error and not bo->virtual

v5: Jason Ekstrand- Don't unnecessarily repeat a comment

90bd943 i965: Implemente a tiled fast-path for glReadPixels and glGetTexImage
src/mesa/drivers/dri/i965/intel_pixel_read.c | 140 ++++++++++++++++++++++++++
src/mesa/drivers/dri/i965/intel_tex.h | 9 ++
src/mesa/drivers/dri/i965/intel_tex_image.c | 123 +++++++++++++++++++++-
3 files changed, 271 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share