stress.h 3.2 KB

/**************************************************************************
 *                                                                        *
 *               Copyright (C) 1995, Silicon Graphics, Inc.               *
 *                                                                        *
 *  These coded instructions, statements, and computer programs  contain  *
 *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
 *  are protected by Federal copyright  law.  They  may not be disclosed  *
 *  to  third  parties  or copied or duplicated in any form, in whole or  *
 *  in part, without the prior written consent of Silicon Graphics, Inc.  *
 *                                                                        *
 *************************************************************************/

#ifndef __STRESS_H__
#define __STRESS_H__

/*
 * File:	stress.h
 *
 */

#include <PR/sptask.h>

#define NUM_FIELDS          1  /* 1 = 60 Hz video interrupts, 2 = 30 Hz, etc */

#define	PHYSICAL_SEGMENT	0  /* maps to physical address 0 */
#define	STATIC_SEGMENT		1
#define	DYNAMIC_SEGMENT		2
#define	TEXTURE_SEGMENT		3
#define	CFB_SEGMENT			4

#define	SCREEN_HT				240
#define	SCREEN_WD				320

#define STRESS_ZBUFFER			0x00000400

#define MAX_MESGS				8
#define MAIN_PRIORITY           10
#define STRESS_PRIORITY         10
#define AUDIO_PRIORITY          12
#define SCHEDULER_PRIORITY      13

#define STACKSIZE               0x2000
#define BOOT_STACKSIZE			0x2000
#define STRESS_STACKSIZE		0x2000
#define MAIN_STACKSIZE			0x2000
#define AUDIO_STACKSIZE			0x2000
#define GFXDLSIZE				128

/*
 * ifdef needed because this file is included by "spec"
 */
#ifdef _LANGUAGE_C

#include "sched.h"

#if defined( _HW_VERSION_1 )
#define PRINTF  rmonPrintf
#else
#define PRINTF  osSyncPrintf
#endif

/*
 * Layout of our dynamic segment
 */
typedef struct {
	Mtx		projection;
	Mtx		ortho;
	Mtx		dummy_mtx;
	Mtx		eye;
	Mtx		viewing;
	Gfx		ani_water[2];	
	Gfx		ani_water_refl[2];	
	Vtx		slider[2];	
	Gfx		lnlist[128];
    LookAt	lookat[2];
    Hilite	hilite[2];
	Gfx		glist[GFXDLSIZE];
} Dynamic;

typedef union {    

    struct {
        short   type;
    } gen;
    
    struct {
        short   type;
    } done;
    
    OSScMsg      app;
    
} GFXMsg;

typedef struct {
    OSScTask    task;
    Dynamic     dp;
    GFXMsg      msg;
    u16		   *cfb;
} GFXInfo;

extern Dynamic	RSPdynamic;
extern u16 	zbuffer[];
extern Gfx	*glistp;

extern u16 	cfb_16_a[];
extern u16 	cfb_16_b[];
extern u16 	rsp_cfb[];
extern u64      gfxYieldBuf[];

extern Mtx 	stress_identity;
extern Vp 	vp;

/*  
 *  Need to make these addresses available to the code segment
 */
extern Gfx	gfxinit_dl[];
extern Gfx	lineinit_dl[];
extern Gfx 	relax0_dl[];
extern Gfx 	relax1_dl[];
extern Gfx	ltsphere_att_dl[];
extern Gfx	ltsphere_dl[];
extern Gfx 	alt_reticle[];

extern char _tableSegmentRomStart[], _tableSegmentRomEnd[];
extern char _seqSegmentRomStart[], _seqSegmentRomEnd[];
extern char _bankSegmentRomStart[], _bankSegmentRomEnd[];

extern char _tableSegmentRomStart[], _tableSegmentRomEnd[];
extern char _seqSegmentRomStart[], _seqSegmentRomEnd[];
extern char _bankSegmentRomStart[], _bankSegmentRomEnd[];

#endif	/* _LANGUAGE_C */

#endif /* __STRESS_H__ */