#define UDI_VERSION 0x101
#define UDI_PHYSIO_VERSION 0x101
#define UDI_GFX_VERSION 0x101
+#define UDI_PCI_VERSION 0x101
#include <udi.h>
#include <udi_physio.h>
#include <udi_gfx.h>
+#include <udi_pci.h>
#define DEBUG_ENABLED 1
#include "../helpers.h"
#include "../helpers_gfx.h"
#include "bochsga_common.h"
-// --- Management Metalang
+/* --- Management Metalang -- */
void bochsga_usage_ind(udi_usage_cb_t *cb, udi_ubit8_t resource_level)
{
- rdata_t *rdata = UDI_GCB(cb)->context;
- //udi_trace_write(rdata->init_context, UDI_TREVENT_LOCAL_PROC_ENTRY, 0, );
+ //rdata_t *rdata = UDI_GCB(cb)->context;
+ /*udi_trace_write(rdata->init_context, UDI_TREVENT_LOCAL_PROC_ENTRY, 0, );*/
- // TODO: Set up region data
+ /* TODO: Set up region data */
udi_usage_res(cb);
}
void bochsga_enumerate_req(udi_enumerate_cb_t *cb, udi_ubit8_t enumeration_level)
{
- rdata_t *rdata = UDI_GCB(cb)->context;
+ //rdata_t *rdata = UDI_GCB(cb)->context;
udi_instance_attr_list_t *attr_list = cb->attr_list;
switch(enumeration_level)
void bochsga_final_cleanup_req(udi_mgmt_cb_t *cb)
{
}
-// ---
+/* --- */
void bochsga_bus_dev_channel_event_ind(udi_channel_event_cb_t *cb);
void bochsga_bus_dev_bus_bind_ack(udi_bus_bind_cb_t *cb, udi_dma_constraints_t dma_constraints, udi_ubit8_t perferred_endianness, udi_status_t status);
void bochsga_bus_dev_bind__pio_map(udi_cb_t *cb, udi_pio_handle_t new_pio_handle);
udi_cb_t *gcb = UDI_GCB(cb);
rdata_t *rdata = gcb->context;
- // Set up PIO handles
+ /* Set up PIO handles */
rdata->init.pio_index = -1;
bochsga_bus_dev_bind__pio_map(gcb, UDI_NULL_PIO_HANDLE);
- // V V V V
+ /* V V V V */
}
void bochsga_bus_dev_bind__pio_map(udi_cb_t *gcb, udi_pio_handle_t new_pio_handle)
{
rdata_t *rdata = gcb->context;
- if( rdata->init.pio_index != -1 )
+ if( rdata->init.pio_index != (udi_index_t)-1 )
{
rdata->pio_handles[rdata->init.pio_index] = new_pio_handle;
}
void bochsga_bus_dev_intr_detach_ack(udi_intr_detach_cb_t *intr_detach_cb)
{
}
-// ---
-// GFX Provider ops
+
+/* --- GFX Provider ops -- */
void bochsga_gfx_channel_event_ind(udi_channel_event_cb_t *cb)
{
- // No operation
+ /* No operation */
}
void bochsga_gfx_bind_req(udi_gfx_bind_cb_t *cb)
{
- // TODO: ACK bind if nothing already bound
+ /* TODO: ACK bind if nothing already bound */
}
void bochsga_gfx_unbind_req(udi_gfx_bind_cb_t *cb)
{
- // TODO: Release internal state?
+ /* TODO: Release internal state? */
}
void bochsga_gfx_set_connector_req$pio(udi_cb_t *gcb, udi_buf_t *new_buf, udi_status_t status, udi_ubit16_t result)
{
}
udi_gfx_set_connector_ack(cb);
return;
- // Change input engine
- // -
+ /* Change input engine */
case UDI_GFX_PROP_INPUT:
- if( rdata->outputstate.engine != value )
- {
- // Validate
- if( !(0 <= value && value <= N_ENGINES) ) {
- udi_gfx_set_connector_ack(cb /*, UDI_STAT_NOT_SUPPORTED*/);
- return ;
- }
-
- // Change saved bitdepth (requires cycling enable)
- rdata->outputstate.engine = value;
- rdata->outputstate.bitdepth = bochsga_engine_defs[value].bitdepth;
- }
udi_gfx_set_connector_ack(cb);
return;
- // Alter output dimensions
+ /* Alter output dimensions */
case UDI_GFX_PROP_WIDTH:
if( value % 8 != 0 ) {
- // Qemu doesn't like resolutions not a multiple of 8
+ /* Qemu doesn't like resolutions not a multiple of 8 */
return ;
}
if( !(320 <= value && value <= rdata->limits.max_width) ) {
udi_gfx_get_connector_ack(cb, !!rdata->output_enable);
return;
case UDI_GFX_PROP_INPUT:
- udi_gfx_get_connector_ack(cb, rdata->outputstate.bitdepth/8-1);
+ udi_gfx_get_connector_ack(cb, 0);
return;
case UDI_GFX_PROP_WIDTH:
udi_gfx_get_connector_ack(cb, rdata->outputstate.width);
switch(cb->attribute)
{
case UDI_GFX_PROP_ENABLE:
- // 2 values: 0 and 1
+ /* 2 values: 0 and 1 */
gfxhelpers_return_range_set(udi_gfx_range_connector_ack, cb, 2, 0, 1);
return;
case UDI_GFX_PROP_INPUT:
- // 0--3 with a step of 1
- gfxhelpers_return_range_simple(udi_gfx_range_connector_ack, cb, 0, 3, 1);
+ /* Fix 0 */
+ gfxhelpers_return_range_fixed(udi_gfx_range_connector_ack, cb, 0);
return;
case UDI_GFX_PROP_WIDTH:
+ /* qemu restricts to 8 step */
gfxhelpers_return_range_simple(udi_gfx_range_connector_ack, cb,
- BOCHSGA_MIN_WIDTH, rdata->limits.max_width, 8); // qemu restricts to 8 step
+ BOCHSGA_MIN_WIDTH, rdata->limits.max_width, 8);
return;
case UDI_GFX_PROP_HEIGHT:
+ /* step of 8 for neatness */
gfxhelpers_return_range_simple(udi_gfx_range_connector_ack, cb,
- BOCHSGA_MIN_HEIGHT, rdata->limits.max_height, 8); // step of 8 for neatness
+ BOCHSGA_MIN_HEIGHT, rdata->limits.max_height, 8);
return;
case UDI_GFX_PROP_CONNECTOR_TYPE:
gfxhelpers_return_range_fixed(udi_gfx_range_connector_ack, cb, UDI_GFX_CONNECTOR_HIDDEN);
udi_gfx_range_cb_t *cb = UDI_MCB(cb, udi_gfx_range_cb_t);
udi_gfx_range_connector_ack(cb);
}
-// --- Engine Manipulation ---
+
+/* --- Engine Manipulation --- */
void bochsga_gfx_set_engine_req(udi_gfx_state_cb_t *cb, udi_ubit32_t value)
{
udi_cb_t *gcb = UDI_GCB(cb);
engine->height = value;
udi_gfx_set_engine_ack(cb);
return;
- case UDI_GFX_PROP_OPERATOR_INDEX:
- if( value >= bochsga_engine_defs[cb->subsystem].op_map.op_count ) {
- // Bad value
- udi_gfx_set_engine_ack(cb);
- return;
- }
- engine->op_idx = value;
- udi_gfx_set_engine_ack(cb);
- return;
}
CONTIN(bochsga_gfx_set_engine_req, udi_log_write,
(UDI_TREVENT_LOG, UDI_LOG_INFORMATION, BOCHSGA_OPS_GFX, 0, BOCHSGA_MSGNUM_PROPUNK, __func__, cb->attribute),
}
const engine_t *engine = &rdata->engines[cb->subsystem];
- const engine_static_t *engine_def = &bochsga_engine_defs[cb->subsystem];
switch(cb->attribute)
{
udi_gfx_get_engine_ack(cb, engine->height);
return;
- case UDI_GFX_PROP_OPERATOR_INDEX:
- udi_gfx_get_engine_ack(cb, engine->op_idx);
- return;
- case UDI_GFX_PROP_OPERATOR_OPCODE:
- case UDI_GFX_PROP_OPERATOR_ARG_1:
- case UDI_GFX_PROP_OPERATOR_ARG_2:
- case UDI_GFX_PROP_OPERATOR_ARG_3:
- udi_gfx_get_engine_ack(cb, gfxhelpers_get_engine_op(&engine_def->op_map, engine->op_idx, cb->attribute));
+ case UDI_GFX_PROP_STOCK_FORMAT:
+ udi_gfx_get_engine_ack(cb, UDI_GFX_STOCK_FORMAT_R8G8B8);
return;
}
CONTIN(bochsga_gfx_get_engine_req, udi_log_write,
{
udi_cb_t *gcb = UDI_GCB(cb);
rdata_t *rdata = gcb->context;
+ (void)rdata;
if( cb->subsystem >= N_ENGINES ) {
udi_gfx_range_engine_ack(cb);
return;
}
- engine_t *engine = &rdata->engines[cb->subsystem];
- const engine_static_t *engine_def = &bochsga_engine_defs[cb->subsystem];
+ //engine_t *engine = &rdata->engines[cb->subsystem];
switch(cb->attribute)
{
gfxhelpers_return_range_fixed(udi_gfx_range_engine_ack, cb, -1);
return;
- case UDI_GFX_PROP_OPERATOR_INDEX:
- gfxhelpers_return_range_simple(udi_gfx_range_engine_ack, cb, 0, engine->op_idx-1, 1);
- return;
- case UDI_GFX_PROP_OPERATOR_OPCODE:
- case UDI_GFX_PROP_OPERATOR_ARG_1:
- case UDI_GFX_PROP_OPERATOR_ARG_2:
- case UDI_GFX_PROP_OPERATOR_ARG_3:
- gfxhelpers_return_range_fixed(udi_gfx_range_engine_ack, cb,
- gfxhelpers_get_engine_op(&engine_def->op_map, engine->op_idx, cb->attribute));
+ case UDI_GFX_PROP_STOCK_FORMAT:
+ gfxhelpers_return_range_fixed(udi_gfx_range_engine_ack, cb, UDI_GFX_STOCK_FORMAT_B8G8R8);
return;
}
CONTIN(bochsga_gfx_range_engine_req, udi_log_write,
udi_gfx_range_cb_t *cb = UDI_MCB(cb, udi_gfx_range_cb_t);
udi_gfx_range_engine_ack( cb );
}
-void bochsga_gfx_command_req(udi_gfx_command_cb_t *cb)
+void bochsga_gfx_get_engine_operator_req(udi_gfx_range_cb_t *cb)
+{
+ /* TODO: Get Engine operator */
+ udi_gfx_get_engine_operator_ack(cb, 0, 0,0,0);
+}
+void bochsga_gfx_connector_command_req(udi_gfx_command_cb_t *cb)
+{
+ /* Need to parse the GLX stream */
+ udi_gfx_connector_command_ack(cb);
+}
+void bochsga_gfx_engine_command_req(udi_gfx_command_cb_t *cb)
+{
+ /* Need to parse the GLX stream */
+ udi_gfx_engine_command_ack(cb);
+}
+void bochsga_gfx_buffer_info_req(udi_gfx_buffer_info_cb_t *cb)
+{
+ switch(cb->buffer_index)
+ {
+ case 0:
+ udi_gfx_buffer_info_ack(cb, 1024, 768, 24, 0);
+ return;
+ default:
+ break;
+ }
+ CONTIN(bochsga_gfx_buffer_info_req, udi_log_write,
+ (UDI_TREVENT_LOG, UDI_LOG_INFORMATION, BOCHSGA_OPS_GFX, 0, BOCHSGA_MSGNUM_BUFUNK, __func__, cb->buffer_index),
+ (udi_status_t status)
+ );
+ udi_gfx_buffer_info_cb_t *cb = UDI_MCB(gcb, udi_gfx_buffer_info_cb_t);
+ udi_gfx_buffer_info_ack(cb, 0,0,0,0);
+}
+void bochsga_gfx_buffer_write_req(udi_gfx_buffer_cb_t *cb)
+{
+}
+void bochsga_gfx_buffer_read_req(udi_gfx_buffer_cb_t *cb)
{
- // Need to parse the GLX stream
}
-// ====================================================================
-// - Management ops
+/*
+====================================================================
+Management ops
+====================================================================
+*/
udi_mgmt_ops_t bochsga_mgmt_ops = {
bochsga_usage_ind,
bochsga_enumerate_req,
bochsga_final_cleanup_req
};
udi_ubit8_t bochsga_mgmt_op_flags[4] = {0,0,0,0};
-// - Bus Ops
+/* - Bus Ops */
udi_bus_device_ops_t bochsga_bus_dev_ops = {
bochsga_bus_dev_channel_event_ind,
bochsga_bus_dev_bus_bind_ack,
bochsga_bus_dev_intr_detach_ack
};
udi_ubit8_t bochsga_bus_dev_ops_flags[5] = {0};
-// - GFX provider ops
+/* - GFX provider ops */
udi_gfx_provider_ops_t bochsga_gfx_ops = {
bochsga_gfx_channel_event_ind,
bochsga_gfx_bind_req,
bochsga_gfx_get_engine_req,
bochsga_gfx_range_connector_req,
bochsga_gfx_range_engine_req,
- bochsga_gfx_command_req
+ bochsga_gfx_get_engine_operator_req,
+ bochsga_gfx_connector_command_req,
+ bochsga_gfx_engine_command_req,
+ bochsga_gfx_buffer_info_req,
+ bochsga_gfx_buffer_read_req,
+ bochsga_gfx_buffer_write_req,
};
udi_ubit8_t bochsga_gfx_ops_flags[10] = {0};
-// --
+/* -- */
udi_primary_init_t bochsga_pri_init = {
.mgmt_ops = &bochsga_mgmt_ops,
.mgmt_op_flags = bochsga_mgmt_op_flags,
#define BOCHSGA_ENGINE_PROP_BUFFER (UDI_GFX_PROP_CUSTOM+0)
-// === CONSTANTS ===
+/* === CONSTANTS === */
const gfxhelpers_op_t bochsga_engine_ops_8bpp[] = {
};
const gfxhelpers_op_t bochsga_engine_ops_32bpp[] = {
- {UDI_GFX_OPERATOR_RGB, 1, 2, 3}, // #0 Output RGB from ops #1,#2,#3
- {UDI_GFX_OPERATOR_SEG, 4, 16, 8}, // #1 Extract 8 bits from bit 16 of #4
- {UDI_GFX_OPERATOR_SEG, 4, 8, 8}, // #2 8 bits from ofs 8 of #4
- {UDI_GFX_OPERATOR_SEG, 4, 0, 8}, // #3 8 bits from ofs 0 of #4
- {UDI_GFX_OPERATOR_BUFFER, 5, 6, 32}, // #4 32 bits from buffer #5 ofs #6
- {UDI_GFX_OPERATOR_ATTR, 0, BOCHSGA_ENGINE_PROP_BUFFER, 0}, // #5 Buffer index
- {UDI_GFX_OPERATOR_MAD, 7, 8, 9}, // #6 Get offset (#8 * #7 + #9)
- {UDI_GFX_OPERATOR_ATTR, 0, UDI_GFX_PROP_SOURCE_WIDTH, 0}, // #7 Read buffer width
- {UDI_GFX_OPERATOR_Y, 0, 0, 0}, // #8 Y coordinate
- {UDI_GFX_OPERATOR_X, 0, 0, 0} // #9 X coordinate
+ {UDI_GFX_OPERATOR_RGB, 1, 2, 3}, /* #0 Output RGB from ops #1,#2,#3 */
+ {UDI_GFX_OPERATOR_SEG, 4, 16, 8}, /* #1 Extract 8 bits from bit 16 of #4 */
+ {UDI_GFX_OPERATOR_SEG, 4, 8, 8}, /* #2 8 bits from ofs 8 of #4 */
+ {UDI_GFX_OPERATOR_SEG, 4, 0, 8}, /* #3 8 bits from ofs 0 of #4 */
+ {UDI_GFX_OPERATOR_BUFFER, 5, 6, 32}, /* #4 32 bits from buffer #5 ofs #6 */
+ {UDI_GFX_OPERATOR_ATTR, 0, BOCHSGA_ENGINE_PROP_BUFFER, 0}, /* #5 Buffer index */
+ {UDI_GFX_OPERATOR_MAD, 7, 8, 9}, /* #6 Get offset (#8 * #7 + #9) */
+ {UDI_GFX_OPERATOR_ATTR, 0, UDI_GFX_PROP_SOURCE_WIDTH, 0}, /* #7 Read buffer width */
+ {UDI_GFX_OPERATOR_Y, 0, 0, 0}, /* #8 Y coordinate */
+ {UDI_GFX_OPERATOR_X, 0, 0, 0} /* #9 X coordinate */
};
typedef struct {
* http://www.d-rift.nl/combuster/mos3/?p=viewsource&file=/include/common/udi_gfx.h
*/
-// note that the specification, and thus, the contents of this file is not fixed.
+/* note that the specification, and thus, the contents of this file is not fixed. */
#ifndef __UDI_GFX_H__
#define __UDI_GFX_H__
* Lists the various UDI properties
*/
-// General state properties
/* Constant: UDI_GFX_PROP_ENABLE
*
* Valid values:
*/
#define UDI_GFX_PROP_CUSTOM 1024
-// engine properties
+/* engine properties */
/* Constant: UDI_GFX_PROP_CLIP
*
*/
#define UDI_GFX_PROP_OPERATOR_COUNT 28
-// properties for removal:
+#if 0
+/* properties for removal: */
#define UDI_GFX_PROP_STORE_COUNT 24 // not generic
#define UDI_GFX_PROP_STORE_WIDTH 9 // not generic
#define UDI_GFX_PROP_STORE_HEIGHT 10 // not generic
#define UDI_GFX_PROP_SOURCE_HEIGHT 13 // should have been documented when I still knew what it did.
#define UDI_GFX_PROP_INPUTX 25 // should have been documented when I still knew what it did.
#define UDI_GFX_PROP_INPUTY 26 // should have been documented when I still knew what it did.
+#endif
-// connector properties
+/* connector properties */
#define UDI_GFX_PROP_SIGNAL 23
#define UDI_GFX_PROP_CONNECTOR_TYPE 24
#define UDI_GFX_PROP_VGA_H_FRONT_PORCH 25
* a1/a2/a3 represents taking the output of a previous operation
* v1/v2/v3 represents the literal value of that argument
*/
-#define UDI_GFX_OPERATOR_RGB 0 // output = (color) red(a1) + green(a2) + blue(a3) (each component is UDI_GFX_PROP_COLOR_BITS
-#define UDI_GFX_OPERATOR_YUV 1 // output = (color) Y(a1) + U(a2) + V(a3)
-#define UDI_GFX_OPERATOR_YIQ 2 // output = (color) Y(a1) + I(a2) + Q(a3)
-#define UDI_GFX_OPERATOR_I 3 // output = (color) intensity(a1)
-#define UDI_GFX_OPERATOR_ALPHA 4 // output = (color) a1 + alpha(a2)
-#define UDI_GFX_OPERATOR_ADD 5 // output = a1 + a2 + v3
-#define UDI_GFX_OPERATOR_SUB 6 // output = a1 - a2 - v3
-#define UDI_GFX_OPERATOR_MUL 7 // output = a1 * a2
-#define UDI_GFX_OPERATOR_DIV 8 // output = a1 / a2
-#define UDI_GFX_OPERATOR_MAD 9 // output = a1 * a2 + a3
-#define UDI_GFX_OPERATOR_FRC 10 // output = (a1 * a2) / a3
-#define UDI_GFX_OPERATOR_SHR 11 // output = a1 >> (a2 + v3)
-#define UDI_GFX_OPERATOR_SHL 12 // output = a1 << (a2 + v3)
-#define UDI_GFX_OPERATOR_ROR 13 // output = a1 >> a2 (over a3 bits)
-#define UDI_GFX_OPERATOR_ROL 14 // output = a1 << a2 (over a3 bits)
-#define UDI_GFX_OPERATOR_SAR 15 // output = a1 >> a2 (width is a3 bits, i.e. empties are filled with bit a3-1)
-#define UDI_GFX_OPERATOR_SAL 16 // output = a1 <<< (a2 + v3) (empties filled with bit 0)
-#define UDI_GFX_OPERATOR_AND 17 // output = a1 & a2
-#define UDI_GFX_OPERATOR_OR 18 // output = a1 | a2 | v3
-#define UDI_GFX_OPERATOR_NOT 19 // output = ~a1
-#define UDI_GFX_OPERATOR_XOR 20 // output = a1 ^ a2 ^ v3
-#define UDI_GFX_OPERATOR_NEG 21 // output = -a1
-#define UDI_GFX_OPERATOR_SEG 22 // output = (a1 >> v2) & (2**v3-1) (select v3 bits starting from bit v2)
-#define UDI_GFX_OPERATOR_RANGE 23 // output = (a1 > a2) ? a2 : ((a1 < a3) ? a3 : a1)
-#define UDI_GFX_OPERATOR_CONST 24 // output = v1
-#define UDI_GFX_OPERATOR_ATTR 25 // output = property[a1 + v2]
-#define UDI_GFX_OPERATOR_SWITCH 26 // output = output[(a1 % v3) + v2]
-#define UDI_GFX_OPERATOR_BUFFER 27 // output = buffer[a1][a2] (buffer is v3 bits per entry)
-#define UDI_GFX_OPERATOR_X 28 // output = output x pixel
-#define UDI_GFX_OPERATOR_Y 29 // output = output y pixel
-#define UDI_GFX_OPERATOR_TX 30 // output = horizontal tile index belonging to output pixel
-#define UDI_GFX_OPERATOR_TY 31 // output = vertical tile index belonging to output pixel
-#define UDI_GFX_OPERATOR_TXOFF 32 // output = horizontal offset from start of tile
-#define UDI_GFX_OPERATOR_TYOFF 33 // output = vertical offset from start of tile
-#define UDI_GFX_OPERATOR_INPUT 34 // output = input engine[x][y] component v1
-#define UDI_GFX_OPERATOR_DINPUT 35 // output = input engine[a1][a2] component v3
+#define UDI_GFX_OPERATOR_RGB 0 /* output = (color) red(a1) + green(a2) + blue(a3) (each component is UDI_GFX_PROP_COLOR_BITS*/
+#define UDI_GFX_OPERATOR_YUV 1 /* output = (color) Y(a1) + U(a2) + V(a3)*/
+#define UDI_GFX_OPERATOR_YIQ 2 /* output = (color) Y(a1) + I(a2) + Q(a3)*/
+#define UDI_GFX_OPERATOR_I 3 /* output = (color) intensity(a1)*/
+#define UDI_GFX_OPERATOR_ALPHA 4 /* output = (color) a1 + alpha(a2)*/
+#define UDI_GFX_OPERATOR_ADD 5 /* output = a1 + a2 + v3*/
+#define UDI_GFX_OPERATOR_SUB 6 /* output = a1 - a2 - v3*/
+#define UDI_GFX_OPERATOR_MUL 7 /* output = a1 * a2*/
+#define UDI_GFX_OPERATOR_DIV 8 /* output = a1 / a2*/
+#define UDI_GFX_OPERATOR_MAD 9 /* output = a1 * a2 + a3*/
+#define UDI_GFX_OPERATOR_FRC 10 /* output = (a1 * a2) / a3*/
+#define UDI_GFX_OPERATOR_SHR 11 /* output = a1 >> (a2 + v3)*/
+#define UDI_GFX_OPERATOR_SHL 12 /* output = a1 << (a2 + v3)*/
+#define UDI_GFX_OPERATOR_ROR 13 /* output = a1 >> a2 (over a3 bits)*/
+#define UDI_GFX_OPERATOR_ROL 14 /* output = a1 << a2 (over a3 bits)*/
+#define UDI_GFX_OPERATOR_SAR 15 /* output = a1 >> a2 (width is a3 bits, i.e. empties are filled with bit a3-1)*/
+#define UDI_GFX_OPERATOR_SAL 16 /* output = a1 <<< (a2 + v3) (empties filled with bit 0)*/
+#define UDI_GFX_OPERATOR_AND 17 /* output = a1 & a2*/
+#define UDI_GFX_OPERATOR_OR 18 /* output = a1 | a2 | v3*/
+#define UDI_GFX_OPERATOR_NOT 19 /* output = ~a1*/
+#define UDI_GFX_OPERATOR_XOR 20 /* output = a1 ^ a2 ^ v3*/
+#define UDI_GFX_OPERATOR_NEG 21 /* output = -a1*/
+#define UDI_GFX_OPERATOR_SEG 22 /* output = (a1 >> v2) & (2**v3-1) (select v3 bits starting from bit v2)*/
+#define UDI_GFX_OPERATOR_RANGE 23 /* output = (a1 > a2) ? a2 : ((a1 < a3) ? a3 : a1)*/
+#define UDI_GFX_OPERATOR_CONST 24 /* output = v1*/
+#define UDI_GFX_OPERATOR_ATTR 25 /* output = property[a1 + v2]*/
+#define UDI_GFX_OPERATOR_SWITCH 26 /* output = output[(a1 % v3) + v2]*/
+#define UDI_GFX_OPERATOR_BUFFER 27 /* output = buffer[a1][a2] (buffer is v3 bits per entry)*/
+#define UDI_GFX_OPERATOR_X 28 /* output = output x pixel*/
+#define UDI_GFX_OPERATOR_Y 29 /* output = output y pixel*/
+#define UDI_GFX_OPERATOR_TX 30 /* output = horizontal tile index belonging to output pixel*/
+#define UDI_GFX_OPERATOR_TY 31 /* output = vertical tile index belonging to output pixel*/
+#define UDI_GFX_OPERATOR_TXOFF 32 /* output = horizontal offset from start of tile*/
+#define UDI_GFX_OPERATOR_TYOFF 33 /* output = vertical offset from start of tile*/
+#define UDI_GFX_OPERATOR_INPUT 34 /* output = input engine[x][y] component v1*/
+#define UDI_GFX_OPERATOR_DINPUT 35 /* output = input engine[a1][a2] component v3*/
/* Enumeration: UDI_GFX_STOCK_FORMAT
* Lists stock configurations
#define UDI_GFX_STOCK_FORMAT_B5G5R5X1 8
#define UDI_GFX_STOCK_FORMAT_N8 9
-// Enumeration: UDI_GFX_BUFFER_INFO_FLAG
-// Lists behavioural patterns for direct buffer accesses.
-//
-#define UDI_GFX_BUFFER_INFO_FLAG_R 0x0001 // buffer can be read
-#define UDI_GFX_BUFFER_INFO_FLAG_W 0x0002 // buffer can be written
-#define UDI_GFX_BUFFER_INFO_FLAG_BITALIGN_ENTRY 0x0004 // for non-multiple-of-eight buffer slot sizes, align on byte boundary every unit
-#define UDI_GFX_BUFFER_INFO_FLAG_BITALIGN_ROW 0x0008 // for non-multiple-of-eight buffer slot sizes, align only the start of the row
+/*
+ * Enumeration: UDI_GFX_BUFFER_INFO_FLAG
+ * Lists behavioural patterns for direct buffer accesses.
+ */
+#define UDI_GFX_BUFFER_INFO_FLAG_R 0x0001 /* buffer can be read*/
+#define UDI_GFX_BUFFER_INFO_FLAG_W 0x0002 /* buffer can be written*/
+#define UDI_GFX_BUFFER_INFO_FLAG_BITALIGN_ENTRY 0x0004 /* for non-multiple-of-eight buffer slot sizes, align on byte boundary every unit*/
+#define UDI_GFX_BUFFER_INFO_FLAG_BITALIGN_ROW 0x0008 /* for non-multiple-of-eight buffer slot sizes, align only the start of the row*/
// Constant: UDI_GFX_PROVIDER_OPS_NUM
udi_gfx_get_engine_operator_req_op_t*gfx_get_engine_operator_req_op_t;
udi_gfx_connector_command_req_op_t *gfx_connector_command_op;
udi_gfx_engine_command_req_op_t *gfx_engine_command_op;
- udi_gfx_buffer_info_req_op_t *gfx_buffer_info_ack;
- udi_gfx_buffer_read_req_op_t *gfx_buffer_read_ack;
- udi_gfx_buffer_write_req_op_t *gfx_buffer_write_ack;
+ udi_gfx_buffer_info_req_op_t *gfx_buffer_info_req_op;
+ udi_gfx_buffer_read_req_op_t *gfx_buffer_read_req_op;
+ udi_gfx_buffer_write_req_op_t *gfx_buffer_write_req_op;
} udi_gfx_provider_ops_t;
/* Structure: udi_gfx_client_ops_t