Commit 96dd515a by Xiaoxuan Liu Committed by Angle LUCI CQ

Update glColorspace(EGL_KHR_gl_colorspace) enable logic

1. Enable glColorspace if VK_EXT_swapchain_colorspace is supported, remove dependency on VK_KHR_image_format_list. 2. Enable VK_KHR_image_format_list support on Mali GPU. 3. Fix PbufferTest.ClearAndBindTexImageSrgbSkipDecode test tolerance issue. Bug: angleproject:2514 Bug: angleproject:5281 Change-Id: I2ed54a14afc7c3aee5a5980bd300ab052ebab3d1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2793852 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
parent 9adf692c
......@@ -221,9 +221,7 @@ void DisplayVk::generateExtensions(egl::DisplayExtensions *outExtensions) const
outExtensions->imageNativeBuffer =
getRenderer()->getFeatures().supportsAndroidHardwareBuffer.enabled;
outExtensions->surfacelessContext = true;
outExtensions->glColorspace =
getRenderer()->getFeatures().supportsSwapchainColorspace.enabled &&
getRenderer()->getFeatures().supportsImageFormatList.enabled;
outExtensions->glColorspace = getRenderer()->getFeatures().supportsSwapchainColorspace.enabled;
outExtensions->imageGlColorspace =
outExtensions->glColorspace && getRenderer()->getFeatures().supportsImageFormatList.enabled;
......
......@@ -2411,7 +2411,8 @@ void RendererVk::initFeatures(DisplayVk *displayVk,
ANGLE_FEATURE_CONDITION(
&mFeatures, supportsImageFormatList,
(ExtensionFound(VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME, deviceExtensionNames)) && isAMD);
(ExtensionFound(VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME, deviceExtensionNames)) &&
(isAMD || isARM));
// Feature disabled due to driver bugs:
//
......
......@@ -368,9 +368,9 @@ TEST_P(PbufferTest, ClearAndBindTexImageSrgbSkipDecode)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SRGB_DECODE_EXT, GL_SKIP_DECODE_EXT);
drawQuad(mTextureProgram, "position", 0.5f);
// Texture is in skip decode mode, expect glReadPixels to be `kSrgbColor`
EXPECT_PIXEL_EQ(getWindowWidth() / 2, getWindowHeight() / 2, kSrgbColor[0], kSrgbColor[1],
kSrgbColor[2], kSrgbColor[3]);
// Texture is in skip decode mode, expect glReadPixels to be `kSrgbColor` with tolerance of 1
EXPECT_PIXEL_NEAR(getWindowWidth() / 2, getWindowHeight() / 2, kSrgbColor[0], kSrgbColor[1],
kSrgbColor[2], kSrgbColor[3], 1);
// Unbind the texture
eglReleaseTexImage(window->getDisplay(), mPbuffer, EGL_BACK_BUFFER);
......
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