diff options
author | Alejandro PiƱeiro <apinheiro@igalia.com> | 2015-12-22 20:04:38 +0100 |
---|---|---|
committer | Eduardo Lima Mitev <elima@igalia.com> | 2016-03-03 15:14:07 +0100 |
commit | a8736a2567057c0cb3cdd673743d9cc8b562b288 (patch) | |
tree | 0431ab01f1465d4c3df65d6e2197a5f83d47fd65 /src/mesa/main | |
parent | e8ab7727e1cb359be565b9d3dace1c0490e452ad (diff) |
mesa/texparam: make public target_allows_setting_sampler_parameters
In order to allow to be used on ARB_internalformat_query2 implementation.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/texparam.c | 32 | ||||
-rw-r--r-- | src/mesa/main/texparam.h | 3 |
2 files changed, 19 insertions, 16 deletions
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 7f3552d349e..9350ca5c035 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -252,8 +252,8 @@ incomplete(struct gl_context *ctx, struct gl_texture_object *texObj) } -static GLboolean -target_allows_setting_sampler_parameters(GLenum target) +GLboolean +_mesa_target_allows_setting_sampler_parameters(GLenum target) { switch (target) { case GL_TEXTURE_2D_MULTISAMPLE: @@ -279,7 +279,7 @@ set_tex_parameteri(struct gl_context *ctx, switch (pname) { case GL_TEXTURE_MIN_FILTER: - if (!target_allows_setting_sampler_parameters(texObj->Target)) + if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) goto invalid_enum; if (texObj->Sampler.MinFilter == params[0]) @@ -307,7 +307,7 @@ set_tex_parameteri(struct gl_context *ctx, return GL_FALSE; case GL_TEXTURE_MAG_FILTER: - if (!target_allows_setting_sampler_parameters(texObj->Target)) + if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) goto invalid_enum; if (texObj->Sampler.MagFilter == params[0]) @@ -324,7 +324,7 @@ set_tex_parameteri(struct gl_context *ctx, return GL_FALSE; case GL_TEXTURE_WRAP_S: - if (!target_allows_setting_sampler_parameters(texObj->Target)) + if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) goto invalid_enum; if (texObj->Sampler.WrapS == params[0]) @@ -337,7 +337,7 @@ set_tex_parameteri(struct gl_context *ctx, return GL_FALSE; case GL_TEXTURE_WRAP_T: - if (!target_allows_setting_sampler_parameters(texObj->Target)) + if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) goto invalid_enum; if (texObj->Sampler.WrapT == params[0]) @@ -350,7 +350,7 @@ set_tex_parameteri(struct gl_context *ctx, return GL_FALSE; case GL_TEXTURE_WRAP_R: - if (!target_allows_setting_sampler_parameters(texObj->Target)) + if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) goto invalid_enum; if (texObj->Sampler.WrapR == params[0]) @@ -438,7 +438,7 @@ set_tex_parameteri(struct gl_context *ctx, if ((_mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_shadow) || _mesa_is_gles3(ctx)) { - if (!target_allows_setting_sampler_parameters(texObj->Target)) + if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) goto invalid_enum; if (texObj->Sampler.CompareMode == params[0]) @@ -457,7 +457,7 @@ set_tex_parameteri(struct gl_context *ctx, if ((_mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_shadow) || _mesa_is_gles3(ctx)) { - if (!target_allows_setting_sampler_parameters(texObj->Target)) + if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) goto invalid_enum; if (texObj->Sampler.CompareFunc == params[0]) @@ -571,7 +571,7 @@ set_tex_parameteri(struct gl_context *ctx, if (ctx->Extensions.EXT_texture_sRGB_decode) { GLenum decode = params[0]; - if (!target_allows_setting_sampler_parameters(texObj->Target)) + if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) goto invalid_enum; if (decode == GL_DECODE_EXT || decode == GL_SKIP_DECODE_EXT) { @@ -589,7 +589,7 @@ set_tex_parameteri(struct gl_context *ctx, && ctx->Extensions.AMD_seamless_cubemap_per_texture) { GLenum param = params[0]; - if (!target_allows_setting_sampler_parameters(texObj->Target)) + if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) goto invalid_enum; if (param != GL_TRUE && param != GL_FALSE) { @@ -645,7 +645,7 @@ set_tex_parameterf(struct gl_context *ctx, if (!_mesa_is_desktop_gl(ctx) && !_mesa_is_gles3(ctx)) goto invalid_pname; - if (!target_allows_setting_sampler_parameters(texObj->Target)) + if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) goto invalid_enum; if (texObj->Sampler.MinLod == params[0]) @@ -658,7 +658,7 @@ set_tex_parameterf(struct gl_context *ctx, if (!_mesa_is_desktop_gl(ctx) && !_mesa_is_gles3(ctx)) goto invalid_pname; - if (!target_allows_setting_sampler_parameters(texObj->Target)) + if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) goto invalid_enum; if (texObj->Sampler.MaxLod == params[0]) @@ -677,7 +677,7 @@ set_tex_parameterf(struct gl_context *ctx, case GL_TEXTURE_MAX_ANISOTROPY_EXT: if (ctx->Extensions.EXT_texture_filter_anisotropic) { - if (!target_allows_setting_sampler_parameters(texObj->Target)) + if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) goto invalid_enum; if (texObj->Sampler.MaxAnisotropy == params[0]) @@ -705,7 +705,7 @@ set_tex_parameterf(struct gl_context *ctx, if (_mesa_is_gles(ctx)) goto invalid_pname; - if (!target_allows_setting_sampler_parameters(texObj->Target)) + if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) goto invalid_enum; if (texObj->Sampler.LodBias != params[0]) { @@ -720,7 +720,7 @@ set_tex_parameterf(struct gl_context *ctx, !ctx->Extensions.ARB_texture_border_clamp) goto invalid_pname; - if (!target_allows_setting_sampler_parameters(texObj->Target)) + if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) goto invalid_enum; flush(ctx); diff --git a/src/mesa/main/texparam.h b/src/mesa/main/texparam.h index eca6e6fe5d9..b2f6a847337 100644 --- a/src/mesa/main/texparam.h +++ b/src/mesa/main/texparam.h @@ -69,6 +69,9 @@ GLboolean _mesa_legal_get_tex_level_parameter_target(struct gl_context *ctx, GLenum target, bool dsa); +GLboolean +_mesa_target_allows_setting_sampler_parameters(GLenum target); + /*@}*/ /** |