diff options
author | marha <marha@users.sourceforge.net> | 2015-05-26 19:43:34 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2015-05-26 19:43:34 +0200 |
commit | 912e881bec8b16f2331225960645c3bdf5a8ba2d (patch) | |
tree | 92afd568d4b3eaab1faf26d8d95d8c6df0173079 /mesalib/src/mesa/main/teximage.c | |
parent | 2e00f3764228cfc91180bbe9375a8d85e0e65a5b (diff) | |
parent | 843964ee791452b197e41dacb0146f5b456ffaa5 (diff) | |
download | vcxsrv-912e881bec8b16f2331225960645c3bdf5a8ba2d.tar.gz vcxsrv-912e881bec8b16f2331225960645c3bdf5a8ba2d.tar.bz2 vcxsrv-912e881bec8b16f2331225960645c3bdf5a8ba2d.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/mapi/glapi/glapi_priv.h
mesalib/src/mesa/drivers/dri/swrast/swrast.c
xorg-server/dix/dispatch.c
xorg-server/os/utils.c
xorg-server/record/record.c
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r-- | mesalib/src/mesa/main/teximage.c | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c index 7bc1da7f8..7616fd7ce 100644 --- a/mesalib/src/mesa/main/teximage.c +++ b/mesalib/src/mesa/main/teximage.c @@ -3624,6 +3624,13 @@ texturesubimage(struct gl_context *ctx, GLuint dims, _mesa_lookup_enum_by_nr(format), _mesa_lookup_enum_by_nr(type), pixels); + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glTextureSubImage%uD(GL_ARB_direct_state_access " + "is not supported)", dims); + return; + } + /* Get the texture object by Name. */ texObj = _mesa_lookup_texture(ctx, texture); if (!texObj) { @@ -4183,6 +4190,12 @@ _mesa_CopyTextureSubImage1D(GLuint texture, GLint level, const char *self = "glCopyTextureSubImage1D"; GET_CURRENT_CONTEXT(ctx); + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "%s(GL_ARB_direct_state_access is not supported)", self); + return; + } + texObj = _mesa_lookup_texture_err(ctx, texture, self); if (!texObj) return; @@ -4207,6 +4220,12 @@ _mesa_CopyTextureSubImage2D(GLuint texture, GLint level, const char *self = "glCopyTextureSubImage2D"; GET_CURRENT_CONTEXT(ctx); + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "%s(GL_ARB_direct_state_access is not supported)", self); + return; + } + texObj = _mesa_lookup_texture_err(ctx, texture, self); if (!texObj) return; @@ -4234,6 +4253,12 @@ _mesa_CopyTextureSubImage3D(GLuint texture, GLint level, const char *self = "glCopyTextureSubImage3D"; GET_CURRENT_CONTEXT(ctx); + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "%s(GL_ARB_direct_state_access is not supported)", self); + return; + } + texObj = _mesa_lookup_texture_err(ctx, texture, self); if (!texObj) return; @@ -4829,6 +4854,13 @@ _mesa_CompressedTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GET_CURRENT_CONTEXT(ctx); + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glCompressedTextureSubImage1D(GL_ARB_direct_state_access " + "is not supported)"); + return; + } + texObj = _mesa_lookup_texture_err(ctx, texture, "glCompressedTextureSubImage1D"); if (!texObj) @@ -4907,6 +4939,13 @@ _mesa_CompressedTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, GET_CURRENT_CONTEXT(ctx); + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glCompressedTextureSubImage2D(GL_ARB_direct_state_access " + "is not supported)"); + return; + } + texObj = _mesa_lookup_texture_err(ctx, texture, "glCompressedTextureSubImage2D"); if (!texObj) @@ -4985,6 +5024,13 @@ _mesa_CompressedTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GET_CURRENT_CONTEXT(ctx); + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glCompressedTextureSubImage3D(GL_ARB_direct_state_access " + "is not supported)"); + return; + } + texObj = _mesa_lookup_texture_err(ctx, texture, "glCompressedTextureSubImage3D"); if (!texObj) @@ -5469,6 +5515,13 @@ _mesa_TextureBuffer(GLuint texture, GLenum internalFormat, GLuint buffer) GET_CURRENT_CONTEXT(ctx); + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glTextureBuffer(GL_ARB_direct_state_access " + "is not supported)"); + return; + } + if (buffer) { bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glTextureBuffer"); if (!bufObj) @@ -5497,6 +5550,13 @@ _mesa_TextureBufferRange(GLuint texture, GLenum internalFormat, GLuint buffer, GET_CURRENT_CONTEXT(ctx); + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glTextureBufferRange(GL_ARB_direct_state_access " + "is not supported)"); + return; + } + if (buffer) { bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glTextureBufferRange"); @@ -5801,6 +5861,13 @@ _mesa_TextureStorage2DMultisample(GLuint texture, GLsizei samples, struct gl_texture_object *texObj; GET_CURRENT_CONTEXT(ctx); + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glTextureStorage2DMultisample(GL_ARB_direct_state_access " + "is not supported)"); + return; + } + texObj = _mesa_lookup_texture_err(ctx, texture, "glTextureStorage2DMultisample"); if (!texObj) @@ -5821,6 +5888,13 @@ _mesa_TextureStorage3DMultisample(GLuint texture, GLsizei samples, struct gl_texture_object *texObj; GET_CURRENT_CONTEXT(ctx); + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glTextureStorage3DMultisample(GL_ARB_direct_state_access " + "is not supported)"); + return; + } + /* Get the texture object by Name. */ texObj = _mesa_lookup_texture_err(ctx, texture, "glTextureStorage3DMultisample"); |