Commit dd4e09ef by Geoff Lang Committed by Commit Bot

Update conditions for exposing ASTC extensions.

Add commenents to explain the Vulkan ASTC situation. Expose GL_KHR_texture_compression_astc_sliced_3d when the HDR profile exists. Bug: angleproject:4447 Change-Id: I00a86cb3c44873a28397aab33a47fb363d4ecfe9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2112283Reviewed-by: 's avatarAlexis Hétu <sugoi@chromium.org> Reviewed-by: 's avatarAlexey Knyazev <lexa.knyazev@gmail.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 07467b4a
......@@ -1132,8 +1132,9 @@ void GenerateCaps(const FunctionsGL *functions,
extensions->textureCompressionASTCLDRKHR &&
functions->hasExtension("GL_KHR_texture_compression_astc_hdr");
extensions->textureCompressionSliced3dASTCKHR =
extensions->textureCompressionASTCLDRKHR &&
functions->hasExtension("GL_KHR_texture_compression_astc_sliced_3d");
(extensions->textureCompressionASTCLDRKHR &&
functions->hasExtension("GL_KHR_texture_compression_astc_sliced_3d")) ||
extensions->textureCompressionASTCHDRKHR;
extensions->elementIndexUintOES = functions->standard == STANDARD_GL_DESKTOP ||
functions->isAtLeastGLES(gl::Version(3, 0)) ||
functions->hasGLESExtension("GL_OES_element_index_uint");
......
......@@ -55,10 +55,14 @@ void RendererVk::ensureCapsInitialized() const
(mPhysicalDeviceFeatures.textureCompressionETC2 == VK_TRUE) &&
gl::DetermineCompressedTextureETCSupport(mNativeTextureCaps);
// Vulkan doesn't support 3D ASTC textures, which are required by both
// GL_OES_texture_compression_astc and GL_KHR_texture_compression_astc_hdr
mNativeExtensions.textureCompressionASTCHDRKHR = false;
// Vulkan doesn't support ASTC 3D block textures, which are required by
// GL_OES_texture_compression_astc.
mNativeExtensions.textureCompressionASTCOES = false;
// Vulkan doesn't guarantee HDR blocks decoding without VK_EXT_texture_compression_astc_hdr.
mNativeExtensions.textureCompressionASTCHDRKHR = false;
// Vulkan supports sliced 3D ASTC texture uploads when ASTC is supported.
mNativeExtensions.textureCompressionSliced3dASTCKHR =
mNativeExtensions.textureCompressionASTCLDRKHR;
......
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