diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mapi/glapi/gen/EXT_direct_state_access.xml | 10 | ||||
-rw-r--r-- | src/mapi/glapi/gen/static_data.py | 2 | ||||
-rw-r--r-- | src/mesa/main/genmipmap.c | 27 | ||||
-rw-r--r-- | src/mesa/main/genmipmap.h | 6 | ||||
-rw-r--r-- | src/mesa/main/tests/dispatch_sanity.cpp | 4 |
5 files changed, 47 insertions, 2 deletions
diff --git a/src/mapi/glapi/gen/EXT_direct_state_access.xml b/src/mapi/glapi/gen/EXT_direct_state_access.xml index cf4ab86cdd1..b2f27cf2dde 100644 --- a/src/mapi/glapi/gen/EXT_direct_state_access.xml +++ b/src/mapi/glapi/gen/EXT_direct_state_access.xml @@ -1026,6 +1026,16 @@ <param name="params" type="GLdouble*" /> </function> + <function name="GenerateTextureMipmapEXT"> + <param name="texture" type="GLuint" /> + <param name="target" type="GLenum" /> + </function> + + <function name="GenerateMultiTexMipmapEXT"> + <param name="texunit" type="GLenum" /> + <param name="target" type="GLenum" /> + </function> + <!-- ARB_vertex_program --> <function name="NamedProgramStringEXT"> <param name="program" type="GLuint" /> diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py index f4ad5da6f3e..95d68a947cb 100644 --- a/src/mapi/glapi/gen/static_data.py +++ b/src/mapi/glapi/gen/static_data.py @@ -1593,6 +1593,8 @@ offsets = { "GetMultiTexParameterIivEXT": 1557, "GetMultiTexParameterIuivEXT": 1558, "NamedProgramLocalParameters4fvEXT": 1559, + "GenerateTextureMipmapEXT": 1560, + "GenerateMultiTexMipmapEXT": 1561, } functions = [ diff --git a/src/mesa/main/genmipmap.c b/src/mesa/main/genmipmap.c index 6729631b16b..dcbe9675070 100644 --- a/src/mesa/main/genmipmap.c +++ b/src/mesa/main/genmipmap.c @@ -240,3 +240,30 @@ _mesa_GenerateTextureMipmap(GLuint texture) texObj = _mesa_lookup_texture_err(ctx, texture, "glGenerateTextureMipmap"); validate_params_and_generate_mipmap(texObj, "glGenerateTextureMipmap"); } + +void GLAPIENTRY +_mesa_GenerateTextureMipmapEXT(GLuint texture, GLenum target) +{ + struct gl_texture_object *texObj; + GET_CURRENT_CONTEXT(ctx); + + texObj = _mesa_lookup_or_create_texture(ctx, target, texture, + false, true, + "glGenerateTextureMipmapEXT"); + validate_params_and_generate_mipmap(texObj, + "glGenerateTextureMipmapEXT"); +} + +void GLAPIENTRY +_mesa_GenerateMultiTexMipmapEXT(GLenum texunit, GLenum target) +{ + struct gl_texture_object *texObj; + GET_CURRENT_CONTEXT(ctx); + + texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target, + texunit - GL_TEXTURE0, + true, + "glGenerateMultiTexMipmapEXT"); + validate_params_and_generate_mipmap(texObj, + "glGenerateMultiTexMipmapEXT"); +} diff --git a/src/mesa/main/genmipmap.h b/src/mesa/main/genmipmap.h index 681c9d9087c..c661f2184c7 100644 --- a/src/mesa/main/genmipmap.h +++ b/src/mesa/main/genmipmap.h @@ -47,4 +47,10 @@ _mesa_GenerateTextureMipmap_no_error(GLuint texture); extern void GLAPIENTRY _mesa_GenerateTextureMipmap(GLuint texture); +extern void GLAPIENTRY +_mesa_GenerateTextureMipmapEXT(GLuint texture, GLenum target); + +extern void GLAPIENTRY +_mesa_GenerateMultiTexMipmapEXT(GLenum texunit, GLenum target); + #endif /* GENMIPMAP_H */ diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 920fee4d1e7..3ff13085894 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -1162,8 +1162,8 @@ const struct function common_desktop_functions_possible[] = { { "glNamedFramebufferTexture3DEXT", 30, -1 }, { "glNamedFramebufferRenderbufferEXT", 30, -1 }, { "glGetNamedFramebufferAttachmentParameterivEXT", 30, -1 }, - //{ "glGenerateTextureMipmapEXT", 30, -1 }, - //{ "glGenerateMultiTexMipmapEXT", 30, -1 }, + { "glGenerateTextureMipmapEXT", 30, -1 }, + { "glGenerateMultiTexMipmapEXT", 30, -1 }, { "glFramebufferDrawBufferEXT", 30, -1 }, { "glFramebufferDrawBuffersEXT", 30, -1 }, { "glFramebufferReadBufferEXT", 30, -1 }, |