1218 Commits

Author SHA1 Message Date
65f3ba70f5 Merge pull request #13522 from tygyh/Enforce-overriding-destructor-style-Core&UnitTests
Core & UnitTests: Make overriding explicit and remove redundant virtual specifiers on overriding destructors
2025-06-07 17:55:14 -05:00
f240e20e3f Make overriding explicit and remove redundant virtual specifiers on overriding destructors - Core & UnitTests 2025-05-01 15:00:37 +02:00
2397a3a915 Use range-based loops - Core VideoBackends 2025-04-14 21:49:08 +02:00
79a1e480ca Enable anisotropic filtering when the game requests it 2025-03-17 20:46:19 -05:00
8c7ab286f5 Merge pull request #13181 from tygyh/Replace-'reinterpret_cast'
Replace 'reinterpret_cast' with 'static_cast'
2025-03-15 15:31:38 +01:00
c18c039089 VideoCommon: Move backend_info out of VideoConfig struct. 2025-03-09 01:42:45 -06:00
140252ffc0 Modernize std::any_of with ranges
In WiimoteReal.cpp, JitRegCache.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those.

In ConvertDialog.cpp, the `std::mem_fn` helper was removed because ranges algorithms are able to handle pointers to member functions as predicates.
2024-12-15 19:54:16 -08:00
6d44afc7dd Replace 'reinterpret_cast' with 'static_cast' 2024-11-08 07:26:47 +01:00
07605bf67c Merge pull request #13090 from mitaclaw/ranges-modernization-1-trivial
Ranges Algorithms Modernization - Trivial
2024-10-15 17:08:55 +02:00
e8d5fb89e4 C++20: Synthesize operator!= From operator==
The inequality operator is automatically generated by the compiler if `operator==` is defined.
2024-10-10 20:23:55 -07:00
88a1a5b4f2 Modernize std::set_intersection with ranges 2024-10-10 00:53:48 -07:00
01d0bdf1bb Modernize std::is_sorted with ranges
In OGLConfig.cpp, `std::views::reverse` is used rather than sorting using `std::ranges::greater` in order to parallel other instances of reverse iteration in the function.
2024-10-10 00:53:48 -07:00
78440ca335 Modernize std::reverse with ranges 2024-10-10 00:53:48 -07:00
7e1a9490c0 VideoBackends:Vulkan: Don't try to present if swapchain acquire failed 2024-10-02 19:22:16 -05:00
d7c93d87be Add support for libfmt-11
fmt::join was moved into fmt/ranges.h

Signed-off-by: Alfred Wingate <parona@protonmail.com>
2024-08-22 16:54:35 +03:00
5c2f73986a Merge pull request #12537 from TellowKrinkle/MTLSubgroup
VideoCommon: More specific subgroup op bugs
2024-05-21 22:17:22 +02:00
50dc0ffbce port to OpenBSD 2024-04-22 20:50:47 +00:00
a3951dc2d7 Fix out of bounds accesses for invalid vertex component formats
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-04 12:50:34 -07:00
b7a451fc87 VideoCommon: Post to analytics when bug is overridden 2024-01-28 23:24:23 -06:00
12dd15c8dd VideoBackends / VideoCommon: add type enum to dictate whether a texture is a 2D texture, a texture array, or a cube map; support 2D texture type across backends
Co-authored-by: TellowKrinkle <tellowkrinkle@gmail.com>
2023-12-15 11:06:02 -06:00
5f6c76af51 VideoCommon: Use std::span for BoundingBox::Write()
Crosses off a lingering TODO.

Also amends a few nearby cases where a u32 cast was being repromoted to
size_t.
2023-12-09 16:33:21 -05:00
becbaf50c4 OGLConfig: Only use Warn Log if OGL extensions are missing 2023-11-27 20:52:04 -08:00
4f2a79058a VideoBackends:OGL: Handle when SSBOs are only supported in some shader stages 2023-10-25 17:47:04 +02:00
b6d321bfb1 VideoBackends / VideoCommon: add new uniform buffer object for custom shader materials (slot 3, geometry shader buffer moves to slot 4 if available) 2023-10-06 02:17:42 -05:00
e892b7f1ac VideoBackends: add support for cube maps for OGL, Vulkan, and D3D 2023-07-21 19:09:40 -05:00
3627398cf5 VideoBackends: support multiple compute images for some backends (D3D, OGL, Vulkan) 2023-06-28 17:15:31 -05:00
8f51a9d2d8 Merge pull request #11699 from Pokechu22/gl-check-maximum-samples
OpenGL: Check the list of supported AA modes instead of hardcoding
2023-06-09 15:07:07 +02:00
092773ad0c Merge pull request #11859 from iwubcode/backend-multi-output
VideoBackends: add support to allow rendering to multiple output targets
2023-06-09 13:40:21 +02:00
b246a634d4 OpenGL: Check the list of supported AA modes instead of hardcoding 2023-06-08 22:07:41 -07:00
c63f0f37cd VideoCommon: Pass WindowSystemInfo to InitBackendInfo 2023-06-08 22:07:39 -07:00
cdc53c046b Video: add R10B10G10A2 and R16G16B16A16F texture types (needed by PR 11850) 2023-06-08 03:17:20 +03:00
834f8f7b5c VideoBackends: add support to allow rendering to multiple output textures 2023-06-03 14:52:31 -05:00
653be9e45d Merge pull request #11628 from Pokechu22/gles-32-only-multisample
OGL: Only specify precision for sampler2DMSArray when it is defined
2023-04-23 16:02:15 +02:00
2e7f0d002e Merge pull request #11760 from Minty-Meeo/embracing-nullptr
Embrace nullptr over NULL and 0
2023-04-18 22:14:11 +02:00
get
a5d06fde4b Embrace nullptr over NULL and 0 2023-04-15 16:07:05 -05:00
784a216927 Common/MathUtil: Move IntLog2 into MathUtil namespace
Gets this out of the global namespace.
2023-04-15 03:35:05 -04:00
8b0bd31e72 OGL: Use GL_OES_texture_storage_multisample_2d_array when supported
See https://bugs.dolphin-emu.org/issues/13198
2023-04-08 15:32:27 -07:00
3f143d1bc9 OGL: Only specify precision for sampler2DMSArray when it is defined
See https://bugs.dolphin-emu.org/issues/13198
2023-04-08 15:32:27 -07:00
53beda526b OGL: Remove bSupports2DTextureStorageMultisample and bSupports3DTextureStorageMultisample
bSupports2DTextureStorageMultisample is completely unused, while bSupports3DTextureStorageMultisample is practically unused. In the past, these were checked and fell back to sampler2DMS instead of sampler2DMSArray on GLES 3.1, but this path was removed in f039149198 and Dolphin always uses array textures now.
2023-04-08 15:32:27 -07:00
c68d484a65 OGL: Convert SupportedESPointSize to an enum class 2023-04-08 15:32:27 -07:00
ddd2b598da Return quarter value for PerfQuery in all backends. 2023-03-14 02:08:20 +01:00
f25a0b43b6 VideoCommon: Fix stereoscopic 3D on OpenGL < 4.3 (macOS) 2023-02-14 18:25:33 +01:00
f37113204f Merge pull request #11550 from iwubcode/set_common_samplers_count
VideoCommon: add constant value for maximum number of pixel samplers
2023-02-13 16:05:51 +13:00
258151fe5a Merge pull request #11523 from degasus/OGL_KHR_subgroup
VideoBackend/OGL: Prefer KHR_shader_subgroup over NV_shader_thread.
2023-02-10 04:47:20 -05:00
af313f8419 VideoCommon: add constant value to set the allowed maximum number of pixel samplers 2023-02-10 00:46:11 -06:00
a88e5ef390 Merge pull request #11498 from iwubcode/save_pipeline_config
VideoCommon: store the configuration used to create the AbstractPipeline
2023-02-09 18:38:49 -05:00
6dfd582de6 OGL: Fix GLES crashing on initialization
Fixes a regression from PR 11522 ("Kill Renderer").
2023-02-09 18:09:03 +01:00
4b2aa948e6 VideoBackend/OGL: Prefer KHR_subgroup over NV_shader_thread.
While the NV extension is totally fine, the KHR extension should be able to support more hardware.

For NVIDIA, the hardware either supports both or neither, it just needs a driver from the last two years.
For AMD, the drivers from late 2022-12 seems to bring support for the KHR extension.
For Intel, the KHR is also supported for some years.
2023-02-09 13:27:02 +01:00
d0c6b6c9ed VideoCommon: store the configuration used to create the AbstractPipeline on the pipeline itself, so that it's easy to duplicate pipelines with slightly altered configuration 2023-02-09 02:13:53 -06:00
ccf92a3e56 Merge pull request #11522 from phire/KillRendererWithFire
Kill Renderer (with phire)
2023-02-09 19:59:16 +13:00