[BUG]: Dumping Creates Duplicate Textures With Non-Unique Name Hashes
Describe the Bug
Several games when dumping textures will produce tens of thousands of textures in a few seconds of dumping. Ace Combat 4, 5, and Zero are known culprits. In these cases there are dozens of identical files for each unique texture. When the dumped PNG files are checked for similarity they are identical in every way except for name. There appears to be something wrong with the hashing algorithm that generates different names for identical images.
For example the following images are identical but the first portion of the image name hash differs.
1eb7cc3b1d5fa43d-af099a789bab7043-r32x32-00002213.png
2dfec3fde93735b1-af099a789bab7043-r32x32-00002213.png
2e6cf21fc0212e03-af099a789bab7043-r32x32-00002213.png
3e9ed7fc7d1e9b4e-af099a789bab7043-r32x32-00002213.png
4f7190f881ae0940-af099a789bab7043-r32x32-00002213.png
Reproduction Steps
Run a mission in Ace Combat 4, 5, or Zero and turn on texture dumping. Thousands of ground textures will fill the dump folder.
Expected Behavior
Identical images in graphics memory should have a single unique hash.
PCSX2 Revision
v2.3.246
Operating System
Windows 11
If Linux - Specify Distro
No response
Logs & Dumps
No response
Source: PCSX2/pcsx2