mesa: add EXT_dsa Generate*MipmapEXT functions
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
@@ -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" />
|
||||
|
||||
@@ -1593,6 +1593,8 @@ offsets = {
|
||||
"GetMultiTexParameterIivEXT": 1557,
|
||||
"GetMultiTexParameterIuivEXT": 1558,
|
||||
"NamedProgramLocalParameters4fvEXT": 1559,
|
||||
"GenerateTextureMipmapEXT": 1560,
|
||||
"GenerateMultiTexMipmapEXT": 1561,
|
||||
}
|
||||
|
||||
functions = [
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user