diff options
author | Pierre-Eric Pelloux-Prayer <[email protected]> | 2019-05-06 11:25:04 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-08-19 18:49:57 -0400 |
commit | 8c76221886358ce9f1377507c317d3aa1b02d23c (patch) | |
tree | 99d9421542218f2757057c9830a75347907d840f /src/mesa/main/teximage.c | |
parent | 7df233d68dc11df3e501e001bec550da10aef92a (diff) |
mesa: add EXT_dsa glCompressedTexture(Sub)Image1D/2D/3D functions
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 8a36247c5a1..875d2226ad9 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -5359,6 +5359,24 @@ _mesa_CompressedTexImage1D(GLenum target, GLint level, void GLAPIENTRY +_mesa_CompressedTextureImage1DEXT(GLuint texture, GLenum target, GLint level, + GLenum internalFormat, GLsizei width, + GLint border, GLsizei imageSize, + const GLvoid *pixels) +{ + struct gl_texture_object* texObj; + GET_CURRENT_CONTEXT(ctx); + + texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true, + "glCompressedTextureImage1DEXT"); + if (!texObj) + return; + teximage(ctx, GL_TRUE, 1, texObj, target, level, internalFormat, + width, 1, 1, border, GL_NONE, GL_NONE, imageSize, pixels, false); +} + + +void GLAPIENTRY _mesa_CompressedTexImage2D(GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, @@ -5371,6 +5389,24 @@ _mesa_CompressedTexImage2D(GLenum target, GLint level, void GLAPIENTRY +_mesa_CompressedTextureImage2DEXT(GLuint texture, GLenum target, GLint level, + GLenum internalFormat, GLsizei width, + GLsizei height, GLint border, GLsizei imageSize, + const GLvoid *pixels) +{ + struct gl_texture_object* texObj; + GET_CURRENT_CONTEXT(ctx); + + texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true, + "glCompressedTextureImage2DEXT"); + if (!texObj) + return; + teximage(ctx, GL_TRUE, 2, texObj, target, level, internalFormat, + width, height, 1, border, GL_NONE, GL_NONE, imageSize, pixels, false); +} + + +void GLAPIENTRY _mesa_CompressedTexImage3D(GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, @@ -5383,6 +5419,25 @@ _mesa_CompressedTexImage3D(GLenum target, GLint level, void GLAPIENTRY +_mesa_CompressedTextureImage3DEXT(GLuint texture, GLenum target, GLint level, + GLenum internalFormat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, + GLsizei imageSize, const GLvoid *pixels) +{ + struct gl_texture_object* texObj; + GET_CURRENT_CONTEXT(ctx); + + texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true, + "glCompressedTextureImage3DEXT"); + if (!texObj) + return; + teximage(ctx, GL_TRUE, 3, texObj, target, level, internalFormat, + width, height, depth, border, GL_NONE, GL_NONE, imageSize, pixels, false); +} + + + +void GLAPIENTRY _mesa_CompressedTexImage1D_no_error(GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLint border, GLsizei imageSize, @@ -5627,6 +5682,20 @@ _mesa_CompressedTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, void GLAPIENTRY +_mesa_CompressedTextureSubImage1DEXT(GLuint texture, GLenum target, + GLint level, GLint xoffset, + GLsizei width, GLenum format, + GLsizei imageSize, const GLvoid *data) +{ + compressed_tex_sub_image(1, target, texture, level, xoffset, 0, + 0, width, 1, 1, format, imageSize, + data, + TEX_MODE_EXT_DSA_TEXTURE, + "glCompressedTextureSubImage1DEXT"); +} + + +void GLAPIENTRY _mesa_CompressedTexSubImage2D_no_error(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, @@ -5755,6 +5824,22 @@ _mesa_CompressedTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, } +void GLAPIENTRY +_mesa_CompressedTextureSubImage3DEXT(GLuint texture, GLenum target, + GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, + GLsizei depth, GLenum format, + GLsizei imageSize, const GLvoid *data) +{ + compressed_tex_sub_image(3, target, texture, level, xoffset, yoffset, + zoffset, width, height, depth, format, + imageSize, data, + TEX_MODE_EXT_DSA_TEXTURE, + "glCompressedTextureSubImage3DEXT"); +} + + mesa_format _mesa_get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat) { |