Commit f06e607f by Jamie Madill

Add support for GL_OES_depth32.

This will allow ANGLE to be more conformant when it accepts 32-bit depth as a Renderbuffer format. BUG=angleproject:1230 Change-Id: I9336c6f951d280b2332fc3e6d2e640852473aa03 Reviewed-on: https://chromium-review.googlesource.com/313994Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 0b200680
......@@ -114,6 +114,7 @@ Extensions::Extensions()
textureCompressionASTCLDR(false),
compressedETC1RGB8Texture(false),
depthTextures(false),
depth32(false),
textureStorage(false),
textureNPOT(false),
drawBuffers(false),
......@@ -177,6 +178,7 @@ std::vector<std::string> Extensions::getStrings() const
InsertExtensionString("GL_OES_compressed_ETC1_RGB8_texture", compressedETC1RGB8Texture, &extensionStrings);
InsertExtensionString("GL_EXT_sRGB", sRGB, &extensionStrings);
InsertExtensionString("GL_ANGLE_depth_texture", depthTextures, &extensionStrings);
InsertExtensionString("GL_OES_depth32", depth32, &extensionStrings);
InsertExtensionString("GL_EXT_texture_storage", textureStorage, &extensionStrings);
InsertExtensionString("GL_OES_texture_npot", textureNPOT, &extensionStrings);
InsertExtensionString("GL_EXT_draw_buffers", drawBuffers, &extensionStrings);
......@@ -435,6 +437,15 @@ static bool DetermineDepthTextureSupport(const TextureCapsMap &textureCaps)
return GetFormatSupport(textureCaps, requiredFormats, true, true, true);
}
// Check for GL_OES_depth32
static bool DetermineDepth32Support(const TextureCapsMap &textureCaps)
{
std::vector<GLenum> requiredFormats;
requiredFormats.push_back(GL_DEPTH_COMPONENT32_OES);
return GetFormatSupport(textureCaps, requiredFormats, false, false, true);
}
// Check for GL_EXT_color_buffer_float
static bool DetermineColorBufferFloatSupport(const TextureCapsMap &textureCaps)
{
......@@ -468,6 +479,7 @@ void Extensions::setTextureExtensionSupport(const TextureCapsMap &textureCaps)
compressedETC1RGB8Texture = DetermineETC1RGB8TextureSupport(textureCaps);
sRGB = DetermineSRGBTextureSupport(textureCaps);
depthTextures = DetermineDepthTextureSupport(textureCaps);
depth32 = DetermineDepth32Support(textureCaps);
colorBufferFloat = DetermineColorBufferFloatSupport(textureCaps);
}
......
......@@ -83,7 +83,7 @@ struct Extensions
// GL_KHR_texture_compression_astc_hdr, GL_KHR_texture_compression_astc_ldr
// GL_OES_compressed_ETC1_RGB8_texture
// GL_EXT_sRGB
// GL_ANGLE_depth_texture
// GL_ANGLE_depth_texture, GL_OES_depth32
// GL_EXT_color_buffer_float
void setTextureExtensionSupport(const TextureCapsMap &textureCaps);
......@@ -158,6 +158,10 @@ struct Extensions
// GL_ANGLE_depth_texture
bool depthTextures;
// GL_OES_depth32
// Allows DEPTH_COMPONENT32_OES as a valid Renderbuffer format.
bool depth32;
// GL_EXT_texture_storage
bool textureStorage;
......
......@@ -416,7 +416,7 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap()
map.insert(InternalFormatInfoPair(GL_DEPTH_COMPONENT16, DepthStencilFormat(16, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, GL_UNSIGNED_NORMALIZED, RequireES<2>, RequireES<2>, RequireESOrExt<3, &Extensions::depthTextures>)));
map.insert(InternalFormatInfoPair(GL_DEPTH_COMPONENT24, DepthStencilFormat(24, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, GL_UNSIGNED_NORMALIZED, RequireES<3>, RequireES<3>, RequireESOrExt<3, &Extensions::depthTextures>)));
map.insert(InternalFormatInfoPair(GL_DEPTH_COMPONENT32F, DepthStencilFormat(32, 0, 0, GL_DEPTH_COMPONENT, GL_FLOAT, GL_FLOAT, RequireES<3>, RequireES<3>, RequireESOrExt<3, &Extensions::depthTextures>)));
map.insert(InternalFormatInfoPair(GL_DEPTH_COMPONENT32_OES, DepthStencilFormat(32, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, GL_UNSIGNED_NORMALIZED, RequireExt<&Extensions::depthTextures>, RequireExt<&Extensions::depthTextures>, AlwaysSupported )));
map.insert(InternalFormatInfoPair(GL_DEPTH_COMPONENT32_OES, DepthStencilFormat(32, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, GL_UNSIGNED_NORMALIZED, RequireExtOrExt<&Extensions::depthTextures, &Extensions::depth32>, RequireExtOrExt<&Extensions::depthTextures, &Extensions::depth32>, AlwaysSupported )));
map.insert(InternalFormatInfoPair(GL_DEPTH24_STENCIL8, DepthStencilFormat(24, 8, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_UNSIGNED_NORMALIZED, RequireESOrExt<3, &Extensions::depthTextures>, RequireESOrExtOrExt<3, &Extensions::depthTextures, &Extensions::packedDepthStencil>, AlwaysSupported )));
map.insert(InternalFormatInfoPair(GL_DEPTH32F_STENCIL8, DepthStencilFormat(32, 8, 24, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, GL_FLOAT, RequireES<3>, RequireES<3>, AlwaysSupported )));
// STENCIL_INDEX8 is special-cased, see around the bottom of the list.
......
......@@ -266,7 +266,6 @@
1028 WIN LINUX MAC : dEQP-GLES2.functional.fbo.completeness.renderable.renderbuffer.color0.rg16f = FAIL
1028 WIN LINUX MAC : dEQP-GLES2.functional.fbo.completeness.renderable.renderbuffer.color0.rgba16f = FAIL
1028 WIN LINUX MAC : dEQP-GLES2.functional.fbo.completeness.renderable.renderbuffer.color0.rgb16f = FAIL
1028 WIN LINUX MAC : dEQP-GLES2.functional.fbo.completeness.renderable.renderbuffer.depth.depth_component32 = FAIL
1028 WIN LINUX MAC : dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb_float = FAIL
1028 WIN LINUX MAC : dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb_half_float_oes = FAIL
1028 WIN LINUX MAC : dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgba_float = FAIL
......
......@@ -387,7 +387,6 @@
1096 WIN : dEQP-GLES3.functional.fragment_ops.blend.fbo_srgb.equation_src_func_dst_func.reverse_subtract_one_minus_constant_alpha_one_minus_constant_color = FAIL
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.depth.depth_component32 = 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
1097 WIN : dEQP-GLES3.functional.fbo.completeness.renderable.texture.color0.srgb8 = FAIL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment