Remove Apple specific code for ANGLE
Bug: 208879311
Change-Id: I78878b89d9f74f557ff57bc4f1fecab21b33e5ae
diff --git a/stream-servers/gl/glestranslator/GLES_V2/GLESv2Context.cpp b/stream-servers/gl/glestranslator/GLES_V2/GLESv2Context.cpp
index 874bb68..78e5f96 100644
--- a/stream-servers/gl/glestranslator/GLES_V2/GLESv2Context.cpp
+++ b/stream-servers/gl/glestranslator/GLES_V2/GLESv2Context.cpp
@@ -525,7 +525,7 @@
bool needPointEmulation = mode == GL_POINTS && !isGles2Gles();
#ifdef __APPLE__
- if (primitiveRestartEnabled() && type) {
+ if (!isGles2Gles() && primitiveRestartEnabled() && type) {
updatePrimitiveRestartIndex(type);
}
#endif
diff --git a/stream-servers/gl/glestranslator/GLES_V2/GLESv2Imp.cpp b/stream-servers/gl/glestranslator/GLES_V2/GLESv2Imp.cpp
index ad17b2b..8b522a1 100644
--- a/stream-servers/gl/glestranslator/GLES_V2/GLESv2Imp.cpp
+++ b/stream-servers/gl/glestranslator/GLES_V2/GLESv2Imp.cpp
@@ -628,7 +628,9 @@
// depending on the internal format and attachment combinations of the
// framebuffer object.
static void sUpdateFboEmulation(GLESv2Context* ctx) {
- if (ctx->getMajorVersion() < 3 || isGles2Gles()) return;
+ if (ctx->getMajorVersion() < 3 || isGles2Gles()) {
+ return;
+ }
std::vector<GLenum> colorAttachments(ctx->getCaps()->maxDrawBuffers);
std::iota(colorAttachments.begin(), colorAttachments.end(), GL_COLOR_ATTACHMENT0);
@@ -1536,11 +1538,13 @@
}
}
#ifdef __APPLE__
- switch (cap) {
- case GL_PRIMITIVE_RESTART_FIXED_INDEX:
- ctx->setPrimitiveRestartEnabled(false);
- ctx->setEnable(cap, false);
- return;
+ if (!isGles2Gles()) {
+ switch (cap) {
+ case GL_PRIMITIVE_RESTART_FIXED_INDEX:
+ ctx->setPrimitiveRestartEnabled(false);
+ ctx->setEnable(cap, false);
+ return;
+ }
}
#endif
ctx->setEnable(cap, false);
@@ -1674,11 +1678,13 @@
}
}
#ifdef __APPLE__
- switch (cap) {
- case GL_PRIMITIVE_RESTART_FIXED_INDEX:
- ctx->setPrimitiveRestartEnabled(true);
- ctx->setEnable(cap, true);
- return;
+ if (!isGles2Gles()) {
+ switch (cap) {
+ case GL_PRIMITIVE_RESTART_FIXED_INDEX:
+ ctx->setPrimitiveRestartEnabled(true);
+ ctx->setEnable(cap, true);
+ return;
+ }
}
#endif
ctx->setEnable(cap, true);
@@ -3206,7 +3212,7 @@
// Line width emulation can be done (replace user's
// vertex buffer with thick triangles of our own),
// but just have thin lines on Mac for now.
- if (!ctx->isCoreProfile()) {
+ if (!ctx->isCoreProfile() || isGles2Gles()) {
ctx->dispatcher().glLineWidth(width);
}
#else
@@ -3302,7 +3308,6 @@
GET_CTX_V2();
SET_ERROR_IF(!(GLESv2Validate::pixelOp(format,type)),GL_INVALID_OPERATION);
SET_ERROR_IF(glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE, GL_INVALID_FRAMEBUFFER_OPERATION);
-
if (ctx->isDefaultFBOBound(GL_READ_FRAMEBUFFER) &&
ctx->getDefaultFBOMultisamples()) {