diff options
| author | kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> | 2024-08-22 12:18:44 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-22 10:18:44 -0700 |
| commit | b5bb82411cc6101b66283f7d0abca7ceb58aa2f6 (patch) | |
| tree | 192a522513da30b1a92e6c319693aa541729bea9 /tools/platform | |
| parent | a3fbd8f060317332eae951d4a376e830d058469e (diff) | |
Feature/capture unit test (#4898)
* record/replay: Add tests
Modify the hello-world example to generate the hash code for the
entry point spirv code, so that we can compare it with replaying
the example.
Add the test script to run the example and compare the hash code
with replaying it.
* Check nullptr for out Diagnostics
We need to check whether the output Diagnostics is a nullptr,
because it's allowed.
* Fix the double free pointers
* Add triangle example as the new test for record-replay
Change the example base to add the offline rendering path
because we don't want to display anything when we're in the
test mode.
This change involves introducing a TestBase that will parse
the command line option. It will decide whether we are in
the test mode.
Disable all the swapchain and windows related creation, instead
we will only create one single framebuffer for the render target.
* Address comments
TODO:
In the follow up patches, I will add more tests and integrate the test flow into slang-unit-test.
Diffstat (limited to 'tools/platform')
| -rw-r--r-- | tools/platform/window.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/platform/window.h b/tools/platform/window.h index efbe139a7..29327def3 100644 --- a/tools/platform/window.h +++ b/tools/platform/window.h @@ -242,7 +242,7 @@ public: int /*showCommand*/) \ { \ platform::Application::init(); \ - auto result = APPLICATION_ENTRY(); \ + auto result = APPLICATION_ENTRY(0, nullptr); \ platform::Application::dispose(); \ GFX_DUMP_LEAK \ return result; \ @@ -251,10 +251,10 @@ public: #else #define PLATFORM_UI_MAIN(APPLICATION_ENTRY) \ - int main() \ + int main(int argc, char** argv) \ { \ platform::Application::init(); \ - auto rs = APPLICATION_ENTRY(); \ + auto rs = APPLICATION_ENTRY(argc, argv); \ platform::Application::dispose(); \ return rs; \ } |
