detached d556226

test(vulkan): explain the dmabuf alloc budget and report the sync path

commit
d55622625bd5bd0b280f43c5a5362f3d2735d734
author
brice · · 2026-10-13 18:33 UTC
parent
0f2ac29
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +6 -4
M internal/adapters/vulkan/scene_perf_test.go +6 -4
@@ -42,7 +42,7 @@ func TestRenderSteadyStateAllocations(t *testing.T) {
4242 }
4343 frame()
4444 if allocs := testing.AllocsPerRun(20, frame); allocs > 3 {
45- t.Errorf("small steady-state Render: %.1f allocs/frame, want <=3", allocs)
45+ t.Errorf("small steady-state Render: %.1f allocs/frame, want <=3 (syncFD path: %v)", allocs, r.syncFD)
4646 } else {
4747 t.Logf("small steady-state Render: %.1f allocs/frame", allocs)
4848 }
@@ -138,8 +138,10 @@ func TestRenderSteadyStateAllocations(t *testing.T) {
138138 }
139139
140140 // A steady frame that draws a client dmabuf also records the ownership
141-// barriers (acquire and release) of its image: no allocation per frame beyond
142-// the SHM scene's. Skipped without a GPU or /dev/udmabuf.
141+// barriers (acquire and release) of its image, which allocate nothing. The
142+// frame still allocates more than the SHM scene: importing the client's
143+// read fence and its retire closure (about 4 per frame). Skipped without a
144+// GPU or /dev/udmabuf.
143145 func TestRenderSteadyStateDMABufAllocations(t *testing.T) {
144146 r, err := New(80, 32)
145147 if err != nil {
@@ -181,7 +183,7 @@ func TestRenderSteadyStateDMABufAllocations(t *testing.T) {
181183 allocs := testing.AllocsPerRun(20, moved)
182184 t.Logf("dmabuf Render: %.1f allocs/frame", allocs)
183185 if allocs > 7 {
184- t.Errorf("dmabuf steady-state Render: %.1f allocs/frame, want <=7", allocs)
186+ t.Errorf("dmabuf steady-state Render: %.1f allocs/frame, want <=7 (syncFD path: %v; a driver without sync-file export takes another path)", allocs, r.syncFD)
185187 }
186188 }
187189
@@ -42,7 +42,7 @@ func TestRenderSteadyStateAllocations(t *testing.T) {
42 }42 }
43 frame()43 frame()
44 if allocs := testing.AllocsPerRun(20, frame); allocs > 3 {44 if allocs := testing.AllocsPerRun(20, frame); allocs > 3 {
45- t.Errorf("small steady-state Render: %.1f allocs/frame, want <=3", allocs)45+ t.Errorf("small steady-state Render: %.1f allocs/frame, want <=3 (syncFD path: %v)", allocs, r.syncFD)
46 } else {46 } else {
47 t.Logf("small steady-state Render: %.1f allocs/frame", allocs)47 t.Logf("small steady-state Render: %.1f allocs/frame", allocs)
48 }48 }
@@ -138,8 +138,10 @@ func TestRenderSteadyStateAllocations(t *testing.T) {
138 }138 }
139 139
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: no allocation per frame beyond141+// barriers (acquire and release) of its image, which allocate nothing. The
142-// the SHM scene's. Skipped without a GPU or /dev/udmabuf.142+// frame still allocates more than the SHM scene: importing the client's
143+// read fence and its retire closure (about 4 per frame). Skipped without a
144+// GPU or /dev/udmabuf.
143 func TestRenderSteadyStateDMABufAllocations(t *testing.T) {145 func TestRenderSteadyStateDMABufAllocations(t *testing.T) {
144 r, err := New(80, 32)146 r, err := New(80, 32)
145 if err != nil {147 if err != nil {
@@ -181,7 +183,7 @@ func TestRenderSteadyStateDMABufAllocations(t *testing.T) {
181 allocs := testing.AllocsPerRun(20, moved)183 allocs := testing.AllocsPerRun(20, moved)
182 t.Logf("dmabuf Render: %.1f allocs/frame", allocs)184 t.Logf("dmabuf Render: %.1f allocs/frame", allocs)
183 if allocs > 7 {185 if allocs > 7 {
184- t.Errorf("dmabuf steady-state Render: %.1f allocs/frame, want <=7", allocs)186+ t.Errorf("dmabuf steady-state Render: %.1f allocs/frame, want <=7 (syncFD path: %v; a driver without sync-file export takes another path)", allocs, r.syncFD)
185 }187 }
186 }188 }
187 189

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