Commit Graph

4584 Commits

Author SHA1 Message Date
TellowKrinkle c08de82e90 VideoBackends:Metal: Bring back unified memory config
Turns out it was helpful.  (Most improvement in ubershaders.)  This time with much better auto mode.
2022-10-08 04:46:05 -05:00
TellowKrinkle 274d4679ca VideoBackends:Multiple: More GPUs with broken subgroup ops 2022-10-08 04:44:48 -05:00
Pokechu22 e8221d7948 Common/PointerWrap: Remove DoPOD
This was added in 385d8e2b15, but became somewhat redundant with Do in 4c7bbd96e4, and completely redundant now that std::is_trivially_copyable_v is well-supported.
2022-10-06 11:25:36 -07:00
Robin Kertels 779fe13e62
VideoCommon: Update EFB peek cache on draw done and tokens
Massively improves performance in Mario Galaxy on Android.
2022-10-01 18:08:38 +02:00
JMC47 68eda7f887
Merge pull request #11084 from K0bin/qcom-workaround
Vulkan: Workaround slow vkCmdCopyImageToBuffer on QCom
2022-09-30 15:33:00 -04:00
Robin Kertels 81c817c54d
VideoBackends:Vulkan: Workaround slow vkCmdCopyImageToBuffer on QCom driver 2022-09-30 21:13:42 +02:00
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 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
Pokechu22 39569392bd VideoCommon: Add statistics for draw done and token commands 2022-09-26 16:19:54 -07:00
Admiral H. Curtiss b7855a3a56
Merge pull request #11073 from Hibyehello/Fix-Metal-init
Add Metal as backend option with Vulkan Disabled
2022-09-23 04:21:23 +02:00
JMC47 22197c09a3
Merge pull request #10781 from tellowkrinkle/UberVertexLoader
VideoCommon: Add dynamic vertex loader for ubershaders to reduce pipeline count
2022-09-20 17:14:07 -04:00
TellowKrinkle 1eb3aaa548 VideoCommon: Use std::array in PortableVertexDeclaration 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 99533d2840 VideoCommon: Add separate pipeline usage for UberShaders 2022-09-19 16:28:24 -05:00
TellowKrinkle d289e9c51c VideoCommon: Compile a few extra pipelines 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
Josh ef13a54b0a
VideoBackends - Enable Metal without Vulkan 2022-09-19 11:28:34 -05:00
Pokechu22 d80201a57f VertexLoaderARM64: Fix direct normal+tangent+binormal with index3 set
Fixes https://bugs.dolphin-emu.org/issues/12952
2022-09-18 23:33:24 -07:00
Pokechu22 f148de161f VertexLoaderARM64: Specify the register to use as a parameter to ReadVertex
This also means that both a register and a vertex are always specified, though right now if the register is scratch1_reg the offset is always 0.
2022-09-18 23:33:24 -07:00
Pokechu22 ad644d5e92 VertexLoaderARM64: Merge GetAddressImm into GetVertexAddr
This way it more closely matches VertexLoaderX64, and is in general easier to understand.
2022-09-18 23:33:24 -07:00
Pokechu22 9a290c3d50 VertexLoaderARM64: Always use unscaled load/store instructions
The source and destination offsets will always be less than 255, so we can get rid of a lot of the complexity by doing this.
2022-09-18 23:33:24 -07:00
Pokechu22 afe5adb74d VertexLoaderARM64: Use EnumMap for normal scales 2022-09-18 23:33:24 -07:00
Pokechu22 200676f4e3 VertexLoaderX64: Fix direct normal+tangent+binormal with index3 set
Fixes https://bugs.dolphin-emu.org/issues/12952
2022-09-18 23:33:23 -07:00
Pokechu22 5cc2f7729e VertexLoaderX64: Use EnumMap for normal scales 2022-09-18 23:33:23 -07:00
Robin Kertels 2db74e7f21
OpcodeDecoding: Get vertex size from the loader 2022-09-19 01:14:53 +02:00
Robin Kertels a6c6ec012c
VertexLoaderManager: Clean up and slightly speed up with templates 2022-09-19 01:14:49 +02:00
Robin Kertels a31e36aeb7
VertexLoaderManager: Fix backwards preprocess check
Spotted by Pokechu22.
2022-09-15 23:56:04 +02:00
Robin Kertels fdcd2b7d00
VertexLoader: Inline GetSize 2022-09-15 12:50:15 +02:00
Robin Kertels 8aa214453a
VertexLoader: Optimize GetVertexSize
GetComponentSizes was unused, so we simplify this and get rid
of the branches.
2022-09-15 02:47:23 +02:00
Admiral H. Curtiss 85bd57df0e
Merge pull request #11007 from PEmu2/enj
Edit error message
2022-09-08 20:00:18 +02:00
Admiral H. Curtiss 45c4aa288a
Merge pull request #10881 from iwubcode/graphics-mod-draw-fb-texture-names
VideoCommon: fix graphics target texture names for efb/xfb
2022-09-08 19:56:49 +02: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 b0717607b2 TextureInfo: Reorder members in constructor
m_stage is initialized last
2022-08-29 21:16:21 +01:00
Merry 3323375efb GraphicsModManager: Reorder DecoratedAction members to initialization order
m_action_impl is initialized before m_mod in constructor
2022-08-29 21:15:49 +01:00
Pokechu22 698def66ff Fifo analyzer: Fix various XF mistakes
* 'hangle' was a typo
* Light colors include an alpha value, so they should be 8 characters, not 6
* The XF command format adds 1 to the count internally (so 0 is one word), but we need to subtract that back to produce a valid command
* XFMEM_POSTMATRICES was calculating the row by subtracting XFMEM_POSMATRICES (POS vs POST), resulting in incorrect row numbering
2022-08-29 11:10:05 -07:00
Pokechu22 3fb09e3297 Fifo analyzer: Improve some BP descriptions
Mainly, the improvements are passing in the current command ID so that e.g. stage numbers can be directly included, instead of saying 0/1 or even/odd.
2022-08-29 11:10:05 -07:00
Pokechu22 546f9952a2 UberShaderPixel: Fix typo 2022-08-29 11:10:05 -07: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 f21798b9b6 BPMemory: Use even/odd in TwoTevStageOrders instead of 0/1 2022-08-29 11:10:05 -07:00
Pokechu22 e43f02c752 BPMemory: Improve consistency of hex offset comments
I search for these somewhat often with control+f, but tend to default to adding a 0x prefix, which means I don't find them until I remove it.
2022-08-29 11:10:05 -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
PEmu2 b516ae12ca
Edit error message
Edit error message to be less sarcastic. I doubt many users appreciate this when Dolphin has just crashed.
2022-08-22 19:52:13 -07:00
JosJuice 724bd3e597 VideoCommon: Fix OpenGL ES GPU texture decoding 2022-08-20 23:21:23 +02:00
CasualPokePlayer ab8a8e6f84 Fix crashes in dual core mode on a PI_FIFO_RESET 2022-08-18 13:38:37 -07:00
iwubcode 0b5f7d2c5f VideoCommon: fix graphics target not properly setting 'draw_started' texture names for efb/xfb 2022-08-06 12:01:33 -05:00
Scott Mansell ebf95370ef
Merge pull request #10946 from Pokechu22/remove-iLog
VideoCommon: Remove old iLog field
2022-08-05 22:42:09 +12:00
Pokechu22 354530cf61 VideoCommon: Remove old iLog field
Prior to 7854bd7109, this was used by the debugger for the OpenGL and D3D9 plugins to control logging (via PRIM_LOG and INFO_LOG/DEBUG_LOG in VideoCommon code; PRIM_LOG was changed in 77215fd27c), and also framedumping (removed in 64927a2f81 and 2d8515c0cf), shader dumping (removed in 2d8515c0cf and this commit), and texture dumping (removed in 54aeec7a8f). Apart from shader dumping, all of these features have modern alternatives, and shader source code can be seen in RenderDoc if "Enable API Validation Layers" is checked (which also enables source attachment), so there's no point in keeping this around.
2022-08-04 15:49:39 -07:00
Pokechu22 20a2a2174d Vulkan: Call setSourceFile in addition to addSourceText 2022-08-04 15:09:12 -07:00
Pokechu22 8129874d11 Sanitize and use increased precision when normalizing light directions
This normalization was added in 02ac5e95c8, and changed to use floats in 4bf031c064.  The conversion to floats means that sometimes there is insufficient precision for the normalization process, which results in values of NaN or infinity.  Performing the whole process with doubles prevents that, but games also sometimes set the values to NaN or infinity directly (possibly accidentally due to the values not being initialized due to them not being used in the current configuration?).

The version of Mesa currently in use on FifoCI (20.3.5) has issues with NaN.  Although this bug has been fixed (b3f3287eac in 21.2.0), FifoCI is stuck with the older version.

This change may or may not be incorrect, but it should result in the same behavior as already present in Dolphin, while working around the Mesa bug.
2022-08-04 08:52:44 -07:00
Shawn Hoffman fec61f89a3 Timer: protect usages of ms timers from rollover 2022-08-02 22:24:06 -07:00