mesa: ctx->API != API_OPENGLES2 --> !_mesa_is_gles2(ctx)

replaces direct API checks with _mesa_is_...() checks

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8340

Signed-off-by: Volodymyr Obohzyn volodymyr.obozhyn@globallogic.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38981>
This commit is contained in:
volodymyr 2023-03-21 21:29:11 +02:00 committed by Marge Bot
parent bf54a790d7
commit 389d8b96a6
2 changed files with 2 additions and 2 deletions

View file

@ -1543,7 +1543,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
return;
}
/* check that all color buffers are the same format */
if (ctx->API != API_OPENGLES2 && intFormat != GL_NONE && f != intFormat) {
if (!_mesa_is_gles2(ctx) && intFormat != GL_NONE && f != intFormat) {
fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT;
fbo_incomplete(ctx, "format mismatch", -1);
return;

View file

@ -85,7 +85,7 @@ st_point_size_per_vertex(struct gl_context *ctx)
return true;
}
}
else if (ctx->API != API_OPENGLES2) {
else if (!_mesa_is_gles2(ctx)) {
/* PointSizeEnabled is always set in ES2 contexts */
return ctx->VertexProgram.PointSizeEnabled;
}