Commit Graph

1156 Commits

Author SHA1 Message Date
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
fb8aa9744e Merge pull request #11286 from K0bin/vk-query-fix
VideoBackends: Query fixes and cleanups
2022-12-19 03:15:48 -05:00
35a6d16d9e VideoBackends: Rename query_type to query_group 2022-11-29 23:14:23 +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
22eb7e6645 OGL: use already known object label lengths
Passing -1 means the driver has to call strlen().
2022-11-01 01:10:03 +00:00
4b8fe959d4 OGL: fix compute shader labels
This fixes GL_INVALID_VALUE errors when using GPU texture decoding.
2022-11-01 01:04:46 +00:00
9624479933 VideoBackends:OGL: Add support for vertex shader point and line expansion 2022-10-22 20:13:24 -05:00
f9fe25291d Remove most uses of StringFromFormat in favor of fmt 2022-10-12 16:50:47 -07:00
4c629c2bee VideoCommon: Add dynamic vertex loader to ubershaders 2022-09-19 16:28:23 -05:00
6ee0248eab VideoBackends:Metal: MSAA support 2022-07-21 20:44:19 -05:00
716c0980d7 VideoBackends: Add Metal renderer 2022-07-21 20:44:19 -05:00
6ab24e6c17 VideoCommon: Better driver bug handling
Adds a pass to process driver deficiencies between UID caching and use, allowing a full view of the whole pipeline, since some bugs/workarounds involve interactions between blend modes and the pixel shader
2022-07-13 21:51:24 -05:00
26529a31ab VideoCommon: Fix SSBO layout and remove associated "bug" 2022-06-16 20:26:11 -05:00
580c721c82 cmake: Don't use PCH with Qt6. 2022-05-22 01:19:44 +02:00
c0488de482 Merge pull request #10251 from Pokechu22/negative-scissor
Rework scissor handling
2022-04-24 15:00:42 -04:00
04fdadd9d5 VideoCommon: Rename norm0/norm1/norm2 to normal/tangent/binormal 2022-04-22 16:54:36 -07:00
076392a0f6 VideoCommon: Rework scissor handling
This increases accuracy, fixing the white rendering in Major Minor's Majestic March.  However, the hardware backends can only have one viewport and scissor rectangle at a time, while sometimes multiple are needed to accurately emulate what is happening.  If possible, this will need to be fixed later.
2022-04-16 10:26:11 -07:00
4595b89ad8 VideoCommon: Remove bSupportsOversizedViewports
I think this is a relic of D3D9.  D3D11 and D3D12 seem to work fine without it.  Plus, ViewportCorrectionMatrix just didn't work correctly (at least with the viewports being generated by the new scissor code).
2022-04-16 10:26:11 -07:00
69e79045a3 VideoBackends: fix opengl object label which was given an invalid enumeration as the identifier parameter. Most implementations will warn in this case but there is an implementation that will crash (ANGLE) 2022-03-24 00:25:59 -05:00
7d76eea4ea OGLRender: Log video backend info, in addition to showing it via OSD
This is mainly intended for debugging fifo.ci.
2022-02-23 18:30:02 -08:00
a9b5188047 OGLMain: Set default value for bSupportsSettingObjectNames 2022-02-08 14:53:51 -05:00
4d1e6ff76a Merge pull request #10422 from OatmealDome/opengl-shader-crash
VideoConfig: Add flag for whether the system supports setting object names
2022-01-31 01:25:46 -05:00
b36c866398 OGLTexture: Only set texture name if supported 2022-01-31 01:17:40 -05:00
ea1ac73c38 OGLShader: Only set shader name if supported 2022-01-31 01:17:40 -05:00
390cc13834 OGLRender: Set object name support on GL >4.3 and GL ES 3.2 2022-01-31 01:17:40 -05: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
161c627466 Treewide: Remove unused inclusions of <cinttypes>
Most of these became unneeded when fmt was introduced.
2022-01-09 12:43:11 -08:00
13939b13d7 Merge pull request #10311 from JosJuice/gles-sampler2dmsarray
GLES: Fix missing precision for sampler2DMSArray
2022-01-01 16:49:34 +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
91cdeb5aa6 SamplerCache: Check for bSupportsLodBiasInSampler instead of IsGLES 2021-12-25 15:17:19 -05:00
08396c56e5 VideoConfig: Add bool for sampler LOD bias support 2021-12-25 15:16:27 -05:00
b1f79d9ecf Merge pull request #10215 from OatmealDome/shader-logic-ops
VideoCommon: Support shader logic ops on Metal (Apple GPUs) and OpenGL ES
2021-12-22 16:39:54 -05:00
27cb704466 Eliminate VarType for ComponentFormat 2021-12-18 15:21:48 -08:00
2025763420 Treewide: Adjust order of includes 2021-12-10 14:49:57 -08: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
4a9b26de86 VideoCommon: Expose SamplerState to shaders
The benefit to exposing this over the raw BP state is that adjustments Dolphin makes, such as LOD biases from arbitrary mipmap detection, will work properly.
2021-11-17 20:04:34 -08:00
6236a0d494 Eliminate SamplerCommon 2021-11-17 20:04:34 -08:00
04d8cdfe88 Convert LOG_TYPE and LOG_LEVELS to enum class 2021-10-24 11:48:36 -07:00
78bfd25964 Fix all uninitialized variable warnings (C26495) 2021-10-13 12:32:16 -07:00
1161af8059 VideoCommon: Abstract bounding box
This moves much of the duplicated bounding box code into VideoCommon,
leaving only the specific buffer implementations in each backend.
2021-10-04 15:51:24 -04:00
1f2f505373 VideoBackends / VideoCommon: allow the ability to set debug names for shaders / textures. These names are visible in applications like RenderDoc 2021-08-30 13:47:48 -05:00
815b590dfe Update clang-format to version 12
12 is the latest release and various editors (VS, VSCode and CLion)
ship with clang-format 12 by default.
2021-08-30 00:20:18 +02: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
2898cf5121 Merge pull request #9784 from PEmu2/master
Update buffer_storage warning message
2021-06-13 12:56:26 +02:00
4866002c9b VideoCommon: Perform OpenGL bounding box inversion in pixel shader
Running the min/max operation on the upside down, quad-rounded pixel
coordinates before inverting them to the standard upper-left origin
produces wrong results. Therefore, we need to do the inversion before
rounding to pixel quads.
2021-06-06 20:55:06 -04:00