[perf] Acquire/present barriers use ALL_COMMANDS scope (Window.cpp) #117

Closed
opened 2026-06-17 21:18:53 +02:00 by jorijnvdgraaf · 1 comment

Found by an adversarially-verified performance audit (confirmed real after a skeptic pass).

Location: implementations/Crafter.Graphics-Window.cpp:818-893
Severity: low · Effort: trivial · Category: sync

Problem

The acquire dst and present src barriers use ALL_COMMANDS scope; the swapchain image is only written by compute/RT.

Fix

Narrow to the actual writer stages — use the union COMPUTE_SHADER | RAY_TRACING_SHADER | TRANSFER (not COMPUTE alone; that under-syncs RT passes). These are frame-edge barriers, so the practical bubble is small.

Found by an adversarially-verified performance audit (confirmed real after a skeptic pass). **Location:** `implementations/Crafter.Graphics-Window.cpp:818-893` **Severity:** low · **Effort:** trivial · **Category:** sync ### Problem The acquire dst and present src barriers use `ALL_COMMANDS` scope; the swapchain image is only written by compute/RT. ### Fix Narrow to the actual writer stages — use the union `COMPUTE_SHADER | RAY_TRACING_SHADER | TRANSFER` (not `COMPUTE` alone; that under-syncs RT passes). These are frame-edge barriers, so the practical bubble is small.
Author
Owner

Merged into #115 — the inter-pass and acquire/present ALL_COMMANDS barriers share one fix (derive the real per-pass stage union, including RAY_TRACING_SHADER) and are a single co-dependent deliverable.

Merged into #115 — the inter-pass and acquire/present ALL_COMMANDS barriers share one fix (derive the real per-pass stage union, including RAY_TRACING_SHADER) and are a single co-dependent deliverable.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Catcrafts/Crafter.Graphics#117
No description provided.