[client] transport: introduce pluggable frame transports
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled

Move shared-memory ownership, LGMP session handling, queue access, and
DMA setup behind a transport interface. The LGMP backend preserves the
existing zero-copy frame and DMA paths while owning its lgmp:* options.

Expose the initialized EGL context through a versioned renderer interop
record for future accelerated decode backends. Add an LGMP-independent,
deterministic test transport for graphics-pipeline validation.
This commit is contained in:
Geoffrey McRae
2026-07-20 05:09:43 +00:00
parent d4b3506e6c
commit 36b33033a1
22 changed files with 2138 additions and 819 deletions

View File

@@ -47,6 +47,7 @@ static StringList optScancodeValues (struct Option * opt);
static bool optScancodeValidate (struct Option * opt, const char ** error);
static char * optScancodeToString (struct Option * opt);
static bool optRotateValidate (struct Option * opt, const char ** error);
static bool optTransportValidate (struct Option * opt, const char ** error);
static bool optMicDefaultParse (struct Option * opt, const char * str);
static StringList optMicDefaultValues (struct Option * opt);
static char * optMicDefaultToString(struct Option * opt);
@@ -87,25 +88,12 @@ static struct Option options[] =
.value.x_bool = false,
},
{
.module = "app",
.name = "cursorPollInterval",
.description = "How often to check for a cursor update in microseconds",
.type = OPTION_TYPE_INT,
.value.x_int = 1000
},
{
.module = "app",
.name = "framePollInterval",
.description = "How often to check for a frame update in microseconds",
.type = OPTION_TYPE_INT,
.value.x_int = 1000
},
{
.module = "app",
.name = "allowDMA",
.description = "Allow direct DMA transfers if supported (see `README.md` in the `module` dir)",
.type = OPTION_TYPE_BOOL,
.value.x_bool = true
.module = "app",
.name = "transport",
.description = "Transport backend to use",
.type = OPTION_TYPE_STRING,
.value.x_string = "lgmp",
.validator = optTransportValidate,
},
// window options
@@ -686,9 +674,7 @@ bool config_load(int argc, char * argv[])
}
// setup the application params for the basic types
g_params.cursorPollInterval = option_get_int ("app" , "cursorPollInterval");
g_params.framePollInterval = option_get_int ("app" , "framePollInterval" );
g_params.allowDMA = option_get_bool ("app" , "allowDMA" );
g_params.transport = option_get_string("app", "transport" );
g_params.windowTitle = option_get_string("win", "title" );
g_params.appId = option_get_string("win", "appId" );
@@ -1025,6 +1011,15 @@ static bool optRotateValidate(struct Option * opt, const char ** error)
return false;
}
static bool optTransportValidate(struct Option * opt, const char ** error)
{
if (lgTransport_isValid(opt->value.x_string))
return true;
*error = "Unknown transport (expected lgmp or test)";
return false;
}
static bool optMicDefaultParse(struct Option * opt, const char * str)
{
if (!str)