Commit Graph

3671 Commits

Author SHA1 Message Date
Tillmann Karras c53cd09b00 BPStructs: don't warn about busclock/perf regs 2018-10-07 16:08:18 +01:00
Pierre Bourdon 58b0a284a8
Merge pull request #7408 from AdmiralCurtiss/twin-snakes-cutscene-flicker-fix
Do not consider XFB copies for invalidating textures when loading a new texture.
2018-10-01 22:24:31 +02:00
Léo Lam c49eb2d249
Merge pull request #7398 from Techjar/emu-speed-skip-vsync
VideoCommon: Skip vsync if configured emulation speed is not 100%
2018-09-16 15:19:45 +02:00
Admiral H. Curtiss f2fa63783b Do not consider XFB copies for invalidating textures when loading a new texture.
This fixes severe image flickering in some cutscenes of Twin Snakes. The game appears to sometimes load a previously made XFB copy as a texture before it is actually rendered to the screen, which we took as an invitation to invalidate the XFB copy.
2018-09-15 13:56:45 +02:00
Admiral H. Curtiss d97bc0d359 Correctly adjust the rendered XFB region at non-native internal resolutions when XFB was loaded from console RAM.
If, for whatever reason, the XFB has to be loaded from console memory, it's possible that the texture is returned at native resolution instead of EFB-scaled resolution. In this case, our xfb_rect.right adjustment must also happen at native resolution instead of scaled resolution.
2018-09-13 19:39:49 +02:00
Techjar e9046f8eec VideoCommon: Skip vsync if configured emulation speed is not 100%
It doesn't make much sense to try to vsync at weird framerates, and
vsync actually causes the speed setting to not work as expected.
2018-09-05 05:40:22 -04:00
Pierre Bourdon 95c2a92f26
Revert "ShaderGen: Drop broken fragment shader index workaround for Vulkan" 2018-09-01 05:32:56 +02:00
Stenzek 3ad7812b53 ShaderGen: Drop broken fragment shader index workaround for Vulkan
AMD appears to have since fixed this in their driver, and it makes
shadergen ever so slightly less messy.
2018-08-28 23:39:47 +10:00
Pierre Bourdon 6a22f1b3e0
Merge pull request #7253 from booto/fifo_reg
CP: some bits in some of the HI registers cannot be set
2018-08-27 14:56:12 +02:00
Stenzek bae1168fe9 PixelShaderGen: Ensure all components of ocol1 are initialized
This was causing a warning in the shader compiler, as the rgb components
were not initialized. Which shouldn't be an issue, as the rgb is not
used in the blend equation, only the alpha. However, the lack of
initialization causes crashes in Intel's D3D shader compiler, so we'll
play nice and initialize all the channels.
2018-08-24 23:53:00 +10:00
Techjar 5512eadd08 VideoCommon/HiresTextures: Change wildcard to a Windows-compatible character 2018-08-21 15:54:25 -04:00
Stenzek dae161e138 FramebufferManager: Use D24S8 on Adreno when using Vulkan
D32F clears are broken on Adreno, which resulted in smeared geometry
across the screen.
2018-07-19 23:30:25 +10:00
Stenzek 3323265d91 FramebufferManager: Dynamic selection of EFB depth format 2018-07-19 21:47:42 +10:00
Stenzek b30342d38f VideoBackends: Support D24S8 abstract texture format 2018-07-19 21:47:42 +10:00
Markus Wick f5e8af7b6c
Merge pull request #7276 from stenzek/disable-shared-context-nouveau
DriverDetails: Disable shared context shader compilation on nouveau
2018-07-19 09:15:27 +02:00
Stenzek 602fe0f457 DriverDetails: Disable shared context shader compilation on nouveau
Our usage of glFinish() can cause driver crashes and/or lockups.

Please note that this disables the background shader compilation (i.e.
all shaders will be compiled on boot). There is no way around this.
2018-07-17 13:34:18 +10:00
Michael M 857138a0ba AVIDump: use dump_path rather than deprecated AVFormatContext::filename
AVFormatContext::filename was deprecated in lavf 58.7.100 in favor
of AVFormatContext::url. Instead of adding version-checking logic,
just use the passed-in dump path instead.
2018-07-14 12:46:04 -07:00
Michael M e45698aaa0 AVIDump: av_register_all is deprecated/unneeded since 58.9.100 2018-07-14 12:46:00 -07:00
booto e2e43b4896 CP: some bits in some of the HI registers cannot be set
The mask is slightly different for Wii and GCN so we need to work it out at runtime.
2018-07-12 20:15:27 -04:00
Lioncash 34c3a65de6
VideoCommon/TextureCacheBase: Resolve a -Wmissing-braces warning in GetRAMCopyFilterCoefficients() 2018-07-06 19:56:35 -04:00
Techjar 80b05b6f0d Make arbitrary mipmap detection toggle invalidate the texture cache
We want this setting to invalidate the cache because it may affect the appearance of textures in the rendered scene, therefore one would expect changing it while the game is running to have the expected effect immediately.
2018-07-03 18:44:11 -04:00
Jonathan Hamilton b54803a074 Remove unused sRGB conversion functions
Now the arbitrary mipmap reference downsampling is just done in linear space,
these are no longer used.
2018-07-02 09:53:54 -07:00
Jonathan Hamilton ac05d1a593 Do all arbitrary mipmap detection in integer space
This no longer converts from sRGB to linear for the reference mip
downsample - even if the original mipmap creation tool used an sRGB
colorspace (which isn't really guaranteed, and may even change per
game), this is a "fast" heuristic that's only an estimate anyway.

The average diff is also now stored in a u64, avoiding floating point
calculations in the per-pixel hot loop.

This should speed up the detection significantly, hopefully fixing
jank when loading in new textures.
2018-07-02 09:52:15 -07:00
Techjar 25bfee2233 VideoCommon: Fix auto IR being very overzealous 2018-06-25 00:48:57 -04:00
Markus Wick 0459a1a9e6
Merge pull request #6875 from JonnyH/WIP/mipmap-heuristic-tweaks
Make arbitrary mipmap detection a config option
2018-06-21 10:19:47 +02:00
Markus Wick bf50348d9f
Merge pull request #6539 from degasus/async
VideoCommon: Flush the GPU pipeline on async requests.
2018-06-21 10:16:54 +02:00
Lioncash de9c5fd375 ConfigManager: Convert GPUDeterminismMode into an enum class
Makes the values strongly-typed and gets more identifiers out of the
global namespace.

We are forced to use anything that is not "None" to mean none, because
X11 is garbage in that it has:

\#define None 0L

Because clearly no one else will ever want to use that identifier for
anything in their own code (and is why you should prefix literally
any and all preprocessor macros you expose to library users in public
headers).
2018-06-15 14:45:30 -04:00
Lioncash 3f210836ad Compiler: Rename __forceinline define to DOLPHIN_FORCE_INLINE
This is much better as prefixed double underscores are reserved for the
implementation when it comes to identifiers. Another reason its better,
is that, on Windows, where __forceinline is a compiler built-in, with
the previous define, header inclusion software that detects unnecessary
includes will erroneously flag usages of Compiler.h as unnecessary
(despite being necessary on other platforms). So we define a macro
that's used by Windows and other platforms to ensure this doesn't
happen.
2018-06-09 12:20:25 -04:00
Lioncash 03414e8e84 Common: Add header for compiler-specifics
Instead of globbing things under an ambiguous Common.h header, move
compiler-specifics over to Compiler.h. This gives us a dedicated home
for anything related to compilers that we want to make functional across
all compilers that we support.

This moves us a little closer to eliminating Common.h entirely.
2018-06-09 12:10:05 -04:00
master0fdisaster 7a90ea2752 Add OSD message for Volume Hotkeys
This pr adds an OnScreenDisplay message when you use the Volume hotkeys.
Just to have visual feedback.
2018-06-06 17:11:43 +02:00
Markus Wick 3860219899 VideoCommon: Flush the GPU pipeline on async requests. 2018-06-06 09:22:01 +02:00
Anthony 36ff2a20d5
Merge pull request #6954 from degasus/coherent
OGL/Streambuffer: Use coherent mapping by default.
2018-06-05 12:06:17 -07:00
Lioncash 72feeb4d18 BPMemory: Silence a -Wmissing-braces warning
Fairly trivial to resolve, we just initialize the std::array with two
sets of braces (one set to create the array, the other to start and end the
aggregate data that we'll end up returning)
2018-05-28 14:52:59 -04:00
Markus Wick cddc2d52c2
Merge pull request #6965 from stenzek/d3d-feature-level-10
D3D: Don't emit uint outputs when logic op is unsupported
2018-05-28 09:52:07 +02:00
degasus 3307946e2a VertexLoaderArm: Fix 565 color format.
Copy & paste error for enforcing A=255.
It was copied from the 888X format, which stores the output data in another register.
2018-05-27 11:27:15 +02:00
Stenzek 57976c947b ShaderGen: Don't emit integer outputs when logic op is unsupported
This may have been causing issues for D3D10 hardware, where logic op was
not supported.
2018-05-26 00:09:29 +10:00
Stenzek 9a5c2119e5 ShaderCache: Remove unused UID bits before inserting into shader map 2018-05-26 00:09:10 +10:00
Stenzek 640bfb8135 VideoConfig: Add a field for indicating logic op support in the backend 2018-05-26 00:07:20 +10:00
degasus fdfd8b19d6 OGL/Streambuffer: Use coherent mapping by default.
Coherent mappings have a lower overhead and less GL codes.
So enables coherent mapping by default for all drivers.
Both Qualcomm and ARM performs very bad with explicit flushing, so this change helps them as well.

AFAIK there was one GPU generation which was slower on coherent mapping: nvidia tesla
So Geforce 200 and 300 series should be tested with this PR before merging.
As this was last tested many years ago, this issue might have been fixed as well.
Those GPUs are close to 10 years old and not supported any more by nvidia.
2018-05-24 00:00:02 +02:00
Stenzek f7a0cae7f4 HiresTextures: Do not load compressed textures with unaligned dimensions
D3D11 cannot handle block compressed textures where the first mip level
is not a multiple of the block size. The simple fix for texture pack
authors: leave these textures uncompressed. You can still use a .dds
container.
2018-05-22 16:15:18 +10:00
Stenzek f74dbc794c EFB2RAM: Apply copy filter as a float coefficient after sampling
Using 8-bit integer math here lead to precision loss for depth copies,
which broke various effects in games, e.g. lens flare in MK:DD.

It's unlikely the console implements this as a floating-point multiply
(fixed-point perhaps), but since we have the float round trip in our
EFB2RAM shaders anyway, it's not going to make things any worse. If we
do rewrite our shaders to use integer math completely, then it might be
worth switching this conversion back to integers.

However, the range of the values (format) should be known, or we should
expand all values out to 24-bits first.
2018-05-22 12:24:08 +10:00
Lioncash c4d27cc8ec PostProcessing: Make GetShader() return by constant reference
We don't need to create copies of the shader string when they can be
avoided.
2018-05-21 12:07:51 -04:00
Lioncash 9d1b6cdea4 PostProcessing: Make member functions const qualified where applicable
These functions don't modify internal class state
2018-05-21 11:59:08 -04:00
Lioncash 8ce6f9bae5 PostProcessing: Replace typedef with a using alias 2018-05-21 11:57:15 -04:00
Lioncash f9c20571ab PostProcessing: Default constructor and destructor of PostProcessingShaderConfiguration
Also ensure that all members of the class are initialized on
construction as well. Previously the bool indicating if options are
dirty wouldn't be initialized, which could be read uninitialized if an
instance was constructed and then IsDirty() is called.
2018-05-21 11:54:56 -04:00
Lioncash ba94ffd51d VideoBackendBase: Include parameter names in member function declarations
Given this is a base class, we should clearly state what the parameters
to the functions in its exposed interface actually mean or represent.
This avoids needing to hunt for the definition of the functions in cpp
files.

While we're at it, normalize said parameter names so they follow our
naming guidelines.
2018-05-20 16:27:16 -04:00
Emmanuel Gil Peyrot c51ae9c62a Remove SOIL altogether from the project. 2018-05-20 13:44:42 +02:00
Emmanuel Gil Peyrot 6d0143647e VideoCommon: Remove a workaround mutex used for SOIL 2018-05-20 13:44:41 +02:00
Emmanuel Gil Peyrot 17e65a7167 VideoCommon: Replace SOIL with libpng for hires textures 2018-05-20 13:44:38 +02:00
Lioncash 4dbd6f6bbc BPMemory: Use Common::BitCast where applicable
Gets rid of memcpy boilerplating for reinterpreting bits properly.
2018-05-18 14:25:44 -04:00