mirror of
https://github.com/Takiiiiiiii/strato.git
synced 2025-07-17 08:46:39 +00:00
Fix UB with guest-less Texture/Buffers in MarkGpuDirty
As there was no check for the lack of a `GuestTexture`/`GuestBuffer`, it would lead to UB when a texture/buffer that had no guest such as the `zeroTexture` from `GraphicsContext` would be marked as dirty they would cause a call to `NCE::RetrapRegions` with a `nullptr` handle that would be dereferenced and cause a segmentation fault.
This commit is contained in:
@ -45,7 +45,7 @@ namespace skyline::gpu {
|
||||
}
|
||||
|
||||
void Buffer::MarkGpuDirty() {
|
||||
if (dirtyState == DirtyState::GpuDirty || externallySynchronized) {
|
||||
if (dirtyState == DirtyState::GpuDirty || externallySynchronized || !guest) {
|
||||
externallySynchronized = false; // We want to handle synchronize internally after the GPU work is done
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user