Mark GL_RGB10_A2UI as a renderable format.

BUG=angleproject:1149

Change-Id: Ia808c0d411133d135eef8e90485ba346086f012c
Reviewed-on: https://chromium-review.googlesource.com/296964
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/formatutils.cpp b/src/libANGLE/formatutils.cpp
index b731dad..e9c04e2 100644
--- a/src/libANGLE/formatutils.cpp
+++ b/src/libANGLE/formatutils.cpp
@@ -346,6 +346,7 @@
 {
     InternalFormatInfoMap map;
 
+    // clang-format off
     // From ES 3.0.1 spec, table 3.12
     map.insert(InternalFormatInfoPair(GL_NONE,              InternalFormat()));
 
@@ -362,7 +363,7 @@
     map.insert(InternalFormatInfoPair(GL_RGBA8,             RGBAFormat( 8,  8,  8,  8, 0, GL_RGBA,         GL_UNSIGNED_BYTE,                GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, &Extensions::rgb8rgba8>, RequireESOrExt<3, &Extensions::rgb8rgba8>, AlwaysSupported)));
     map.insert(InternalFormatInfoPair(GL_RGBA8_SNORM,       RGBAFormat( 8,  8,  8,  8, 0, GL_RGBA,         GL_BYTE,                         GL_SIGNED_NORMALIZED,   false, RequireES<3>,                              NeverSupported,                            AlwaysSupported)));
     map.insert(InternalFormatInfoPair(GL_RGB10_A2,          RGBAFormat(10, 10, 10,  2, 0, GL_RGBA,         GL_UNSIGNED_INT_2_10_10_10_REV,  GL_UNSIGNED_NORMALIZED, false, RequireES<3>,                              RequireES<3>,                              AlwaysSupported)));
-    map.insert(InternalFormatInfoPair(GL_RGB10_A2UI,        RGBAFormat(10, 10, 10,  2, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT_2_10_10_10_REV,  GL_UNSIGNED_INT,        false, RequireES<3>,                              NeverSupported,                            NeverSupported)));
+    map.insert(InternalFormatInfoPair(GL_RGB10_A2UI,        RGBAFormat(10, 10, 10,  2, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT_2_10_10_10_REV,  GL_UNSIGNED_INT,        false, RequireES<3>,                              RequireES<3>,                              NeverSupported)));
     map.insert(InternalFormatInfoPair(GL_SRGB8,             RGBAFormat( 8,  8,  8,  0, 0, GL_RGB,          GL_UNSIGNED_BYTE,                GL_UNSIGNED_NORMALIZED, true,  RequireESOrExt<3, &Extensions::sRGB>,      NeverSupported,                            AlwaysSupported)));
     map.insert(InternalFormatInfoPair(GL_SRGB8_ALPHA8,      RGBAFormat( 8,  8,  8,  8, 0, GL_RGBA,         GL_UNSIGNED_BYTE,                GL_UNSIGNED_NORMALIZED, true,  RequireESOrExt<3, &Extensions::sRGB>,      RequireESOrExt<3, &Extensions::sRGB>,      AlwaysSupported)));
     map.insert(InternalFormatInfoPair(GL_R11F_G11F_B10F,    RGBAFormat(11, 11, 10,  0, 0, GL_RGB,          GL_UNSIGNED_INT_10F_11F_11F_REV, GL_FLOAT,               false, RequireES<3>,                              RequireExt<&Extensions::colorBufferFloat>, AlwaysSupported)));
@@ -479,6 +480,7 @@
     // - It affects only validation of internalformat in RenderbufferStorageMultisample.
     //                               | Internal format  |                  |D |S |X | Format          | Type            | Component type        | Supported   | Renderable  | Filterable   |
     map.insert(InternalFormatInfoPair(GL_STENCIL_INDEX8, DepthStencilFormat(0, 8, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, RequireES<2>, RequireES<2>, NeverSupported)));
+    // clang-format on
 
     return map;
 }
diff --git a/src/libANGLE/renderer/gl/formatutilsgl.cpp b/src/libANGLE/renderer/gl/formatutilsgl.cpp
index 7d34e94..b5dfbf1 100644
--- a/src/libANGLE/renderer/gl/formatutilsgl.cpp
+++ b/src/libANGLE/renderer/gl/formatutilsgl.cpp
@@ -126,6 +126,7 @@
 {
     InternalFormatInfoMap map;
 
+    // clang-format off
     //                       | Format              | OpenGL texture support                          | Filter  | OpenGL render support                        | OpenGL ES texture support                 | Filter  | OpenGL ES render support                 |
     InsertFormatMapping(&map, GL_R8,                VersionOrExts(3, 0, "GL_ARB_texture_rg"),         Always(), VersionOrExts(3, 0, "GL_ARB_texture_rg"),      VersionOrExts(3, 0, "GL_EXT_texture_rg"),   Always(), VersionOrExts(3, 0, "GL_EXT_texture_rg")  );
     InsertFormatMapping(&map, GL_R8_SNORM,          VersionOnly(3, 1),                                Always(), Never(),                                       VersionOnly(3, 0),                          Always(), Never()                                   );
@@ -139,7 +140,7 @@
     InsertFormatMapping(&map, GL_RGBA8,             Always(),                                         Always(), Always(),                                      VersionOrExts(3, 0, "GL_OES_rgb8_rgba8"),   Always(), VersionOrExts(3, 0, "GL_OES_rgb8_rgba8")  );
     InsertFormatMapping(&map, GL_RGBA8_SNORM,       VersionOnly(3, 1),                                Always(), Never(),                                       VersionOnly(3, 0),                          Always(), Never()                                   );
     InsertFormatMapping(&map, GL_RGB10_A2,          Always(),                                         Always(), Always(),                                      VersionOnly(3, 0),                          Always(), VersionOnly(3, 0)                         );
-    InsertFormatMapping(&map, GL_RGB10_A2UI,        VersionOrExts(3, 3, "GL_ARB_texture_rgb10_a2ui"), Never(),  Never(),                                       VersionOnly(3, 0),                          Never(),  Never()                                   );
+    InsertFormatMapping(&map, GL_RGB10_A2UI,        VersionOrExts(3, 3, "GL_ARB_texture_rgb10_a2ui"), Never(),  Always(),                                      VersionOnly(3, 0),                          Never(),  Always()                                  );
     InsertFormatMapping(&map, GL_SRGB8,             VersionOrExts(2, 1, "GL_EXT_texture_sRGB"),       Always(), VersionOrExts(2, 1, "GL_EXT_texture_sRGB"),    VersionOrExts(3, 0, "GL_EXT_texture_sRGB"), Always(), VersionOrExts(3, 0, "GL_EXT_texture_sRGB"));
     InsertFormatMapping(&map, GL_SRGB8_ALPHA8,      VersionOrExts(2, 1, "GL_EXT_texture_sRGB"),       Always(), VersionOrExts(2, 1, "GL_EXT_texture_sRGB"),    VersionOrExts(3, 0, "GL_EXT_texture_sRGB"), Always(), VersionOrExts(3, 0, "GL_EXT_texture_sRGB"));
     InsertFormatMapping(&map, GL_R8I,               VersionOrExts(3, 0, "GL_ARB_texture_rg"),         Never(),  VersionOrExts(3, 0, "GL_ARB_texture_rg"),      VersionOnly(3, 0),                          Never(),  VersionOnly(3, 0)                         );
@@ -244,6 +245,7 @@
 
     // From GL_ANGLE_texture_compression_dxt5
     InsertFormatMapping(&map, GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, ExtsOnly("GL_EXT_texture_compression_s3tc"), Always(), Never(), ExtsOnly("GL_ANGLE_texture_compression_dxt5"), Always(), Never());
+    // clang-format on
 
     return map;
 }
diff --git a/src/tests/deqp_support/deqp_gles3_test_expectations.txt b/src/tests/deqp_support/deqp_gles3_test_expectations.txt
index 227db3e..a1798b5 100644
--- a/src/tests/deqp_support/deqp_gles3_test_expectations.txt
+++ b/src/tests/deqp_support/deqp_gles3_test_expectations.txt
@@ -583,10 +583,7 @@
 1096 WIN : dEQP-GLES3.functional.fragment_ops.random.* = FAIL
 1096 WIN : dEQP-GLES3.functional.fragment_ops.interaction.basic_shader.* = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.rgb16f = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.rgb10_a2ui = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.stencil.rgb10_a2ui = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.depth.depth_component32 = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.depth.rgb10_a2ui = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.color0.rgb16f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.color0.rgb9_e5 = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.color0.srgb_unsigned_byte = FAIL
@@ -601,7 +598,6 @@
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.color0.rg8_snorm = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.color0.rgb8_snorm = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.color0.rgba8_snorm = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.color0.rgb10_a2ui = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.stencil.rgb9_e5 = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.stencil.srgb_unsigned_byte = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.stencil.srgb8 = FAIL
@@ -615,7 +611,6 @@
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.stencil.rg8_snorm = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.stencil.rgb8_snorm = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.stencil.rgba8_snorm = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.stencil.rgb10_a2ui = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.depth.rgb9_e5 = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.depth.srgb_unsigned_byte = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.depth.srgb8 = FAIL
@@ -629,7 +624,6 @@
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.depth.rg8_snorm = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.depth.rgb8_snorm = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.depth.rgba8_snorm = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.depth.rgb10_a2ui = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.size.distinct = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.layer.2darr_1_3 = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.layer.2darr_4_15 = FAIL
@@ -637,10 +631,7 @@
 1097 WIN : dEQP-GLES3.functional.fbo.completeness.layer.3d_4_15 = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.render.resize.tex2d_rgba16f_stencil_rbo_stencil_index8 = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.render.resize.tex2d_rgba8_stencil_rbo_stencil_index8 = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.render.resize.rbo_rgb10_a2ui = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.render.recreate_color.rbo_rgb10_a2ui_depth_stencil_rbo_depth24_stencil8 = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.render.recreate_depth_stencil.tex2d_rgba8_stencil_rbo_stencil_index8 = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.color.clear.rgb10_a2ui = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.color.texcube.rgba32i = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.color.texcube.rgba32ui = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.color.texcube.rgba16i = FAIL
@@ -707,7 +698,6 @@
 1097 WIN : dEQP-GLES3.functional.fbo.color.repeated_clear.sample.tex2d.rg16f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.color.repeated_clear.sample.tex2d.r32f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.color.repeated_clear.sample.tex2d.r16f = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.color.repeated_clear.blit.rbo.rgb10_a2ui = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.depth.depth_write_clamp.depth_component32f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.depth.depth_write_clamp.depth_component24 = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.depth.depth_write_clamp.depth_component16 = FAIL
@@ -741,8 +731,6 @@
 1097 WIN : dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_out_of_bounds_mag_reverse_dst_y = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_out_of_bounds_mag_reverse_src_dst_x = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_out_of_bounds_mag_reverse_src_dst_y = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgba32ui_to_rgb10_a2ui = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgba16ui_to_rgb10_a2ui = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgba8_to_rgb8 = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgba8_to_rgb565 = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgba8_to_rgba32f = FAIL
@@ -752,7 +740,6 @@
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgba8_to_rg16f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgba8_to_r32f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgba8_to_r16f = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgba8ui_to_rgb10_a2ui = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_rgba32f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_rgba16f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_r11f_g11f_b10f = FAIL
@@ -767,16 +754,6 @@
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgb10_a2_to_rg16f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgb10_a2_to_r32f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgb10_a2_to_r16f = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgb10_a2ui_to_rgba32ui = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgb10_a2ui_to_rgba16ui = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgb10_a2ui_to_rgba8ui = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgb10_a2ui_to_rgb10_a2ui = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgb10_a2ui_to_rg32ui = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgb10_a2ui_to_rg16ui = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgb10_a2ui_to_rg8ui = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgb10_a2ui_to_r32ui = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgb10_a2ui_to_r16ui = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgb10_a2ui_to_r8ui = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgba4_to_rgb8 = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgba4_to_rgb565 = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgba4_to_rgba32f = FAIL
@@ -807,8 +784,6 @@
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgb565_to_rg16f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgb565_to_r32f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rgb565_to_r16f = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rg32ui_to_rgb10_a2ui = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rg16ui_to_rgb10_a2ui = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rg8_to_rgba32f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rg8_to_rgba16f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rg8_to_r11f_g11f_b10f = FAIL
@@ -816,9 +791,6 @@
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rg8_to_rg16f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rg8_to_r32f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rg8_to_r16f = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.rg8ui_to_rgb10_a2ui = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.r32ui_to_rgb10_a2ui = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.r16ui_to_rgb10_a2ui = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.r8_to_rgba32f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.r8_to_rgba16f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.r8_to_r11f_g11f_b10f = FAIL
@@ -826,7 +798,6 @@
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.r8_to_rg16f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.r8_to_r32f = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.r8_to_r16f = FAIL
-1097 WIN : dEQP-GLES3.functional.fbo.blit.conversion.r8ui_to_rgb10_a2ui = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_basic = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_scale = FAIL
 1097 WIN : dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8_linear_out_of_bounds_blit_from_default = FAIL
@@ -1143,8 +1114,6 @@
 1100 WIN : dEQP-GLES3.functional.fragment_out.random.97 = FAIL
 1100 WIN : dEQP-GLES3.functional.fragment_out.random.98 = FAIL
 1100 WIN : dEQP-GLES3.functional.fragment_out.random.99 = FAIL
-1101 WIN : dEQP-GLES3.functional.pbo.renderbuffer.rgb10_a2ui_triangles = FAIL
-1101 WIN : dEQP-GLES3.functional.pbo.renderbuffer.rgb10_a2ui_clears = FAIL
 1101 WIN : dEQP-GLES3.functional.rasterization.flatshading.triangles = FAIL
 1101 WIN : dEQP-GLES3.functional.rasterization.flatshading.triangle_strip = FAIL
 1101 WIN : dEQP-GLES3.functional.rasterization.flatshading.triangle_fan = FAIL
@@ -1348,7 +1317,6 @@
 1101 WIN : dEQP-GLES3.functional.state_query.shader.transform_feedback = FAIL
 1101 WIN : dEQP-GLES3.functional.state_query.internal_format.rgba_samples = FAIL
 1101 WIN : dEQP-GLES3.functional.state_query.internal_format.rgb_samples = FAIL
-1101 WIN : dEQP-GLES3.functional.state_query.internal_format.rgb10_a2ui_samples = FAIL
 1101 WIN : dEQP-GLES3.functional.polygon_offset.fixed16_render_with_units = FAIL
 1101 WIN : dEQP-GLES3.functional.polygon_offset.fixed24_render_with_units = FAIL
 1101 WIN : dEQP-GLES3.functional.draw.draw_elements.points.instanced_attributes = FAIL