dolphin/Source/Core/VideoCommon
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
..
Assets VideoCommon: Fix std::filesystem::path encoding conversion 2023-08-16 09:56:56 +02:00
GraphicsModSystem 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
AbstractFramebuffer.cpp VideoBackends: add support to allow rendering to multiple output textures 2023-06-03 14:52:31 -05:00
AbstractFramebuffer.h AbstractFramebuffer: Fix Android reorder-ctor warning 2023-08-12 20:48:47 -07:00
AbstractGfx.cpp Video: implement color correction to match the NTSC and PAL color spaces (and gamma) that GC and Wii targeted. 2023-06-19 01:34:42 +03:00
AbstractGfx.h VideoBackends: support multiple compute images for some backends (D3D, OGL, Vulkan) 2023-06-28 17:15:31 -05:00
AbstractPipeline.h Fix uninitialized variable warnings (C26495) 2023-02-15 19:18:39 -08:00
AbstractShader.h treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
AbstractStagingTexture.cpp Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
AbstractStagingTexture.h treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
AbstractTexture.cpp Merge pull request #11901 from Filoppi/add_texture_types 2023-06-08 15:28:15 +02:00
AbstractTexture.h Add compression option for texture dumps. 2023-06-01 16:01:11 -04:00
AsyncRequests.cpp Lint fixes 2023-02-09 18:36:20 +13:00
AsyncRequests.h Fix crashes in dual core mode on a PI_FIFO_RESET 2022-08-18 13:38:37 -07:00
AsyncShaderCompiler.cpp Allow to interrupt shader precompilation by stopping emulation 2022-06-10 17:11:32 +02:00
AsyncShaderCompiler.h Allow to interrupt shader precompilation by stopping emulation 2022-06-10 17:11:32 +02:00
BPFunctions.cpp Move UseVertexDepthRange() out of Renderer 2023-02-09 18:36:20 +13:00
BPFunctions.h Resolve GCC Warnings 2022-06-30 15:26:48 -05:00
BPMemory.cpp treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
BPMemory.h Fifo analyzer: Improve some BP descriptions 2022-08-29 11:10:05 -07:00
BPStructs.cpp HW/VideoInterface: Refactor to class. 2023-03-11 12:50:35 +01:00
BPStructs.h treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
BoundingBox.cpp Move BoundingBox out of RenderBase 2023-01-31 19:41:24 +13:00
BoundingBox.h Move BoundingBox out of RenderBase 2023-01-31 19:41:24 +13:00
CMakeLists.txt 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
CPMemory.cpp EnumUtils: Add Common::ToUnderlying 2023-06-17 07:15:33 -05:00
CPMemory.h Simplify saving CP state 2022-10-09 19:32:59 -07:00
CPUCull.cpp VideoCommon: Explicitly disable fp_contract for CPUCull 2023-01-25 02:21:56 -06:00
CPUCull.h Fix uninitialized variable warnings (C26495) 2023-02-15 19:18:39 -08:00
CPUCullImpl.h VideoCommon: Add class for quickly transforming and culling vertices on the CPU 2023-01-25 02:21:56 -06:00
CommandProcessor.cpp Merge pull request #11586 from JosJuice/unknown-opcode-msg 2023-06-03 12:53:33 +02:00
CommandProcessor.h VideoCommon/CommandProcessor: Pass System to HandleUnknownOpcode(). 2023-04-05 20:09:32 +02:00
ConstantManager.h VideoCommon: Add class for quickly transforming and culling vertices on the CPU 2023-01-25 02:21:56 -06:00
Constants.h VideoBackends: support multiple compute images for some backends (D3D, OGL, Vulkan) 2023-06-28 17:15:31 -05:00
DataReader.h treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
DriverDetails.cpp Remove out-dated hack of AMD driver issue WRT dual-source blending output index. 2023-08-15 23:58:29 -04:00
DriverDetails.h Remove out-dated hack of AMD driver issue WRT dual-source blending output index. 2023-08-15 23:58:29 -04:00
Fifo.cpp Common: Convert BlockingLoop::StopMode to enum class 2023-06-12 17:12:25 -07:00
Fifo.h VideoCommon: Reword the unknown opcode error message 2023-02-19 16:35:28 +01:00
FrameDumpFFMpeg.cpp HW/VideoInterface: Refactor to class. 2023-03-11 12:50:35 +01:00
FrameDumpFFMpeg.h Fix builds with FFMPEG disabled 2023-02-09 18:36:20 +13:00
FrameDumper.cpp Fix builds with FFMPEG disabled 2023-02-09 18:36:20 +13:00
FrameDumper.h Apply suggestions from code review 2023-02-09 18:36:20 +13:00
FramebufferManager.cpp Make sure m_prev_efb_format is initilized 2023-02-09 18:36:20 +13:00
FramebufferManager.h Apply suggestions from code review 2023-02-09 18:36:20 +13:00
FramebufferShaderGen.cpp Video: implement color correction to match the NTSC and PAL color spaces (and gamma) that GC and Wii targeted. 2023-06-19 01:34:42 +03:00
FramebufferShaderGen.h Video: implement color correction to match the NTSC and PAL color spaces (and gamma) that GC and Wii targeted. 2023-06-19 01:34:42 +03:00
FreeLookCamera.cpp Common: Refactor PointerWrap 2022-05-25 13:06:41 -07:00
FreeLookCamera.h VideoCommon: update Free Look camera's 'FieldOfView' function to 'FieldOfViewMultiplier' to better reflect usage 2021-10-08 18:17:20 -05:00
GXPipelineTypes.h VideoCommon: update pipeline version for RenderState change 2023-06-03 14:52:31 -05:00
GeometryShaderGen.cpp VideoCommon: Fix stereoscopic 3D on OpenGL < 4.3 (macOS) 2023-02-14 18:25:33 +01:00
GeometryShaderGen.h Fix ambiguous uses of format_to 2022-01-13 11:11:08 -08:00
GeometryShaderManager.cpp VideoCommon: De-globalize GeometryShaderManager class. 2022-12-29 15:33:19 +01:00
GeometryShaderManager.h VideoCommon: De-globalize GeometryShaderManager class. 2022-12-29 15:33:19 +01:00
HiresTextures.cpp VideoCommon: Fix std::filesystem::path encoding conversion 2023-08-16 09:56:56 +02:00
HiresTextures.h Core / VideoCommon: update HiresTexture to use CustomAssetLoader 2023-06-05 16:33:19 -05:00
IndexGenerator.cpp IndexGenerator: Fix off-by-one in GetRemainingIndices 2023-01-04 10:42:00 -08:00
IndexGenerator.h VideoCommon: Add vertex shader point and line expansion 2022-10-22 20:13:24 -05:00
LightingShaderGen.cpp [[unlikely]] ASSERT 2023-03-02 19:54:15 -06:00
LightingShaderGen.h LightingShaderGen: Make s_lighting_struct not inline 2021-12-22 15:17:52 -08:00
LookUpTables.h treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
NativeVertexFormat.h Change unnamed enum in NativeVertexFormat.h to u32 2023-06-17 08:13:57 -05:00
NetPlayChatUI.cpp 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
NetPlayChatUI.h treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
NetPlayGolfUI.cpp treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
NetPlayGolfUI.h treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
OnScreenDisplay.cpp Timer: protect usages of ms timers from rollover 2022-08-02 22:24:06 -07:00
OnScreenDisplay.h treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
OnScreenUI.cpp 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
OnScreenUI.h 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
OnScreenUIKeyMap.h Insert a more solid abstraction between Qt and Imgui 2023-02-09 18:36:20 +13:00
OpcodeDecoding.cpp VideoCommon/CommandProcessor: Pass System to HandleUnknownOpcode(). 2023-04-05 20:09:32 +02:00
OpcodeDecoding.h OpcodeDecoding: Get vertex size from the loader 2022-09-19 01:14:53 +02:00
PerfQueryBase.cpp treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
PerfQueryBase.h Add virtual Initialize() to PerfQueryBase 2023-01-31 19:41:24 +13:00
PerformanceMetrics.cpp HW/VideoInterface: Refactor to class. 2023-03-11 12:50:35 +01:00
PerformanceMetrics.h Fix uninitialized variable warnings (C26495) 2023-02-15 19:18:39 -08:00
PerformanceTracker.cpp PerformanceTracker: Add ownership of m_log_name. 2023-01-06 20:27:25 +01:00
PerformanceTracker.h PerformanceTracker: Add ownership of m_log_name. 2023-01-06 20:27:25 +01:00
PixelEngine.cpp Move BoundingBox out of RenderBase 2023-01-31 19:41:24 +13:00
PixelEngine.h VideoCommon/PixelEngine: Pass Core::System to methods. 2022-12-11 21:57:30 +01:00
PixelShaderGen.cpp Remove out-dated hack of AMD driver issue WRT dual-source blending output index. 2023-08-15 23:58:29 -04:00
PixelShaderGen.h VideoCommon: Better logic op invert approximation 2023-01-30 14:04:37 -06:00
PixelShaderManager.cpp Make sure pixel shaders pick up Initial EFB Scale 2023-02-09 18:36:20 +13:00
PixelShaderManager.h VideoCommon/PixelShaderManager: Rename s_ variables. 2022-12-27 20:20:27 +01:00
PostProcessing.cpp Video: implement color correction to match the NTSC and PAL color spaces (and gamma) that GC and Wii targeted. 2023-06-19 01:34:42 +03:00
PostProcessing.h Video: implement color correction to match the NTSC and PAL color spaces (and gamma) that GC and Wii targeted. 2023-06-19 01:34:42 +03:00
Present.cpp Video: implement color correction to match the NTSC and PAL color spaces (and gamma) that GC and Wii targeted. 2023-06-19 01:34:42 +03:00
Present.h Hook up Presenter's ConfigChanged function 2023-02-09 18:36:20 +13:00
RenderBase.cpp Move UseVertexDepthRange() out of Renderer 2023-02-09 18:36:20 +13:00
RenderBase.h Cleanup headers 2023-02-09 18:36:20 +13:00
RenderState.cpp VideoBackends: add support to allow rendering to multiple output textures 2023-06-03 14:52:31 -05:00
RenderState.h VideoBackends: add support to allow rendering to multiple output textures 2023-06-03 14:52:31 -05:00
ShaderCache.cpp Common/LinearDiskCache: Move interface into Common namespace 2023-04-19 09:14:39 -04:00
ShaderCache.h Common/LinearDiskCache: Move interface into Common namespace 2023-04-19 09:14:39 -04:00
ShaderGenCommon.cpp D3D: Restore workaround for erroneous NaN optimization 2023-02-25 16:27:30 -08:00
ShaderGenCommon.h Remove old GCC version workarounds 2023-06-06 22:49:53 -05:00
Spirv.cpp Merge pull request #10946 from Pokechu22/remove-iLog 2022-08-05 22:42:09 +12:00
Spirv.h VideoBackends / VideoCommon: refactor Vulkan to use new SPIRV functionality 2022-06-24 18:09:53 -05:00
Statistics.cpp Apply suggestions from code review 2023-02-09 18:36:20 +13:00
Statistics.h Fix uninitialized variable warnings (C26495) 2023-02-15 19:18:39 -08:00
TMEM.cpp Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
TMEM.h Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
TextureCacheBase.cpp 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
TextureCacheBase.h 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
TextureConfig.cpp Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
TextureConfig.h VideoBackends: add support for cube maps for OGL, Vulkan, and D3D 2023-07-21 19:09:40 -05:00
TextureConversionShader.cpp Common/MathUtil: Move IntLog2 into MathUtil namespace 2023-04-15 03:35:05 -04:00
TextureConversionShader.h VideoCommon: Reduce duplicates of non-palette-requiring texture decode shaders 2022-06-16 02:08:45 -05:00
TextureConverterShaderGen.cpp Fix OpenGL error on M1 Mac. 2022-07-17 08:54:39 -04:00
TextureConverterShaderGen.h Restructure parameters to TetxureConverterShaderGen/TextureConversionShader 2022-07-16 00:07:10 -07:00
TextureDecoder.h VideoCommon: add function to check whether TextureFormat is a valid value 2022-06-26 00:45:13 -05:00
TextureDecoder_Common.cpp TextureDecoder: Fix warning: array subscript has type ‘char’ [-Wchar-subscripts] 2023-02-09 16:23:02 -08:00
TextureDecoder_Generic.cpp Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
TextureDecoder_Util.h treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
TextureDecoder_x64.cpp Remove casts to integers for texture and EFB formats 2022-07-15 12:29:40 -07:00
TextureInfo.cpp Common/MathUtil: Move IntLog2 into MathUtil namespace 2023-04-15 03:35:05 -04:00
TextureInfo.h VideoCommon: add support for setting and getting the stage from the texture info 2022-06-26 00:45:13 -05:00
UberShaderCommon.cpp EnumUtils: Add Common::ToUnderlying 2023-06-17 07:15:33 -05:00
UberShaderCommon.h VideoCommon: Allow BitfieldExtract in specialized shaders 2021-11-17 20:04:33 -08:00
UberShaderPixel.cpp Remove out-dated hack of AMD driver issue WRT dual-source blending output index. 2023-08-15 23:58:29 -04:00
UberShaderPixel.h VideoCommon: Better driver bug handling 2022-07-13 21:51:24 -05:00
UberShaderVertex.cpp EnumUtils: Add Common::ToUnderlying 2023-06-17 07:15:33 -05:00
UberShaderVertex.h VideoCommon: Name ubershaders 2022-06-16 02:08:45 -05:00
VertexLoader.cpp Fix VertexLoader.cpp using the wrong size for texture matrix indices without a corresponding texture 2022-11-22 17:49:54 -08:00
VertexLoader.h VertexLoader: Eliminate use of DataReader 2022-11-22 17:17:11 -08:00
VertexLoaderARM64.cpp VertexLoader: Add more info to m_vertex_size == m_src_ofs assertion 2023-02-12 20:10:38 -08:00
VertexLoaderARM64.h VertexLoader: Eliminate use of DataReader 2022-11-22 17:17:11 -08:00
VertexLoaderBase.cpp VertexLoaderBase: Fix shadowing warning 2023-02-09 16:23:02 -08:00
VertexLoaderBase.h VertexLoader: Eliminate use of DataReader 2022-11-22 17:17:11 -08:00
VertexLoaderManager.cpp Resolve [-Wclass-memaccess] 2023-04-12 03:59:57 -05:00
VertexLoaderManager.h VertexLoader: Eliminate use of DataReader 2022-11-22 17:17:11 -08:00
VertexLoaderUtils.h VertexLoader: Eliminate use of DataReader 2022-11-22 17:17:11 -08:00
VertexLoaderX64.cpp XEmitter: Add enum class Jump 2023-06-12 13:04:18 -07:00
VertexLoaderX64.h VertexLoader: Eliminate use of DataReader 2022-11-22 17:17:11 -08:00
VertexLoader_Color.cpp VertexLoader: Remove "too many initializer values" workaround functions 2022-10-25 15:29:09 -07:00
VertexLoader_Color.h VertexLoader: Inline GetSize 2022-09-15 12:50:15 +02:00
VertexLoader_Normal.cpp VertexLoader: Fix loading tangent/binormal caches with NormalIndex3 2023-01-13 15:38:00 -08:00
VertexLoader_Normal.h VertexLoader: Inline GetSize 2022-09-15 12:50:15 +02:00
VertexLoader_Position.cpp VertexLoader: Don't write position_cache if vertex is skipped 2023-01-13 15:38:00 -08:00
VertexLoader_Position.h VertexLoader: Inline GetSize 2022-09-15 12:50:15 +02:00
VertexLoader_TextCoord.cpp VertexLoader: Eliminate use of DataReader 2022-11-22 17:17:11 -08:00
VertexLoader_TextCoord.h VertexLoader: Inline GetSize 2022-09-15 12:50:15 +02:00
VertexManagerBase.cpp VideoCommon: don't do pointer copies during graphics mod callback iteration 2023-07-02 13:58:07 -05:00
VertexManagerBase.h Apply suggestions from code review 2023-02-09 18:36:20 +13:00
VertexShaderGen.cpp Fix build errors related to formatting non-scoped enums 2022-11-23 13:45:43 -08:00
VertexShaderGen.h Fix build errors related to formatting non-scoped enums 2022-11-23 13:45:43 -08:00
VertexShaderManager.cpp VideoCommon: don't do pointer copies during graphics mod callback iteration 2023-07-02 13:58:07 -05:00
VertexShaderManager.h VideoCommon:VertexShaderManager: Inline SetVertexFormat & UpdateValue/Offset 2023-03-20 20:59:38 +01:00
VideoBackendBase.cpp VideoCommon: Pass WindowSystemInfo to InitBackendInfo 2023-06-08 22:07:39 -07:00
VideoBackendBase.h VideoCommon: Pass WindowSystemInfo to InitBackendInfo 2023-06-08 22:07:39 -07:00
VideoCommon.h Fix warning about compare sign mismatch 2023-01-31 19:41:23 +13:00
VideoConfig.cpp Don't call RunAsCPUThread in config callbacks 2023-08-17 19:19:25 +02:00
VideoConfig.h Video: implement color correction to match the NTSC and PAL color spaces (and gamma) that GC and Wii targeted. 2023-06-19 01:34:42 +03:00
VideoEvents.h Fix uninitialized variable warnings (C26495) 2023-02-15 19:18:39 -08:00
VideoState.cpp Move m_prev_efb_format into FramebufferManager 2023-02-09 18:36:20 +13:00
VideoState.h treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
Widescreen.cpp Lint fixes 2023-02-09 18:36:20 +13:00
Widescreen.h Apply suggestions from code review 2023-02-09 18:36:20 +13:00
XFMemory.cpp treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
XFMemory.h VideoCommon: Add class for quickly transforming and culling vertices on the CPU 2023-01-25 02:21:56 -06:00
XFStructs.cpp VideoCommon: De-globalize GeometryShaderManager class. 2022-12-29 15:33:19 +01:00
XFStructs.h Refactor OpcodeDecoding and FIFO analyzer to use callbacks 2021-12-18 15:21:36 -08:00
sfont.inc Use fmt::to_string for texture format overlay 2022-07-15 12:29:40 -07:00