Robin Kertels
3ffbf94b2a
VideoBackends:Vulkan: Set up VMA
...
Co-authored-by: iwubcode <iwubcode@users.noreply.github.com>
2022-10-23 02:54:35 +02:00
TellowKrinkle
6fd933915b
VideoBackends:Vulkan: Improve backend multithreading
...
Makes the multiple threads actually able to run at the same time
2022-10-17 00:05:35 -05:00
Admiral H. Curtiss
10f973a87f
Merge pull request #11122 from K0bin/descriptor-overhaul
...
VideoBackends:Vulkan: Allocate descriptor pools as needed
2022-10-17 04:25:35 +02:00
Robin Kertels
6992b0d8e1
VideoBackends:Vulkan: Allocate descriptor pools as needed
2022-10-16 17:04:35 +02:00
Pokechu22
ae7b14887b
Remove varargs support from LOG_VULKAN_ERROR
...
Nothing currently uses it. It could theoretically be replaced with fmt support, but I don't think the LOG_VULKAN_ERROR macro is that useful and it'd be better to replace it with regular logging instead.
2022-10-12 16:50:51 -07:00
Robin Kertels
332824f7d5
VideoBackends:Vulkan: Fix command buffer cleanup
2022-10-08 21:40:33 +02:00
TellowKrinkle
274d4679ca
VideoBackends:Multiple: More GPUs with broken subgroup ops
2022-10-08 04:44:48 -05:00
Admiral H. Curtiss
eea31db781
Vulkan/CommandBufferManager: Show error code in PanicAlerts.
2022-10-04 19:50:23 +02:00
JMC47
c196c47e81
Merge pull request #11090 from K0bin/submit-rework
...
Vulkan: Raise number of command buffers
2022-09-30 20:15:25 -04:00
Robin Kertels
e5fb9c9adf
VideoBackends:Vulkan: Raise number of command buffers
...
Avoid waiting for earlier submissions when we flush more often.
The vertex manager will flush more often if the game accesses the EFB
on the CPU, to give the GPU a head start.
2022-10-01 01:26:04 +02:00
Robin Kertels
fba7d35f94
VideoBackends:Vulkan: Associate descriptor pool with frame rather than command buffer
2022-10-01 01:26:04 +02:00
Robin Kertels
ed75a58061
VideoBackends:Vulkan: Decouple available command buffers from frames in flight
2022-10-01 01:26:04 +02:00
Robin Kertels
e8fa867f14
VideoBackends:Vulkan: Only synchronize with submission thread when necessary
...
We only need to synchronize with the submission thread
when submitting on the GPU thread or when waiting for a command buffer.
2022-10-01 01:26:04 +02:00
Robin Kertels
2e6d8d6575
VideoBackends:Vulkan: Fix validation error around surface_capabilities2
2022-10-01 01:26:03 +02:00
Robin Kertels
81c817c54d
VideoBackends:Vulkan: Workaround slow vkCmdCopyImageToBuffer on QCom driver
2022-09-30 21:13:42 +02:00
TellowKrinkle
28b31b8327
VideoBackends:Vulkan: Make dynamic vertex loader optional
...
Makes it easier to disable in the future if support for VK_EXT_vertex_input_dynamic_state is added
2022-09-19 16:28:24 -05:00
TellowKrinkle
936b4d5d0d
VideoBackends:Vulkan: Dynamic vertex loader support
2022-09-19 16:28:24 -05:00
TellowKrinkle
99533d2840
VideoCommon: Add separate pipeline usage for UberShaders
2022-09-19 16:28:24 -05:00
TellowKrinkle
4c629c2bee
VideoCommon: Add dynamic vertex loader to ubershaders
2022-09-19 16:28:23 -05:00
Pokechu22
0cced44142
Use `__VA_OPT__(, ) __VA_ARGS__` instead of `##__VA_ARGS__`
...
Per https://en.cppreference.com/w/cpp/preprocessor/replace#.23_and_.23.23_operators the `##` behavior is a nonstandard extension; this extension seems to be supported by all compilers we care about, but IntelliSense in visual studio doesn't correctly handle it, resulting in false errors in the IDE (but not when compiling).
Per https://en.cppreference.com/w/cpp/preprocessor/replace#Function-like_macros C++20 introduced a workaround, where `__VA_OPT__(, )` generates a comma if and only if `__VA_ARGS__` is non-empty.
This PR replaces all occurrences, with the exception of Externals, DSPSpy (which is not likely to be edited in MSVC and does not target C++20 currently), and JitArm64_Integer.cpp (which uses `Function(__VA_ARGS__)`, and thus does not ever need a comma).
2022-08-23 12:09:57 -07:00
Pokechu22
da7aded00d
Vulkan: Remove unused swap chain functions
...
These were added in 5e29508b8f
and 1f2d43c870
, but were replaced with CONFIG_CHANGE_BIT_VSYNC and CONFIG_CHANGE_BIT_STEREO_MODE in e4b205c769
.
2022-08-17 18:16:17 -07:00
TellowKrinkle
6559c6b8ee
VideoBackends:Multiple: Grammar fixes
2022-07-21 20:44:19 -05:00
TellowKrinkle
6ee0248eab
VideoBackends:Metal: MSAA support
2022-07-21 20:44:19 -05:00
TellowKrinkle
716c0980d7
VideoBackends: Add Metal renderer
2022-07-21 20:44:19 -05:00
TellowKrinkle
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
JMC47
cce6133ef6
Merge pull request #10749 from tellowkrinkle/IntelUbershaders
...
VideoCommon: Fix ubershaders on MoltenVK Intel
2022-07-10 19:35:55 -04:00
OatmealDome
1c6a0073d2
ShaderCompiler: Use compute shader header in compute shaders
2022-07-09 19:01:58 -04:00
iwubcode
dda1479ecf
VideoBackends / VideoCommon: refactor Vulkan to use new SPIRV functionality
2022-06-24 18:09:53 -05:00
TellowKrinkle
26529a31ab
VideoCommon: Fix SSBO layout and remove associated "bug"
2022-06-16 20:26:11 -05:00
TellowKrinkle
db6e928c8d
VideoCommon: Fix Intel GPUs on Metal/Vulkan locking up in ubershaders
2022-06-14 00:48:47 -05:00
OatmealDome
803a0de5a4
VKMain: Remove check for macOS 10.14
2022-06-01 22:57:56 -04:00
Admiral H. Curtiss
580c721c82
cmake: Don't use PCH with Qt6.
2022-05-22 01:19:44 +02:00
JMC47
c0488de482
Merge pull request #10251 from Pokechu22/negative-scissor
...
Rework scissor handling
2022-04-24 15:00:42 -04:00
Pokechu22
8e7c848425
Merge pull request #10601 from Pokechu22/vulkan-shader-compile-error
...
Vulkan: Improve shader compile error handling
2022-04-24 11:43:10 -07:00
JMC47
c42392c565
Merge pull request #10290 from OatmealDome/m1-earlyz-bug
...
DriverDetails: Add broken discard with early-Z bug on Apple Silicon GPUs
2022-04-24 13:30:04 -04:00
Pokechu22
04fdadd9d5
VideoCommon: Rename norm0/norm1/norm2 to normal/tangent/binormal
2022-04-22 16:54:36 -07:00
Pokechu22
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
Pokechu22
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
OatmealDome
259a5fc7c0
DriverDetails: Add broken discard with early-Z bug on Apple Silicon GPUs
2022-04-20 14:56:34 -04:00
OatmealDome
e7f5e5172c
DriverDetails: Introduce new VENDOR_APPLE for Apple GPUs
2022-04-19 10:55:27 -04:00
OatmealDome
bad0283ff7
VKPipeline: Add shader blending support
2022-04-19 10:55:26 -04:00
Pokechu22
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
Mai M
40cda23491
Merge pull request #10404 from iwubcode/vulkan_headers_update
...
Externals / Vulkan: update Vulkan headers to v1.3.204
2022-02-04 01:04:29 -05:00
JMC47
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
OatmealDome
4c7fe45475
VKShader: Only set shader name if supported
2022-01-31 01:17:40 -05:00
OatmealDome
28f3cb3d97
VKTexture: Only set texture name if supported
2022-01-31 01:17:40 -05:00
OatmealDome
a8ce71fcd4
VulkanContext: Set bSupportsSettingObjectNames based on extension initialization result
2022-01-31 01:17:40 -05:00
OatmealDome
801897467c
VulkanEntryPoints: Make vkSetDebugUtilsObjectNameEXT an instance function
2022-01-31 01:17:40 -05:00
OatmealDome
a720083a7e
Revert "Vulkan: Check for vkSetDebugUtilsObjectNameEXT before using it"
...
This reverts commit 2ab66390f8
.
2022-01-31 01:17:40 -05:00
iwubcode
8e3dbe9671
Externals / Vulkan: update Vulkan headers to v1.3.204. Fix default present mode in Vulkan swap chain
2022-01-29 00:47:51 -06:00
Léo Lam
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
JosJuice
2ab66390f8
Vulkan: Check for vkSetDebugUtilsObjectNameEXT before using it
...
Fixes a crash that has been present on Android (and probably also
macOS) since f6883a0
.
2022-01-03 20:17:57 +01:00
OatmealDome
9ff7f80aa0
VulkanContext: Ensure present queue family is valid before incrementing queueCreateInfoCount
2021-12-28 21:18:47 -05:00
OatmealDome
08396c56e5
VideoConfig: Add bool for sampler LOD bias support
2021-12-25 15:16:27 -05:00
JMC47
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
Pokechu22
27cb704466
Eliminate VarType for ComponentFormat
2021-12-18 15:21:48 -08:00
Pokechu22
2025763420
Treewide: Adjust order of includes
2021-12-10 14:49:57 -08:00
OatmealDome
f87f704f43
ShaderCompiler: Add helpers for Metal framebuffer fetch
2021-12-06 22:36:39 -05:00
OatmealDome
40eb071562
ShaderCompiler: Add new helper define for input attachment binding
2021-12-06 22:36:39 -05:00
OatmealDome
8e72136eeb
VulkanContext: Set Apple GPUs as supporting framebuffer fetch
2021-11-24 17:52:24 -05:00
Pokechu22
1adff1c467
VideoCommon: Skip textureQueryLevels if it doesn't exist
2021-11-17 21:28:39 -08:00
Pokechu22
51e3334526
VideoCommon: Use coarse derivatives for Manual Texture Sampling if possible
2021-11-17 20:04:34 -08:00
Pokechu22
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
OatmealDome
2209dc0355
MoltenVK: Use an external project instead of a pre-compiled dylib
...
Also, update MoltenVK to match Vulkan SDK 1.2.189.
2021-11-13 11:43:23 -08:00
Pokechu22
04d8cdfe88
Convert LOG_TYPE and LOG_LEVELS to enum class
2021-10-24 11:48:36 -07:00
Pokechu22
78bfd25964
Fix all uninitialized variable warnings (C26495)
2021-10-13 12:32:16 -07:00
Léo Lam
ff1cb5a1c0
Merge pull request #9803 from Techjar/bbox-videocommon
...
VideoCommon: Abstract bounding box
2021-10-08 22:24:38 +02:00
Techjar
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
OatmealDome
a256c11d2f
DriverDetails: Add broken dual source blending bug to MoltenVK on Intel GPUs
2021-09-20 19:14:41 -04:00
OatmealDome
aa64f7f14f
VulkanContext: Don't assume anv for Intel GPUs on macOS
2021-09-20 18:57:19 -04:00
OatmealDome
7e8f5208fe
VulkanContext: Disable subgroup reduction on macOS with AMD GPUs
2021-09-16 23:32:10 -04:00
iwubcode
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
OatmealDome
d453390c48
ShaderCompiler: Attach source text to SPIR-V for debuggers like RenderDoc
2021-08-05 03:04:18 -04:00
Pierre Bourdon
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
Techjar
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
Techjar
2f1b639f0a
VideoCommon: Restore BBox* forwarding functions
2021-05-31 18:01:47 -04:00
Techjar
a24e78b3cf
VideoCommon: Remove BBox* forwarding functions
2021-05-29 01:45:21 -04:00
Techjar
0f17990137
VideoCommon: Split BBox* functions into common and backend implementation variants
...
This will allow for some aspects of bounding box to be handled in
VideoCommon instead of individual backends.
2021-05-22 01:11:57 -04:00
JosJuice
8a0f5ea04a
Remove all remaining volatile qualifiers
2021-05-15 09:52:04 +02:00
Connor McLaughlin
b24e3f2f1a
Vulkan: Work around AMD exclusive fullscreen bug (21.3+)
2021-04-12 12:41:17 +10:00
Pokechu22
70f9fc4e75
Convert BPMemory to BitField and enum class
...
Additional changes:
- For TevStageCombiner's ColorCombiner and AlphaCombiner, op/comparison and scale/compare_mode have been split as there are different meanings and enums if bias is set to compare. (Shift has also been renamed to scale)
- In TexMode0, min_filter has been split into min_mip and min_filter.
- In TexImage1, image_type is now cache_manually_managed.
- The unused bit in GenMode is now exposed.
- LPSize's lineaspect is now named adjust_for_aspect_ratio.
2021-03-06 19:27:19 -08:00
Shawn Hoffman
500a694ca8
msbuild: bundle all dolphin "core" code into single library
2021-01-27 14:29:49 -08:00
Shawn Hoffman
d7fd892fde
normalize common filenames in VideoBackends/Vulkan
2021-01-27 14:29:48 -08:00
Lioncash
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
Jonathan Marek
a20e69ff51
Vulkan: fix validation error in bSupportsGeometryShaders=false case
...
In CreateDescriptorSetLayouts(), one less dynamic binding is created when
bSupportsGeometryShaders=false. Reduce the dynamicOffsetCount argument by
one in that case. Avoids this validation error:
Attempting to bind 3 descriptorSets with 2 dynamic descriptors, but
dynamicOffsetCount is 3. It should exactly match the number of dynamic
descriptors. The Vulkan spec states: dynamicOffsetCount must be equal to
the total number of dynamic descriptors in pDescriptorSets
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
[Applied clang-format]
Signed-off-by: Léo Lam <leo@leolam.fr>
2020-11-20 12:23:34 +01:00
Lioncash
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
JosJuice
28aa04312c
Common/LinearDiskCache: Replace std::fstream with File::IOFile
...
File::IOFile is better suited to this type of task.
Split out from a future PR.
2020-11-05 00:31:17 +01:00
Jordan Woyak
d2f80a4595
Merge pull request #9138 from martymac/VK_NULL_HANDLE-fix
...
Fix build on FreeBSD i386 - nullptr vs VK_NULL_HANDLE
2020-11-03 08:28:11 -06:00
Ganael Laplanche
d456e2e391
Resolve VkDeviceMemory/nullptr type mismatch to fix build on FreeBSD i386
2020-11-03 07:47:43 +01:00
Techjar
0c01712d13
DriverDetails: Remove bug for broken GPU Texture Decoding
2020-10-08 10:13:40 -04:00
Stenzek
24bb947eff
Vulkan: Use VK_LAYER_KHRONOS_validation for validation
...
VK_LAYER_LUNARG_standard_validation is deprecated.
2020-10-01 17:21:46 +10:00
Techjar
69358b2186
VideoBackends: Disable GPU Texture Decoding under MoltenVK
...
It's broken and causes spectacular artifacts and crashes.
2020-09-07 17:28:05 -04:00
JosJuice
6eefc3c524
Make default graphics backend not show up as empty
...
Fixes https://bugs.dolphin-emu.org/issues/12245 .
I considered making a change to DolphinQt instead of
the core, but then additional effort would've been
required to add the same fix to the Android GUI once
we start using the new config system there.
2020-09-06 12:56:45 +02:00
Shawn Hoffman
6ef9d70701
name some threads
2020-08-22 17:22:07 -07:00
LC
4a34b74e68
Merge pull request #9035 from shuffle2/vs-pretty
...
misc vcxproj cleanup
2020-08-22 20:13:25 -04:00
Shawn Hoffman
cff4806d8d
windows: fix build if pch were to be disabled
2020-08-22 16:18:24 -07:00
Shawn Hoffman
2f47f486af
msbuild: re-enable standalone vcxproj processing
2020-08-22 16:17:50 -07:00
Shawn Hoffman
94bf48b67c
msbuild: refactor stuff out of project files (for dolphin)
2020-08-22 16:17:50 -07:00
Filip Gawin
0ede5d1537
Use range loop (if possible)
2020-07-18 18:29:16 -05:00
orbea
ba2d04b793
Externals: Fix build failures with the newer glslang.
...
v2: Don't include glslang project wide.
2020-05-30 18:54:21 -07:00