[host] Added SMID BGRAToRGB support and implemented it in DXGI

This commit is contained in:
Geoffrey McRae committed 2017-12-12 03:59:55 +11:00
1 parent 6eb40a1897
commit 534e9425f1
3 files changed
+62 -12

No files matched your search

+6 -2
View File
@@ -114,8 +114,12 @@ bool Service::Process()
if (!m_initialized)
return false;
KVMGFXHeader * header = reinterpret_cast<KVMGFXHeader *>(m_memory);
const uint64_t dataOffset = sizeof(KVMGFXHeader) + m_frameIndex * m_capture->GetMaxFrameSize();
KVMGFXHeader * header = reinterpret_cast<KVMGFXHeader *>(m_memory);
// calculate the current offset and ensure it is 16-byte aligned for SMID performance
uint64_t dataOffset = sizeof(KVMGFXHeader) + m_frameIndex * m_capture->GetMaxFrameSize();
dataOffset = (dataOffset + 0xF) & ~0xF;
uint8_t * data = m_memory + dataOffset;
const size_t available = m_ivshmem->GetSize() - sizeof(KVMGFXHeader);