Commit Graph

18 Commits

Author SHA1 Message Date
Matthias Clasen
3be03ea56f testdmabuf: Make overlay more challenging
Put both changing and unchanging widgets in the overlay, to
test our offloading code harder.
2024-02-10 07:09:28 -05:00
Matthias Clasen
49e0ae8742 testdmabuf: Use a spinner as overlay
Thats a bigger challenge, and it breaks.
2024-02-09 11:50:51 -05:00
Matthias Clasen
b734614aed Merge branch 'matthiasc/for-main' into 'main'
testdmabuf: Be more dynamic

See merge request GNOME/gtk!6865
2024-02-09 04:50:39 +00:00
Matthias Clasen
d418b0984c testdmabuf: Be more dynamic
Add shortcuts for triggering various changes:

- F11 toggles fullscreen
- Ctrl-O toggles an overlay
- Ctrl-F flips the texture
2024-02-08 23:28:57 -05:00
Benjamin Otte
9c87dd503a testdmabuf: Vulkan requires listing of all dependencies
Shuts up the validation layer.
2024-02-09 04:28:32 +01:00
Matthias Clasen
6dfa6fe442 testdmabuf: Add a --fullscreen option
This may help in getting a scanout tranche.
2024-02-07 12:38:18 -05:00
Benjamin Otte
6bac377fa5 gdk: Don't include vulkan.h in public API anymore 2024-01-07 14:47:22 +01:00
Matthias Clasen
bd3afd1006 testdmabuf: Add a --unpremultiplied option
This lets us test handling of straight-alpha dmabufs.
2023-12-15 07:40:27 -05:00
Matthias Clasen
be0546bb39 testdmabuf: Support a separate-alpha format
This helps with verifying the support for these formats
in gdkdmabuf.c.
2023-11-16 20:54:16 -05:00
Benjamin Otte
de3f55fc5f testdmabuf: Use Vulkan to create dmabufs
This is somewhat hacky, but good enough for testing.

And it's definitely better than needing to chmod files owned by root.
2023-11-17 00:22:27 +01:00
Matthias Clasen
d3a5aa5304 testdmabuf: Use GtkGraphicsOffload 2023-11-13 22:27:51 +01:00
Matthias Clasen
f0ec1660c1 Make testdmabuf fall back to memfd
If we can't open /dev/dma_heap/system, fall back to using memfd_create.
It does not let us make a 'proper' dmabuf, but it is good enough to
test our handling of linear buffers in various formats.
2023-10-22 22:18:30 -04:00
Benjamin Otte
e05764806a build: Change where we get drm_fourcc.h from
The canonical source for userspace is libdrm, not kernel headers.

Fixes compilation on Arch Linux.
2023-10-22 20:40:20 +02:00
Matthias Clasen
e1cbc96b8c testdmabuf: Add a --download-to option
The next option we add will tilt the balance
towards GOptionContext.
2023-10-21 17:26:53 -04:00
Benjamin Otte
58a0e4ffaa testdmabuf: Add --disjoint and --undecorated
The code now by default puts all planes into the same fd - like
v4l does, too.

The old behavior of one fd per plane can be enabled via --disjoint.

Also, am --undecorated option has been added so that the window
isn't decorated and all that the renderer has to do is display the
dmabuf.
This is useful when debugging just the dmabuf rendering.
2023-10-21 17:02:05 +02:00
Benjamin Otte
7ab9056c11 testdmabuf: Fix NV12
The code was computing the wrong size.
2023-10-21 16:42:16 +02:00
Benjamin Otte
2d9fbb16bc testdmabuf: Use the actual pixel
The previous code would subsample the luma channel, too. Don't do that.
2023-10-21 16:42:15 +02:00
Matthias Clasen
98e883f9b4 Make a test app with dma heaps
This uses the dma-heap kernel api to create a dma-buf
and use it for a GdkDmabufTexture. It supports a few
formats to test how well GL conversion of YUV works.

The YUV code is adapted from weston tests.
2023-10-20 19:53:33 -04:00