#pragma once #include #include #include "vkvg.h" #include "vkh.h" #include #define TRY_LOAD_DEVICE_EXT(ext) \ { \ if (vkh_phyinfo_try_get_extension_properties(pi, #ext, NULL)) \ enabledExts[enabledExtsCount++] = #ext; \ } class SampleApp { bool try_get_phyinfo(VkhPhyInfo *phys, uint32_t phyCount, VkPhysicalDeviceType gpuType, VkhPhyInfo *phy); static void key_callback(GLFWwindow *window, int key, int scancode, int action, int mods); VkPhysicalDeviceMemoryProperties memory_properties; VkPhysicalDeviceProperties gpu_props; public: uint32_t width = 512; uint32_t height = 512; uint32_t iterations = 0; uint32_t testSize = 500; std::vector logSeverity = {1}; uint32_t logType = 0; bool listGpus = false; int32_t gpuIndex = -1; VkSampleCountFlags samples = VK_SAMPLE_COUNT_1_BIT; std::vector testsToRun; VkPhysicalDeviceType preferedGPU = VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU; VkPresentModeKHR presentMode = VK_PRESENT_MODE_MAILBOX_KHR; GLFWwindow* win; VkSurfaceKHR vkSurf; VkhApp app; VkhDevice vkhDev; VkhPresenter renderer; uint32_t presentQIndex; void Init(); void Run(); void CleanUp(); };