Pokechu22
555a93057c
VideoCommon: Allow BitfieldExtract in specialized shaders
2021-11-17 20:04:33 -08:00
Scott Mansell
7128befb39
Fix copy filter clamping regression in Spyro
...
This fixes horizontal lines in the bloom effect of Spyro: A Hero's Tail,
which is a regression caused by PR #10204
Screenshot of regression:
https://user-images.githubusercontent.com/138484/142030503-90fcd8d5-63d3-4820-874a-72e9be0c4768.png
Fixed:
https://user-images.githubusercontent.com/138484/142031598-b85ff55c-1302-4e4d-bcb2-57848974056b.png
Spyro uses an 640x80 pixel sub-buffer within the EFB to calculate
it's bloom effects, which it places below the main 640x448 buffer.
EFB layout:
https://user-images.githubusercontent.com/138484/142030573-e933b6ae-c37e-4be6-86d4-0bc779b92535.png
Note: Colors are wrong because the main color buffer uses RGBA6,
while the bloom is calculated in RGB8
This allows it to do bloom without backing up part of the EFB to
main memory, as most games do.
But, since some of the sub-buffers used in the bloom effect are taller
than 80 pixels, they need to be sliced up into smaller sub, sub buffers
which get combined later when copied to main memory.
At one point, a 320x224 buffer is broken up into 320x80, 320x64 and
320x80 slices. These are copied out with the copy filter set to a
vertical blur.
Because there was an off-by-one errror in the clamping coordinates,
the bottom line of the color buffer would be blurred into
the top of each slice.
Final combined EFB copy:
https://user-images.githubusercontent.com/138484/142031360-2c076839-7c96-4b3b-a093-d899d0a2c7ae.png
Fixed version:
https://user-images.githubusercontent.com/138484/142031370-72e41a35-3b3e-4662-a483-79203e357ecc.png
Before #10204 the copy filter wasn't enabled for efb copies, and most
other games don't do this type of slicing.
FIFO CI shows that a few other games are effected, it's always just a minor difference to the top line where there was previously a slight hint of garbage.
2021-11-17 06:12:46 +13:00
Pokechu22
868de78f16
VideoCommon: Use the copy filter for EFB copies as well as XFB copies
...
This fixes the pink screens in EA Sports Active. See https://gist.github.com/Pokechu22/49455f9094ed0ff017da64e3f7aa0404 for details.
2021-11-11 17:22:50 -08:00
Mai M
6c72e6814d
Merge pull request #10169 from leoetlino/fmt-localtime
...
Use fmt::localtime instead of thread-unsafe std::localtime
2021-11-07 00:08:14 -04:00
Emmanuel Gil Peyrot
5a1333026b
VideoCommon: Add missing algorithm include for std::none_of
...
Otherwise this is an error on gcc/libstdc++, and there are no transitive
includes for this header.
2021-11-02 13:50:21 +01:00
Emmanuel Gil Peyrot
7590f07b80
FrameDump: Remove deprecated call to av_init_packet()
...
This function was deprecated in ffmpeg in January[1], while its
replacement got introduced in 2015[2], so now might be the time to start
using it in Dolphin. :)
[1] f7db77bd87
[2] a9a6010637
2021-11-02 13:50:21 +01:00
Emmanuel Gil Peyrot
25b136ac17
VideoCommon: Fix a -Wclass-memaccess in gcc 11
2021-11-02 13:50:21 +01:00
Pokechu22
db54e4f2b0
Externals: Update imgui to 1.85
2021-10-26 15:07:57 -07:00
Léo Lam
fd7df2ccae
Use fmt::localtime instead of thread-unsafe std::localtime
...
fmt::localtime is also less awkward to use compared to std::localtime.
2021-10-15 22:49:13 +02:00
Pokechu22
a372a5947b
VideoCommon: Fix color channel logic when per-pixel lighting is in use
...
This was broken in #10012 (specifically by 06579e4d53844e5a45ae18f8eda6c4ee69ebad2c and c3dec343918ff44e90886daf71a6bf0c49033de1).
2021-10-13 20:43:32 -07:00
Pokechu22
78bfd25964
Fix all uninitialized variable warnings (C26495)
2021-10-13 12:32:16 -07:00
Scott Mansell
edb66dab84
TextureCache: Remove deleted textures from bound_textures
...
Fixes issue where vulkan might crash trying to bind a deleted
texture.
2021-10-12 15:51:24 +13:00
Scott Mansell
d771bee0fe
TMEM: Add some helpful comments
2021-10-12 15:51:24 +13:00
Scott Mansell
a33cf27885
TMEM: Handle savestate and init
2021-10-12 15:51:24 +13:00
Scott Mansell
88bd10cd30
Extend TMEM cache implementation
...
Now works with games that deliberately avoid invalidating TMEM because
they know textures are too large to fit:
* Sonic Riders
* Metal Arms: Glitch in the System
* Godzilla: Destroy All Monsters Melee
* NHL Slapshot
* Tak and the Power of Juju
* Night at the Museum: Battle of the Smithsonian
* 428: Fūsa Sareta Shibuya de
2021-10-12 15:51:24 +13:00
Scott Mansell
5a8455e8ce
BoundingBox: Add missing include
2021-10-10 13:21:31 +13:00
Scott Mansell
9fa26624b0
BPMemory: Refactor/consolidate TexUnit Addressing
...
Currently the logic for addressing the individual TexUnits is splattered all
across dolphin's codebase, this commit attempts to consolidate it all into a
single place and formalise it using our new TexUnitAddress struct.
2021-10-10 09:09:43 +13:00
Scott Mansell
ef0e401708
BPMem: Abstract TexUnit Addressing into struct
...
The addressing of the texture units is a bit non-obvious.
This struct abstracts the complexity away.
2021-10-10 09:01:57 +13:00
iwubcode
514475646d
VideoCommon: update Free Look camera's 'FieldOfView' function to 'FieldOfViewMultiplier' to better reflect usage
2021-10-08 18:17:20 -05:00
iwubcode
aa07fde8a0
VideoCommon: update fov multiplier variables and add constant variables for defaults to the Free Look camera
2021-10-08 18:17:20 -05:00
iwubcode
e70157474b
Core / VideoCommon: refactor FreeLookCamera to have the underlying controller handle all the logic (field-of-view, movement, etc)
2021-10-08 18:16:32 -05:00
Léo Lam
ff1cb5a1c0
Merge pull request #9803 from Techjar/bbox-videocommon
...
VideoCommon: Abstract bounding box
2021-10-08 22:24:38 +02:00
nonoteal
90437d1574
Change how FFmpeg is imported for Apple computers.
...
Imports Apple libraries and also pulls swresample in, so when compiling Dolphin doesn't throw undefined symbols.
2021-10-06 18:11:32 -10:00
Techjar
1161af8059
VideoCommon: Abstract bounding box
...
This moves much of the duplicated bounding box code into VideoCommon,
leaving only the specific buffer implementations in each backend.
2021-10-04 15:51:24 -04:00
Shawn Hoffman
e11fdaabf1
fix unused variable warning
2021-09-30 14:27:53 -04:00
sowens99
30dcac15fa
RenderBase: Show input count on m_ShowFrameCount
...
Just to stay consistent, I believe it is best to show total input polls alongside the framecount.
2021-09-29 14:36:09 -04:00
Scott Mansell
a47b91e946
Merge pull request #9945 from OatmealDome/intel-broken-discard
...
DriverDetails: Add broken dual source blending bug to MoltenVK on Intel GPUs
2021-09-30 06:04:06 +13:00
sowens99
53ca2ec274
RenderBase: show total framecount on movie playback
...
Previously, when playing back a movie, you could not see the total frame count of a movie, only the total number of input polls.
This change simply shows the total frame count on movie playback.
Note that this change also results in the framecount and framecount total ALWAYS being displayed if show_movie_window is true, regardless of whether or not m_ShowFrameCount is true. I believe this is fine, as TASers are much more likely to reference the framecount than the input poll count.
2021-09-28 22:15:25 -04:00
OatmealDome
a256c11d2f
DriverDetails: Add broken dual source blending bug to MoltenVK on Intel GPUs
2021-09-20 19:14:41 -04:00
Scott Mansell
ce80a96aee
BPStructs: ensure side effects are same
...
Missed this side effect when fixing crash in Mario Kart Wii wifi
2021-09-18 23:58:24 +12:00
OatmealDome
7e8f5208fe
VulkanContext: Disable subgroup reduction on macOS with AMD GPUs
2021-09-16 23:32:10 -04:00
Scott Mansell
7c7609f5b9
BPStructs: Ignore malformed efb copies
2021-09-17 12:42:23 +12:00
Scott Mansell
eb8bfabdfd
BPStructs: make copy width/height const
2021-09-15 11:54:40 +12:00
Scott Mansell
37b80e2170
BPStructs: fix out-of-range EFB copy clamping
...
Previous code from #7950 only clamps correctly when the efb copies
left and top coordinates are (0, 0)
Now we should handle all situations.
Spyro: A hero's tail is an example of a game that does an oversized
EFB copy with a non-zero origin.
2021-09-15 02:31:38 +12:00
JMC47
05f86b9f5b
Merge pull request #10012 from Pokechu22/thps4-green-sky
...
UberShaderVertex: Fix Tony Hawk Pro Skater 4
2021-09-09 17:58:35 -04:00
Pokechu22
52c82733f6
Use custom isnan implementation to avoid HLSL optimizer issues
...
This adjusts the NaN replacement logic introduced in #9928 to work around the HLSL compiler optimizing away calls to isnan, which caused that functionality to not work with ubershaders on D3D11 and D3D12 (it did work with specialized shaders, despite a warning being logged for both; that warning is also now gone). Note that the `D3DCOMPILE_IEEE_STRICTNESS` flag did not solve this issue, despite the warning suggesting that it might.
Suggested by @kayru and @jamiehayes.
2021-09-07 19:04:40 -07:00
Lioncash
f36fd5fa39
BPMemory: Make ZTexOp enum an enum class
...
Avoids placing generic names in the surrounding namespace.
2021-09-01 18:23:22 -04:00
iwubcode
1f2f505373
VideoBackends / VideoCommon: allow the ability to set debug names for shaders / textures. These names are visible in applications like RenderDoc
2021-08-30 13:47:48 -05:00
Pokechu22
c3dec34391
UberShaderVertex: Simplify color channel logic
2021-08-18 10:40:54 -07:00
Pokechu22
06579e4d53
VertexShaderGen: Simplify color channel logic
2021-08-18 10:40:54 -07:00
Pokechu22
2519d14e36
UberShaderVertex: Fix Tony Hawk Pro Skater 4
...
Fixes https://bugs.dolphin-emu.org/issues/12620
The changed code did not match the corresponding code in VertexShaderGen. Some parts of the sky have 2 color channels in each vertex, while others only have 1, despite only color channel 0 being used and XFMEM_SETNUMCHAN being set to 1 for both of them. The old code (from #4601 ) caused channel 0 to be set to channel 1 if the vertex contained both color channels but the number of channels was set to 1, which is wrong.
2021-08-18 10:40:53 -07:00
Tillmann Karras
f9d2d42a4c
VideoCommon: report games that set bits in XFMEM_CLIPDISABLE
...
The SDK only exposes the lowest bit. The Nintendo Channel intro is currently
broken because we don't implement this (see issue 12562).
2021-08-15 04:41:49 +01:00
JosJuice
c79757618d
Merge pull request #9993 from Techjar/late-vi-output
...
VI: Implement post-scanout XFB output
2021-08-07 12:41:59 +02:00
Techjar
797d0b7b1b
VI: Implement post-scanout XFB output
...
This adds about a frame of latency, and since most games don't change
VI registers during scanout, we can get away with outputting the XFB at
the start of scanout. WWE Crush Hour is the (only currently known)
exception, which has flickering problems when doing it this way.
This adds a path to perform the output at the end of scanout, and gates
it behind an option which defaults to using the latency-reducing
pre-scanout path.
2021-08-03 23:37:50 -04:00
Léo Lam
c9c5f7a89c
Merge pull request #9928 from Pokechu22/shadow-the-hedgehog-eyelids-NaN
...
Convert NaN to 1 when generating texture coordinates
2021-08-04 03:08:34 +02:00
Léo Lam
35bf5e3839
Merge pull request #9962 from OatmealDome/macos-vulkan-default
...
VideoBackendBase: Prefer Vulkan over OGL on macOS Mojave and newer
2021-08-02 03:39:12 +02:00
Pokechu22
f46fe77264
GeometryShaderGen: Rename ApiType to api_type
2021-08-01 15:17:21 -07:00
Pokechu22
3b752c4d5d
UberShaderPixel: Rename ApiType to api_type
2021-08-01 15:09:20 -07:00
Pokechu22
b6d2938731
Recompile shaders when 'Enable API Validation Layers' is toggled
2021-07-28 21:35:36 -07:00
Pokechu22
eb81968fe6
Convert ShaderHostConfig to BitField
2021-07-28 21:35:36 -07:00