From: Pierre-Eric Pelloux-Prayer Date: Wed, 11 Sep 2019 08:01:24 +0000 (+0200) Subject: mesa: add EXT_dsa Generate*MipmapEXT functions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e14749f8f82cba47ff89432cafd9fd9bee70e82;p=mesa.git mesa: add EXT_dsa Generate*MipmapEXT functions Reviewed-by: Marek Olšák --- 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 @@ + + + + + + + + + + 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 },