Texture management and OpenCL improvements