st/mesa: implement a simple cache for glDrawPixels

Graphics / Mesa 3D Graphics Library / Mesa - Brian Paul [vmware.com] - 19 February 2016 09:51 UTC

Instead of discarding the texture we created, keep it around in case the next glDrawPixels draws the same image again. This is intended to help application which draw the same image several times in a row, either within a frame or subsequent frames.

44f48fe st/mesa: implement a simple cache for glDrawPixels
src/mesa/state_tracker/st_cb_drawpixels.c | 85 +++++++++++++++++++++++++++++
src/mesa/state_tracker/st_context.c | 4 ++
src/mesa/state_tracker/st_context.h | 8 +++
3 files changed, 97 insertions(+)

Upstream: cgit.freedesktop.org


  • Share