Bigfoot / Sonarqube (game) (push) Skipped
Bigfoot / Sonarqube (toolmode) (push) Skipped
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: game) (push) Successful in 9m17s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: toolmode) (push) Successful in 1m10s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: ON, Variant: game) (push) Successful in 43s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: ON, Variant: toolmode) (push) Successful in 46s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: game) (push) Failing after 3m39s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: toolmode) (push) Failing after 2m18s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: game) (push) Failing after 1m45s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: toolmode) (push) Failing after 1m53s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: game) (push) Failing after 11m24s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: toolmode) (push) Failing after 34s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: ON, Variant: game) (push) Failing after 29s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: ON, Variant: toolmode) (push) Failing after 31s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: game) (push) Failing after 3m54s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: game) (push) Failing after 25s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: toolmode) (push) Failing after 25s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: toolmode) (push) Failing after 23s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: toolmode) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: ON, Variant: game) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: ON, Variant: toolmode) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: game) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: toolmode) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: game) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: toolmode) (push) Canceled after 0s
Bigfoot / Clang Format Checks (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: game) (push) Canceled after 28s
61 lines
1.9 KiB
C++
61 lines
1.9 KiB
C++
/*********************************************************************
|
|
* \file VulkanSurface.cpp
|
|
*
|
|
* \author Romain BOULLARD
|
|
* \date September 2026
|
|
*********************************************************************/
|
|
#include <GraphicsVulkan/VulkanSurface.hpp>
|
|
|
|
#include <GraphicsVulkan/VulkanInstance.hpp>
|
|
|
|
#include <Utils/TargetMacros.h>
|
|
|
|
#include <SDL3/SDL.h>
|
|
#include <gtest/gtest.h>
|
|
|
|
namespace Bigfoot::Vulkan
|
|
{
|
|
class VulkanSurfaceFixture: public ::testing::Test
|
|
{
|
|
protected:
|
|
void SetUp() override
|
|
{
|
|
SDL_Init(SDL_INIT_VIDEO);
|
|
|
|
m_window = SDL_CreateWindow("VulkanSurfaceTests", 64, 64, SDL_WINDOW_HIDDEN | SDL_WINDOW_VULKAN);
|
|
|
|
const SDL_PropertiesID windowProperties = SDL_GetWindowProperties(m_window);
|
|
|
|
#ifdef BIGFOOT_WINDOWS
|
|
m_surfaceCreateInfo.m_windowHandle =
|
|
static_cast<HWND>(SDL_GetPointerProperty(windowProperties, SDL_PROP_WINDOW_WIN32_HWND_POINTER, nullptr));
|
|
m_surfaceCreateInfo.m_windowInstance = GetModuleHandle(nullptr);
|
|
#elif defined BIGFOOT_LINUX
|
|
m_surfaceCreateInfo.m_display = static_cast<wl_display*>(
|
|
SDL_GetPointerProperty(windowProperties, SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER, nullptr));
|
|
m_surfaceCreateInfo.m_surface = static_cast<wl_surface*>(
|
|
SDL_GetPointerProperty(windowProperties, SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER, nullptr));
|
|
#endif
|
|
}
|
|
|
|
void TearDown() override
|
|
{
|
|
SDL_DestroyWindow(m_window);
|
|
SDL_Quit();
|
|
}
|
|
|
|
VulkanInstance m_instance {"VulkanSurfaceTests", Version {1, 0, 0}};
|
|
SDL_Window* m_window = nullptr;
|
|
SurfaceCreateInfo m_surfaceCreateInfo;
|
|
};
|
|
|
|
/****************************************************************************************/
|
|
|
|
TEST_F(VulkanSurfaceFixture, Constructor_ShouldCreateAValidSurface)
|
|
{
|
|
const VulkanSurface surface {m_instance, m_surfaceCreateInfo};
|
|
|
|
EXPECT_TRUE(surface.GetHandle());
|
|
}
|
|
} // namespace Bigfoot::Vulkan
|