how to efficiently upload gray scale 16 bit texture?

Hi all,

what is the fastest way to upload 16 bit gray scale texture in opengl? I tried glTextureSubImage2D, used external and internal format as GL_RED, data type is GL_UNSIGNED_SHORT, but it seems to be quite slow. For 2048x2048 16 bit texture, it takes about 4-5 ms.

CUDA copy from cpu to gpu is much faster, taking less than 1ms. Any idea of how to speed up the upload? Thanks.

Try using GL_R16 as the internal format.