driver.h 3.63 KB
/*
 *  driver.h, memory structure for CC driver
 *
 *
 *
 */

#ifndef DRIVER_INCLUDE
#define DRIVER_INCLUDE

#define	DELAY_ONE		1	
#define	DELAY_TWO		2
#define	DELAY_THREE		3
#define	DELAY_FOUR		4

typedef struct {
  /* required */
  char *label;
  int gclk_old;
  int argc;
  char **argv;

  /* input */
  int gclk;

  /* output */
    int  st_span;        /* start of span */
    int  ncyc;           /* number of cycles per pixel */
    int  key_en;
    int  texture_edge_mode;
    int  cvg_times_alpha;
    int  alpha_cvg_select;
    int  cc_x_sel_0_r;
    int  cc_y_sel_0_r;
    int  cc_a_sel_0_r;
    int  cc_c_sel_0_r;
    int  cc_x_sel_0_a;
    int  cc_y_sel_0_a;
    int  cc_a_sel_0_a;
    int  cc_c_sel_0_a;
    int  cc_x_sel_1_r;
    int  cc_y_sel_1_r;
    int  cc_a_sel_1_r;
    int  cc_c_sel_1_r;
    int  cc_x_sel_1_a;
    int  cc_y_sel_1_a;
    int  cc_a_sel_1_a;
    int  cc_c_sel_1_a;
    int  st_r;
    int  st_g;
    int  st_b;
    int  st_a;
    int  tf_r;
    int  tf_g;
    int  tf_b;
    int  tf_a;
    int  tf_lod_frac;
    int  tf_lge1;
    int  prim_lod_frac;
    int  prim_r;
    int  prim_g;
    int  prim_b;
    int  prim_a;
    int  env_r;
    int  env_g;
    int  env_b;
    int  env_a;
    int  center_r;
    int  center_g;
    int  center_b;
    int  scale_r;
    int  scale_g;
    int  scale_b;
    int  width_r;
    int  width_g;
    int  width_b;
    int  k4_coeff;
    int  k5_coeff;
    int  noise;
    int  cvg;
    int  dv;

    /* artificially delayed values */

    int  key_en_delay[DELAY_THREE];
    int  texture_edge_mode_delay[DELAY_THREE];
    int  cvg_times_alpha_delay[DELAY_THREE];
    int  alpha_cvg_select_delay[DELAY_THREE];
    int  cc_x_sel_0_r_delay[DELAY_ONE];
    int  cc_y_sel_0_r_delay[DELAY_ONE];
    int  cc_a_sel_0_r_delay[DELAY_ONE];
    int  cc_c_sel_0_r_delay[DELAY_ONE];
    int  cc_x_sel_0_a_delay[DELAY_ONE];
    int  cc_y_sel_0_a_delay[DELAY_ONE];
    int  cc_a_sel_0_a_delay[DELAY_ONE];
    int  cc_c_sel_0_a_delay[DELAY_ONE];
    int  cc_x_sel_1_r_delay[DELAY_ONE];
    int  cc_y_sel_1_r_delay[DELAY_ONE];
    int  cc_a_sel_1_r_delay[DELAY_ONE];
    int  cc_c_sel_1_r_delay[DELAY_ONE];
    int  cc_x_sel_1_a_delay[DELAY_ONE];
    int  cc_y_sel_1_a_delay[DELAY_ONE];
    int  cc_a_sel_1_a_delay[DELAY_ONE];
    int  cc_c_sel_1_a_delay[DELAY_ONE];
    int  st_r_delay[DELAY_TWO];
    int  st_g_delay[DELAY_TWO];
    int  st_b_delay[DELAY_TWO];
    int  st_a_delay[DELAY_TWO];
    int  tf_r_delay[DELAY_TWO];		/* see comments in driver code */
    int  tf_g_delay[DELAY_TWO];		/* ""			    "" */
    int  tf_b_delay[DELAY_TWO];		/* ""			    "" */
    int  tf_a_delay[DELAY_TWO];		/* ""			    "" */
    int  tf_lod_frac_delay[DELAY_ONE];
    int  tf_lge1_delay[DELAY_ONE];
    int  prim_lod_frac_delay[DELAY_TWO];
    int  prim_r_delay[DELAY_TWO];
    int  prim_g_delay[DELAY_TWO];
    int  prim_b_delay[DELAY_TWO];
    int  prim_a_delay[DELAY_TWO];
    int  env_r_delay[DELAY_TWO];
    int  env_g_delay[DELAY_TWO];
    int  env_b_delay[DELAY_TWO];
    int  env_a_delay[DELAY_TWO];
    int  center_r_delay[DELAY_TWO];
    int  center_g_delay[DELAY_TWO];
    int  center_b_delay[DELAY_TWO];
    int  scale_r_delay[DELAY_TWO];
    int  scale_g_delay[DELAY_TWO];
    int  scale_b_delay[DELAY_TWO];
    int  width_r_delay[DELAY_THREE];
    int  width_g_delay[DELAY_THREE];
    int  width_b_delay[DELAY_THREE];
    int  k4_coeff_delay[DELAY_TWO];
    int  k5_coeff_delay[DELAY_TWO];
    int  noise_delay[DELAY_TWO];
    int  cvg_delay[DELAY_THREE];
    int  dither_en;
    int  dv_delay[DELAY_FOUR];
} driver_t;


/*
 *  Prototypes
 */
void driver(driver_t **pp0, driver_t **pp1);
void driver_init(driver_t *p0, driver_t *p1);

#endif /* DRIVER_INCLUDE */