aux/vk: Apply the protected content flag if app pass it when create swapchain

This commit is contained in:
quic_zhibinw 2021-09-28 15:33:15 +08:00
parent 7b5102dc28
commit f9d0bfb80a

View file

@ -392,6 +392,10 @@ vk_create_image_from_native(struct vk_bundle *vk,
.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED,
};
if (0 != (info->create & XRT_SWAPCHAIN_CREATE_PROTECTED_CONTENT)) {
vk_info.flags |= VK_IMAGE_CREATE_PROTECTED_BIT;
}
ret = vk->vkCreateImage(vk->device, &vk_info, NULL, &image);
if (ret != VK_SUCCESS) {
VK_ERROR(vk, "vkCreateImage: %s", vk_result_string(ret));