summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
AgeCommit message (Collapse)Author
2024-05-31VideoCommon: use imgui mouse position event when the mouse position changesiwubcode
2024-05-23Refactored Achievement Badges into Texture LayersLillyJadeKatrin
Achievement badges/icons are refactored into the type CustomTextureData::ArraySlice::Level as that is the data type images loaded from the filesystem will be. This includes everything that uses the badges in the Qt UI and OnScreenDisplay, and similarly removes the OSD::Icon type because Level already contains that information.
2024-05-21Merge pull request #12537 from TellowKrinkle/MTLSubgroupAdmiral H. Curtiss
VideoCommon: More specific subgroup op bugs
2024-05-18VideoCommon: use imgui input queue for mouse clicks, this helps keep input ↵iwubcode
smooth regardless of frame-times and matches keyboard events, this system was introduced in 1.87
2024-05-04Merge pull request #10957 from Pokechu22/std-bitcastTilka
Replace Common::BitCast with std::bit_cast
2024-05-03Replace Common::BitCast with std::bit_castPokechu22
2024-05-01Core::IsRunning: Avoid Global System Accessormitaclaw
2024-05-01Display active leaderboard data on screenLillyJadeKatrin
Up to four leaderboards are displayed in a window in the bottom right of the screen (vertically above challenge icons, if there are any). As per RetroAchievements standards, the markers only display the current leaderboard values with no further context necessary.
2024-04-28VideoCommon: allow custom shaders to set the alpha value for use when ↵iwubcode
blending is enabled
2024-04-26VideoCommon: Only show input count when recordingsowens99
2024-04-20VideoCommon/BPStructs: Add a missing bounds checkJosJuice
Happened to find this when working on the previous commit.
2024-04-20VideoCommon: Use GetSpanForAddress safely in texture decodingJosJuice
Now only VertexLoader remains... But that one might be tricky.
2024-04-20Memmap: Replace GetPointer with GetSpanForAddressJosJuice
To ensure memory safety, callers of GetPointer have to perform a bounds check. But how is this bounds check supposed to be performed? GetPointerForRange contained one implementation of a bounds check, but it was cumbersome, and it also isn't obvious why it's correct. To make doing the right thing easier, this commit changes GetPointer to return a span that tells the caller how many bytes it's allowed to access.
2024-04-18Config: Expose GFX_OVERLAY_PROJ_STATS setting in UI.Jordan Woyak
2024-04-18VideoCommon: Show the average projection to viewport ratio in statisticsJordan Woyak
window.
2024-04-18Merge pull request #12698 from iwubcode/xfb_copy_hash_in_presentAdmiral H. Curtiss
VideoCommon: add xfbs hashes to present info if available
2024-04-15Remove defined-out codeDentomologist
2024-04-13Merge pull request #12436 from Filoppi/frame-dump-raw-internal-resolutionAdmiral H. Curtiss
Frame dump at raw internal resolution
2024-04-13VideoConfig: Adjust FrameDumpResolutionType enum class to style guidelinesAdmiral H. Curtiss
2024-04-09VideoCommon: add xfb hash values (if available) to present informationiwubcode
2024-04-09VideoCommon: add xfbs presented to video eventsiwubcode
2024-04-09VideoCommon: Remove calls to GetPointerJosJuice
This fourth part of my series of patches to get rid of unsafe uses of GetPointer takes care of the "easy" cases in VideoCommon. Three uses of GetPointer now remain in Dolphin: VertexLoaderManager, TextureInfo, and the software renderer's TextureSampler.
2024-04-08Core::GetState: Avoid Global System Accessormitaclaw
2024-04-08Video: remove enforced resolution least common multiple of 4 when dumping ↵Filoppi
screenshots and not videos (only videos encoders have this limit). NOTE: this will likely trigger FIFOCI differences.
2024-04-08Video: split frame dumping settings into 3 resolution dumping modesFiloppi
also polish aspect ratio related code for clarity
2024-04-04Fix out of bounds accesses for invalid vertex component formatsPokechu22
On all platforms, this would result in out of bounds accesses when getting the component sizes (which uses stuff from VertexLoader_Position.h/VertexLoader_TextCoord.h/VertexLoader_Normal.h). On platforms other than x64 and ARM64, this would also be out of bounds accesses when getting function pointers for the non-JIT vertex loader (in VertexLoader_Position.cpp etc.). Usually both of these would get data from other entries in the same multi-dimensional array, but the last few entries would be truly out of bounds. This does mean that an out of bounds function pointer can be called on platforms that don't have a JIT vertex loader, but it is limited to invalid component formats with values 5/6/7 due to the size of the bitfield the formats come from, so it seems unlikely that this could be exploited in practice. This issue affects a few games; Def Jam: Fight for New York (https://bugs.dolphin-emu.org/issues/12719) and Fifa Street are known to be affected. I have not done any hardware testing for this PR specifically, though I *think* I previously determined that at least a value of 5 behaves the same as float (4). That's what I implemented in any case. I did previously determine that both Def Jam: Fight for New York and Fifa Street use an invalid normal format, but don't actually have lighting enabled when that normal vector is used, so it doesn't change rendering in practice. The color component format also has two invalid values, but VertexLoader_Color.h/.cpp do check for those invalid ones and return a default value instead of doing an out of bounds access.
2024-04-03Video: move all padding added for frame dumping to a single function,Filoppi
which also avoids the output window from being resized randomly to be a multiple of 4
2024-04-03Video: Change the frame dumper to actually use the raw emulation output ↵Filoppi
resolution, avoiding any scaling if possible. This should make comparisons much more reliable as pixels wouldn't be smushed together or stretched.
2024-03-21VideoCommon: Scan texture dumping directory + subdirectories to not re-dump ↵Jordan Woyak
existing files.
2024-03-15VideoCommon: Prefer D3D11/12 over OpenGL on Windows.Jordan Woyak
2024-03-02Merge pull request #12438 from Filoppi/custom_relative_aspect_ratioAdmiral H. Curtiss
Add Custom Relative and Raw (Squared Pixels) aspect ratios
2024-02-29Add custom relative and raw (squared pixels) aspect ratio modesFiloppi
2024-02-28VertexManagerBase: Initialize m_ticks_elapsed on constructionLioncash
Ensures that this always has a deterministic value on construction like everything else in the class.
2024-02-20Merge pull request #12435 from Filoppi/fix-aspect-ratio-stuckAdmiral H. Curtiss
Fix aspect ratio heuristics getting stuck to a state
2024-02-20Video: update widescreen heuristic code to never get stuck to specific old ↵Filoppi
values when changing settings
2024-02-20Video: Make the game resolution (within the window) snap to the XFB size if ↵Filoppi
they are within a ~1 pixel treshold on one axis only. This takes care of making the image clearer in some edge cases where the game was already running at near perfect 4:3 with no stretching, and the VI aspect ratio didn't match the XFB by one pixel, making the image stretched and blurry. -Video: Fix `FindClosestIntegerResolution() using the window aspect ratio and not the draw aspect ratio, causing it to prefer stretching over black bars in cases when it wasn't desirable.
2024-02-20Video: Fix aspect ratio heuristics getting stuck to widescreen (or to non ↵Filoppi
widescreen) (`m_is_game_widescreen` variable) if the user first forced the aspect ratio to 16:9/4:3 and then set it back to Auto.
2024-02-18VideoCommon: move factory names to be a static inside each action class, so ↵iwubcode
that they can be reused in the future for serialization
2024-02-18Merge pull request #12281 from TellowKrinkle/AsahiGL33Admiral H. Curtiss
VideoCommon: Don't use indexed output for fbfetch
2024-02-16Merge pull request #12457 from iwubcode/asset_memory_limitMai
VideoCommon: handle asset memory going over reserved limit correctly
2024-02-12VideoCommon: make mesh asset data loadable by asset loaderiwubcode
2024-02-11VideoCommon: add functionality to prepare for a mesh asset that is loaded ↵iwubcode
from a GLTF file
2024-02-07VideoCommon: Don't use indexed output for fbfetchTellowKrinkle
A nonzero index makes no sense, and Mesa doesn't like it when you supply an index
2024-02-03Merge pull request #12550 from lioncash/deadAdmiral H. Curtiss
VertexLoaderManager: Remove unused entry struct
2024-02-01VertexLoaderManager: Use fill() in Init()Lioncash
Same behavior, less code.
2024-02-01VertexLoaderManager: Remove unused entry structLioncash
This isn't used anywhere, so it can be removed.
2024-02-01CustomPipeline: Mark arrays as constexprLioncash
Ensures that these go into the ro section.
2024-02-01CustomPipeline: Make use of emplace_back() in GlobalConflicts()Lioncash
We can use the string_view arguments to directly construct strings inside of the global_result vector.
2024-02-01CustomPipeline: Resolve unused variable warningLioncash
We can just use holds_alternative here instead.
2024-01-31Merge pull request #12546 from lioncash/eventAdmiral H. Curtiss
VideoCommon/Statistics: Remove global system accessor from s_after_frame_event