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

Tools: Add additional options for dumping in GS runner. #12229

Merged
merged 3 commits into from
Feb 12, 2025

Conversation

TJnotJT
Copy link
Contributor

@TJnotJT TJnotJT commented Jan 23, 2025

Description of Changes

Add additional options to GS dump runner to allow: dumping render target, textures, depth, alphas per draw; range of frames or draws to dump. Some miscellanous fixes to formatting of file names and dumping of GS context.

Rationale behind Changes

To make it easier to debug large numbers of GS dumps. Example workflow: run a large number of GS dumps just outputting the frames, check which dumps/frames are different, rerun the dump runner on the differing dumps/frames while dumping all draws RTs to see which draw the change ocurred.

Suggested Testing Steps

Run the GS dump runner with new options -dump [rt|tex|z|f|a|i], -dumprange, -dumprangef. Example:
pcsx2-gsdumprunner-x64-dbg.exe <dump file> -renderer sw -dumpdir <output dir> -dump rttexfzai -dumprange 100,100,3
to dump RTs, textures, frames, alphas,and info (context, vertex, vsync regs) from in draws 100 to 199 that are multiples of 3.

Copy link
Member

@F0bes F0bes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks fine. Does @lightningterror want to do a test dump, just to see if the basic functionality is still working properly? :)

@@ -443,6 +443,14 @@ static void PrintCommandLineHelp(const char* progname)
std::fprintf(stderr, " -help: Displays this information and exits.\n");
std::fprintf(stderr, " -version: Displays version information and exits.\n");
std::fprintf(stderr, " -dumpdir <dir>: Frame dump directory (will be dumped as filename_frameN.png).\n");
std::fprintf(stderr, " -dump [rt|tex|z|f|a|i]: Enabling dunmping of render target, texture, z buffer, frame, "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo "dunmping"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review Fobes. Fixed the typo.

@TJnotJT TJnotJT force-pushed the gsrunner-dump-options branch from 1a6d429 to c19921d Compare February 5, 2025 05:11
@Mrlinkwii
Copy link
Contributor

just to note their are conflicts

@TJnotJT TJnotJT force-pushed the gsrunner-dump-options branch from b9e0272 to b883a94 Compare February 9, 2025 23:04
@TJnotJT
Copy link
Contributor Author

TJnotJT commented Feb 9, 2025

Thanks for the head up @Mrlinkwii. I fixed the conflict, which was a blank line. I also made a small formatting fix, which apparently reverts something in a PR since I made this one:

Old:
s = GetDrawDumpPath("%05d_f%lld_rt1_%05x_(%05x)_%s.bmp", s_n, frame, m_cached_ctx.FRAME.Block(), rt->m_TEX0.TBP0, psm_str(m_cached_ctx.FRAME.PSM));

New:
s = GetDrawDumpPath("%05d_f%05lld_rt1_%05x_%s.bmp", s_n, frame, m_cached_ctx.FRAME.Block(), psm_str(m_cached_ctx.FRAME.PSM));

The parenthesis around block number are inconsistent with the way SW renderer names dump files and others names even in HW renderer, so I changed it back. Hope that's ok.

@TJnotJT TJnotJT force-pushed the gsrunner-dump-options branch from cde33a7 to bbb516c Compare February 9, 2025 23:57
@F0bes F0bes merged commit 46221a8 into PCSX2:master Feb 12, 2025
12 checks passed
@lightningterror
Copy link
Contributor

This breaks draw dumping on opengl, no context or vertex info is dumped.

@TJnotJT
Copy link
Contributor Author

TJnotJT commented Feb 15, 2025

This breaks draw dumping on opengl, no context or vertex info is dumped.

Should be fixed by adding missing UI elements in #12302

@TJnotJT TJnotJT deleted the gsrunner-dump-options branch February 15, 2025 19:04
Hancock33 added a commit to Hancock33/batocera.piboy that referenced this pull request Feb 16, 2025
----------------------------------------------------
pcsx2.mk v2.3.154 # Version: Commits on Feb 12, 2025
----------------------------------------------------
- [Tools: Add additional options for dumping in GS runner.](PCSX2/pcsx2#12229)

,

-----------------------------------------------------------------------------------
play.mk e46557675bf6f0936475168e3fadd49abe9742a4 # Version: Commits on Feb 12, 2025
-----------------------------------------------------------------------------------
Use proper preprocessor macro.,

---------------------------------------------------------------
ruffle.mk nightly-2025-02-13 # Version: Commits on Feb 13, 2025
---------------------------------------------------------------
## What's Changed

* chore: Bump a subset of indirect Rust dependencies by @torokati44 in ruffle-rs/ruffle#19500

* avm1: Don't use a static `AvmString` for AVM1 array's length property by @moulins in ruffle-rs/ruffle#19480

* avm1: Do not unwrap parent when removing objects pending removal by @kjarosh in ruffle-rs/ruffle#19462

* avm1: avoid creating a temporary `Vec` in `Array.prototype.splice` by @moulins in ruffle-rs/ruffle#19504

**Full Changelog**: ruffle-rs/ruffle@nightly-2025-02-12...nightly-2025-02-13,

--------------------------------------------------------------------------------------
shadps4.mk 6e1264215179e24c4e8c58b00df8a9f78da7a2f6 # Version: Commits on Feb 13, 2025
--------------------------------------------------------------------------------------
shader_recompiler: Lower non-compute shared memory into spare VGPRs. (#2403),

---------------------------------------------------------------------------------------------
solarus-engine.mk 676a87f5640c2acdcd3d86ff45fe295129b6b48c # Version: Commits on Feb 13, 2025
---------------------------------------------------------------------------------------------
Merge branch 'hhromic/cicd' into 'dev'

---------------------------------------------------------------------------------------
thextech.mk 5a6d83efe49ec8740d52d54eea8cbd489bc811e4 # Version: Commits on Feb 13, 2025
---------------------------------------------------------------------------------------
Add sound thread to do non-blocking SFX (#903)

* Add sound thread to do non-blocking SFX

* Update changelog.txt

* Don't include sound_thread.cpp when disabled

* sound.h: Fixed the PlaySfx_Blocking prototype

---------

Co-authored-by: Wohlstand <admin@wohlnet.ru>,

------------------------------------------------------------------------------------------
devilutionx.mk 420b569d4901c1438d891cee2080950016d13f16 # Version: Commits on Feb 13, 2025
------------------------------------------------------------------------------------------
Update cache version of Linux CI build scripts,

----------------------------------------------------------------------------------------
retroarch.mk a6ea47df15970dfe753f2a56ecfecbd652615f69 # Version: Commits on Feb 13, 2025
----------------------------------------------------------------------------------------
Fetch translations from Crowdin,

-----------------------------------------------------------------------------------------
sonic3-air.mk c54f56b537dc231a4c2c9fffd2e9aa7235aab7c4 # Version: Commits on Feb 12, 2025
-----------------------------------------------------------------------------------------
When script compilation fails in dev mode, ask whether to retry compilation right away,

------------------------------------------------------------------------------------------
xash3d-fwgs.mk 0dd5a6041047b8d9834d9eaf2b596b26014f6cc9 # Version: Commits on Feb 12, 2025
------------------------------------------------------------------------------------------
3rdparty: gl4es: update submodule,

--------------------------------------------------------------------------------------------
libretro-play.mk e46557675bf6f0936475168e3fadd49abe9742a4 # Version: Commits on Feb 12, 2025
--------------------------------------------------------------------------------------------
Use proper preprocessor macro.,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants