Lines Matching defs:demo
286 struct demo { struct
287 GLFWwindow* window;
288 VkSurfaceKHR surface;
289 bool use_staging_buffer;
291 VkAllocationCallbacks allocator;
293 VkInstance inst;
294 VkPhysicalDevice gpu;
295 VkDevice device;
296 VkQueue queue;
297 VkPhysicalDeviceProperties gpu_props;
298 VkQueueFamilyProperties *queue_props;
299 uint32_t graphics_queue_node_index;
301 uint32_t enabled_extension_count;
302 uint32_t enabled_layer_count;
303 const char *extension_names[64];
304 char *device_validation_layers[64];
306 int width, height;
307 VkFormat format;
308 VkColorSpaceKHR color_space;
311 fpGetPhysicalDeviceSurfaceSupportKHR;
313 fpGetPhysicalDeviceSurfaceCapabilitiesKHR;
315 fpGetPhysicalDeviceSurfaceFormatsKHR;
317 fpGetPhysicalDeviceSurfacePresentModesKHR;
318 PFN_vkCreateSwapchainKHR fpCreateSwapchainKHR;
319 PFN_vkDestroySwapchainKHR fpDestroySwapchainKHR;
320 PFN_vkGetSwapchainImagesKHR fpGetSwapchainImagesKHR;
321 PFN_vkAcquireNextImageKHR fpAcquireNextImageKHR;
322 PFN_vkQueuePresentKHR fpQueuePresentKHR;
323 uint32_t swapchainImageCount;
324 VkSwapchainKHR swapchain;
325 SwapchainBuffers *buffers;
327 VkCommandPool cmd_pool;
329 struct {
335 } depth;
337 struct texture_object textures[DEMO_TEXTURE_COUNT];
339 struct {
346 } vertices;
348 VkCommandBuffer setup_cmd; // Command Buffer for initialization commands
349 VkCommandBuffer draw_cmd; // Command Buffer for drawing commands
350 VkPipelineLayout pipeline_layout;
351 VkDescriptorSetLayout desc_layout;
352 VkPipelineCache pipelineCache;
353 VkRenderPass render_pass;
354 VkPipeline pipeline;
379 static void demo_resize(struct demo *demo); argument
381 static bool memory_type_from_properties(struct demo *demo, uint32_t typeBits, in memory_type_from_properties()
402 static void demo_flush_init_cmd(struct demo *demo) { in demo_flush_init_cmd()
433 static void demo_set_image_layout(struct demo *demo, VkImage image, in demo_set_image_layout()
511 static void demo_draw_build_cmd(struct demo *demo) { in demo_draw_build_cmd()
600 static void demo_draw(struct demo *demo) { in demo_draw()
690 static void demo_prepare_buffers(struct demo *demo) { in demo_prepare_buffers()
843 static void demo_prepare_depth(struct demo *demo) { in demo_prepare_depth()
918 demo_prepare_texture_image(struct demo *demo, const uint32_t *tex_colors, in demo_prepare_texture_image()
1005 static void demo_destroy_texture_image(struct demo *demo, in demo_destroy_texture_image()
1012 static void demo_prepare_textures(struct demo *demo) { in demo_prepare_textures()
1131 static void demo_prepare_vertices(struct demo *demo) { in demo_prepare_vertices()
1210 static void demo_prepare_descriptor_layout(struct demo *demo) { in demo_prepare_descriptor_layout()
1242 static void demo_prepare_render_pass(struct demo *demo) { in demo_prepare_render_pass()
1305 demo_prepare_shader_module(struct demo *demo, const void *code, size_t size) { in demo_prepare_shader_module()
1322 static VkShaderModule demo_prepare_vs(struct demo *demo) { in demo_prepare_vs()
1331 static VkShaderModule demo_prepare_fs(struct demo *demo) { in demo_prepare_fs()
1340 static void demo_prepare_pipeline(struct demo *demo) { in demo_prepare_pipeline()
1457 static void demo_prepare_descriptor_pool(struct demo *demo) { in demo_prepare_descriptor_pool()
1476 static void demo_prepare_descriptor_set(struct demo *demo) { in demo_prepare_descriptor_set()
1508 static void demo_prepare_framebuffers(struct demo *demo) { in demo_prepare_framebuffers()
1537 static void demo_prepare(struct demo *demo) { in demo_prepare()
1585 struct demo* demo = glfwGetWindowUserPointer(window); in demo_refresh_callback() local
1590 struct demo* demo = glfwGetWindowUserPointer(window); in demo_resize_callback() local
1596 static void demo_run(struct demo *demo) { in demo_run()
1614 static void demo_create_window(struct demo *demo) { in demo_create_window()
1683 static void demo_init_vk(struct demo *demo) { in demo_init_vk()
1971 static void demo_init_device(struct demo *demo) { in demo_init_device()
2006 static void demo_init_vk_swapchain(struct demo *demo) { in demo_init_vk_swapchain()
2099 static void demo_init_connection(struct demo *demo) { in demo_init_connection()
2115 static void demo_init(struct demo *demo, const int argc, const char *argv[]) in demo_init()
2135 static void demo_cleanup(struct demo *demo) { in demo_cleanup()
2186 static void demo_resize(struct demo *demo) { in demo_resize()
2232 struct demo demo; in main() local