summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texparam.c
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <[email protected]>2019-09-09 16:44:11 +0200
committerPierre-Eric Pelloux-Prayer <[email protected]>2019-10-18 10:26:26 +0200
commitc2d6f61f26c60f1cd2c61c4e350d38015660c2fd (patch)
treed5cfe3a6ea15218fa758fb7b657363dd222fd2e0 /src/mesa/main/texparam.c
parent2bdf809e66d16ff571eafa90f7607793ba65266b (diff)
mesa: add EXT_dsa + EXT_texture_integer functions
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/texparam.c')
-rw-r--r--src/mesa/main/texparam.c127
1 files changed, 127 insertions, 0 deletions
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index ade10b2e2b4..c642f456992 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -1395,6 +1395,38 @@ _mesa_TextureParameterIiv(GLuint texture, GLenum pname, const GLint *params)
}
void GLAPIENTRY
+_mesa_TextureParameterIivEXT(GLuint texture, GLenum target, GLenum pname,
+ const GLint *params)
+{
+ struct gl_texture_object *texObj;
+ GET_CURRENT_CONTEXT(ctx);
+
+ texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true,
+ "glTextureParameterIivEXT");
+ if (!texObj)
+ return;
+
+ _mesa_texture_parameterIiv(ctx, texObj, pname, params, true);
+}
+
+void GLAPIENTRY
+_mesa_MultiTexParameterIivEXT(GLenum texunit, GLenum target, GLenum pname,
+ const GLint *params)
+{
+ struct gl_texture_object *texObj;
+ GET_CURRENT_CONTEXT(ctx);
+
+ texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
+ texunit - GL_TEXTURE0,
+ true,
+ "glMultiTexParameterIivEXT");
+ if (!texObj)
+ return;
+
+ _mesa_texture_parameterIiv(ctx, texObj, pname, params, true);
+}
+
+void GLAPIENTRY
_mesa_TextureParameterIuiv(GLuint texture, GLenum pname, const GLuint *params)
{
struct gl_texture_object *texObj;
@@ -1407,6 +1439,38 @@ _mesa_TextureParameterIuiv(GLuint texture, GLenum pname, const GLuint *params)
_mesa_texture_parameterIuiv(ctx, texObj, pname, params, true);
}
+void GLAPIENTRY
+_mesa_TextureParameterIuivEXT(GLuint texture, GLenum target, GLenum pname,
+ const GLuint *params)
+{
+ struct gl_texture_object *texObj;
+ GET_CURRENT_CONTEXT(ctx);
+
+ texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true,
+ "glTextureParameterIuivEXT");
+ if (!texObj)
+ return;
+
+ _mesa_texture_parameterIuiv(ctx, texObj, pname, params, true);
+}
+
+void GLAPIENTRY
+_mesa_MultiTexParameterIuivEXT(GLenum texunit, GLenum target, GLenum pname,
+ const GLuint *params)
+{
+ struct gl_texture_object *texObj;
+ GET_CURRENT_CONTEXT(ctx);
+
+ texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
+ texunit - GL_TEXTURE0,
+ true,
+ "glMultiTexParameterIuivEXT");
+ if (!texObj)
+ return;
+
+ _mesa_texture_parameterIuiv(ctx, texObj, pname, params, true);
+}
+
GLboolean
_mesa_legal_get_tex_level_parameter_target(struct gl_context *ctx, GLenum target,
bool dsa)
@@ -2739,6 +2803,37 @@ _mesa_GetTextureParameterIiv(GLuint texture, GLenum pname, GLint *params)
get_tex_parameterIiv(ctx, texObj, pname, params, true);
}
+void GLAPIENTRY
+_mesa_GetTextureParameterIivEXT(GLuint texture, GLenum target, GLenum pname, GLint *params)
+{
+ struct gl_texture_object *texObj;
+ GET_CURRENT_CONTEXT(ctx);
+
+ texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true,
+ "glGetTextureParameterIivEXT");
+ if (!texObj)
+ return;
+
+
+ get_tex_parameterIiv(ctx, texObj, pname, params, true);
+}
+
+void GLAPIENTRY
+_mesa_GetMultiTexParameterIivEXT(GLenum texunit, GLenum target, GLenum pname,
+ GLint *params)
+{
+ struct gl_texture_object *texObj;
+ GET_CURRENT_CONTEXT(ctx);
+
+ texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
+ texunit - GL_TEXTURE0,
+ true,
+ "glGetMultiTexParameterIiv");
+ if (!texObj)
+ return;
+
+ get_tex_parameterIiv(ctx, texObj, pname, params, true);
+}
void GLAPIENTRY
_mesa_GetTextureParameterIuiv(GLuint texture, GLenum pname, GLuint *params)
@@ -2752,3 +2847,35 @@ _mesa_GetTextureParameterIuiv(GLuint texture, GLenum pname, GLuint *params)
get_tex_parameterIiv(ctx, texObj, pname, (GLint *) params, true);
}
+
+void GLAPIENTRY
+_mesa_GetTextureParameterIuivEXT(GLuint texture, GLenum target, GLenum pname,
+ GLuint *params)
+{
+ struct gl_texture_object *texObj;
+ GET_CURRENT_CONTEXT(ctx);
+
+ texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true,
+ "glGetTextureParameterIuvEXT");
+ if (!texObj)
+ return;
+
+ get_tex_parameterIiv(ctx, texObj, pname, (GLint *) params, true);
+}
+
+void GLAPIENTRY
+_mesa_GetMultiTexParameterIuivEXT(GLenum texunit, GLenum target, GLenum pname,
+ GLuint *params)
+{
+ struct gl_texture_object *texObj;
+ GET_CURRENT_CONTEXT(ctx);
+
+ texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
+ texunit - GL_TEXTURE0,
+ true,
+ "glGetMultiTexParameterIuiv");
+ if (!texObj)
+ return;
+
+ get_tex_parameterIiv(ctx, texObj, pname, (GLint *) params, true);
+}