The behavior was verified on Dobie to be correct.
The code needs to be ported to SW renderer too to
improve rendering on SW side.
Current PR will fix plenty of games on HW renderer
that had/have zbuffer issues before.
v2. Set DepthMask to the maximum the current depth format allows.
Will properly clamp for 16bit and 24bit formats.
v3. gl: Fix uniform buffer upload/cache for VSConstantBuffer.
Add support for depthmasking to EmulateZbuffer, previous old code had
support but wasn't ported properly with the new code a few years back.
VS Constant buffer is now properly setup.
* Add Z clamping to GSdx SW mode
* Fix spacing
* Only clamp when max vertex z is greater than zfmt max
* Fix Z format switches
* Get rid of needless shuffle
* Whoops, missed a case
* Replace switches with a shift
* Disable triangle clamping for SSE2
* Implement clamping on GS Raster Interpreter
* Added SSE2 Triangle Z clamping by KrossX
* macOS compile
* Fix memprotect error on macOS
* Fix semaphore wait + thread cancel on macOS
* Fix timedlock timeout calculation
* spu2-x macOS
* onepad macOS support
* Add MacOS game controller db
* Disable onepad_legacy on macOS
* Fix spu2-x configuration crashes
* Make recompiler work on 32-bit macOS
* Use dylib extension for plugins on macOS
* Make app bundle on macOS
* Use git info for Info.plist version
Fix for terrible performance in US versions of Primal (all the time) and Ghosthunter (when encountering Teddy Bear and in the moment of Gator-Man's rush attack, maybe few other cases), Both games use shared code with pretty dumb wait loops in the microcode, those are absolutelly unnecessary and significantly kill performance on emulator.
* Performance fix for Primal and Ghosthunter
Fix for terrible performance in US versions of Primal (all the time) and Ghosthunter (when encountering Teddy Bear and in the moment of Gator-Man's rush attack, maybe few other cases). Both games use shared code with pretty dumb wait loops in the microcode, those are absolutely unnecessary and significantly kill performance on the emulator.
This change makes the EE recompiler not hardcoded to working with 32 MB of RAM, and instead work with the amount of RAM set in Ps2MemSize::MainRam. The rest of PCSX2 seems to work fine with more than 32 MB of RAM - it is only the EE recompiler that has trouble. If the Ps2MemSize::MainRam value is not changed from the default 32 MB, there should be no change: 32 MB / 0x10000 = 0x200, the value that was there previously.
This may be helpful if anybody else in the future wants to emulate a PS2 dev kit with 128 MB or RAM, or maybe the PSX dvr thing which I think has 64 MB of RAM. I've confirmed that with the change, you could set Ps2MemSize::MainRam to 128 MB, and execute code with the recompiler that's above the first 32 MB of RAM, and do VIF and scratchpad DMA transfers from this upper memory as well.
* Modify VU addressing so it only multiplies by 8 before entering the program
Fixes issues with VU1 TPC being read multiplied by 8 (bad)
* Removed assert on SuperVU which no longer makes sense
- Always enable sw colclip for BLEND_NO_BAR.
Free blending and it's faster than standard hdr algo when Blending
Accuracy is disabled.
- Enable sw colclip for Safe FBMASK SW emulated.
instead of hdr mode with accumulation blend so we don't use a mix of sw
and hw blending. It is more accurate.
Test case: Superman Shadows of Apokolips, fixes shadows when blending is enabled.
- Use const to get rid of some warnings.
- Free blending and it's faster than standard hdr algo when Blending
Accuracy is disabled.
- Add assert when disabling hw blending, hw blending should only be disabled
on free/no barrier blending. D3D11 lacks other types of blending.
- Use const to get rid of some warnings.