Forbid Pass appearing twice in same submit;

This commit is contained in:
bjorn 2022-08-07 22:28:12 -07:00
parent 2047127a97
commit d88a7bdc8b
1 changed files with 4 additions and 0 deletions

View File

@ -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) {