switch (pname) {
case GL_TEXTURE_MIN_FILTER:
if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
- goto invalid_enum;
+ goto invalid_dsa;
if (texObj->Sampler.MinFilter == params[0])
return GL_FALSE;
case GL_TEXTURE_MAG_FILTER:
if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
- goto invalid_enum;
+ goto invalid_dsa;
if (texObj->Sampler.MagFilter == params[0])
return GL_FALSE;
case GL_TEXTURE_WRAP_S:
if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
- goto invalid_enum;
+ goto invalid_dsa;
if (texObj->Sampler.WrapS == params[0])
return GL_FALSE;
case GL_TEXTURE_WRAP_T:
if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
- goto invalid_enum;
+ goto invalid_dsa;
if (texObj->Sampler.WrapT == params[0])
return GL_FALSE;
case GL_TEXTURE_WRAP_R:
if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
- goto invalid_enum;
+ goto invalid_dsa;
if (texObj->Sampler.WrapR == params[0])
return GL_FALSE;
|| _mesa_is_gles3(ctx)) {
if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
- goto invalid_enum;
+ goto invalid_dsa;
if (texObj->Sampler.CompareMode == params[0])
return GL_FALSE;
|| _mesa_is_gles3(ctx)) {
if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
- goto invalid_enum;
+ goto invalid_dsa;
if (texObj->Sampler.CompareFunc == params[0])
return GL_FALSE;
GLenum decode = params[0];
if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
- goto invalid_enum;
+ goto invalid_dsa;
if (decode == GL_DECODE_EXT || decode == GL_SKIP_DECODE_EXT) {
if (texObj->Sampler.sRGBDecode != decode) {
GLenum param = params[0];
if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
- goto invalid_enum;
+ goto invalid_dsa;
if (param != GL_TRUE && param != GL_FALSE) {
goto invalid_param;
suffix, _mesa_enum_to_string(params[0]));
return GL_FALSE;
+invalid_dsa:
+ if (!dsa)
+ goto invalid_enum;
+
invalid_operation:
_mesa_error(ctx, GL_INVALID_OPERATION, "glTex%sParameter(pname=%s)",
suffix, _mesa_enum_to_string(pname));
goto invalid_pname;
if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
- goto invalid_enum;
+ goto invalid_dsa;
if (texObj->Sampler.MinLod == params[0])
return GL_FALSE;
goto invalid_pname;
if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
- goto invalid_enum;
+ goto invalid_dsa;
if (texObj->Sampler.MaxLod == params[0])
return GL_FALSE;
case GL_TEXTURE_MAX_ANISOTROPY_EXT:
if (ctx->Extensions.EXT_texture_filter_anisotropic) {
if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
- goto invalid_enum;
+ goto invalid_dsa;
if (texObj->Sampler.MaxAnisotropy == params[0])
return GL_FALSE;
goto invalid_pname;
if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
- goto invalid_enum;
+ goto invalid_dsa;
if (texObj->Sampler.LodBias != params[0]) {
flush(ctx);
suffix, _mesa_enum_to_string(pname));
return GL_FALSE;
+invalid_dsa:
+ if (!dsa)
+ goto invalid_enum;
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glTex%sParameter(pname=%s)",
+ suffix, _mesa_enum_to_string(pname));
+ return GL_FALSE;
invalid_enum:
_mesa_error(ctx, GL_INVALID_ENUM, "glTex%sParameter(pname=%s)",
suffix, _mesa_enum_to_string(pname));
}
if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glTextureParameterIiv(texture)");
+ _mesa_error(ctx, dsa ? GL_INVALID_OPERATION : GL_INVALID_ENUM, "glTextureParameterIiv(texture)");
return;
}
FLUSH_VERTICES(ctx, _NEW_TEXTURE_OBJECT);
}
if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glTextureParameterIuiv(texture)");
+ _mesa_error(ctx, dsa ? GL_INVALID_OPERATION : GL_INVALID_ENUM, "glTextureParameterIuiv(texture)");
return;
}
FLUSH_VERTICES(ctx, _NEW_TEXTURE_OBJECT);