rpbegin.framebuffer = vk_fb(fb[imgid]);
vk_rect(&rpbegin.renderArea, 0, 0, win_width, win_height);
rpbegin.pClearValues = clear;
- rpbegin.clearValueCount = 2;
+ rpbegin.clearValueCount = 1;
vkCmdBeginRenderPass(cmdbuf, &rpbegin, VK_SUBPASS_CONTENTS_INLINE);
/* swap buffers after drawing is finished */
vk_present(queue, imgid, sem_draw);
+
+ usleep(10000);
}
void app_reshape(int x, int y)
{
int i;
+ return; /* XXX */
+
if(vk_reshape(x, y) == -1) {
abort();
}
for(i=0; i<vk_num_swap_images(); i++) {
vk_fb_size(fb[i], x, y);
+ vk_fb_images(fb[i], 1, vk_swap_image(i));
}
}
att[i].initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
att[i].finalLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR;
}
+ /*
att[zidx].format = r->zfmt;
att[zidx].samples = 1;
att[zidx].loadOp = r->clear ? VK_ATTACHMENT_LOAD_OP_CLEAR : VK_ATTACHMENT_LOAD_OP_DONT_CARE;
att[zidx].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
att[zidx].initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
att[zidx].finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
+ */
for(i=0; i<r->num_colbuf; i++) {
catref[i].attachment = i;
catref[i].layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
}
+ /*
zatref.attachment = zidx;
zatref.layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
+ */
memset(&subpass, 0, sizeof subpass);
subpass.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
subpass.colorAttachmentCount = r->num_colbuf;
subpass.pColorAttachments = catref;
- subpass.pDepthStencilAttachment = &zatref;
+ subpass.pDepthStencilAttachment = 0;//&zatref;
memset(&pinf, 0, sizeof pinf);
pinf.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO;
- pinf.attachmentCount = r->num_colbuf + 1;
+ pinf.attachmentCount = r->num_colbuf;// + 1;
pinf.pAttachments = att;
pinf.subpassCount = 1;
pinf.pSubpasses = &subpass;
fbinf.pAttachments = f->imgv;
fbinf.width = f->width;
fbinf.height = f->height;
+ fbinf.layers = 1;
if(vkCreateFramebuffer(vkdev, &fbinf, 0, &f->vkobj) != 0) {
fprintf(stderr, "vk_fb: failed to create framebuffer\n");
#define ARRSZ(arr) (sizeof arr / sizeof *arr)
static const char *known_layer_list[] = {
+ "VK_LAYER_KHRONOS_validation",
"VK_LAYER_GOOGLE_threading",
"VK_LAYER_LUNARG_parameter_validation",
"VK_LAYER_LUNARG_object_tracker",