fix(agc): submit tiled multisample test targets before destroying them
The tiled cases of agc_multisample_guest_access destroyed each target while its layout transition and clear were still recorded, so the recorder later submitted commands for destroyed images and lavapipe crashed executing them. Each case now submits and waits first, as the linear case does. The 2x case runs only when the device renders 2x color, like the 8x case.
This commit is contained in:
parent
c13dc7e6b4
commit
b32ba9eeef
|
|
@ -4663,20 +4663,28 @@ void multisampleGuestAccessTests(const Device& device, Recorder& recorder) {
|
|||
{
|
||||
std::lock_guard gpu(GpuMutex());
|
||||
Require(MultisampleTargetView(context, target) != VK_NULL_HANDLE, "the tiled multisampled target has no view");
|
||||
recorder.Submit();
|
||||
device.WaitQueue();
|
||||
recorder.Sync();
|
||||
}
|
||||
refused([&] { AgcDriver::GuestMemory::Read(address + targetBytes - texels.size(), texels); }, "a CPU read", "a CPU read inside the tiled multisampled target");
|
||||
AgcDriver::GuestMemory::Read(address + targetBytes, texels);
|
||||
ClearMultisampleTargets(context.device);
|
||||
target.extent = {128, 64};
|
||||
target.surfaceExtent = target.extent;
|
||||
target.samples = 2;
|
||||
{
|
||||
std::lock_guard gpu(GpuMutex());
|
||||
Require(MultisampleTargetView(context, target) != VK_NULL_HANDLE, "the 2x tiled multisampled target has no view");
|
||||
if ((base.limits.framebufferColorSampleCounts & VK_SAMPLE_COUNT_2_BIT) != 0) {
|
||||
target.extent = {128, 64};
|
||||
target.surfaceExtent = target.extent;
|
||||
target.samples = 2;
|
||||
{
|
||||
std::lock_guard gpu(GpuMutex());
|
||||
Require(MultisampleTargetView(context, target) != VK_NULL_HANDLE, "the 2x tiled multisampled target has no view");
|
||||
recorder.Submit();
|
||||
device.WaitQueue();
|
||||
recorder.Sync();
|
||||
}
|
||||
refused([&] { AgcDriver::GuestMemory::Read(address + 2u * targetBytes - texels.size(), texels); }, "a CPU read", "a CPU read inside the 2x tile-height padding");
|
||||
AgcDriver::GuestMemory::Read(address + 2u * targetBytes, texels);
|
||||
ClearMultisampleTargets(context.device);
|
||||
}
|
||||
refused([&] { AgcDriver::GuestMemory::Read(address + 2u * targetBytes - texels.size(), texels); }, "a CPU read", "a CPU read inside the 2x tile-height padding");
|
||||
AgcDriver::GuestMemory::Read(address + 2u * targetBytes, texels);
|
||||
ClearMultisampleTargets(context.device);
|
||||
if ((base.limits.framebufferColorSampleCounts & VK_SAMPLE_COUNT_8_BIT) != 0) {
|
||||
target.extent = {64, 32};
|
||||
target.surfaceExtent = target.extent;
|
||||
|
|
@ -4684,6 +4692,9 @@ void multisampleGuestAccessTests(const Device& device, Recorder& recorder) {
|
|||
{
|
||||
std::lock_guard gpu(GpuMutex());
|
||||
Require(MultisampleTargetView(context, target) != VK_NULL_HANDLE, "the 8x tiled multisampled target has no view");
|
||||
recorder.Submit();
|
||||
device.WaitQueue();
|
||||
recorder.Sync();
|
||||
}
|
||||
refused([&] { AgcDriver::GuestMemory::Read(address + 2u * targetBytes - texels.size(), texels); }, "a CPU read", "a CPU read inside the 8x tile-height padding");
|
||||
AgcDriver::GuestMemory::Read(address + 2u * targetBytes, texels);
|
||||
|
|
|
|||
Loading…
Reference in New Issue