Admiral H. Curtiss
69db8a615f
Merge pull request #12145 from JosJuice/ubershaderpixel-uint
...
VideoCommon: Fix GLSL uint handling in UberShaderPixel
2023-08-29 12:33:54 +02:00
Admiral H. Curtiss
df120b0630
Merge pull request #12000 from Filoppi/window_res_fix
...
Video: Fix issues with the window presentation
2023-08-28 23:50:50 +02:00
JosJuice
5b112dbf2c
VideoCommon: Fix GLSL uint handling in UberShaderPixel
2023-08-28 21:17:01 +02:00
Admiral H. Curtiss
2502e412b3
Merge pull request #12117 from JosJuice/config-callback-cpu
...
Don't call RunAsCPUThread in config callbacks
2023-08-26 16:34:46 +02:00
Admiral H. Curtiss
5c4671f573
Merge pull request #12126 from JosJuice/small-vector
...
Move SmallVector to Common
2023-08-26 14:15:18 +02:00
JosJuice
ba99d17ac0
VideoCommon: Fix custom shader constants on GLES
2023-08-22 19:38:18 +02:00
JosJuice
6e88c44d5d
Move SmallVector to Common
...
We had one implementation of this type of data structure in Arm64Emitter
and one in VideoCommon. This moves the Arm64Emitter implementation to
its own file and adds begin and end functions to it, so that VideoCommon
can use it.
You may notice that the license header for the new file is CC0. I wrote
the Arm64Emitter implementation of SmallVector, so this should be no
problem.
2023-08-22 13:19:49 +02:00
iwubcode
55fba7c0ed
VideoCommon/GraphicsModAsset: Error out if config key is not a string.
2023-08-22 02:40:08 +02:00
iwubcode
5506121685
VideoCommon: add support to graphics mod manager to load in assets and pass it to graphics actions
2023-08-20 18:53:27 -05:00
iwubcode
6ea0d17802
VideoCommon: when graphics settings change, trigger a reload of all custom shaders
2023-08-20 18:53:27 -05:00
iwubcode
931a8aa413
VideoCommon: add milliseconds elapsed time value to pixel shaders as a uniform to be able to support animation effects in custom shaders
2023-08-20 18:53:27 -05:00
iwubcode
c7191382be
VideoCommon: add custom pipeline action
2023-08-20 18:53:27 -05:00
iwubcode
d320366954
VideoCommon: add custom shader cache to VertexManagerBase, supporting custom pixel shaders by replacing the existing pipeline with a modified one
2023-08-20 18:53:27 -05:00
iwubcode
bedbf2b8c6
VideoCommon: add custom shader cache
2023-08-20 18:53:27 -05:00
iwubcode
dbaf24ef09
VideoCommon: add data needed to support custom pixel shaders to graphics mod actions
2023-08-20 18:53:27 -05:00
iwubcode
4283d76718
VideoCommon: uber pixel shader gen changes needed to support custom pixel shaders in graphics mods
2023-08-20 18:53:27 -05:00
iwubcode
e704385fce
VideoCommon: pixel shader gen changes needed to support custom pixel shaders in graphics mods
2023-08-20 18:53:27 -05:00
iwubcode
c3a370839a
VideoCommon: add helper functions to handle generating custom lighting code for a custom pixel shader
2023-08-20 18:53:27 -05:00
iwubcode
0da5cf60a8
VideoCommon: add custom pixel shader definition and custom shader header to shadergen common as it will be used by both the special and uber shader variant of pixel shaders
2023-08-20 18:53:27 -05:00
Filoppi
8bca9a864f
Video: The `Auto` internal resolution scaling wasn't working correctly if the window weird aspect ratios (e.g. 32:9), beacuse it would account for the the portion of the image that will show black bars into the calcuations to find the best matching resolution
2023-08-18 02:14:00 +03:00
Filoppi
6c7f34d5da
Video: The `Auto-Adjust Window Size` setting was calculating the window size based on the resolution of the window in the previous frame if we used the "stretch" aspect ratio setting, so it's result would be self influence in a loop and behave unreliably (e.g. when changing resolution between Auto/Native/2x the automatic window scaling would behave randomly)
2023-08-18 02:14:00 +03:00
Filoppi
cb34d1aafe
Video: There was always a black line around one of the 4 edges (top/left/bottom/right) of the window because the final output size wasn't calculated right (unless the aspect ratio was set to stretch)
2023-08-18 02:14:00 +03:00
Filoppi
fae3aee9e0
Video: The `% 4` that was done on the rendering resolution was only meant to be done when recording videos (due to encoding limitations) but one case was missed (this had no consequences really, as it was just in the code that automatically resizes the window). The hardcoded `4` has been replaced with `VIDEO_ENCODER_LMC` for clarity.
2023-08-18 02:14:00 +03:00
Filoppi
80b453082d
Video: fix post process shaders with parameters failing to build on OpenGL
...
This was because the shader uniforms between the pixel and vertex shaders
were willingly left different, to avoid filling the vertex shader with unnecessary
params. Turns out all backends are fine with this except OGL.
The new behaviour is now much more consistent and well explained,
the "default" shaders are the ones that always run, and the non default
ones are the user selected ones (if any).
2023-08-18 02:00:56 +03:00
Sam Belliveau
39d96a21a8
Video: Improved Tooltips & Bicubic ( #5 )
...
Edited by Filoppi
2023-08-18 02:00:56 +03:00
Sam Belliveau
ca93a5191f
Video: Added Box Resampling
...
Edited by Filoppi
2023-08-18 02:00:56 +03:00
Filoppi
2edf81cdb0
Video: implement output resampling (upscaling/downscaling) methods
2023-08-18 02:00:55 +03:00
Admiral H. Curtiss
a08792033a
Merge pull request #12103 from iwubcode/asset_load_system_time
...
VideoCommon: asset load time is now stored as a chrono system_clock time
2023-08-18 00:14:29 +02:00
JosJuice
7197e3abd0
Use structs for config callback IDs
...
This way you can't mix up regular config callback IDs and CPU thread
config callback IDs. (It would be rather bad if you did!)
2023-08-17 19:19:26 +02:00
JosJuice
71ce8bb6f0
Don't call RunAsCPUThread in config callbacks
...
In theory, our config system supports calling Set from any thread. But
because we have config callbacks that call RunAsCPUThread, it's a lot
more restricted in practice. Calling Set from any thread other than the
host thread or the CPU thread is formally thread unsafe, and calling Set
on the host thread while the CPU thread is showing a panic alert causes
a deadlock. This is especially a problem because 04072f0
made the
"Ignore for this session" button in panic alerts call Set.
Because so many of our config callbacks want their code to run on the
CPU thread, I thought it would make sense to have a centralized way to
move execution to the CPU thread for config callbacks. To solve the
deadlock problem, this new way is non-blocking. This means that threads
other than the CPU thread might continue executing before the CPU thread
is informed of the new config, but I don't think there's any problem
with that.
Intends to fix https://bugs.dolphin-emu.org/issues/13108 .
2023-08-17 19:19:25 +02:00
Admiral H. Curtiss
23ae8c439c
Merge pull request #12112 from JosJuice/hires-texture-encoding
...
VideoCommon: Fix std::filesystem::path encoding conversion
2023-08-16 18:39:18 +02:00
JosJuice
86910f406e
VideoCommon: Fix std::filesystem::path encoding conversion
...
In std::string, you can store strings using any encoding, but in Dolphin
we have decided to use UTF-8. The problem is that if you convert between
std::string and std::filesystem::path using the built-in methods, the
standard library will make up its own assumption of what encoding you're
using in the std::string. On most OSes this is UTF-8, but on Windows
it's whatever the user's code page is.
What I believe is the C++ standard authors' intended solution to this is
to use std::u8string instead of std::string, but that's a big hassle to
move over to, because there's no convenient way to convert between
std::string and std::u8string. Instead, in Dolphin, we have added helper
functions that convert between std::string and std::filesystem::path in
the manner we want. You *always* have to use these when converting
between std::string and std::filesystem::path, otherwise we get these
kinds of encoding problems that we've been having with custom textures.
Fixes https://bugs.dolphin-emu.org/issues/13328 .
2023-08-16 09:56:56 +02:00
takayhan-AMD
b969282b72
Remove out-dated hack of AMD driver issue WRT dual-source blending output index.
2023-08-15 23:58:29 -04:00
iwubcode
eeb73460ab
VideoCommon: asset load time is now stored as a chrono system_clock time, so that times can be fabricated in a future feature (without creating a file to do so)
2023-08-15 22:02:28 -05:00
Dentomologist
720191d1f7
AbstractFramebuffer: Fix Android reorder-ctor warning
...
Move declaration of m_additional_color_attachments so its initialization
order matches that of the constructor.
2023-08-12 20:48:47 -07:00
iwubcode
246b7c5bdb
VideoCommon: fix regression with texture load order where the custom texture code was always updating the asset map for each texture with each entry, making it so the last value actually would be loaded instead of the first
2023-08-11 00:36:41 -05:00
JMC47
5512d19d4b
Merge pull request #12061 from iwubcode/cubemap_backends_only
...
VideoBackends: add support for cube maps for OGL, Vulkan, and D3D
2023-08-10 18:36:48 -04:00
iwubcode
dca7c67105
VideoCommon: update NetplayChatUI's chat message input to use a hidden label. This avoids an error thrown by imgui
2023-07-29 00:27:07 -05:00
iwubcode
350e51951b
VideoCommon: update imgui to 1.89.7 (and implot to 0.15); fix issues with upgrade; keep the demo code in case someone wants to reference it but don't compile it by enabling 'IMGUI_DISABLE_DEMO_WINDOWS' in config
2023-07-27 11:47:34 -05:00
Admiral H. Curtiss
a76cc146e1
Merge pull request #12055 from iwubcode/skip_dump_async
...
VideoCommon: skip the texture dump if a custom texture is available, regardless if it is loaded or not
2023-07-23 19:53:25 +02:00
iwubcode
fd74244339
VideoCommon: add custom texture message to provide a dirty means of debugging whether custom textures are installed correctly
2023-07-21 20:13:27 -05:00
iwubcode
e892b7f1ac
VideoBackends: add support for cube maps for OGL, Vulkan, and D3D
2023-07-21 19:09:40 -05:00
iwubcode
f7e78742cf
VideoCommon: skip the texture dump if the texture is using a custom texture, regardless of whether or not it is loaded yet
2023-07-19 23:44:41 -05:00
iwubcode
79f202ea5c
VideoCommon: fix some compiler warnings for CustomAsset. FreeBSD compiler complained about a defaulted move constructor due to the mutex being implicitly deleted. Additionally, the const owning library deleted the copy constructor.
2023-07-16 19:45:55 -05:00
iwubcode
5740be15f9
VideoCommon: initialize load info variables
2023-07-16 12:56:03 -05:00
iwubcode
77511e8e7c
VideoCommon: add material asset. A material is similar to other graphics engines where it provides data to be used in conjunction with a shader asset to generate a runtime AbstractShader
2023-07-09 12:21:34 -05:00
Admiral H. Curtiss
7bb04ff1dc
Merge pull request #12022 from iwubcode/texture_create_gmod_impl
...
VideoCommon: call into graphics mods create texture callback
2023-07-09 04:20:43 +02:00
Admiral H. Curtiss
0366122306
Merge pull request #12009 from iwubcode/shader_asset
...
VideoCommon: add a pixel shader asset
2023-07-03 03:24:11 +02:00
iwubcode
a2ad3ca6f7
VideoCommon: don't do pointer copies during graphics mod callback iteration
2023-07-02 13:58:07 -05:00
iwubcode
0539bb4a3e
VideoCommon: call into graphics mods create texture callback, providing additional asset dependencies that trigger the texture to be reloaded
2023-07-02 13:45:09 -05:00