Commit graph

3682 commits

Author SHA1 Message Date
Tilka
b5d855caf7
Merge pull request #7496 from stenzek/null-shader-cache
ShaderCache: Don't create or load shader cache with Null backend
2018-10-14 12:30:32 +01:00
Tilka
660fb3fca0
Merge pull request #7412 from AdmiralCurtiss/xfb-stitch-in-order
Stitch together overlapping XFB regions in order of XFB copy creation.
2018-10-14 12:00:41 +01:00
Stenzek
c2fab7f016 ShaderCache: Don't create or load shader cache with Null backend 2018-10-14 20:03:57 +10:00
Mat M
ecd4897d43
Merge pull request #7437 from stenzek/graphics-options-race
Fix race condition caused by opening graphics options while running
2018-10-12 10:29:28 -04:00
Tilka
5b8e1e61e8
Merge pull request #7470 from Tilka/fifoplayer
FifoPlayer: reduce XF_REGS_SIZE to what we know
2018-10-09 08:56:48 +01:00
Tillmann Karras
56fdcf5f00 VideoCommon: remove unnecessary floor()
floatindex is clamped to the range [0, 9]. For non-negative numbers
floor() is equivalent to trunc(). Truncation happens implicitly when
converting to uint, so the floor() is unnecessary.
2018-10-09 00:31:43 +01:00
Tillmann Karras
9c7136453d FifoPlayer: reduce XF_REGS_SIZE to what we know
This avoids out-of-bounds warnings when replaying FIFO captures.

The value of XF_REGS_SIZE is written into the DFF header and we only
read the min of XF_REGS_SIZE and the header value, so this change is
backward compatible and doesn't break forward compatibility for old
Dolphin versions either.
2018-10-08 06:54:32 +01:00
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
Stenzek
eb33d7af64 Core: Call InitBackendInfo before loading config 2018-09-28 21:44:41 +10:00
Stenzek
93923e2b29 Don't fill backend info when core is running
The current approach results in the UI thread creating a graphics device
whilst the core is running, leading to races on function pointers, and
potentially crashing.
2018-09-28 21:43:22 +10:00
Stenzek
a877d5f6dc Remove unused Host_ShowVideoConfig 2018-09-28 14:05:53 +10: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
3e95d3c477 Stitch together overlapping XFB regions in order of XFB copy creation. 2018-09-14 19:41:27 +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