Commit Graph

5172 Commits

Author SHA1 Message Date
c34b3ae390 VideoCommon: refactor drawing into its own function 2024-01-27 14:45:34 -06:00
3e3967ff94 VideoCommon: refactor the custom pipeline logic in the graphics mod action into a separate class, so it is reusable 2024-01-27 00:12:49 -06:00
c3652a7129 Merge pull request #12532 from lioncash/json
GraphicsMod/ShaderAsset: Lessen object churn a little bit
2024-01-26 18:52:52 +01:00
Mai
a553308775 Merge pull request #12443 from iwubcode/custom_pipeline_action_material_cubemap
VideoCommon: update custom pipeline action to support a variety of texture samplers, support for materials, and more!
2024-01-26 12:39:37 -05:00
7a59ecc39d GraphicsTarget: Reduce object churn a little 2024-01-24 23:00:01 -05:00
1b7da37114 GraphicsTargetGroup: Reduce object churn a little 2024-01-24 22:52:58 -05:00
24f952c12b GraphicsModFeature: Reduce object churn a little 2024-01-24 22:48:53 -05:00
0385b40bd8 GraphicsModAsset: Reduce object churn a little 2024-01-24 22:47:22 -05:00
2253d9a95d GraphicsModGroup: Mark move constructor and assignment as noexcept
Allows containers to optimize off of std::move_if_noexcept
2024-01-24 22:41:30 -05:00
0327b11e0b GraphicsModGroup: Reduce object churn
We can emplace and move to avoid doing object copies.
2024-01-24 22:40:05 -05:00
e3e20df185 GraphicsMod: Avoid some object churn
We have quite a bit of allocation churn going on here, so we can emplace
and move where appropriate to alleviate that a little.
2024-01-24 22:34:50 -05:00
7b6463ef1f ShaderAsset: Emplace value instances when possible in ToJson()
Constructs elements directly inside the container and also makes it
shorter to read in certain instances.
2024-01-24 18:47:44 -05:00
cf081e839d VideoCommon: fix compilation error in pixel shaders when per-pixel lighting isn't set for custom shaders 2024-01-23 21:50:42 -06:00
a8d45b8e55 VideoCommon: fix compilation error in uber pixel shaders when pixel shader lighting isn't set for custom shaders 2024-01-23 21:50:42 -06:00
7118fc5b7b VideoCommon: fix pixel shader compilation error that happens when uint output is defined 2024-01-23 21:50:42 -06:00
a37fd83218 VideoCommon: fix uber shader pixel compilation error that happens when uint output is defined 2024-01-23 21:50:41 -06:00
3a688aa35e VideoCommon: add function to serialize MaterialAsset to json 2024-01-23 13:01:33 -06:00
5aeadb1ef8 PostProcessing: Don't potentially leak memory in BlitFromTexture()
All release() does is relinquish the pointer, rather than free the
memory associated with it.
2024-01-23 13:34:40 -05:00
a3f9f2c7aa PostProcessing: Remove unnecessary get() calls in BlitFromTexture()
We can just use operator-> instead.
2024-01-23 13:34:16 -05:00
a40a952177 VideoCommon: add a method to calculate a default value for ShaderAsset and another to list its types 2024-01-23 11:58:32 -06:00
b5a6225e1a VideoCommon: add function to serialize ShaderAsset to json 2024-01-23 11:58:32 -06:00
ac670d99e2 VideoCommon: Only initialize Bounding Box if supported by GPU/driver. 2024-01-20 12:34:24 +01:00
95cba6be2b Core/Movie: Refactor to class, move to System.
A bit of global state remains (the `header` in `BeginRecordingInput()`) due to unclear lifetime requirements.
2024-01-15 08:05:30 +01:00
Mai
c76dee7807 Merge pull request #12285 from iwubcode/serialize_graphics_mods
VideoCommon: add ability to serialize graphics mod to json object
2024-01-13 14:15:14 -05:00
637fd49909 FifoRecorder: Move instance to System. 2024-01-12 15:06:06 +01:00
fc2ec826d4 FifoPlayer: Move instance to System. 2024-01-05 20:15:18 +01:00
07c035e659 Core/SystemTimers: Refactor to class, move to System. 2024-01-04 23:35:19 +01:00
1073722cdf Revert "VideoCommon: revert max pixel shader samplers back to 8 for Android devices."
This reverts commit 79648e1c24.
2024-01-03 18:43:44 -06:00
f1d446da3f Merge pull request #12452 from Tilka/efb24
VideoCommon: apply "force 24-bit color" to EFB-to-VRAM copies as well
2023-12-29 03:51:59 +01:00
a23cf2121d VideoCommon/PixelEngine: Generify lock guards
We don't need to specify the type of the mutex being passed in.
2023-12-22 14:19:29 -05:00
0505f057ca VideoCommon/PixelEngine: Remove global system accessor in UpdateInterrupts()
Now that the system instance is passed through, this is no longer necessary.
2023-12-22 14:19:29 -05:00
e539dbba4c VideoCommon/PixelEngine: Passthrough system instance in constructor
Simplifies the interface in terms of usage
2023-12-22 14:19:26 -05:00
8d4575cfd8 Merge pull request #12454 from lioncash/proc
VideoCommon/CommandProcessor: Pass system instance through constructor
2023-12-21 17:46:28 +00:00
b669580aeb VideoCommon: handle asset memory going over reserved limit correctly by erroring when the memory is exceeded and not allowing more assets to load until memory is released 2023-12-21 01:05:56 -06:00
79648e1c24 VideoCommon: revert max pixel shader samplers back to 8 for Android devices.
It was reported that some games (Zelda Wind Waker and Zelda Twilight Princess but others may also exhibit the issue) have graphical issues with the max pixel samplers set to 16 on some Android devices (ex: Pixel6); since this was increased for a performance heavy feature (custom shaders) just disable it for now.  In the future, this could be handled more elegantly
2023-12-21 00:36:44 -06:00
f97b2d472a VideoCommon/CommandProcessor: Pass system instance through constructor
Makes the use of the interface a little less noisy, especially given
how much of the interface depends on an instance being present.
2023-12-20 09:02:53 -05:00
fcfcf14e07 VideoCommon: when loading a texture asset, set sampler to linear sampler if the texture type is not defined and the 2d texture is assumed 2023-12-19 21:51:42 -06:00
ae758f489a VideoCommon: update custom pipeline action to support a variety of texture samplers (2D, 2D array, and cube maps) 2023-12-19 21:51:42 -06:00
ddb4566a41 VideoCommon: apply "force 24-bit color" to EFB-to-VRAM copies as well 2023-12-20 02:25:07 +00:00
b0d244b772 VideoCommon/Fifo: Pass system instance through FifoManager constructor
Given how many member functions make use of the system instance,
it's likely just better to pass the system instance in on construction.

Makes the interface a little less noisy to use.
2023-12-18 22:03:25 -05:00
715a551dac Merge pull request #12170 from Filoppi/custom_aspect_ratio
Add support for custom aspect ratios
2023-12-18 05:19:06 +01:00
a6dfeed318 Video: make the "Auto" resolution setting also follow the max res setting, to avoid trying to create texture bigger than the maximum supported one 2023-12-18 02:00:25 +02:00
ff03189a60 Video: fix auto resolution scale calculations 2023-12-18 02:00:25 +02:00
fdd1934f12 Video: fix Auto Resolution Scale not updating when the window was resized.
Also fixes the widescreen hack not fully updating when the aspect ratio setting changed on the spot.
2023-12-18 02:00:25 +02:00
b3aa6ad93b Video: implement custom aspect ratio support (already exposed to Qt).
This also renamed some variables/functions.
2023-12-18 02:00:24 +02:00
f96bea95d8 Video: rename Presenter::SetWindowSize() 2023-12-18 00:28:15 +02:00
24004af814 Video: polish aspect ratio related code comments to make it clearer 2023-12-18 00:28:14 +02:00
Mai
bcd74a81a9 Merge pull request #12370 from iwubcode/more_samplers
VideoBackends / VideoCommon: update max pixel shader samplers from 8 to 16
2023-12-17 14:50:23 -05:00
Mai
0125b5182f Merge pull request #12409 from iwubcode/custom_material_graphics_mod_action_data
VideoCommon: prepare graphics mods for custom shader material data
2023-12-17 14:42:34 -05:00
Mai
b27c15fab6 Merge pull request #12382 from iwubcode/shader_asset_default_value
VideoCommon: update shader asset to provide a variant default value
2023-12-17 14:41:55 -05:00