#pragma once #if defined(XCENGINE_SUPPORT_VULKAN) #include #include #include #include #include "XCEngine/RHI/RHICommandList.h" #include "XCEngine/RHI/RHICommandQueue.h" #include "XCEngine/RHI/RHIDevice.h" #include "XCEngine/RHI/RHIShader.h" #include "XCEngine/RHI/RHITexture.h" #include "XCEngine/RHI/Vulkan/VulkanDevice.h" #include "XCEngine/RHI/Vulkan/VulkanTexture.h" namespace XCEngine { namespace RHI { class VulkanGraphicsFixture : public ::testing::Test { protected: void SetUp() override; void TearDown() override; std::wstring ResolveShaderPath(const wchar_t* relativePath) const; TextureDesc CreateColorTextureDesc(uint32_t width, uint32_t height) const; TextureDesc CreateDepthTextureDesc(uint32_t width, uint32_t height) const; RHICommandList* CreateCommandList() const; RHIShader* CreateWriteRedComputeShader() const; RHIShader* CreateWriteRedComputeShaderFromGlsl() const; void SubmitAndWait(RHICommandList* commandList); std::vector ReadTextureRgba8(VulkanTexture* texture); RHIDevice* m_device = nullptr; RHICommandQueue* m_queue = nullptr; }; } // namespace RHI } // namespace XCEngine #endif