{
vk::VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR,
DE_NULL,
+#ifndef NOT_PROTECTED
vk::VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR,
+#else
+ (vk::VkSwapchainCreateFlagsKHR)0,
+#endif
(vk::VkSurfaceKHR)0,
capabilities.minImageCount,
formats[0].format,
(vk::VkSwapchainKHR)0 // oldSwapchain
};
+ vk::VkImageCreateFlags imageCreateFlag =
+#ifndef NOT_PROTECTED
+ vk::VK_IMAGE_CREATE_PROTECTED_BIT;
+#else
+ (vk::VkImageCreateFlags)0u;
+#endif
+
switch (dimension)
{
case TEST_DIMENSION_MIN_IMAGE_COUNT:
{
vk::VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,
DE_NULL,
- vk::VK_IMAGE_CREATE_PROTECTED_BIT,
+ imageCreateFlag,
vk::VK_IMAGE_TYPE_2D,
baseParameters.imageFormat,
{
{
deUint32 heapIndex = memoryProperties.memoryTypes[memType].heapIndex;
if ((memoryRequirements.memoryTypeBits & (1u << memType)) != 0 &&
+#ifndef NOT_PROTECTED
(memoryProperties.memoryTypes[memType].propertyFlags & vk::VK_MEMORY_PROPERTY_PROTECTED_BIT) != 0 &&
+#endif
(protectedHeapMask & (1u << heapIndex)) == 0)
{
protectedHeapSize = de::max(protectedHeapSize, memoryProperties.memoryHeaps[heapIndex].size);
for (deUint32 memType = 0; memType < memoryProperties.memoryTypeCount; memType++)
{
deUint32 heapIndex = memoryProperties.memoryTypes[memType].heapIndex;
+#ifndef NOT_PROTECTED
if (memoryProperties.memoryTypes[memType].propertyFlags & vk::VK_MEMORY_PROPERTY_PROTECTED_BIT)
+#endif
{
protectedHeapSize = de::max(protectedHeapSize, memoryProperties.memoryHeaps[heapIndex].size);
maxMemoryUsage = protectedHeapSize / 4 ; /* Use at maximum 25% of heap */
{
vk::VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,
DE_NULL,
- vk::VK_IMAGE_CREATE_PROTECTED_BIT,
+ imageCreateFlag,
vk::VK_IMAGE_TYPE_2D,
curFmt->format,
{
for (deUint32 memType = 0; memType < memoryProperties.memoryTypeCount; memType++)
{
deUint32 heapIndex = memoryProperties.memoryTypes[memType].heapIndex;
+#ifndef NOT_PROTECTED
if (memoryProperties.memoryTypes[memType].propertyFlags & vk::VK_MEMORY_PROPERTY_PROTECTED_BIT)
+#endif
{
protectedHeapSize = de::max(protectedHeapSize, memoryProperties.memoryHeaps[heapIndex].size);
maxMemoryUsage = protectedHeapSize / 4 ; /* Use at maximum 25% of heap */
{
vk::VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,
DE_NULL,
- vk::VK_IMAGE_CREATE_PROTECTED_BIT,
+ imageCreateFlag,
vk::VK_IMAGE_TYPE_2D,
baseParameters.imageFormat,
{
{
vk::VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,
DE_NULL,
- vk::VK_IMAGE_CREATE_PROTECTED_BIT,
+ imageCreateFlag,
vk::VK_IMAGE_TYPE_2D,
baseParameters.imageFormat,
{
{
vk::VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,
DE_NULL,
- vk::VK_IMAGE_CREATE_PROTECTED_BIT,
+ imageCreateFlag,
vk::VK_IMAGE_TYPE_2D,
baseParameters.imageFormat,
{