diff --git a/nx/include/switch/nvidia/gpu/gpfifo.h b/nx/include/switch/nvidia/gpu/gpfifo.h index 668c9209..ee1852b9 100644 --- a/nx/include/switch/nvidia/gpu/gpfifo.h +++ b/nx/include/switch/nvidia/gpu/gpfifo.h @@ -2,7 +2,6 @@ typedef struct { NvChannel* parent; - nvioctl_fence fifo_fence; } NvGpfifo; Result nvGpfifoCreate(NvGpfifo* f, NvChannel* parent); diff --git a/nx/source/nvidia/gpu/gpfifo.c b/nx/source/nvidia/gpu/gpfifo.c index c6fe25c8..04a0d35b 100644 --- a/nx/source/nvidia/gpu/gpfifo.c +++ b/nx/source/nvidia/gpu/gpfifo.c @@ -24,8 +24,11 @@ Result nvGpfifoCreate(NvGpfifo* f, NvChannel* parent) { f->parent = parent; - return nvioctlChannel_AllocGpfifoEx2( - parent->fd, DEFAULT_FIFO_ENTRIES, 1, 0, 0, 0, 0, &f->fifo_fence); + NvFence fence; + Result res = nvioctlChannel_AllocGpfifoEx2(parent->fd, DEFAULT_FIFO_ENTRIES, 1, 0, 0, 0, 0, &fence); + if (R_SUCCEEDED(res) && (s32)fence.id >= 0) + nvFenceWait(&fence, -1); + return res; } void nvGpfifoClose(NvGpfifo* f) {