mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-22 15:11:31 +00:00
[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:
@@ -26,6 +26,7 @@
|
||||
|
||||
#include "CDebug.h"
|
||||
#include "Seq.h"
|
||||
#include "WCCopy.h"
|
||||
#include "transport/lgmp/CLGMPHost.h"
|
||||
|
||||
#include <limits>
|
||||
@@ -637,7 +638,7 @@ bool CLGMPClipboardTransport::QueueStreamTarget(
|
||||
(m_streamTargetHead + m_streamTargetCount) % STREAM_TARGET_COUNT];
|
||||
target.record = record;
|
||||
if (record.length)
|
||||
memcpy(target.data, data, record.length);
|
||||
WCCopy::Copy(target.data, data, record.length);
|
||||
++m_streamTargetCount;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user