3 * - By John Hodge (thePowersGang)
9 #define UDI_VERSION 0x101
10 #define UDI_GFX_VERSION 0x101
14 #include <api_drv_video.h>
17 typedef struct rdata_s
23 void usage_ind(udi_usage_cb_t *cb, udi_ubit8_t resource_level)
25 // Set up structures that don't need interegating the card to do
29 @GFX_CLIENT channel_event_ind(udi_channel_event_cb_t *cb)
31 udi_gfx_bind_cb_t *bind_cb = cb->params.parent_bound.bind_cb;
34 case UDI_CHANNEL_CLOSED:
36 case UDI_CHANNEL_BOUND:
37 [sockets, engines, status] = udi_gfx_bind_req(bind_cb);
38 if( status != UDI_OK ) {
42 [new_cb] = udi_cb_alloc(bind_cb, ACESSGFX_CB_STATE);
43 udi_gfx_state_cb_t *state_cb = new_cb;
44 for( int i = 0; i < engines; i ++ )
46 state_cb->subsystem = i;
47 state_cb->attribute = UDI_GFX_PROP_PIXELFORMAT;
48 [pixfmt] = @TRY_NAK[status] udi_gfx_get_engine_req(state_cb)
50 // Shit to do if NAK happens
55 // TODO: Annotate udi_gfx_state_cb_t to note values are kept?
56 state_cb->subsystem = i;
57 state_cb->attribute = UDI_GFX_PROP_OPERATOR_INDEX;
58 [count] = udi_gfx_get_engine_req(state_cb);
59 for( int j = 0; j < count; j ++ )
61 state_cb->attribute = j;
62 [operator, arg_1, arg_2, arg_3] = udi_gfx_engine_getop_req(state_cb);
63 Log_Debug("UDIGFX", "%i/%i: %i 0x%x 0x%x 0x%x",
65 operator, arg_1, arg_2, arg_3);
70 // TODO: emit an error of some form?
75 // === UDI Bindings ===