diff --git a/MVS/RenderDoc/main.cpp b/MVS/RenderDoc/main.cpp index 0a9ca507..7929e59c 100644 --- a/MVS/RenderDoc/main.cpp +++ b/MVS/RenderDoc/main.cpp @@ -52,7 +52,7 @@ HMODULE gRenderDocModule = nullptr; typedef int (RENDERDOC_CC* PFN_RENDERDOC_GetAPI)(int version, void** apiOut); -struct RENDERDOC_API_1_1_2 +struct RENDERDOC_API_1_7_0 { void (RENDERDOC_CC* GetAPIVersion)(int* major, int* minor, int* patch); void (RENDERDOC_CC* SetCaptureOptionU32)(uint32_t opt, uint32_t val); @@ -76,9 +76,16 @@ struct RENDERDOC_API_1_1_2 void (RENDERDOC_CC* StartFrameCapture)(void* device, void* window); uint32_t (RENDERDOC_CC* IsFrameCapturing)(); void (RENDERDOC_CC* EndFrameCapture)(void* device, void* window); + void (RENDERDOC_CC* TriggerMultiFrameCapture)(uint32_t numFrames); + void (RENDERDOC_CC* SetCaptureFileComments)(const char* filePath, const char* comments); + uint32_t (RENDERDOC_CC* DiscardFrameCapture)(void* device, void* window); + uint32_t (RENDERDOC_CC* ShowReplayUI)(); + void (RENDERDOC_CC* SetCaptureTitle)(const char* title); + void (RENDERDOC_CC* SetObjectAnnotation)(void* device, void* object, const char* key, int valueType, uint32_t valueVectorWidth, const void* value); + void (RENDERDOC_CC* SetCommandAnnotation)(void* device, void* queueOrCommandBuffer, const char* key, int valueType, uint32_t valueVectorWidth, const void* value); }; -RENDERDOC_API_1_1_2* gRenderDocAPI = nullptr; +RENDERDOC_API_1_7_0* gRenderDocAPI = nullptr; D3D12Device gDevice; D3D12CommandQueue gCommandQueue; @@ -457,7 +464,7 @@ bool InitRenderDoc() return false; } - int apiVersion = 10102; + int apiVersion = 10700; void* apiPtr = nullptr; int ret = GetAPI(apiVersion, &apiPtr); if (ret != 1 || !apiPtr) @@ -467,7 +474,19 @@ bool InitRenderDoc() return false; } - gRenderDocAPI = (RENDERDOC_API_1_1_2*)apiPtr; + gRenderDocAPI = (RENDERDOC_API_1_7_0*)apiPtr; + + gRenderDocAPI->SetCaptureOptionU32(2, 1); + Log("[INFO] RenderDoc API Validation enabled"); + + gRenderDocAPI->SetCaptureOptionU32(8, 1); + Log("[INFO] RenderDoc RefAllResources enabled"); + + gRenderDocAPI->SetCaptureOptionU32(9, 1); + Log("[INFO] RenderDoc SaveAllInitials enabled"); + + gRenderDocAPI->SetCaptureFilePathTemplate(".\\captures"); + Log("[INFO] RenderDoc initialized successfully"); return true; } @@ -561,6 +580,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine if (frameCount == 5) { Log("[INFO] Starting RenderDoc capture at frame %d", frameCount); + gRenderDocAPI->SetCaptureTitle("Sphere_DrawIndexed_Test"); + gRenderDocAPI->SetCaptureFileComments(NULL, "Testing DrawIndexed with texture, Frame 5-6"); gRenderDocAPI->StartFrameCapture(gDevice.GetDevice(), nullptr); } diff --git a/MVS/RenderDoc/renderdoc.dll b/MVS/RenderDoc/renderdoc.dll deleted file mode 100644 index 01c09c96..00000000 Binary files a/MVS/RenderDoc/renderdoc.dll and /dev/null differ diff --git a/Testing/Temporary/CTestCostData.txt b/Testing/Temporary/CTestCostData.txt deleted file mode 100644 index ed97d539..00000000 --- a/Testing/Temporary/CTestCostData.txt +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/test_scene.scene b/test_scene.scene deleted file mode 100644 index 6f028315..00000000 --- a/test_scene.scene +++ /dev/null @@ -1,5 +0,0 @@ -# XCEngine Scene File -scene=TestScene; -active=1; - -gameobject=name=SavedObject;active=1;id=21;transform=position=1,2,3;rotation=0,0,0,1;scale=1,1,1;; diff --git a/test_scene_multi.scene b/test_scene_multi.scene deleted file mode 100644 index c1aed40a..00000000 --- a/test_scene_multi.scene +++ /dev/null @@ -1,6 +0,0 @@ -# XCEngine Scene File -scene=TestScene; -active=1; - -gameobject=name=Player;active=1;id=23;transform=position=0,0,0;rotation=0,0,0,1;scale=1,1,1;; -gameobject=name=Enemy;active=1;id=24;transform=position=0,0,0;rotation=0,0,0,1;scale=1,1,1;; diff --git a/tests/RHI/OpenGL/integration/minimal/CMakeLists.txt b/tests/RHI/OpenGL/integration/minimal/CMakeLists.txt index 7dc1ef2e..19d94fec 100644 --- a/tests/RHI/OpenGL/integration/minimal/CMakeLists.txt +++ b/tests/RHI/OpenGL/integration/minimal/CMakeLists.txt @@ -39,6 +39,9 @@ add_custom_command(TARGET OpenGL_Minimal POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/GT.ppm $/ + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ENGINE_ROOT_DIR}/third_party/renderdoc/renderdoc.dll + $/ ) add_test(NAME OpenGL_Minimal_Integration diff --git a/tests/RHI/test_factory.cpp b/tests/RHI/test_factory.cpp deleted file mode 100644 index f6016cd8..00000000 --- a/tests/RHI/test_factory.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once - -#include - -#include "XCEngine/RHI/RHIFactory.h" -#include "XCEngine/RHI/D3D12/D3D12Device.h" - -using namespace XCEngine::RHI; - -TEST(RHIFactory, CreateD3D12Device_ReturnsValidPointer) { - RHIDevice* device = RHIFactory::CreateRHIDevice(RHIType::D3D12); - - ASSERT_NE(device, nullptr); - - delete device; -} - -TEST(RHIFactory, CreateD3D12DeviceByName_ReturnsValidPointer) { - RHIDevice* device = RHIFactory::CreateRHIDevice("D3D12"); - - ASSERT_NE(device, nullptr); - - delete device; -} - -TEST(RHIFactory, CreateInvalidDevice_ReturnsNullptr) { - RHIDevice* device = RHIFactory::CreateRHIDevice("InvalidAPI"); - - ASSERT_EQ(device, nullptr); -} - -TEST(RHIFactory, CreateInvalidType_ReturnsNullptr) { - RHIDevice* device = RHIFactory::CreateRHIDevice(RHIType::Vulkan); - - ASSERT_EQ(device, nullptr); -} - -TEST(D3D12DeviceCreation, DirectCreation_Success) { - D3D12Device* device = new D3D12Device(); - - ASSERT_NE(device, nullptr); - - delete device; -}