mesa/main: use _mesa_is_desktop_gl_compat-helper
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
This commit is contained in:
committed by
Marge Bot
parent
87dda2988b
commit
1e4f12d7ac
+13
-13
@@ -463,7 +463,7 @@ set_tex_parameteri(struct gl_context *ctx,
|
||||
return GL_TRUE;
|
||||
|
||||
case GL_GENERATE_MIPMAP_SGIS:
|
||||
if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES)
|
||||
if (!_mesa_is_desktop_gl_compat(ctx) && ctx->API != API_OPENGLES)
|
||||
goto invalid_pname;
|
||||
|
||||
if (params[0] && texObj->Target == GL_TEXTURE_EXTERNAL_OES)
|
||||
@@ -824,7 +824,7 @@ set_tex_parameterf(struct gl_context *ctx,
|
||||
return GL_TRUE;
|
||||
|
||||
case GL_TEXTURE_PRIORITY:
|
||||
if (ctx->API != API_OPENGL_COMPAT)
|
||||
if (!_mesa_is_desktop_gl_compat(ctx))
|
||||
goto invalid_pname;
|
||||
|
||||
flush(ctx);
|
||||
@@ -1825,7 +1825,7 @@ get_tex_level_parameter_image(struct gl_context *ctx,
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_BORDER:
|
||||
if (ctx->API != API_OPENGL_COMPAT)
|
||||
if (!_mesa_is_desktop_gl_compat(ctx))
|
||||
goto invalid_pname;
|
||||
*params = img->Border;
|
||||
break;
|
||||
@@ -1840,7 +1840,7 @@ get_tex_level_parameter_image(struct gl_context *ctx,
|
||||
break;
|
||||
case GL_TEXTURE_INTENSITY_SIZE:
|
||||
case GL_TEXTURE_LUMINANCE_SIZE:
|
||||
if (ctx->API != API_OPENGL_COMPAT)
|
||||
if (!_mesa_is_desktop_gl_compat(ctx))
|
||||
goto invalid_pname;
|
||||
if (_mesa_base_format_has_channel(img->_BaseFormat, pname)) {
|
||||
*params = _mesa_get_format_bits(texFormat, pname);
|
||||
@@ -1893,7 +1893,7 @@ get_tex_level_parameter_image(struct gl_context *ctx,
|
||||
/* GL_ARB_texture_float */
|
||||
case GL_TEXTURE_LUMINANCE_TYPE_ARB:
|
||||
case GL_TEXTURE_INTENSITY_TYPE_ARB:
|
||||
if (ctx->API != API_OPENGL_COMPAT)
|
||||
if (!_mesa_is_desktop_gl_compat(ctx))
|
||||
goto invalid_pname;
|
||||
FALLTHROUGH;
|
||||
case GL_TEXTURE_RED_TYPE_ARB:
|
||||
@@ -2376,13 +2376,13 @@ get_tex_parameterfv(struct gl_context *ctx,
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_RESIDENT:
|
||||
if (ctx->API != API_OPENGL_COMPAT)
|
||||
if (!_mesa_is_desktop_gl_compat(ctx))
|
||||
goto invalid_pname;
|
||||
|
||||
*params = 1.0F;
|
||||
break;
|
||||
case GL_TEXTURE_PRIORITY:
|
||||
if (ctx->API != API_OPENGL_COMPAT)
|
||||
if (!_mesa_is_desktop_gl_compat(ctx))
|
||||
goto invalid_pname;
|
||||
|
||||
*params = obj->Attrib.Priority;
|
||||
@@ -2414,7 +2414,7 @@ get_tex_parameterfv(struct gl_context *ctx,
|
||||
*params = obj->Sampler.Attrib.MaxAnisotropy;
|
||||
break;
|
||||
case GL_GENERATE_MIPMAP_SGIS:
|
||||
if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES)
|
||||
if (!_mesa_is_desktop_gl_compat(ctx) && ctx->API != API_OPENGLES)
|
||||
goto invalid_pname;
|
||||
|
||||
*params = (GLfloat) obj->Attrib.GenerateMipmap;
|
||||
@@ -2435,7 +2435,7 @@ get_tex_parameterfv(struct gl_context *ctx,
|
||||
/* GL_DEPTH_TEXTURE_MODE_ARB is removed in core-profile and it has
|
||||
* never existed in OpenGL ES.
|
||||
*/
|
||||
if (ctx->API != API_OPENGL_COMPAT)
|
||||
if (!_mesa_is_desktop_gl_compat(ctx))
|
||||
goto invalid_pname;
|
||||
*params = (GLfloat) obj->Attrib.DepthMode;
|
||||
break;
|
||||
@@ -2634,13 +2634,13 @@ get_tex_parameteriv(struct gl_context *ctx,
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_RESIDENT:
|
||||
if (ctx->API != API_OPENGL_COMPAT)
|
||||
if (!_mesa_is_desktop_gl_compat(ctx))
|
||||
goto invalid_pname;
|
||||
|
||||
*params = 1;
|
||||
break;
|
||||
case GL_TEXTURE_PRIORITY:
|
||||
if (ctx->API != API_OPENGL_COMPAT)
|
||||
if (!_mesa_is_desktop_gl_compat(ctx))
|
||||
goto invalid_pname;
|
||||
|
||||
*params = FLOAT_TO_INT(obj->Attrib.Priority);
|
||||
@@ -2700,7 +2700,7 @@ get_tex_parameteriv(struct gl_context *ctx,
|
||||
*params = LCLAMPF(obj->Sampler.Attrib.MaxAnisotropy, INT32_MIN, INT32_MAX);
|
||||
break;
|
||||
case GL_GENERATE_MIPMAP_SGIS:
|
||||
if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES)
|
||||
if (!_mesa_is_desktop_gl_compat(ctx) && ctx->API != API_OPENGLES)
|
||||
goto invalid_pname;
|
||||
|
||||
*params = (GLint) obj->Attrib.GenerateMipmap;
|
||||
@@ -2718,7 +2718,7 @@ get_tex_parameteriv(struct gl_context *ctx,
|
||||
*params = (GLint) obj->Sampler.Attrib.CompareFunc;
|
||||
break;
|
||||
case GL_DEPTH_TEXTURE_MODE_ARB:
|
||||
if (ctx->API != API_OPENGL_COMPAT)
|
||||
if (!_mesa_is_desktop_gl_compat(ctx))
|
||||
goto invalid_pname;
|
||||
*params = (GLint) obj->Attrib.DepthMode;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user