Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions GPU/GPUTracking/display/backend/GPUDisplayBackendOpenGL.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,23 @@ GPUDisplayBackendOpenGL::GPUDisplayBackendOpenGL()
mBackendName = "OpenGL";
}

#ifdef GPUCA_DISPLAY_GL3W
int32_t GPUDisplayBackendOpenGL::ExtInit()
{
#ifdef GPUCA_DISPLAY_GL3W
return gl3wInit();
}
#else
int32_t GPUDisplayBackendOpenGL::ExtInit()
{
return glewInit();
}
#endif
#ifdef GPUCA_DISPLAY_OPENGL_CORE
}

bool GPUDisplayBackendOpenGL::CoreProfile()
{
#ifdef GPUCA_DISPLAY_OPENGL_CORE
return true;
}
#else
bool GPUDisplayBackendOpenGL::CoreProfile()
{
return false;
}
#endif
}

// #define CHKERR(cmd) {cmd;}
#define CHKERR(cmd) \
Expand Down
5 changes: 2 additions & 3 deletions GPU/GPUTracking/display/backend/GPUDisplayBackendVulkan.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ double GPUDisplayBackendVulkan::checkDevice(vk::PhysicalDevice device, const std

void GPUDisplayBackendVulkan::createDevice()
{
VULKAN_HPP_DEFAULT_DISPATCHER.init();
VULKAN_HPP_DEFAULT_DISPATCHER.init(vkGetInstanceProcAddr);
vk::ApplicationInfo appInfo{};
appInfo.pApplicationName = "GPU CA Standalone display";
appInfo.applicationVersion = VK_MAKE_VERSION(1, 0, 0);
Expand All @@ -355,8 +355,7 @@ void GPUDisplayBackendVulkan::createDevice()
uint32_t frontendExtensionCount = mDisplay->frontend()->getReqVulkanExtensions(frontendExtensions);
std::vector<const char*> reqInstanceExtensions(frontendExtensions, frontendExtensions + frontendExtensionCount);

const std::vector<const char*> reqValidationLayers = {
"VK_LAYER_KHRONOS_validation"};
const std::vector<const char*> reqValidationLayers = {"VK_LAYER_KHRONOS_validation"};
auto debugCallback = [](vk::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, vk::DebugUtilsMessageTypeFlagsEXT messageType, const vk::DebugUtilsMessengerCallbackDataEXT* pCallbackData, void* pUserData) -> VkBool32 {
static int32_t throwOnError = getenv("GPUCA_VULKAN_VALIDATION_THROW") ? atoi(getenv("GPUCA_VULKAN_VALIDATION_THROW")) : 0;
static bool showVulkanValidationInfo = getenv("GPUCA_VULKAN_VALIDATION_INFO") && atoi(getenv("GPUCA_VULKAN_VALIDATION_INFO"));
Expand Down