[idd] clipboard: optimize write-combined reads

Add a reusable copy path for moving data from write-combined mappings
into normal cacheable memory. Dispatch to MOVNTDQA-based SSE4.1 or AVX2
loads when the processor and OS support them, with a fenced fallback.

Use the optimized path when staging inbound clipboard stream records from
the IVSHMEM mapping.
This commit is contained in:
Geoffrey McRae
2026-08-15 16:09:28 +10:00
parent 9e9bf6b88c
commit 4477ac0de1
6 changed files with 272 additions and 1 deletions

View File

@@ -70,6 +70,10 @@
<ClCompile Include="CDebug.cpp" />
<ClCompile Include="CPipeEndpoint.cpp" />
<ClCompile Include="RefreshRate.cpp" />
<ClCompile Include="WCCopy.cpp" />
<ClCompile Include="WCCopyAVX2.cpp">
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CClipboardChannel.h" />
@@ -85,6 +89,7 @@
<ClInclude Include="PipeMsg.h" />
<ClInclude Include="RefreshRate.h" />
<ClInclude Include="Seq.h" />
<ClInclude Include="WCCopy.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />