f9c4e25483
Provide fd_rd_output facilities which enable constructing RD dumps that are stored into gzip-compressed output. This matches the default behavior of libwrap. Enabling and adjusting the behavior of functionality is done through the FD_RD_DUMP environment variable. Integration into Turnip's MSM backend is covered, replacing the previous RD dump that was enabled through TU_DEBUG=rd. That debug option still works and is the same as using FD_RD_DUMP=enable. By default the dumps are created for each submission, using the provided submit index. FD_RD_DUMP=combine enables gathering dumps for submissions for the given logical device into a single file. In the Turnip integration, FD_RD_DUMP=full will force dumping contents of any buffer object. Additionally, with that option enabled any previous submit will be waited on. Specifying FD_RD_DUMP=trigger sets up a trigger file that can be used to activate dumping manually. Writing zero or some non-integer value to the file will disable dumping. Writing a positive integer value to it will enable dumps for that many future submissions. Writing -1 to it will enable dumps until disabled. Signed-off-by: Zan Dobersek <zdobersek@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27230>