Commit Graph

39 Commits

Author SHA1 Message Date
463269f704 VideoBackends:Multiple: Split up BUG_BROKEN_SUBGROUP_OPS
We now use subgroup ops for more than just a minor performance optimization
2024-01-28 23:20:39 -06:00
3627398cf5 VideoBackends: support multiple compute images for some backends (D3D, OGL, Vulkan) 2023-06-28 17:15:31 -05:00
196c684ac1 Vulkan: Enable subgroupShuffle.
It is used as workaround for the missing subgroupBroadcastDynamicId flag on SPIR-V < 1.5.
2023-03-24 21:53:23 +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
1c6a0073d2 ShaderCompiler: Use compute shader header in compute shaders 2022-07-09 19:01:58 -04:00
dda1479ecf VideoBackends / VideoCommon: refactor Vulkan to use new SPIRV functionality 2022-06-24 18:09:53 -05:00
26529a31ab VideoCommon: Fix SSBO layout and remove associated "bug" 2022-06-16 20:26:11 -05:00
0f92ab380e Vulkan: Include the info log in the shader compile error panic alert
The other backends do this, and it is helpful for quickly identifying errors during development.
2022-04-22 16:38:35 -07:00
7ae71e643e Vulkan: Close the output stream on shader compile error before showing the panic alert
This fixes the file showing up as 0 bytes in Windows Explorer (although the file would still display properly when opened).
2022-04-22 16:37:43 -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
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
2025763420 Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
f87f704f43 ShaderCompiler: Add helpers for Metal framebuffer fetch 2021-12-06 22:36:39 -05:00
40eb071562 ShaderCompiler: Add new helper define for input attachment binding 2021-12-06 22:36:39 -05:00
d453390c48 ShaderCompiler: Attach source text to SPIR-V for debuggers like RenderDoc 2021-08-05 03:04:18 -04: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
58238e75a7 Vulkan: Fix subgroup reduction
It seems that we were writing values from helper invocations, which
produces wrong results.
2021-06-07 22:32:25 -04: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
21dd7a8ebb Vulkan: Migrate logging over to fmt
Migrates the vulkan backend over to the fmt-capable logger.
2020-11-09 03:26:16 -05:00
ba2d04b793 Externals: Fix build failures with the newer glslang.
v2: Don't include glslang project wide.
2020-05-30 18:54:21 -07:00
b6ff15c130 Cleanup warnings of -Wmissing-declarations
Add static to the functions which is not intentionally
export to big scope.
2020-03-24 20:16:10 +08:00
e5f6d9320f Add Dolphin version and current video backend to shader compilation logs 2020-01-24 03:29:38 -05:00
72b04a353d VideoBackends/Vulkan: Use nested namespace specifiers where applicable 2019-06-17 16:57:30 -04:00
1831dcbe6f VideoVulkan/ShaderCompiler: Use non-member std::size instead of ArraySize()
Now that we're on C++17, we can use its non-member std::size function
instead of ours. This provides no functional change.
2019-05-30 04:16:20 -04:00
d6a60050ff VideoVulkan/ShaderCompiler: Use a std::optional instead of bool+out variable
Now that we utilize C++17, we can simply return an optional containing
the code instead of using an out variable and a boolean result,
essentially combining them into one.

This provides a much more straightforward interface.
2019-05-30 04:16:17 -04:00
e60268bd42 VideoCommon/RenderBase: Use a std::string_view with CreateShaderFromSource()
Greatly simplifies the overall interface when it comes to compiling
shaders. Also allows getting rid of a std::string overload of the same
name. Now std::string and const char* both go through the same function.
2019-05-30 03:29:35 -04:00
6561850f2b Vulkan: Support subgroup reduction operations via GL_KHR_shader_subgroup 2019-03-29 20:06:56 +10:00
f039149198 Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
448e19629d Vulkan: Drop usage of VK_NV_glsl extension
It's not providing a large performance improvement anymore, after the
more recent drivers introduced a new shader compiler.
2018-08-29 13:12:19 +10:00
bc96557ec4 Externals: Update glslang to upstream commit 32d3ec3 2018-06-02 07:34:31 +00:00
40bb9974f2 Reformat all the things! 2018-04-12 21:28:39 +02:00
79188d4f55 Vulkan: Use VK_NV_glsl extension where available, and skip glslang 2017-10-11 23:15:41 +10:00
254160691a Revert "Vulkan: Use VK_NV_glsl extension where available, and skip glslang"
This reverts commit d23fd17e1a.

Dynamic sampler indexing is broken in VK_NV_glsl as of 385.41. The
performance gap doesn't seem to be as wide with the updated driver, so
to save maintaining two code paths, it's easier to just drop the
extension support completely.
2017-09-03 15:31:19 +10:00
d23fd17e1a Vulkan: Use VK_NV_glsl extension where available, and skip glslang
Seems to produce faster ubershaders, at least.
2017-07-30 12:38:49 +10:00
cf94ce6305 Add a namespace to OpenFStream
For consistency with the other functions in FileUtil.h.
2017-06-15 21:34:04 +02:00
5fbc63fbcf Vulkan: Compute shader support 2017-04-01 12:32:57 +10:00
804af42ccc Vulkan: Support binding texel buffers in UtilityShaderDraw 2016-12-04 20:10:13 +10:00
9395b8efa9 Vulkan: Amend header includes
Adds headers where necessary to eliminate indirect includes.
Also adds headers to ensure certain standard constructs always
resolve correctly
2016-09-30 23:26:03 -04:00
77a128ab87 Implement experimental Vulkan backend 2016-10-01 02:40:01 +10:00