+ for(i=0; i<num; i++) {
+ memset(&ivinf, 0, sizeof ivinf);
+ ivinf.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
+ ivinf.image = vksc_img[i];
+ ivinf.format = vksurf_fmt[vksurf_selfmt].format;
+ ivinf.components.r = VK_COMPONENT_SWIZZLE_IDENTITY;
+ ivinf.components.g = VK_COMPONENT_SWIZZLE_IDENTITY;
+ ivinf.components.b = VK_COMPONENT_SWIZZLE_IDENTITY;
+ ivinf.components.a = VK_COMPONENT_SWIZZLE_IDENTITY;
+ ivinf.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
+ ivinf.subresourceRange.levelCount = 1;
+ ivinf.subresourceRange.layerCount = 1;
+ ivinf.viewType = VK_IMAGE_VIEW_TYPE_2D;
+
+ if(vkCreateImageView(vkdev, &ivinf, 0, vksc_view + i) != 0) {
+ fprintf(stderr, "failed to create image view (%d)\n", i);
+ return -1;
+ }
+ }