mesa: reject immutable textures in glEGLImageTargetTexture2DOES()
authorDylan Noblesmith <nobled@dreamwidth.org>
Sun, 29 Apr 2012 13:23:53 +0000 (13:23 +0000)
committerDylan Noblesmith <nobled@dreamwidth.org>
Mon, 30 Apr 2012 14:52:47 +0000 (14:52 +0000)
commit18bb6852b234a69530a4a6f3ff4e9d33b8e8c7fb
tree95c4b1db76cdf9e4d298be8e5f2ee3b35d8f0278
parent4c23acb269b3d30b9840fcb36edf01410b2f9213
mesa: reject immutable textures in glEGLImageTargetTexture2DOES()

GL_ARB_texture_storage says:

    The commands eglBindTexImage, wglBindTexImageARB, glXBindTexImageEXT or
    EGLImageTargetTexture2DOES are not permitted on an immutable-format
    texture.
    They will generate the following errors:
      - EGLImageTargetTexture2DOES: INVALID_OPERATION
      - eglBindTexImage: EGL_BAD_MATCH
      - wglBindTexImage: ERROR_INVALID_OPERATION
      - glXBindTexImageEXT: BadMatch

Fixing the EGL and GLX cases requires extending the DRI interface,
since setTexBuffer2 doesn't currently return any error information.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/teximage.c