mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-28 15:03:07 +00:00
memory: Check that core is powered on before attempting to use GPU.
- GPU will be released on shutdown, before pages are unmapped. - On subsequent runs, current_page_table will be not nullptr, but GPU might not be valid yet.
This commit is contained in:
parent
19330f45d3
commit
3ae0de9b53
|
@ -48,7 +48,7 @@ static void MapPages(Common::PageTable& page_table, VAddr base, u64 size, u8* me
|
||||||
(base + size) * PAGE_SIZE);
|
(base + size) * PAGE_SIZE);
|
||||||
|
|
||||||
// During boot, current_page_table might not be set yet, in which case we need not flush
|
// During boot, current_page_table might not be set yet, in which case we need not flush
|
||||||
if (current_page_table) {
|
if (Core::System::GetInstance().IsPoweredOn()) {
|
||||||
Core::System::GetInstance().GPU().FlushAndInvalidateRegion(base << PAGE_BITS,
|
Core::System::GetInstance().GPU().FlushAndInvalidateRegion(base << PAGE_BITS,
|
||||||
size * PAGE_SIZE);
|
size * PAGE_SIZE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue