Commit Graph

176 Commits

Author SHA1 Message Date
c18c039089 VideoCommon: Move backend_info out of VideoConfig struct. 2025-03-09 01:42:45 -06: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
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
834f8f7b5c VideoBackends: add support to allow rendering to multiple output textures 2023-06-03 14:52:31 -05: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
c68d484a65 OGL: Convert SupportedESPointSize to an enum class 2023-04-08 15:32:27 -07: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
f0336a3129 Implement AbstractGfx for OpenGL
Mostly involves moving contents of OGLRender
to OGLGfx and OGLConfig
2023-01-31 18:46:04 +13:00
cb0a603c72 VideoCommon: De-globalize GeometryShaderManager class. 2022-12-29 15:33:19 +01:00
50625728e0 VideoCommon: De-globalize VertexShaderManager class. 2022-12-28 15:52:29 +01:00
725bd64ec2 VideoCommon: De-globalize PixelShaderManager class. 2022-12-27 20:13:24 +01:00
e3cc42069f VideoBackends:OGL: Creating vertex formats shouldn't unbind anything 2022-11-28 21:28:24 -06:00
cc5640245c Fix build errors related to formatting non-scoped enums 2022-11-23 13:45:43 -08:00
f9fe25291d Remove most uses of StringFromFormat in favor of fmt 2022-10-12 16:50:47 -07:00
26529a31ab VideoCommon: Fix SSBO layout and remove associated "bug" 2022-06-16 20:26:11 -05:00
04fdadd9d5 VideoCommon: Rename norm0/norm1/norm2 to normal/tangent/binormal 2022-04-22 16:54:36 -07:00
83c5446d85 Fix static initialisation order fiasco issue for Version variables
Fixes a crash that could occur if the static constructor function for
the MainSettings.cpp TU happened to run before the variables in
Common/Version.cpp are initialised. (This is known as the static
initialisation order fiasco.)

By using wrapper functions, those variables are now guaranteed to be
constructed on first use.
2022-01-14 00:04:22 +01:00
76b508557e GLES: Fix missing precision for sampler2DMSArray
We don't use sampler2DMS, but we do use sampler2DMSArray.

I can't reproduce it on my phone, but a user who was running GLES
on a Tegra X1 reported a shader compilation error related to this.
2021-12-28 11:36:11 +01:00
1c421444ae ProgramShaderCache: Don't define FB_FETCH_VALUE for GL_EXT_shader_framebuffer_fetch
We will automatically choose between real_ocol0 and ocol0 in the fragment shader.
2021-12-06 22:36:40 -05:00
1adff1c467 VideoCommon: Skip textureQueryLevels if it doesn't exist 2021-11-17 21:28:39 -08:00
51e3334526 VideoCommon: Use coarse derivatives for Manual Texture Sampling if possible 2021-11-17 20:04:34 -08:00
e149ad4f0a treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
ff4f67492b normalize common filenames in VideoBackends/OGL 2021-01-27 14:29:48 -08:00
139d4fc76e General: Convert PanicAlerts over to fmt equivalent
Converts lingering panic alert calls over to the fmt-capable ones.
2020-12-02 13:38:33 -05:00
413d64e7fc OpenGL: Migrate logging over to fmt
Migrates over to the fmt-capable logger.
2020-11-09 03:09:09 -05:00
4db06bf85b ogl: init ProgramShaderCache::s_ubo_align to 1.
silences a warning that it may cause div-by-zero.
2020-08-27 15:15:52 -07:00
86f8768268 VideoCommon/ShaderGenCommon: Make template functions regular functions
These are only ever used with ShaderCode instances and nothing else.
Given that, we can convert these helper functions to expect that type of
object as an argument and remove the need for templates, improving
compiler throughput a marginal amount, as the template instantiation
process doesn't need to be performed.

We can also move the definitions of these functions into the cpp file,
which allows us to remove a few inclusions from the ShaderGenCommon
header. This uncovered a few instances of indirect inclusions being
relied upon in other source files.

One other benefit is this allows changes to be made to the definitions
of the functions without needing to recompile all translation units that
make use of these functions, making change testing a little quicker.

Moving the definitions into the cpp file also allows us to completely
hide DefineOutputMember() from external view, given it's only ever used
inside of GenerateVSOutputMembers().
2020-05-25 21:12:29 -04:00
e5f6d9320f Add Dolphin version and current video backend to shader compilation logs 2020-01-24 03:29:38 -05:00
d6617d399f OGL/ProgramShaderCache: Use std::lock_guard deduction guides where applicable
Same thing, less reading.
2019-07-26 18:22:55 -04:00
6e69e3cf26 OGL/ProgramShaderCache: Remove unused headers
Removes a few inclusions that aren't necessary, reducing the number of
header dependencies.
2019-07-26 18:09:44 -04:00
fb384dec55 OGL/ProgramShaderCache: Use std::string_view where applicable 2019-07-26 18:02:00 -04:00
d4337eebde VideoCommon/Statistics: Rename stats global to g_stats
Makes the global variable follow our convention of prefixing g_ on
global variables to make it obvious in surrounding code that it's not a
local variable.
2019-07-10 23:34:54 -04:00
a99c7d01e1 VideoCommon/Statistics: Normalize statistic variable names
Normalizes all variables related to statistics so that they follow our
coding style.

These are relatively low traffic areas, so this modification isn't too
noisy.
2019-07-10 23:19:10 -04:00
99a4ca8de7 Merge pull request #7839 from ShFil119/impr/redundant
Remove redundant initialization
2019-05-04 22:50:51 +02:00
c110ffcdaa Remove redundant initialization 2019-04-30 01:22:24 +02:00
356ebdf509 OGL: Set shared context state up to match main context
Has a better chance of avoiding recompiling if so.
2019-04-21 14:28:14 +10:00
f2a594fad5 OGL: Fix binding error on shutdown
This was occurring if the imgui vertex format was bound on shutdown,
which is destroyed before the vertex buffers
2019-04-21 14:28:14 +10:00
5c95dc61fc OGL: Store shader source in OGLShader
So it can be dumped with info log when linking fails.
2019-04-21 14:28:14 +10:00
bbd1ae16db OGL: Remove unused ProgramShaderCache::CompileShader() 2019-04-21 14:28:14 +10:00
616ad378b7 OGL: Support returning pipeline cache data 2019-04-16 00:39:43 +10:00
f3fadd7302 Merge pull request #7869 from stenzek/d3dcommon
D3D: Move sharable D3D11/D3D12 code to common library
2019-03-29 20:40:06 +10:00
86da282570 OGL: Support subgroup reduction operations via GL_NV_shader_thread_shuffle 2019-03-29 20:06:56 +10:00
3b86c93285 VertexManagerBase: Increase vertex/uniform buffer sizes
ZTP was uploading 10MB+ of uniforms per frame, reducing paralellism by
forcing GPU waits.
2019-03-29 19:52:38 +10:00
f039149198 Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
7afd5cc2fb Use main buffers for utility draws 2018-12-04 17:37:25 +10:00
dcdd02d646 GLContext: Remove global context pointer 2018-10-20 21:11:34 +10:00
134d967be2 Refactoring and cleanup of GLInterface (now GLContext) 2018-10-20 21:11:34 +10:00
75f5fcdfee Assert: Remove unused parameter from DEBUG_ASSERT
This brings the macro in line with the regular ASSERT macro, which only has one
macro parameter.
2018-03-16 13:01:11 -04:00
50a476c371 Assert: Uppercase assertion macros
Macros should be all upper-cased. This is also kind of a wart that's
been sticking out for quite a while now (we avoid prefixing
underscores).
2018-03-14 22:03:12 -04:00