Limit protected swapchain images based on memory

A surface's maxImageCount isn't based on the swapchain image extents
or format, so it's valid for swapchain creation to fail for
out-of-memory reasons even when the image count is within the
supported range.

This is particularly problematic for protected swapchains, since many
implementations have a limit on the total amount of protected memory
that can be allocated which is much smaller than total device memory.

This change estimates how much memory is used by protected swapchain
images, compares that to the size of heaps that support protected
memory types, and doesn't try to create swapchains that would have
more images than would fit within that size.

Components: Vulkan

VK-GL-CTS Issue: 1167

Affects:
    dEQP-VK.protected_memory.interaction.wsi.*.swapchain.create.min_image_count

Change-Id: I6cc3bd25f7f22de8424f9e3375ade35fac26a884
1 file changed
tree: fb993e1cf54a60ec3b346d86d5a424e0e0630046
  1. android/
  2. data/
  3. doc/
  4. execserver/
  5. executor/
  6. external/
  7. framework/
  8. modules/
  9. scripts/
  10. targets/
  11. .editorconfig
  12. .gitignore
  13. Android.mk
  14. AndroidGen.mk
  15. CMakeLists.txt
  16. LICENSE
  17. MODULE_LICENSE_APACHE2
  18. NOTICE
  19. OWNERS
  20. README.md
README.md

dEQP README

This repository contains a GPU testing suite called dEQP (drawElements Quality Program). dEQP contains tests for several graphics APIs, including OpenGL ES, EGL, and Vulkan.

Documentation

Up-to-date documentation for the dEQP is available at Android Open Source Project site.

Khronos Vulkan Conformance Tests

This repository includes Khronos Vulkan CTS under external/vulkancts directory. For more information see Vulkan CTS README.

Khronos OpenGL / OpenGL ES Conformance Tests

This repository includes Khronos OpenGL / OpenGL ES CTS under external/openglcts directory. For more information see OpenGL / OpenGL ES CTS README.