So to compensate lets bring back some speed to the emulation.
change a little the way the vertex are send to the gpu,
This first implementation changes dx9 a lot and dx11 a little to increase the parallelism between the cpu and gpu.
ogl: is my next step in ogl is a little more trickier so i have to take a little more time.
the original concept is Marcos idea, with my little touch to make it even more faster.
what to look for: SPEEEEEDDD :).
please test it a lot and let me know if you see any problem.
in dx9 the code is prepared to fall back to the previous implementation if your card does not support the amount of buffers needed.
So if you did not experience any speed gains you know where is the problem :).
for the ones with more experience and compression of the code please test changing the amount and size of the buffers to tune this for your specific machine.
The current values are the sweet spot for my machine.
All must Thanks Marcos, I hate him for giving good ideas when I'm full of work.
Most of the InvalidateICache calls are for a 32 bytes block: this is the
number of bytes invalidated by PowerPC dcb*/icb* instructions. Profiling
shows that a lot of CPU time is spent checking if there are any JIT blocks
covered by these 32 bytes (using std::map::lower_bound).
This patch adds a bitset containing the state of every 32 bytes block in
RAM (JIT cached/not JIT cached). Using that, a 32 bytes InvalidateICache
can check in the bitset if any JIT block might be invalidated. A bitset
check is a lot faster than an std::map::lower_bound operation, improving
performance of JitCache::InvalidateICache by more than 100%.
Some practical numbers:
* Xenoblade Chronicles (PAL)
56.04FPS -> 59.28FPS (+5.78%)
* The Last Story (PAL)
30.9FPS -> 32.83FPS (+6.25%)
* Super Mario Galaxy (PAL)
59.76FPS -> 62.46FPS (+4.52%)
This function still takes more time than it should - more optimization in
this area might be possible (specializing for 32 bytes blocks to avoid
useless memcpy, for example).
Very useful to compare performance between two builds, check the impact of
a configuration option, etc. FPS log is stored in User/Logs/fps.txt and is
reset each time you launch a game. Only enabled if you check the "Log FPS
to file" option in your graphics settings.
Could be improved a bit: currently logs only every 1s (so you can't really
see small variations), maybe output more infos to the fps.txt like
average/stddev (but Excel/Libreoffice/Google Docs can compute that easily
too).
These merges, while in theory improving emulation accuracy, cause issues
in other parts of the emulator based on invalid assumptions. memcard-delay
fixed some of these issues in the EXI memcard code, but several other
problems still exist and I don't have the time to debug that right now.
The problem here was the logic that detects SDL in the main CMakeLists.txt
is not the same as it is in DolphinWX/CmakeLists.txt to set libraries. When
using SDL from Externals it failed at link time because -lSDL was never set.
This fixes the problem by using the same condition logic to set the libs
as used when detecting SDL in the first place.
This was not needed for most games before because the external exception was
itself delayed. aram-dma-fixes changed that and made the external exception
happen a lot quicker, breaking games that relied on the memcard operations
delay.
Fixes issue 5583.
Reason:
- It's wrong, zcomploc can't be emulated perfectly in HW backends without severely impacting performance.
- It provides virtually no advantages over the previous hack while introducing lots of code.
- There is a better alternative: If people insist on having some sort of valid zcomploc emulation, I suggest rendering each primitive separately while using a _clean_ dual-pass approach to emulate zcomploc.
This reverts commit 0efd4e5c29.
This reverts commit b4ec836aca.
This reverts commit bb4c9e2205.
This reverts commit 146b02615c.
The GL EFB cache did not clamp correctly the coordinates when computing
the rectangle it needed to cache, leading to negative values being used
as indexes and often crashes.
Fixes issue 5510.
This adds support for drivers supporting sine, square and triangle
periodic haptic effects. This allows rumble to work on devices/drivers
supporting these effects, such as an xbox controller using the xpad
driver under Linux.
Dolphin code already builds against SDL2 but the build system never
checks for SDL2, which is the what latest SDL is called now. SDL2
replaces SDL 1.3. This allows Dolphin to be build against SDL2, which
activates certain new features such as the haptic interface.
To use, install OpenVPN's TAP device driver. Then create a network bridge between the TAP and your device connected to the internet.
TODO:
proper overlapped read - can look at qemu impl
non-windows impl
MTMSR is executed.
This commits fixes issue 617. WWE Day of Reckoning 1 and 2 are now playable
with Dolphin.
The changes are not implemented for JitIL yet.
the intent is to replace the haphazard scheduling and finger-crossing associated with saving/loading with the correct and minimal necessary wait for each thread to reach a known safe location before commencing the savestate operation, and for any already-paused components to not need to be resumed to do so.
* misc-speedups:
fixed and reenabled and slightly optimized the JIT version of fcmpo/fcmpu.
slightly more precise speed percent display (this is really minor)
a small thread synchronization speedup for dual core mode. it's most noticeable in games where the CPU is running behind compared to the GPU.
Conflicts:
Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp
The Fifo.cpp changes from rdaefb3b550e2 was not merged as there was no performance benefit.
This branch reduces the number of useless state flushes in the video
emulation layer by checking whether a BP/XF change will have an effect
or not. Greatly reduces the number of GL calls per frame.
Thanks to degasus for his help!
When a game writes the same value that was already configured to a BP
register, Dolphin previously flushed the GPU pipeline and reconfigured
the internal video state (calling SetScissor/SetLineWidth/SetDepthMode).
Some of these useless writes still need to perform actions, for example
writes to the EFB copy trigger or the texture preload registers (which
need to reload the texture from memory).
This allows users to easily check whether their Wii dump is corrupted or not
using the Dolphin properties window. Right click on a game, Properties,
Filesystem tab, then right click on the game partition and select "Check
partition integrity".
This may have some false negatives due to the unused clusters heuristic (see
the comment in VolumeWiiCrypted.cpp). False positives are unlikely.