aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/intel_tex.h
diff options
context:
space:
mode:
authorSisinty Sasmita Patra <[email protected]>2014-12-12 13:03:21 -0800
committerJason Ekstrand <[email protected]>2015-01-26 17:29:35 -0800
commit90bd943f2abafd5e3ea29ab8397fd4682ef74170 (patch)
treebdc65b26aeb1d1c8e1adc78496c7d89e44a72663 /src/mesa/drivers/dri/i965/intel_tex.h
parentb52959c6022509514deb672e53c710069eed0237 (diff)
i965: Implemente a tiled fast-path for glReadPixels and glGetTexImage
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 <[email protected]> - 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 <[email protected]> - Better documentation fot the *_tiled_memcpy functions - Add target restrictions for renderbuffers wrapping textures v4: Jason Ekstrand <[email protected]> - Only check the return value of brw_bo_map for error and not bo->virtual v5: Jason Ekstrand <[email protected]> - Don't unnecessarily repeat a comment Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_tex.h')
-rw-r--r--src/mesa/drivers/dri/i965/intel_tex.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tex.h b/src/mesa/drivers/dri/i965/intel_tex.h
index 27f7f1135bd..f048e846d55 100644
--- a/src/mesa/drivers/dri/i965/intel_tex.h
+++ b/src/mesa/drivers/dri/i965/intel_tex.h
@@ -68,4 +68,13 @@ intel_texsubimage_tiled_memcpy(struct gl_context *ctx,
const struct gl_pixelstore_attrib *packing,
bool for_glTexImage);
+bool
+intel_gettexsubimage_tiled_memcpy(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
+ GLint xoffset, GLint yofset,
+ GLsizei width, GLsizei height,
+ GLenum format, GLenum type,
+ GLvoid *pixels,
+ const struct gl_pixelstore_attrib *packing);
+
#endif