detached dff8f48

test(vulkan): keep one alloc of headroom in the dmabuf frame budget

The budget is 6 for 5 measured on radv, so another driver's import path does not fail perf-check; the semaphore retire is locked at 0 by its own test.
commit
dff8f48518b002f10236afe07711b9d1cb42dbe1
author
brice · · 2026-10-16 14:08 UTC
parent
5d1d4d1
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +6 -4
M internal/adapters/vulkan/scene_perf_test.go +6 -4
@@ -140,8 +140,10 @@ func TestRenderSteadyStateAllocations(t *testing.T) {
140140 // A steady frame that draws a client dmabuf also records the ownership
141141 // barriers (acquire and release) of its image, which allocate nothing. The
142142 // frame still allocates more than the SHM scene: importing the client's
143-// read fence (about 5 per frame, measured 5.0; the semaphore retire is
144-// typed and costs no closure). Skipped without a GPU or /dev/udmabuf.
143+// read fence (measured 5.0 on radv; the semaphore retire is typed and costs
144+// no closure, locked by TestRetireSemaphoreAllocatesNothing). The budget
145+// keeps one alloc of headroom for drivers whose import path differs.
146+// Skipped without a GPU or /dev/udmabuf.
145147 func TestRenderSteadyStateDMABufAllocations(t *testing.T) {
146148 r, err := New(80, 32)
147149 if err != nil {
@@ -182,8 +184,8 @@ func TestRenderSteadyStateDMABufAllocations(t *testing.T) {
182184 moved()
183185 allocs := testing.AllocsPerRun(20, moved)
184186 t.Logf("dmabuf Render: %.1f allocs/frame", allocs)
185- if allocs > 5 {
186- t.Errorf("dmabuf steady-state Render: %.1f allocs/frame, want <=5 (syncFD path: %v; a driver without sync-file export takes another path)", allocs, r.syncFD)
187+ if allocs > 6 {
188+ t.Errorf("dmabuf steady-state Render: %.1f allocs/frame, want <=6 (syncFD path: %v; a driver without sync-file export takes another path)", allocs, r.syncFD)
187189 }
188190 }
189191
@@ -140,8 +140,10 @@ func TestRenderSteadyStateAllocations(t *testing.T) {
140 // A steady frame that draws a client dmabuf also records the ownership140 // A steady frame that draws a client dmabuf also records the ownership
141 // barriers (acquire and release) of its image, which allocate nothing. The141 // barriers (acquire and release) of its image, which allocate nothing. The
142 // frame still allocates more than the SHM scene: importing the client's142 // frame still allocates more than the SHM scene: importing the client's
143-// read fence (about 5 per frame, measured 5.0; the semaphore retire is143+// read fence (measured 5.0 on radv; the semaphore retire is typed and costs
144-// typed and costs no closure). Skipped without a GPU or /dev/udmabuf.144+// no closure, locked by TestRetireSemaphoreAllocatesNothing). The budget
145+// keeps one alloc of headroom for drivers whose import path differs.
146+// Skipped without a GPU or /dev/udmabuf.
145 func TestRenderSteadyStateDMABufAllocations(t *testing.T) {147 func TestRenderSteadyStateDMABufAllocations(t *testing.T) {
146 r, err := New(80, 32)148 r, err := New(80, 32)
147 if err != nil {149 if err != nil {
@@ -182,8 +184,8 @@ func TestRenderSteadyStateDMABufAllocations(t *testing.T) {
182 moved()184 moved()
183 allocs := testing.AllocsPerRun(20, moved)185 allocs := testing.AllocsPerRun(20, moved)
184 t.Logf("dmabuf Render: %.1f allocs/frame", allocs)186 t.Logf("dmabuf Render: %.1f allocs/frame", allocs)
185- if allocs > 5 {187+ if allocs > 6 {
186- t.Errorf("dmabuf steady-state Render: %.1f allocs/frame, want <=5 (syncFD path: %v; a driver without sync-file export takes another path)", allocs, r.syncFD)188+ t.Errorf("dmabuf steady-state Render: %.1f allocs/frame, want <=6 (syncFD path: %v; a driver without sync-file export takes another path)", allocs, r.syncFD)
187 }189 }
188 }190 }
189 191

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 25

Tags 10

↑↓ moveenter openesc close