[idd] lgmp: stream staged copies to WC memory

This commit is contained in:
Geoffrey McRae
2026-08-17 01:27:38 +10:00
parent 636e55db0d
commit 26cafbe3df
6 changed files with 284 additions and 7 deletions

32
idd/LGCommon/WCWrite.h Normal file
View File

@@ -0,0 +1,32 @@
/**
* Looking Glass
* Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc., 59
* Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#pragma once
#include <stddef.h>
namespace WCWrite
{
// Copy from normal cacheable memory into write-combined memory. The source
// and destination ranges must not overlap. Call Flush before publishing the
// written range to another processor or device.
void Copy(void * destination, const void * source, size_t size);
void Flush();
}