summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
AgeCommit message (Collapse)Author
2021-11-17VideoCommon: Allow BitfieldExtract in specialized shadersPokechu22
2021-11-17Fix copy filter clamping regression in SpyroScott Mansell
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-11VideoCommon: Use the copy filter for EFB copies as well as XFB copiesPokechu22
This fixes the pink screens in EA Sports Active. See https://gist.github.com/Pokechu22/49455f9094ed0ff017da64e3f7aa0404 for details.
2021-11-07Merge pull request #10169 from leoetlino/fmt-localtimeMai M
Use fmt::localtime instead of thread-unsafe std::localtime
2021-11-02VideoCommon: Add missing algorithm include for std::none_ofEmmanuel Gil Peyrot
Otherwise this is an error on gcc/libstdc++, and there are no transitive includes for this header.
2021-11-02FrameDump: Remove deprecated call to av_init_packet()Emmanuel Gil Peyrot
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] https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/f7db77bd8785d1715d3e7ed7e69bd1cc991f2d07 [2] https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/a9a60106370f862e191dea58e748626da6a8fe97
2021-11-02VideoCommon: Fix a -Wclass-memaccess in gcc 11Emmanuel Gil Peyrot
2021-10-26Externals: Update imgui to 1.85Pokechu22
2021-10-15Use fmt::localtime instead of thread-unsafe std::localtimeLéo Lam
fmt::localtime is also less awkward to use compared to std::localtime.
2021-10-13VideoCommon: Fix color channel logic when per-pixel lighting is in usePokechu22
This was broken in #10012 (specifically by 06579e4d53844e5a45ae18f8eda6c4ee69ebad2c and c3dec343918ff44e90886daf71a6bf0c49033de1).
2021-10-13Fix all uninitialized variable warnings (C26495)Pokechu22
2021-10-12TextureCache: Remove deleted textures from bound_texturesScott Mansell
Fixes issue where vulkan might crash trying to bind a deleted texture.
2021-10-12TMEM: Add some helpful commentsScott Mansell
2021-10-12TMEM: Handle savestate and initScott Mansell
2021-10-12Extend TMEM cache implementationScott Mansell
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-10BoundingBox: Add missing includeScott Mansell
2021-10-10BPMemory: Refactor/consolidate TexUnit AddressingScott Mansell
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-10BPMem: Abstract TexUnit Addressing into structScott Mansell
The addressing of the texture units is a bit non-obvious. This struct abstracts the complexity away.
2021-10-08VideoCommon: update Free Look camera's 'FieldOfView' function to ↵iwubcode
'FieldOfViewMultiplier' to better reflect usage
2021-10-08VideoCommon: update fov multiplier variables and add constant variables for ↵iwubcode
defaults to the Free Look camera
2021-10-08Core / VideoCommon: refactor FreeLookCamera to have the underlying ↵iwubcode
controller handle all the logic (field-of-view, movement, etc)
2021-10-08Merge pull request #9803 from Techjar/bbox-videocommonLéo Lam
VideoCommon: Abstract bounding box
2021-10-06Change how FFmpeg is imported for Apple computers.nonoteal
Imports Apple libraries and also pulls swresample in, so when compiling Dolphin doesn't throw undefined symbols.
2021-10-04VideoCommon: Abstract bounding boxTechjar
This moves much of the duplicated bounding box code into VideoCommon, leaving only the specific buffer implementations in each backend.
2021-09-30fix unused variable warningShawn Hoffman
2021-09-29RenderBase: Show input count on m_ShowFrameCountsowens99
Just to stay consistent, I believe it is best to show total input polls alongside the framecount.
2021-09-30Merge pull request #9945 from OatmealDome/intel-broken-discardScott Mansell
DriverDetails: Add broken dual source blending bug to MoltenVK on Intel GPUs
2021-09-28RenderBase: show total framecount on movie playbacksowens99
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-20DriverDetails: Add broken dual source blending bug to MoltenVK on Intel GPUsOatmealDome
2021-09-18BPStructs: ensure side effects are sameScott Mansell
Missed this side effect when fixing crash in Mario Kart Wii wifi
2021-09-16VulkanContext: Disable subgroup reduction on macOS with AMD GPUsOatmealDome
2021-09-17BPStructs: Ignore malformed efb copiesScott Mansell
2021-09-15BPStructs: make copy width/height constScott Mansell
2021-09-15BPStructs: fix out-of-range EFB copy clampingScott Mansell
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-09Merge pull request #10012 from Pokechu22/thps4-green-skyJMC47
UberShaderVertex: Fix Tony Hawk Pro Skater 4
2021-09-07Use custom isnan implementation to avoid HLSL optimizer issuesPokechu22
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-01BPMemory: Make ZTexOp enum an enum classLioncash
Avoids placing generic names in the surrounding namespace.
2021-08-30VideoBackends / VideoCommon: allow the ability to set debug names for ↵iwubcode
shaders / textures. These names are visible in applications like RenderDoc
2021-08-18UberShaderVertex: Simplify color channel logicPokechu22
2021-08-18VertexShaderGen: Simplify color channel logicPokechu22
2021-08-18UberShaderVertex: Fix Tony Hawk Pro Skater 4Pokechu22
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-15VideoCommon: report games that set bits in XFMEM_CLIPDISABLETillmann Karras
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-07Merge pull request #9993 from Techjar/late-vi-outputJosJuice
VI: Implement post-scanout XFB output
2021-08-03VI: Implement post-scanout XFB outputTechjar
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-04Merge pull request #9928 from Pokechu22/shadow-the-hedgehog-eyelids-NaNLéo Lam
Convert NaN to 1 when generating texture coordinates
2021-08-02Merge pull request #9962 from OatmealDome/macos-vulkan-defaultLéo Lam
VideoBackendBase: Prefer Vulkan over OGL on macOS Mojave and newer
2021-08-01GeometryShaderGen: Rename ApiType to api_typePokechu22
2021-08-01UberShaderPixel: Rename ApiType to api_typePokechu22
2021-07-28Recompile shaders when 'Enable API Validation Layers' is toggledPokechu22
2021-07-28Convert ShaderHostConfig to BitFieldPokechu22