From d88a7bdc8b64fe51457d3cce926ae6c0de81a7c0 Mon Sep 17 00:00:00 2001 From: bjorn Date: Sun, 7 Aug 2022 22:28:12 -0700 Subject: [PATCH] Forbid Pass appearing twice in same submit; --- src/modules/graphics/graphics.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/graphics/graphics.c b/src/modules/graphics/graphics.c index c60ec9ea..5b4ee967 100644 --- a/src/modules/graphics/graphics.c +++ b/src/modules/graphics/graphics.c @@ -829,6 +829,10 @@ void lovrGraphicsSubmit(Pass** passes, uint32_t count) { Pass* pass = passes[i]; lovrAssert(passes[i]->tick == state.tick, "Trying to submit a Pass that wasn't reset this frame"); + for (uint32_t j = 0; j < i; j++) { + lovrCheck(passes[j] != passes[i], "Using a Pass twice in the same submit is not allowed"); + } + streams[i + 1] = pass->stream; switch (pass->info.type) {