Commit Graph

2281 Commits

Author SHA1 Message Date
Mai
0c19a1d87c
Merge pull request #11100 from Pokechu22/software-settings-merge
Use the same settings for the software renderer as other backends
2022-09-29 09:05:51 -04:00
Pokechu22
b90d23158f Software: Fix mipmaps and uneven strides in SWTexture
I think this is only used for texture dumping, but this resolves some failed assertions and glitchy results.
2022-09-26 19:43:57 -07:00
Pokechu22
a6c00c7633 D3D12: Fix backend multithreading incorrectly being marked as supported 2022-09-26 19:24:52 -07:00
Pokechu22
56fce3ba8a Software: Remove dedicated texture/frame dumping infrastructure
Texture dumping can already be done using VideoCommon's system (and in fact the same setting already enabled *both* of these). Dumping objects/TEV stages/texture fetches doesn't currently have an equivalent, but could be added to the FIFO player instead.
2022-09-26 18:25:54 -07:00
TellowKrinkle
ee692abbe1 VideoBackends:Metal: Use BitField for stuffing bits in pipeline ids
Also removes cullmode all handling, it's handled in CPU and DX11 backend doesn't specially handle it either
2022-09-20 01:45:18 -05:00
TellowKrinkle
1eb3aaa548 VideoCommon: Use std::array in PortableVertexDeclaration 2022-09-19 16:28:24 -05: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
dae56a24b8 VideoBackends:D3D12: Dynamic vertex loader support 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
7edc8b4e79 VideoBackends:Metal: Don't set primitive on ubershaders 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
d3dae1cd7e VideoBackends:Metal: Dynamic vertex loader support 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
2dfe91336a
Merge pull request #10549 from Pokechu22/sw-tev-enum-map
Refactor various bits of graphics code for readability
2022-09-08 09:42:12 -07:00
Merry
362167fde5 MTLObjectCache: Correct signature of equality operator
Not doing so produces a warning in clang:
    ISO C++20 considers use of overloaded operator '!=' (with operand types
    'Metal::DepthStencilSelector' and 'Metal::DepthStencilSelector') to be
    ambiguous despite there being a unique best viable function with
    non-reversed arguments

The underlying reason for this warning is an incorrect method signature.
2022-08-29 21:23:23 +01:00
Pokechu22
5ef8a7973e BPMemory: Make TevKSel more clear
It stores both the konst selection value for alpha and color channels (for two tev stages per ksel), and half of a swap table row (there are 4 total swap tables, which can be used for swizzling the rasterized color and the texture color, and indices selecting which tables to use are stored per tev stage in the alpha combiner).  Since these are indexed very differently, the old code was hard to follow.
2022-08-29 11:10:05 -07:00
Pokechu22
4206ac243b SW/Rasterizer: Use RAS1_IREF::getTexCoord and getTexMap 2022-08-29 11:10:05 -07:00
Pokechu22
ae0fcd9a9f SW/Tev: Replace Tev::SetRegColor with Tev::SetKonstColors 2022-08-29 11:10:05 -07:00
Pokechu22
3b9a048291 SW/Tev: Use std::clamp for Clamp255 and Clamp1024 2022-08-29 11:10:05 -07:00
Pokechu22
bae0f21f74 SW/Tev: Remove Tev::Init 2022-08-29 11:10:05 -07:00
Pokechu22
c9936f8c1c SW/Tev: Use EnumMap for scale/bias tables 2022-08-29 11:10:05 -07:00
Pokechu22
b02992548e SW/Tev: Use EnumMap for Reg 2022-08-29 11:10:03 -07:00
Pokechu22
2db7569463 SW/Tev: Use TevColorRef/TevAlphaRef instead of raw s16 pointers 2022-08-29 11:05:10 -07:00
Pokechu22
e04d23e086 SW/Rasterizer: Fix indirect stage using texture coordinates/maps >= 4
The masking was incorrect. This affects the main menu of The Last Avatar, though that menu also relies on copy filter functionality that is not correctly handled in the software renderer so the difference is not obvious; that game shuffles textures across all indices for some reason, so this issue would presumably result in subtle flickering.
2022-08-28 12:19:36 -07: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
3c38f5c1d2 D3DCommon: Remove unused swap chain functions
These were added in ea15080d8f (which added D3DCommon), but never were used.
2022-08-17 18:16:50 -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
OatmealDome
700162b8bd MTLUtil: Include TargetConditionals 2022-07-23 17:22:11 -04:00
OatmealDome
77f44f1600 MTLMain: Include TargetConditionals 2022-07-23 17:22:11 -04:00
OatmealDome
b32b27ae9a MTLMain: Only compile NSView manipulation code on macOS 2022-07-23 17:22:04 -04:00
OatmealDome
8ad7fa0313 MTLUtil: Return invalid for non-supported texture formats on non-macOS platforms 2022-07-23 13:53:31 -04:00
OatmealDome
7edd3aff75 MTLUtil: Don't attempt to get all GPUs on non-macOS platforms 2022-07-23 13:53:22 -04:00
OatmealDome
50d3ad58df CMakeLists: Link videometal with Foundation 2022-07-23 13:53:15 -04:00
TellowKrinkle
6559c6b8ee VideoBackends:Multiple: Grammar fixes 2022-07-21 20:44:19 -05:00
TellowKrinkle
a41345127f VideoBackends:Metal: Remove unified memory config
Not worth the extra code
2022-07-21 20:44:19 -05:00
TellowKrinkle
5065767abd VideoBackends:Metal: Avoid submitting draw calls with no vertices/indices 2022-07-21 20:44:19 -05:00
TellowKrinkle
ee3f2b8fcb VideoBackends:Metal: Implement PerfQuery 2022-07-21 20:44:19 -05:00
TellowKrinkle
c48035908c VideoBackends:Metal: Use unified memory path by default on all GPUs 2022-07-21 20:44:19 -05:00
TellowKrinkle
6ee0248eab VideoBackends:Metal: MSAA support 2022-07-21 20:44:19 -05:00
TellowKrinkle
c0fd128171 VideoBackends:Metal: Use base vertex 2022-07-21 20:44:19 -05:00
TellowKrinkle
5742ccf8de VideoBackends:Metal: Cache pipelines
Metal pipelines hold less stuff than Dolphin pipelines, so duplicates will appear
2022-07-21 20:44:19 -05:00
TellowKrinkle
e32213d031 VideoBackends:Metal: Create samplers on demand 2022-07-21 20:44:19 -05:00
TellowKrinkle
61705b05da VideoBackends:Metal: FBFetch for Intel GPUs 2022-07-21 20:44:19 -05:00
TellowKrinkle
a5ef9dfd53 VideoBackends:Metal: Use DriverDetails for bugs 2022-07-21 20:44:19 -05:00
TellowKrinkle
716c0980d7 VideoBackends: Add Metal renderer 2022-07-21 20:44:19 -05:00
JMC47
70b0b03c3c
Merge pull request #10747 from tellowkrinkle/LateUIDFixup
Add a post-cache shader UID fixup pass
2022-07-17 00:43:16 -04:00
Pokechu22
2f43889141 Software: Use hardware-verified numbers for RGB->YUV conversion 2022-07-16 00:07:10 -07:00
Pokechu22
791bd16b28 Restructure parameters to TetxureConverterShaderGen/TextureConversionShader
This will be used for later refactoring for increased accuracy.
2022-07-16 00:07:10 -07: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