From e3444b4fc27b7eaca546841243eb13c8f676e28e Mon Sep 17 00:00:00 2001 From: DH Date: Fri, 30 Jun 2023 17:10:22 +0300 Subject: [PATCH] [amdgpu/device] Ignore black surface flip --- hw/amdgpu/device/src/device.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/amdgpu/device/src/device.cpp b/hw/amdgpu/device/src/device.cpp index 850b1c359..dbad8888d 100644 --- a/hw/amdgpu/device/src/device.cpp +++ b/hw/amdgpu/device/src/device.cpp @@ -4023,6 +4023,11 @@ bool amdgpu::device::AmdgpuDevice::handleFlip( auto buffer = bridge->buffers[bufferIndex]; + if (bufferIndex == ~static_cast(0)) { + // black surface, ignore for now + return false; + } + if (buffer.pitch == 0 || buffer.height == 0 || buffer.address == 0) { std::printf("Attempt to flip unallocated buffer\n"); return false;