Commit 68eab7af authored by Timothy Arceri's avatar Timothy Arceri

mesa: add support for glCompressedTextureSubImage2DEXT()

parent 82d6ca30
......@@ -123,6 +123,21 @@
<param name="texture" type="GLuint" />
</function>
<!-- OpenGL 1.3 -->
<function name="CompressedTextureSubImage2DEXT">
<param name="texture" type="GLuint" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
<param name="xoffset" type="GLint" />
<param name="yoffset" type="GLint" />
<param name="width" type="GLsizei" />
<param name="height" type="GLsizei" />
<param name="format" type="GLenum" />
<param name="imageSize" type="GLsizei" />
<param name="data" type="const GLvoid *" />
</function>
<!-- OpenGL 1.5 -->
<function name="NamedBufferDataEXT">
......
......@@ -1118,7 +1118,7 @@ const struct function common_desktop_functions_possible[] = {
//{ "glCompressedTextureImage2DEXT", 10, -1 },
//{ "glCompressedTextureImage3DEXT", 10, -1 },
//{ "glCompressedTextureSubImage1DEXT", 10, -1 },
//{ "glCompressedTextureSubImage2DEXT", 10, -1 },
{ "glCompressedTextureSubImage2DEXT", 10, -1 },
//{ "glCompressedTextureSubImage3DEXT", 10, -1 },
//{ "glGetCompressedTextureImageEXT", 10, -1 },
//{ "glCompressedMultiTexImage1DEXT", 10, -1 },
......
......@@ -5062,8 +5062,8 @@ compressed_tex_sub_image(unsigned dim, GLenum target, GLuint texture,
GLint level, GLint xoffset, GLint yoffset,
GLint zoffset, GLsizei width, GLsizei height,
GLsizei depth, GLenum format, GLsizei imageSize,
const GLvoid *data, bool dsa, bool no_error,
const char *caller)
const GLvoid *data, bool dsa, bool ext_dsa,
bool no_error, const char *caller)
{
struct gl_texture_object *texObj = NULL;
struct gl_texture_image *texImage;
......@@ -5073,13 +5073,20 @@ compressed_tex_sub_image(unsigned dim, GLenum target, GLuint texture,
if (dsa) {
if (no_error) {
texObj = _mesa_lookup_texture(ctx, texture);
target = texObj->Target;
} else {
texObj = _mesa_lookup_texture_err(ctx, texture, caller);
if (!texObj)
return;
}
if (!ext_dsa) {
texObj = _mesa_lookup_texture_err(ctx, texture, caller);
if (!texObj)
return;
target = texObj->Target;
target = texObj->Target;
} else {
texObj = lookup_texture_ext_dsa(ctx, target, texture, caller);
if (!texObj)
return;
}
}
}
if (!no_error &&
......@@ -5150,12 +5157,12 @@ compressed_tex_sub_image_error(unsigned dim, GLenum target, GLuint texture,
GLint level, GLint xoffset, GLint yoffset,
GLint zoffset, GLsizei width, GLsizei height,
GLsizei depth, GLenum format, GLsizei imageSize,
const GLvoid *data, bool dsa,
const GLvoid *data, bool dsa, bool ext_dsa,
const char *caller)
{
compressed_tex_sub_image(dim, target, texture, level, xoffset, yoffset,
zoffset, width, height, depth, format, imageSize,
data, dsa, false, caller);
data, dsa, ext_dsa, false, caller);
}
static void
......@@ -5163,12 +5170,12 @@ compressed_tex_sub_image_no_error(unsigned dim, GLenum target, GLuint texture,
GLint level, GLint xoffset, GLint yoffset,
GLint zoffset, GLsizei width, GLsizei height,
GLsizei depth, GLenum format, GLsizei imageSize,
const GLvoid *data, bool dsa,
const GLvoid *data, bool dsa, bool ext_dsa,
const char *caller)
{
compressed_tex_sub_image(dim, target, texture, level, xoffset, yoffset,
zoffset, width, height, depth, format, imageSize,
data, dsa, true, caller);
data, dsa, ext_dsa, true, caller);
}
void GLAPIENTRY
......@@ -5179,7 +5186,7 @@ _mesa_CompressedTexSubImage1D_no_error(GLenum target, GLint level,
{
compressed_tex_sub_image_no_error(1, target, 0, level, xoffset, 0, 0, width,
1, 1, format, imageSize, data, false,
"glCompressedTexSubImage1D");
false, "glCompressedTexSubImage1D");
}
......@@ -5189,7 +5196,7 @@ _mesa_CompressedTexSubImage1D(GLenum target, GLint level, GLint xoffset,
GLsizei imageSize, const GLvoid *data)
{
compressed_tex_sub_image_error(1, target, 0, level, xoffset, 0, 0, width, 1,
1, format, imageSize, data, false,
1, format, imageSize, data, false, false,
"glCompressedTexSubImage1D");
}
......@@ -5200,8 +5207,9 @@ _mesa_CompressedTextureSubImage1D_no_error(GLuint texture, GLint level,
GLenum format, GLsizei imageSize,
const GLvoid *data)
{
compressed_tex_sub_image_no_error(1, 0, texture, level, xoffset, 0, 0, width,
1, 1, format, imageSize, data, true,
compressed_tex_sub_image_no_error(1, 0, texture, level, xoffset, 0, 0,
width, 1, 1, format, imageSize, data,
true, false,
"glCompressedTextureSubImage1D");
}
......@@ -5212,10 +5220,11 @@ _mesa_CompressedTextureSubImage1D(GLuint texture, GLint level, GLint xoffset,
GLsizei imageSize, const GLvoid *data)
{
compressed_tex_sub_image_error(1, 0, texture, level, xoffset, 0, 0, width,
1, 1, format, imageSize, data, true,
1, 1, format, imageSize, data, true, false,
"glCompressedTextureSubImage1D");
}
void GLAPIENTRY
_mesa_CompressedTexSubImage2D_no_error(GLenum target, GLint level,
GLint xoffset, GLint yoffset,
......@@ -5225,7 +5234,8 @@ _mesa_CompressedTexSubImage2D_no_error(GLenum target, GLint level,
{
compressed_tex_sub_image_no_error(2, target, 0, level, xoffset, yoffset, 0,
width, height, 1, format, imageSize, data,
false, "glCompressedTexSubImage2D");
false, false,
"glCompressedTexSubImage2D");
}
......@@ -5237,7 +5247,22 @@ _mesa_CompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset,
{
compressed_tex_sub_image_error(2, target, 0, level, xoffset, yoffset, 0,
width, height, 1, format, imageSize, data,
false, "glCompressedTexSubImage2D");
false, false,
"glCompressedTexSubImage2D");
}
void GLAPIENTRY
_mesa_CompressedTextureSubImage2DEXT(GLuint texture, GLenum target,
GLint level, GLint xoffset,
GLint yoffset, GLsizei width,
GLsizei height, GLenum format,
GLsizei imageSize, const GLvoid *data)
{
compressed_tex_sub_image_error(2, target, texture, level, xoffset, yoffset,
0, width, height, 1, format, imageSize,
data, true, true,
"glCompressedTextureSubImage2DEXT");
}
......@@ -5250,7 +5275,8 @@ _mesa_CompressedTextureSubImage2D_no_error(GLuint texture, GLint level,
{
compressed_tex_sub_image_no_error(2, 0, texture, level, xoffset, yoffset, 0,
width, height, 1, format, imageSize, data,
true, "glCompressedTextureSubImage2D");
true, false,
"glCompressedTextureSubImage2D");
}
......@@ -5263,7 +5289,8 @@ _mesa_CompressedTextureSubImage2D(GLuint texture, GLint level, GLint xoffset,
{
compressed_tex_sub_image_error(2, 0, texture, level, xoffset, yoffset, 0,
width, height, 1, format, imageSize, data,
true, "glCompressedTextureSubImage2D");
true, false,
"glCompressedTextureSubImage2D");
}
void GLAPIENTRY
......@@ -5276,7 +5303,7 @@ _mesa_CompressedTexSubImage3D_no_error(GLenum target, GLint level,
{
compressed_tex_sub_image_no_error(3, target, 0, level, xoffset, yoffset,
zoffset, width, height, depth, format,
imageSize, data, false,
imageSize, data, false, false,
"glCompressedTexSubImage3D");
}
......@@ -5288,7 +5315,7 @@ _mesa_CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset,
{
compressed_tex_sub_image_error(3, target, 0, level, xoffset, yoffset,
zoffset, width, height, depth, format,
imageSize, data, false,
imageSize, data, false, false,
"glCompressedTexSubImage3D");
}
......@@ -5302,7 +5329,7 @@ _mesa_CompressedTextureSubImage3D_no_error(GLuint texture, GLint level,
{
compressed_tex_sub_image_no_error(3, 0, texture, level, xoffset, yoffset,
zoffset, width, height, depth, format,
imageSize, data, true,
imageSize, data, true, false,
"glCompressedTextureSubImage3D");
}
......@@ -5315,7 +5342,7 @@ _mesa_CompressedTextureSubImage3D(GLuint texture, GLint level, GLint xoffset,
{
compressed_tex_sub_image_error(3, 0, texture, level, xoffset, yoffset,
zoffset, width, height, depth, format,
imageSize, data, true,
imageSize, data, true, false,
"glCompressedTextureSubImage3D");
}
......
......@@ -532,6 +532,13 @@ _mesa_CompressedTextureSubImage1D(GLuint texture, GLint level, GLint xoffset,
GLsizei width, GLenum format,
GLsizei imageSize, const GLvoid *data);
void GLAPIENTRY
_mesa_CompressedTextureSubImage2DEXT(GLuint texture, GLenum target,
GLint level, GLint xoffset,
GLint yoffset, GLsizei width,
GLsizei height, GLenum format,
GLsizei imageSize, const GLvoid *data);
extern void GLAPIENTRY
_mesa_CompressedTexSubImage2D_no_error(GLenum target, GLint level,
GLint xoffset, GLint yoffset,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment