summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
AgeCommit message (Collapse)Author
2024-11-03GeneralWidget: Recommend default video backend in tooltipDentomologist
Recommend the platform's default video backend in the Backend tooltip instead of always recommending OpenGL.
2024-11-03VideoBackendBase: Clarify function nameDentomologist
Rename GetDefaultBackendName to GetDefaultBackendConfigName to distinguish it from the display name.
2024-10-29VideoCommon: Implement primitive breaking for primitive listsTellowKrinkle
2024-10-19Merge pull request #13135 from Tilka/warningJMC47
VideoCommon: fix -Wshadow-uncaptured-local warning and simplify
2024-10-19Merge pull request #12712 from Dentomologist/remove_defined_out_codeTilka
Remove defined-out code
2024-10-17Merge pull request #13092 from mitaclaw/ranges-modernization-3-spaceshipJMC47
Ranges Algorithms Modernization - Compare
2024-10-16VideoCommon: fix -Wshadow-uncaptured-local warning and simplifyTillmann Karras
2024-10-15Merge pull request #13090 from mitaclaw/ranges-modernization-1-trivialJosJuice
Ranges Algorithms Modernization - Trivial
2024-10-14Merge pull request #13115 from Tilka/syncfifoJMC47
VideoCommon: fix common opcode decoding errors
2024-10-12Cache normals in addition to binormals and tangentsPokechu22
Fixes LIT (https://bugs.dolphin-emu.org/issues/13635). The text does not include normals, but has lighting enabled. With the previous default of (0, 0, 0), lighting was always black (as dot(X, (0, 0, 0)) is always 0). It seems like the normal from the map in the background (0, 0, 1) is re-used. LIT also has the vertex color enabled while vertex color is not specified, the same as SMS's debug cubes; the default MissingColorValue GameINI value of solid white seems to work correctly in this case.
2024-10-11Merge pull request #13117 from mitaclaw/ranges-modernization-9-trivial-findTilka
Ranges Algorithms Modernization - Find
2024-10-11GraphicsMod: Simplify `std::sort` using ranges and projectionsmitaclaw
2024-10-10C++20: Synthesize `operator!=` From `operator==`mitaclaw
The inequality operator is automatically generated by the compiler if `operator==` is defined.
2024-10-10Modernize `std::find_if` with rangesmitaclaw
In BTEmu.cpp, `std::mem_fn` was not necessary for the predicate to compile.
2024-10-10Modernize `std::find` with rangesmitaclaw
2024-10-10Modernize `std::binary_search` with rangesmitaclaw
In VolumeVerifier.cpp, constructing a `std::string_view` of the volume's GameID is unnecessary, as `std::`(`ranges::`)`binary_search` supports heterogeneous lookup. The usage in GameFile.cpp is a perfect example.
2024-10-10Modernize `std::sort` with rangesmitaclaw
2024-10-10Modernize `std::fill` with rangesmitaclaw
In DSPCore.cpp, there were two `std::fill` uses that could be simplified using `std::fill_n`. Due to their proximity with other `std::fill` algorithms being modernized with ranges, I chose to make these examples into the rare `std::ranges::fill_n`.
2024-10-10VideoCommon: fix common opcode decoding errorsTillmann Karras
Many games call GXSetGPFifo() without first waiting for the GP to finish consuming outstanding commands in the previous GP fifo. Normally, Dolphin runs OpcodeDecoding in 1000-cycle time slices. In that time frame, GXSetGPFifo() has probably completed and the GP read pointer now points to entirely new memory. If the last GP fifo copy ended in an incomplete command, the new GP fifo would most likely desync for a while. To avoid all this, give the GP a time slice right now to copy the remaining data from the previous GP fifo.
2024-10-06Fifo analyzer: Fix indexed XF loads showing "bytes" instead of "words"Pokechu22
Indexed XF loads specify the number of 32-bit words (generally floats, but light data has some integers) to load, not the number of bytes. This was only a mistake in the fifo analyzer text; the actual implementation already loaded words.
2024-10-06Merge pull request #12918 from JosJuice/revert-revert-audit-get-stateJMC47
Partially revert "Revert "Audit uses of IsRunning and GetState""
2024-10-05Merge pull request #12208 from PatrickFerry/add-vertex-depth-range-caseJules Blok
Use Vertex Depth Range when zRange Exceeds farZ
2024-10-04Partially revert "Revert "Audit uses of IsRunning and GetState""JosJuice
This reverts the revert commit bc67fc97c39628c76a4dbca411b0e8a9bfaf726a, except for the changes in BaseConfigLoader.cpp, which caused the bug that made us revert 72cf2bdb87f09deff22e1085de3290126aa4ad05. PR 12917 contains an improved change to BaseConfigLoader.cpp, which can be merged (or rejected) independently. A few changes have also been made based on review comments.
2024-10-04Merge pull request #13078 from ↵JosJuice
Dentomologist/videobackendbase_only_populate_backend_info_when_uninitialized VideoBackendBase: Only populate backend info when uninitialized
2024-10-02Merge pull request #13087 from TellowKrinkle/PresentSkipJMC47
VideoBackends:Vulkan: Prevent freezes during window resize on Linux
2024-10-02VideoBackends:Vulkan: Don't try to present if swapchain acquire failedTellowKrinkle
2024-09-30VideoCommon: Dirty pixel shader manager on efb scale changesTellowKrinkle
2024-09-27VideoBackendBase: Only populate backend info when uninitializedDentomologist
Prevent potential issues when creating the Graphics window (and thus calling PopulateBackendInfo) while the core state is Stopping, like we already do while it's Starting or Running.
2024-09-26VideoBackendBase: Check Core state in PopulateBackendInfoDentomologist
Remove the PopulateBackendInfoFromUI function, which had a single caller (GraphicsWindow::OnBackendChanged) and checked that the core wasn't running or starting before calling PopulateBackendInfo. Move the core state check into PopulateBackendInfo and have OnBackendChanged call that instead. This guarantees the check is performed by all callers of PopulateBackendInfo, preventing potential reintroduction of the crash fixed in 3d4ae63f if another call to PopulateBackendInfo is added. As of the previous commit the only other caller of PopulateBackendInfo is Core::Init shortly before s_state is set to Starting, so it will always pass the check and so maintain its current behavior.
2024-09-26GraphicsWindow: Fix crash when opening during emulation startupDentomologist
Fix a crash when opening the Graphics window for the first time during emulation startup when the backend is Vulkan, D3D11, or D3D12. Don't call PopulateBackendInfo() from the Host thread when the core is starting up. First, the function has already been called in Core::Init() so we don't need to again. More importantly, PopulateBackendInfo() calls g_video_backend->InitBackendInfo(), and the Vulkan and D3D implementations of those functions load and then unload libraries (and their associated function pointers) which are potentially in use by other threads. This crash was reliably reproducible with the following steps: 1) Select an affected backend. 2) Enable "Compile Shaders Before Starting" 3) Delete the cached shaders (but not the .uidcache file) for the game you're testing. 4) Close and reopen Dolphin. 5) Start the game. 6) While the game is still booting or compiling shaders, open the Graphics window for the first time in that Dolphin session. Fixes https://bugs.dolphin-emu.org/issues/13634.
2024-09-06Texture Dumping: Show OSD message on startup and when toggledDentomologist
If texture dumping is enabled, notify the user on emulation startup using an On Screen Display message. Also notify the user when texture dumping is toggled. Addresses https://bugs.dolphin-emu.org/issues/12445.
2024-08-31Merge pull request #13031 from parona-source/libfmt-11Admiral H. Curtiss
Add support for libfmt-11
2024-08-22Add support for libfmt-11Alfred Wingate
fmt::join was moved into fmt/ranges.h Signed-off-by: Alfred Wingate <parona@protonmail.com>
2024-08-22Graphics: Adapt aspect ratio when SBS/TAB 3D is usedBryan Jacobs
Adds support for choosing to present the full resolution independently to each eye when using side-by-side or top-and-bottom 3D.
2024-08-20Remove redundant semicolonsDr. Dystopia
2024-08-18VideoCommon: force 32-byte alignment for display list address and sizeTillmann Karras
2024-08-15Use 'contains' methodmitaclaw
2024-08-14Use 'contains' methodDr. Dystopia
2024-07-26Adjust order and spacing of various #includesDentomologist
Move some #includes around to match the Contributing guidelines.
2024-07-06Properly link against xxhashTellowKrinkle
Things using dolphin_find_optional_system_library need to link against the name used there or they won't work with both the system and bundled cases
2024-06-29VideoCommon: add ability to serialize a texture asset metadata to jsoniwubcode
2024-06-29VideoCommon: set individual texture asset filter/wrap values when loading ↵iwubcode
from json
2024-06-29VideoCommon: update texture asset to properly set near sampler state valueiwubcode
2024-06-23Core/VideoCommon: Revert change from #12828Admiral H. Curtiss
This causes Dual Core to lock up during the boot sequence, because it tries to wait for a not-yet-running GPU thread. Fixes https://bugs.dolphin-emu.org/issues/13559
2024-06-22Merge pull request #12828 from JosJuice/unify-state-variables-2Admiral H. Curtiss
Clean up Core::GetState
2024-06-21Audit uses of IsRunning and GetStateJosJuice
Some pieces of code are calling IsRunning because there's some particular action that only makes sense when emulation is running, for instance showing the state of the emulated CPU. IsRunning is appropriate to use for this. Then there are pieces of code that are calling IsRunning because there's some particular thing they must avoid doing e.g. when the CPU thread is running or IOS is running. IsRunning isn't quite appropriate for this. Such code should also be checking for the states Starting and Stopping. Keep in mind that: * When the state is Starting, the state can asynchronously change to Running at any time. * When we try to stop the core, the state gets set to Stopping before we take any action to actually stop things. This commit adds a new method Core::IsUninitialized, and changes all callers of IsRunning and GetState that look to me like they should be changed.
2024-06-21Core: Store current state in less placesJosJuice
Core::GetState reads from four different pieces of state: s_is_stopping, s_hardware_initialized, s_is_booting, and CPUManager::IsStepping. I'm keeping that last one as is for now because there's code in Dolphin that sets it directly, but we can unify the other three to make things easier to reason about. This commit also gets rid of s_is_started. This was previously used in Core::IsRunningAndStarted to ensure true wouldn't be returned until the CPU thread was started, but it wasn't used in Core::GetState, so Core::GetState would happily return State::Running after we had initialized the hardware but before we had initialized the CPU thread. As far as I know, there are no callers that have any real need to know whether the boot process is currently initializing the hardware or the CPU thread. Perhaps once upon a time there was a desire to make the apploader debuggable, but a long time has passed without anyone stepping up to implement it, and the way CBoot::RunApploader is implemented makes it rather difficult. So this commit makes all the functions in Core.cpp consider the core to still be starting until the CPU thread is started.
2024-06-21Merge pull request #12867 from AdmiralCurtiss/uicommon-dependencyAdmiral H. Curtiss
CMake dependency fixes
2024-06-19Scale challenge icons based on screen heightLillyJadeKatrin
2024-06-19Merge pull request #12859 from LillyJadeKatrin/retroachievements-challenge-hideJMC47
Hide Challenge Icons when OSD Messages Disabled