mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 12:56:06 +00:00
Open driver pairs: vkd3d-proton reports the driver's caps; buffer attach/release tracing; Mesa log
- With a PanVK or RADV pair (BL_OPEN_DRIVER=1), droiddeck-game-env drops the app-wide VKD3D_FEATURE_LEVEL=12_2 and VKD3D_SHADER_MODEL=6_9 so vkd3d-proton reports what the driver has (an Unreal DX12 game crashed at start on PanVK with the overrides); a game's own setting still wins, and launch.txt records DROIDDECK_VKD3D_CAPS=driver. - The compositor traces, on a GPU that is not an Adreno, the first 400 dma-buf attaches and buffer releases by wl_buffer id and sending line, and logs any release of a buffer already released and not attached again (gamescope's "Compositor released us but we were not acquired" on G925). - Per-game logs no longer set MESA_DEBUG=silent, which kept mesa.log empty.
This commit is contained in:
1 parent
0e44b3a032
commit
d16ca4d8a8
5 files changed
+64
-5
No files matched your search
@@ -393,6 +393,20 @@ class GameEnvironmentTest(unittest.TestCase):
|
||||
named = game_logs(command, on, None, now=0)
|
||||
self.assertTrue(Path(named["PROTON_LOG_DIR"]).name.endswith("-Hades"))
|
||||
|
||||
def test_open_driver_pairs_report_the_drivers_own_vkd3d_caps(self):
|
||||
apply = MODULE["apply_config"]
|
||||
config = {"version": 1, "shared": {"VKD3D_FEATURE_LEVEL": "12_2", "VKD3D_SHADER_MODEL": "6_9"},
|
||||
"games": {"42": {"VKD3D_SHADER_MODEL": "6_6"}}}
|
||||
adreno = apply({}, config, "1")
|
||||
self.assertEqual(adreno["VKD3D_FEATURE_LEVEL"], "12_2")
|
||||
pair = apply({"BL_OPEN_DRIVER": "1"}, config, "1")
|
||||
self.assertNotIn("VKD3D_FEATURE_LEVEL", pair)
|
||||
self.assertNotIn("VKD3D_SHADER_MODEL", pair)
|
||||
self.assertEqual(pair["DROIDDECK_VKD3D_CAPS"], "driver")
|
||||
own = apply({"BL_OPEN_DRIVER": "1"}, config, "42")
|
||||
self.assertEqual(own["VKD3D_SHADER_MODEL"], "6_6")
|
||||
self.assertNotIn("VKD3D_FEATURE_LEVEL", own)
|
||||
|
||||
def test_game_ids_and_probes(self):
|
||||
for prefix in ("", "/compatdata/0", "/compatdata/0-123", "/compatdata/nope", "/compatdata/4294967296"):
|
||||
self.assertIsNone(MODULE["game_id"]({"STEAM_COMPAT_DATA_PATH": prefix}))
|
||||
|
||||
@@ -73,7 +73,10 @@ int __android_log_print(int, const char *, const char *, ...);
|
||||
''')
|
||||
(tmp / 'wayland-server.h').write_text('#pragma once\nstruct wl_display; struct wl_resource; struct wl_client;\n')
|
||||
compositor = (SOURCE.parent / 'compositor.c').read_text()
|
||||
callers = '\n'.join(function(compositor, n) for n in ('buffer_release_blocked', 'send_buffer_release', 'take_shm', 'take_pixel'))
|
||||
# send_buffer_release is a macro over send_buffer_release_at (with buffer tracing).
|
||||
callers = ('static void buf_trace_release(struct wl_resource *b, int line) { (void)b; (void)line; }\n'
|
||||
+ '#define send_buffer_release(b) send_buffer_release_at((b), __LINE__)\n'
|
||||
+ '\n'.join(function(compositor, n) for n in ('buffer_release_blocked', 'send_buffer_release_at', 'take_shm', 'take_pixel')))
|
||||
harness = (Path(__file__).with_name('vk_terminal_callers_test.c')).read_text()
|
||||
probe = tmp / 'probe.c'
|
||||
probe.write_text(harness.replace('/* COMPOSITOR_CALLERS */', callers))
|
||||
|
||||
Reference in new issue
Block a user