Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tracing Support #90

Closed
flibitijibibo opened this issue Jan 17, 2021 · 4 comments
Closed

Add Tracing Support #90

flibitijibibo opened this issue Jan 17, 2021 · 4 comments
Assignees

Comments

@flibitijibibo
Copy link
Member

FNA now supports many renderers, more than 3 times what FNA supported just two years ago. Additionally, the renderers we support are far more complex and require a lot of testing to ensure high accuracy, stability, and performance. With this in mind, we need to start working on adding functionality that dramatically simplifies mass testing of new features and renderers.

The first step is to add a tracing tool to FNA3D. In short: We need a system that, when enabled, captures all incoming FNA3D calls (and their associated data) and writes it to a file that can be played back with a simple program. The API used when capturing should not matter, and when playing the file back you should be able to use any backend that FNA3D currently supports. The one exception to this rule would be any trace that uses the SysRenderer APIs, as that requires data outside FNA3D's own scope.

Once this is done, we can simply do captures of our whole catalog, and as long as the ABI doesn't break we can very easily test new renderers locally while also integrating the catalog into a GitHub Action that plays everything back against a bunch of reference devices (WARP, llvmpipe GL/VK, etc.) to trivially catch regressions regarding accuracy and stability. Performance is a bit tougher to test, but that can be checked out after we have a good testing system in place for the basic stuff.

@flibitijibibo
Copy link
Member Author

Tracing support has begun! The framework is in place, it just needs to be filled in now:

https://github.com/FNA-XNA/FNA3D/blob/master/src/FNA3D_Tracing.c
https://github.com/FNA-XNA/FNA3D/blob/master/replay/replay.c

@flibitijibibo
Copy link
Member Author

As of the latest commit, tracing should now be fully-functional for single-threaded applications. Just need to add a mutex to the tracer and this is good to review...

@flibitijibibo
Copy link
Member Author

The mutex is in, so if I didn't screw anything up this is now good to test.

@flibitijibibo
Copy link
Member Author

Traces are working and we've already started filing reports with them, so I think we're good here. Back to #72 we go...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant