Skip to content

Commit

Permalink
Merge branch 'stable' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornbytes committed Nov 9, 2023
2 parents ce4e07d + 4522d10 commit 534947b
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions src/modules/graphics/graphics.c
Original file line number Diff line number Diff line change
Expand Up @@ -1656,26 +1656,29 @@ void lovrGraphicsSubmit(Pass** passes, uint32_t count) {
Canvas* canvas = &passes[i]->canvas;

for (uint32_t t = 0; t < canvas->count; t++) {
canvas->color[t].texture->sync.barrier = &state.postBarrier;
Texture* texture = canvas->color[t].texture;
texture->sync.barrier = &state.postBarrier;
if (texture->info.xr && texture->xrTick != state.tick) {
gpu_xr_acquire(streams[0], texture->gpu);
gpu_xr_release(streams[streamCount - 1], texture->gpu);
texture->xrTick = state.tick;
}
}

if (canvas->depth.texture) {
canvas->depth.texture->sync.barrier = &state.postBarrier;
Texture* texture = canvas->depth.texture;
texture->sync.barrier = &state.postBarrier;
if (texture->info.xr && texture->xrTick != state.tick) {
gpu_xr_acquire(streams[0], texture->gpu);
gpu_xr_release(streams[streamCount - 1], texture->gpu);
texture->xrTick = state.tick;
}
}

for (uint32_t j = 0; j < COUNTOF(passes[i]->access); j++) {
for (AccessBlock* block = passes[i]->access[j]; block != NULL; block = block->next) {
for (uint32_t k = 0; k < block->count; k++) {
block->list[k].sync->barrier = &state.postBarrier;

if (block->textureMask & (1ull << k)) {
Texture* texture = (Texture*) ((char*) block->list[k].sync - offsetof(Texture, sync));
if (texture && texture->info.xr && texture->xrTick != state.tick) {
gpu_xr_acquire(streams[0], texture->gpu);
gpu_xr_release(streams[streamCount - 1], texture->gpu);
texture->xrTick = state.tick;
}
}
}
}
}
Expand Down

0 comments on commit 534947b

Please sign in to comment.