Metal: fix max point size and RGB565 renderbuffer bug.

- Max point size is set to 64, since this is the max size observed. It
  is not 511 as
  https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf claims.
- RGB565 is emulated on macOS by RGBA, needs to disable alpha write for
  this format. This was already done for TextureMtl, but wasn't for
  RenderBufferMtl.
- Also enable true non-power-of-two textures support (OES_texture_npot).
  This was technically already supported, just that the extension wasn't
  advertised yet.

- New Test: FramebufferFormatsTest.RGB565Renderbuffer

Bug: angleproject:4816
Bug: angleproject:2634
Change-Id: Ie7e3efb4cb29bb9a3fd706c26e2b50b42ff3f6be
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2281797
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/tests/gl_tests/FramebufferTest.cpp b/src/tests/gl_tests/FramebufferTest.cpp
index bece631..2f9139a 100644
--- a/src/tests/gl_tests/FramebufferTest.cpp
+++ b/src/tests/gl_tests/FramebufferTest.cpp
@@ -362,6 +362,28 @@
     EXPECT_PIXEL_COLOR_EQ(0, 0, GLColor::red);
 }
 
+// Test that a renderbuffer with RGB565 format works as expected. This test is intended for some
+// back-end having no support for native RGB565 renderbuffer and thus having to emulate using RGBA
+// format.
+TEST_P(FramebufferFormatsTest, RGB565Renderbuffer)
+{
+    GLRenderbuffer rbo;
+    glBindRenderbuffer(GL_RENDERBUFFER, rbo);
+    glRenderbufferStorage(GL_RENDERBUFFER, GL_RGB565, 1, 1);
+
+    GLFramebuffer completeFBO;
+    glBindFramebuffer(GL_FRAMEBUFFER, completeFBO);
+    glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, rbo);
+
+    EXPECT_GLENUM_EQ(GL_FRAMEBUFFER_COMPLETE, glCheckFramebufferStatus(GL_FRAMEBUFFER));
+
+    ASSERT_GL_NO_ERROR();
+
+    glClearColor(1, 0, 0, 0.5f);
+    glClear(GL_COLOR_BUFFER_BIT);
+    EXPECT_PIXEL_COLOR_EQ(0, 0, GLColor::red);
+}
+
 class FramebufferTest_ES3 : public ANGLETest
 {};