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]:[NAK,status] = udi_gfx_get_engine_req(state_cb);
50 // Shit to do if NAK happens
56 // TODO: Annotate udi_gfx_state_cb_t to note values are kept?
57 state_cb->subsystem = i;
58 state_cb->attribute = UDI_GFX_PROP_OPERATOR_INDEX;
59 [count] = udi_gfx_get_engine_req(state_cb);
60 for( int j = 0; j < count; j ++ )
62 state_cb->attribute = j;
63 [operator, arg_1, arg_2, arg_3] = udi_gfx_engine_getop_req(state_cb);
64 Log_Debug("UDIGFX", "%i/%i: %i 0x%x 0x%x 0x%x",
66 operator, arg_1, arg_2, arg_3);
71 // TODO: emit an error of some form?
76 // === UDI Bindings ===