From f92c6625d920d14a1595a4b3e4fe71297c399467 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 9 Apr 2018 21:09:52 -0700 Subject: [PATCH] VK: Cleanup. --- examples/common/entry/entry_x11.cpp | 5 +++++ scripts/genie.lua | 1 + src/renderer_vk.cpp | 10 ++++++---- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/examples/common/entry/entry_x11.cpp b/examples/common/entry/entry_x11.cpp index 6bfd3192c..49149f2e8 100644 --- a/examples/common/entry/entry_x11.cpp +++ b/examples/common/entry/entry_x11.cpp @@ -12,6 +12,7 @@ #include #include // will include X11 which #defines None... Don't mess with order of includes. #include +//#include #include #include // syscall @@ -35,7 +36,11 @@ namespace entry inline void x11SetDisplayWindow(void* _display, uint32_t _window, void* _glx = NULL) { bgfx::PlatformData pd; +#if 0 + pd.ndt = XGetXCBConnection( (Display*)_display); +#else pd.ndt = _display; +#endif // 0 pd.nwh = (void*)(uintptr_t)_window; pd.context = _glx; pd.backBuffer = NULL; diff --git a/scripts/genie.lua b/scripts/genie.lua index fd6f21f53..92d55c4b8 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -283,6 +283,7 @@ function exampleProjectDefaults() "X11", "GL", "pthread", +-- "X11-xcb", } configuration { "linux-steamlink" } diff --git a/src/renderer_vk.cpp b/src/renderer_vk.cpp index 6d04003bf..e008ccb80 100644 --- a/src/renderer_vk.cpp +++ b/src/renderer_vk.cpp @@ -838,9 +838,10 @@ VK_IMPORT errorState = ErrorState::InstanceCreated; BX_TRACE("Instance functions:"); -#define VK_IMPORT_INSTANCE_FUNC(_optional, _func) \ + +#define VK_IMPORT_INSTANCE_FUNC(_optional, _func) \ _func = (PFN_##_func)vkGetInstanceProcAddr(m_instance, #_func); \ - BX_TRACE("\t%p " #_func, _func); \ + BX_TRACE("\t%p " #_func, _func); \ imported &= _optional || NULL != _func VK_IMPORT_INSTANCE #undef VK_IMPORT_INSTANCE_FUNC @@ -852,6 +853,7 @@ VK_IMPORT_INSTANCE } m_debugReportCallback = VK_NULL_HANDLE; + if (BX_ENABLED(BGFX_CONFIG_DEBUG) ) { VkDebugReportCallbackCreateInfoEXT drcb; @@ -3525,8 +3527,8 @@ VK_DESTROY , shaderSize ); #else -#include "../examples/runtime/shaders/spv/vert.spv.h" -#include "../examples/runtime/shaders/spv/frag.spv.h" +#include "../examples/runtime/shaders/spirv/vert.spv.h" +#include "../examples/runtime/shaders/spirv/frag.spv.h" shaderSize = BGFX_CHUNK_MAGIC_VSH == magic ? sizeof(vs_cubes_spv)