From 8d9b0041b48161d443ff094f6c05627650b42c12 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Sat, 11 Mar 2023 23:11:15 +0000 Subject: [PATCH] Return a dummy buffer when encountering unbound SSBOs --- app/src/main/cpp/skyline/gpu/interconnect/common/pipeline.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/cpp/skyline/gpu/interconnect/common/pipeline.inc b/app/src/main/cpp/skyline/gpu/interconnect/common/pipeline.inc index 1b293b73..199f6ae9 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/common/pipeline.inc +++ b/app/src/main/cpp/skyline/gpu/interconnect/common/pipeline.inc @@ -51,6 +51,8 @@ namespace skyline::gpu::interconnect { size_t padding{ssbo.address & (ctx.gpu.traits.minimumStorageBufferAlignment - 1)}; cachedView.Update(ctx, ssbo.address - padding, util::AlignUp(ssbo.size + padding, ctx.gpu.traits.minimumStorageBufferAlignment)); + if (!cachedView.view) // Return a dummy buffer if the SSBO isn't bound + return BufferBinding{ctx.gpu.megaBufferAllocator.Allocate(ctx.executor.cycle, PAGE_SIZE).buffer, 0, PAGE_SIZE}; auto view{cachedView.view}; ctx.executor.AttachBuffer(view);