summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends
AgeCommit message (Collapse)Author
2024-08-31Merge pull request #13031 from parona-source/libfmt-11Admiral H. Curtiss
Add support for libfmt-11
2024-08-28vulkan: Add line number to vulkan error loggerAli Homafar
This is a minor improvement to add line numbers to the LOG_VULKAN_ERROR define. Basically error logs for Vulkan will now look like: ``` // This 25:03:347 VideoBackends/Vulkan/VulkanLoader.cpp:247 E[Video]: (WaitForCommandBufferCompletion:278) vkWaitForFences failed: (2: VK_TIMEOUT) // Instead of 15:45:154 VideoBackends/Vulkan/VulkanLoader.cpp:247 E[Video]: (WaitForCommandBufferCompletion) vkWaitForFences failed: (2: VK_TIMEOUT) ```
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-20Remove redundant semicolonsDr. Dystopia
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-22Migrate Vulkan-Headers to submodule and update to v1.3.288Luis Condes Diaz
2024-05-21Merge pull request #12537 from TellowKrinkle/MTLSubgroupAdmiral H. Curtiss
VideoCommon: More specific subgroup op bugs
2024-04-22port to OpenBSDGuilherme Janczak
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-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-03-10Add HDR to MetalSam Belliveau
2024-01-28VideoCommon: Post to analytics when bug is overriddenTellowKrinkle
2024-01-28VideoCommon: Add ability for backends to override bugsTellowKrinkle
2024-01-28VideoBackends:Multiple: Split up BUG_BROKEN_SUBGROUP_OPSTellowKrinkle
We now use subgroup ops for more than just a minor performance optimization
2024-01-27VideoBackends:MTL: Use SPIRV 1.5TellowKrinkle
Allows non-constant simd broadcast, which is used by the ascii art shader
2024-01-05VKGfx: Don't panic for VK_SUBOPTIMAL_KHRMartino Fontana
2024-01-03Revert "VideoCommon: revert max pixel shader samplers back to 8 for Android ↵iwubcode
devices." This reverts commit 79648e1c24eac81f54365bbcb6dbc49ad6b16b1c.
2023-12-21VideoCommon: revert max pixel shader samplers back to 8 for Android devices.iwubcode
It was reported that some games (Zelda Wind Waker and Zelda Twilight Princess but others may also exhibit the issue) have graphical issues with the max pixel samplers set to 16 on some Android devices (ex: Pixel6); since this was increased for a performance heavy feature (custom shaders) just disable it for now. In the future, this could be handled more elegantly
2023-12-17Merge pull request #12370 from iwubcode/more_samplersMai
VideoBackends / VideoCommon: update max pixel shader samplers from 8 to 16
2023-12-17Merge pull request #12372 from iwubcode/texture_usage_flagMai
VideoBackends / VideoCommon: add type enum to dictate how the texture is used; support texture 2d
2023-12-15VideoBackends / VideoCommon: add type enum to dictate whether a texture is a ↵iwubcode
2D texture, a texture array, or a cube map; support 2D texture type across backends Co-authored-by: TellowKrinkle <tellowkrinkle@gmail.com>
2023-12-14MTLStateTracker: Increase fragment buffer array size to 3OatmealDome
2023-12-12Software/SWGfx: Default destructor in cpp fileLioncash
Fixes a build failure with clang 17. The destructor needs to be in the cpp file, since we have a forward declared std::unique_ptr type as part of the class. So technically the default inline destructor could invoke without seeing the full data type definition.
2023-12-10VideoBackends / VideoCommon: update max pixel shader samplers from 8 to 16, ↵iwubcode
this allows us to support more samplers than the native Wii/GC
2023-12-09VideoCommon: Use std::span for BoundingBox::Write()Lioncash
Crosses off a lingering TODO. Also amends a few nearby cases where a u32 cast was being repromoted to size_t.
2023-12-09Fix out of bound write in EfbCopy::ClearEfbtimetravelthree
2023-11-29VideoBackends:Metal: Support multiple compute texturesTellowKrinkle
2023-11-29VideoBackends:Metal: Align utility uniform sizesTellowKrinkle
Prevents complaining from validation layers
2023-11-27OGLConfig: Only use Warn Log if OGL extensions are missingDentomologist
2023-11-26Vulkan: use EnumMap for blend factor luts (NFC)Tillmann Karras
2023-11-24Metal: enable concurrent compilation only if availablePierre de La Morinerie
Bug: https://bugs.dolphin-emu.org/issues/13404 On macOS 13.6 / Intel HD 5000, Dolphin crashes with this message: > -[MTLIGAccelDevice setShouldMaximizeConcurrentCompilation:]: unrecognized selector This should be available on all macOS 13.3+ systems – but when using OCLP drivers, some devices use an older version of Metal.framework, which doesn't expose the selector. This concerns Intel Ivy Bridge, Haswell and Nvidia Kepler when using OCLP on macOS 13.3 or newer. (See https://github.com/dortania/OpenCore-Legacy-Patcher/blob/34676702f494a2a789c514cc76dba19b8b7206b1/docs/PATCHEXPLAIN.md?plain=1#L354C1-L354C83) As the behavior is an optional optimization anyway, perform a dynamic detection to avoid crashing if the feature is not available.
2023-11-11Rename bpmem.copyMipMapStrideChannels to bpmem.copyDestStridePokechu22
As far as I can tell, it has nothing to do with the mipmap/half_scale functionality, but does change based on the width of the destination texture (and the destination texture is half the width if half_scale is set). The comment that was there (which dates back to the initial megacommit) seems to not have accounted for the width aspect; it was first used as an actual stride in bbbe898839467c312c31456334540c20fedc7be3 (the first commit that used it at all).
2023-10-25VideoBackends:OGL: Handle when SSBOs are only supported in some shader stagesTellowKrinkle
2023-10-06Metal: update binding mapping for SPRV due to change for custom shader ↵iwubcode
uniforms in other backends (Metal is still not supported) Co-authored-by: TellowKrinkle <tellowkrinkle@gmail.com>
2023-10-06VideoCommon: avoid Vulkan validation errors when custom shader ubo isn't set upiwubcode
Co-authored-by: TellowKrinkle <tellowkrinkle@gmail.com>
2023-10-06VideoBackends / VideoCommon: add new uniform buffer object for custom shader ↵iwubcode
materials (slot 3, geometry shader buffer moves to slot 4 if available)
2023-09-03Merge pull request #12004 from TellowKrinkle/MetalMultiTargetOatmealDome
VideoBackends:Metal: Multi render target support
2023-08-13VideoBackends: update SRVDescriptorTable size in DX12 to use pixel sampler ↵iwubcode
constant
2023-08-10Merge pull request #12061 from iwubcode/cubemap_backends_onlyJMC47
VideoBackends: add support for cube maps for OGL, Vulkan, and D3D
2023-08-04D3D12: Only use framebuffer integer descriptor if allocatedDentomologist
Verify that DXFramebuffer's integer RTV descriptor's cpu_handle has been allocated before using it, and if it hasn't use the non-integer RTV descriptor instead. This fixes a Dolphin crash in Twilight Princess, and possibly other games (Issue 13312). As an optimization to save space in the descriptor heap, DXFramebuffer's integer descriptor is only initialized if the given abstract texture format has different integer and non-integer RTV formats. This previously wasn't accounted for by GetIntRTVDescriptorArray, which could cause DX12::Gfx::BindFramebuffer to call OMSetRenderTargets with an invalid descriptor which would lead to a crash. Triggering the bug was fortunately rare because integer formats are only used when blending is disabled and logic ops are enabled. Furthermore, the standard integer abstract format is RGBA8 which has different integer and non-integer RTV formats, causing the integer descriptor to be initialized and avoiding the bug. The crash started appearing in a2702c6 because it changed the swapchain's abstract texture format from RGBA8 to RGB10_A2. Unlike RGBA8, RGB10_A2 has the same integer and non-integer RTV formats and so the bug can be triggered if the other requirements are met.
2023-07-21VideoBackends: add support for cube maps for OGL, Vulkan, and D3Diwubcode
2023-07-11Merge pull request #12042 from JosJuice/logic-op-no-win7OatmealDome
D3D: Remove Windows 7 mention in logic ops warning
2023-07-11D3D: Remove Windows 7 mention in logic ops warningJosJuice
Dolphin no longer supports Windows 7, so the fact that there are (were?) more people who use Windows 7 than who use a GPU that doesn't support the required feature is no longer relevant.
2023-07-01Merge pull request #11923 from iwubcode/multi-texture-compute-supportAdmiral H. Curtiss
VideoBackends: support multiple compute images for some backends
2023-06-29VKGfx: Add parentheses around ambiguous if statements.Admiral H. Curtiss
2023-06-28VideoBackends: support multiple compute images for some backends (D3D, OGL, ↵iwubcode
Vulkan)
2023-06-28VideoBackends:Metal: Multi render target supportTellowKrinkle
2023-06-23Merge pull request #11850 from Filoppi/post_process_fixesAdmiral H. Curtiss
Video: implement color correction to match the Wii/GC NTSC/PAL color spaces (and gamma)
2023-06-19Video: implement color correction to match the NTSC and PAL color spaces ↵Filoppi
(and gamma) that GC and Wii targeted. To further increase the accuracy of the post process phase, I've added (scRGB) HDR support, which is necessary to fully display the PAL and NTSC-J color spaces, and also to improve the quality of post process texture samplings and do them in linear space instead of gamma space (which is very important when playing at low resolutions). For SDR, the quality is also slightly increased, at least if any post process runs, as the buffer is now R10G10B10A2 (on Vulkan, DX11 and DX12) if supported; previously it was R8G8B8A8 but the alpha bits were wasted. Gamma correction is arguably the most important thing as Dolphin on Windows outputted in "sRGB" (implicitly) as that's what Windows expects by default, though sRGB gamma is very different from the gamma commonly used by video standards dating to the pre HDR era (roughly gamma 2.35). Additionally, the addition of HDR support (which is pretty straight forward and minimal), added support for our own custom AutoHDR shaders, which would allow us to achieve decent looking HDR in Dolphin games without having to use SpecialK or Windows 11 AutoHDR. Both of which don't necessarily play nice with older games with strongly different and simpler lighting. HDR should also be supported in Linux. Development of my own AutoHDR shader is almost complete and will come next. This has been carefully tested and there should be no regression in any of the different features that Dolphin offers, like multisampling, stereo rendering, other post processes, etc etc. Fixes: https://bugs.dolphin-emu.org/issues/8941 Co-authored-by: EndlesslyFlowering <EndlesslyFlowering@protonmail.com> Co-authored-by: Dogway <lin_ares@hotmail.com>