Home | History | Annotate | Download | only in demos

Lines Matching refs:device

175     VkDevice device;
309 vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, cmd_bufs);
330 err = vkAllocateCommandBuffers(demo->device, &cmd, &demo->setup_cmd);
491 err = vkCreateSemaphore(demo->device, &presentCompleteSemaphoreCreateInfo,
496 err = demo->fpAcquireNextImageKHR(demo->device, demo->swapchain, UINT64_MAX,
505 vkDestroySemaphore(demo->device, presentCompleteSemaphore, NULL);
570 vkDestroySemaphore(demo->device, presentCompleteSemaphore, NULL);
653 err = demo->fpCreateSwapchainKHR(demo->device, &swapchain, NULL,
662 demo->fpDestroySwapchainKHR(demo->device, oldSwapchain, NULL);
665 err = demo->fpGetSwapchainImagesKHR(demo->device, demo->swapchain,
672 err = demo->fpGetSwapchainImagesKHR(demo->device, demo->swapchain,
715 err = vkCreateImageView(demo->device, &color_attachment_view, NULL,
769 err = vkCreateImage(demo->device, &image, NULL, &demo->depth.image);
773 vkGetImageMemoryRequirements(demo->device, demo->depth.image, &mem_reqs);
783 err = vkAllocateMemory(demo->device, &mem_alloc, NULL, &demo->depth.mem);
788 vkBindImageMemory(demo->device, demo->depth.image, demo->depth.mem, 0);
798 err = vkCreateImageView(demo->device, &view, NULL, &demo->depth.view);
839 vkCreateImage(demo->device, &image_create_info, NULL, &tex_obj->image);
842 vkGetImageMemoryRequirements(demo->device, tex_obj->image, &mem_reqs);
851 err = vkAllocateMemory(demo->device, &mem_alloc, NULL, &tex_obj->mem);
855 err = vkBindImageMemory(demo->device, tex_obj->image, tex_obj->mem, 0);
868 vkGetImageSubresourceLayout(demo->device, tex_obj->image, &subres,
871 err = vkMapMemory(demo->device, tex_obj->mem, 0,
881 vkUnmapMemory(demo->device, tex_obj->mem);
895 vkDestroyImage(demo->device, tex_obj->image, NULL);
896 vkFreeMemory(demo->device, tex_obj->mem, NULL);
914 /* Device can texture using linear textures */
1009 err = vkCreateSampler(demo->device, &sampler, NULL,
1015 err = vkCreateImageView(demo->device, &view, NULL,
1050 err = vkCreateBuffer(demo->device, &buf_info, NULL, &demo->vertices.buf);
1053 vkGetBufferMemoryRequirements(demo->device, demo->vertices.buf, &mem_reqs);
1062 err = vkAllocateMemory(demo->device, &mem_alloc, NULL, &demo->vertices.mem);
1065 err = vkMapMemory(demo->device, demo->vertices.mem, 0,
1071 vkUnmapMemory(demo->device, demo->vertices.mem);
1073 err = vkBindBufferMemory(demo->device, demo->vertices.buf,
1116 err = vkCreateDescriptorSetLayout(demo->device, &descriptor_layout, NULL,
1127 err = vkCreatePipelineLayout(demo->device, &pPipelineLayoutCreateInfo, NULL,
1190 err = vkCreateRenderPass(demo->device, &rp_info, NULL, &demo->render_pass);
1206 err = vkCreateShaderModule(demo->device, &moduleCreateInfo, NULL, &module);
1369 err = vkCreatePipelineCache(demo->device, &pipelineCache, NULL,
1372 err = vkCreateGraphicsPipelines(demo->device, demo->pipelineCache, 1,
1376 vkDestroyPipelineCache(demo->device, demo->pipelineCache, NULL);
1378 vkDestroyShaderModule(demo->device, demo->frag_shader_module, NULL);
1379 vkDestroyShaderModule(demo->device, demo->vert_shader_module, NULL);
1396 err = vkCreateDescriptorPool(demo->device, &descriptor_pool, NULL,
1413 err = vkAllocateDescriptorSets(demo->device, &alloc_info, &demo->desc_set);
1430 vkUpdateDescriptorSets(demo->device, 1, &write, 0, NULL);
1456 err = vkCreateFramebuffer(demo->device, &fb_info, NULL,
1471 err = vkCreateCommandPool(demo->device, &cmd_pool_info, NULL,
1482 err = vkAllocateCommandBuffers(demo->device, &cmd, &demo->draw_cmd);
1654 vkDeviceWaitIdle(demo->device);
1913 /* For tri demo we just grab the first physical device */
1959 /* Look for device extensions */
2047 // Having these GIPA queries of device extension entry points both
2075 ERR_EXIT("Required device feature `shaderClipDistance` not supported\n",
2099 VkDeviceCreateInfo device = {
2114 err = vkCreateDevice(demo->gpu, &device, NULL, &demo->device);
2203 vkGetDeviceQueue(demo->device, demo->graphics_queue_node_index, 0,
2305 vkDestroyFramebuffer(demo->device, demo->framebuffers[i], NULL);
2308 vkDestroyDescriptorPool(demo->device, demo->desc_pool, NULL);
2311 vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->setup_cmd);
2313 vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->draw_cmd);
2314 vkDestroyCommandPool(demo->device, demo->cmd_pool, NULL);
2316 vkDestroyPipeline(demo->device, demo->pipeline, NULL);
2317 vkDestroyRenderPass(demo->device, demo->render_pass, NULL);
2318 vkDestroyPipelineLayout(demo->device, demo->pipeline_layout, NULL);
2319 vkDestroyDescriptorSetLayout(demo->device, demo->desc_layout, NULL);
2321 vkDestroyBuffer(demo->device, demo->vertices.buf, NULL);
2322 vkFreeMemory(demo->device, demo->vertices.mem, NULL);
2325 vkDestroyImageView(demo->device, demo->textures[i].view, NULL);
2326 vkDestroyImage(demo->device, demo->textures[i].image, NULL);
2327 vkFreeMemory(demo->device, demo->textures[i].mem, NULL);
2328 vkDestroySampler(demo->device, demo->textures[i].sampler, NULL);
2332 vkDestroyImageView(demo->device, demo->buffers[i].view, NULL);
2335 vkDestroyImageView(demo->device, demo->depth.view, NULL);
2336 vkDestroyImage(demo->device, demo->depth.image, NULL);
2337 vkFreeMemory(demo->device, demo->depth.mem, NULL);
2339 demo->fpDestroySwapchainKHR(demo->device, demo->swapchain, NULL);
2342 vkDestroyDevice(demo->device, NULL);
2372 vkDestroyFramebuffer(demo->device, demo->framebuffers[i], NULL);
2375 vkDestroyDescriptorPool(demo->device, demo->desc_pool, NULL);
2378 vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->setup_cmd);
2380 vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->draw_cmd);
2381 vkDestroyCommandPool(demo->device, demo->cmd_pool, NULL);
2383 vkDestroyPipeline(demo->device, demo->pipeline, NULL);
2384 vkDestroyRenderPass(demo->device, demo->render_pass, NULL);
2385 vkDestroyPipelineLayout(demo->device, demo->pipeline_layout, NULL);
2386 vkDestroyDescriptorSetLayout(demo->device, demo->desc_layout, NULL);
2388 vkDestroyBuffer(demo->device, demo->vertices.buf, NULL);
2389 vkFreeMemory(demo->device, demo->vertices.mem, NULL);
2392 vkDestroyImageView(demo->device, demo->textures[i].view, NULL);
2393 vkDestroyImage(demo->device, demo->textures[i].image, NULL);
2394 vkFreeMemory(demo->device, demo->textures[i].mem, NULL);
2395 vkDestroySampler(demo->device, demo->textures[i].sampler, NULL);
2399 vkDestroyImageView(demo->device, demo->buffers[i].view, NULL);
2402 vkDestroyImageView(demo->device, demo->depth.view, NULL);
2403 vkDestroyImage(demo->device, demo->depth.image, NULL);
2404 vkFreeMemory(demo->device, demo->depth.mem, NULL);