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/+/2112283
Reviewed-by: Alexis Hétu <[email protected]>
Reviewed-by: Alexey Knyazev <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
This commit is contained in:
Geoff Lang authored and Commit Bot committed 2020-03-20 20:13:07 +00:00
1 parent 07467b4aca
commit dd4e09ef31
2 files changed
+10 -5

No files matched your search

@@ -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
// 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;
mNativeExtensions.textureCompressionASTCOES = false;
// Vulkan supports sliced 3D ASTC texture uploads when ASTC is supported.
mNativeExtensions.textureCompressionSliced3dASTCKHR =
mNativeExtensions.textureCompressionASTCLDRKHR;