summaryrefslogtreecommitdiff
path: root/vulkan/libvulkan/swapchain.cpp
diff options
context:
space:
mode:
author Yuxin Hu <yuxinhu@google.com> 2024-02-08 22:15:06 +0000
committer Yuxin Hu <yuxinhu@google.com> 2024-02-08 23:05:56 +0000
commitf768e04b3d488d1712855f1f4ba031c59bfa2fb0 (patch)
tree916c2583bec34535f0ce913a60819d0081c6e038 /vulkan/libvulkan/swapchain.cpp
parentd3ff5213d27f8624d33a2c8b0a754060bf3112c0 (diff)
Add VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT to FP16 surface
VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT is not enabled on any VkFormat. This means ANGLE on Vulkan is not exposing EGL_EXT_gl_colorspace_display_p3_linear EGL colorspace, because ANGLE's query of VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT vulkan color space returns nothing. This causes TextureViewTest that relies on EGL_EXT_gl_colorspace_display_p3_linear color space support to fail on ANGLE. To fix it, enable the VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT color space on VK_FORMAT_R16G16B16A16_SFLOAT VkFormat first. Test: atest --verbose CtsViewTestCases:android.view.cts.TextureViewTest Bug: b/322044839 Change-Id: I95b6b425aef4b7870797e406dce59f596f1f50c3
Diffstat (limited to 'vulkan/libvulkan/swapchain.cpp')
-rw-r--r--vulkan/libvulkan/swapchain.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/vulkan/libvulkan/swapchain.cpp b/vulkan/libvulkan/swapchain.cpp
index 892cd19f2f..fe3be45f78 100644
--- a/vulkan/libvulkan/swapchain.cpp
+++ b/vulkan/libvulkan/swapchain.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include "vulkan/vulkan_core.h"
#define ATRACE_TAG ATRACE_TAG_GRAPHICS
#include <aidl/android/hardware/graphics/common/Dataspace.h>
@@ -789,6 +790,9 @@ VkResult GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice pdev,
all_formats.emplace_back(
VkSurfaceFormatKHR{VK_FORMAT_R16G16B16A16_SFLOAT,
VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT});
+ all_formats.emplace_back(
+ VkSurfaceFormatKHR{VK_FORMAT_R16G16B16A16_SFLOAT,
+ VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT});
}
}