diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 965c650c..8d3d4e3e 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -35,7 +35,7 @@ jobs: - name: Install clang-20 run: | sudo apt-get update - sudo apt-get install -y clang-20 clang++-20 lld-20 libc++-20-dev libc++abi-20-dev + sudo apt-get install -y clang-20 clang++-20 lld-20 libc++-20-dev libc++abi-20-dev libvulkan-dev - name: Show installed toolchain run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8465feda..5dca1367 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,7 +35,7 @@ jobs: - name: Install clang-20 run: | sudo apt-get update - sudo apt-get install -y clang-20 clang++-20 lld-20 libc++-20-dev libc++abi-20-dev + sudo apt-get install -y clang-20 clang++-20 lld-20 libc++-20-dev libc++abi-20-dev libvulkan-dev - name: Show installed toolchain run: | diff --git a/MobileGL/Includes.h b/MobileGL/Includes.h index 50a3d3fb..a6f996df 100644 --- a/MobileGL/Includes.h +++ b/MobileGL/Includes.h @@ -80,6 +80,7 @@ #ifdef __linux__ #include #include +#include #endif #ifdef _WIN32 @@ -94,7 +95,6 @@ #include #include #include -#include #include #include #endif diff --git a/MobileGL/MG_Impl/EGLImpl/EGLForVulkan/EGLForVulkan.cpp b/MobileGL/MG_Impl/EGLImpl/EGLForVulkan/EGLForVulkan.cpp index 515af665..c8028426 100644 --- a/MobileGL/MG_Impl/EGLImpl/EGLForVulkan/EGLForVulkan.cpp +++ b/MobileGL/MG_Impl/EGLImpl/EGLForVulkan/EGLForVulkan.cpp @@ -14,7 +14,7 @@ #if MOBILEGL_BACKEND == MOBILEGL_BACKEND_TYPE_DIRECT_VULKAN namespace MobileGL { namespace MG_Impl::EGLImpl { - // TODO: complete EGL for Vulkan implementation + // TODO: complete EGL impl for Vulkan const char* demoFS = R"(#version 460 layout(location = 0) out vec4 outColor; @@ -86,18 +86,25 @@ namespace MobileGL { }); } +#ifdef __ANDROID__ void CreateWindowSurfaceForVulkan(ANativeWindow* window) { MG_Backend::DirectVulkan::pVulkanRenderer = MakeUnique(window); MG_Backend::DirectVulkan::pVulkanRenderer->Initialize(); PrepareDemoRes(); // for demo use } +#endif EGLSurface CreateWindowSurface(EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint* attrib_list) { MGLOG_D("EGLForVulkan::CreateWindowSurface called with window=%p", window); +#ifdef __ANDROID__ auto* nativeWindow = static_cast(window); CreateWindowSurfaceForVulkan(nativeWindow); +#else + MGLOG_W("EGLForVulkan::CreateWindowSurface is not implemented for this platform"); // TODO: support more + // platforms +#endif return (EGLSurface)1; }