Require protected memory support when creating protected queue
According to VUID-VkDeviceQueueCreateInfo-flags-02861, the
protectedMemory feature must be enabled if the
VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT flag is specified. When using debug
builds of the ARM Mali Vulkan ICD that don't support protected memory,
specifying that flag anyway was causing an assert in the ICD, so don't
attempt to create a protected device if the physical device doesn't
support protected memory.
Bug: b/312107548
Change-Id: I74c162ba90ea582b403a44d362932eac9b6fa66f
diff --git a/libs/renderengine/skia/SkiaVkRenderEngine.cpp b/libs/renderengine/skia/SkiaVkRenderEngine.cpp
index 8821c0e..ba20d1f 100644
--- a/libs/renderengine/skia/SkiaVkRenderEngine.cpp
+++ b/libs/renderengine/skia/SkiaVkRenderEngine.cpp
@@ -433,6 +433,10 @@
// Looks like this would slow things down and we can't depend on it on all platforms
interface.physicalDeviceFeatures2->features.robustBufferAccess = VK_FALSE;
+ if (protectedContent && !interface.protectedMemoryFeatures->protectedMemory) {
+ BAIL("Protected memory not supported");
+ }
+
float queuePriorities[1] = {0.0f};
void* queueNextPtr = nullptr;