⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hk_public.h

📁 操作系统SunOS 4.1.3版本的源码
💻 H
📖 第 1 页 / 共 5 页
字号:
#ifndef _HK_PUBLIC_#define _HK_PUBLIC_/* *********************************************************************** * WARNING: The context is frozen at HK_CTX_VERSION = 0x0201.  Any *	further changes must be made in a completely backward *	compatible manner.  The size of the Hk_context and Hk_state *	structures as well as the offsets of all elements *must* remain *	constant in order for existing programs to continue to run with *	new firmware. *********************************************************************** * * * hk_public.h * *	@(#)hk_public.h 1.1 92/07/30 17:41:11 * * Copyright (c) 1991 by Sun Microsystems, Inc. * *	Hawk Instruction Set and Front End Processor algorithms (hk_fe). * *	This header file contains public constants and types used *	by the Hawk simulator and by any program (e.g. hasm, test_hdl, *	toy_alouette) building a display list using the Hawk Instruction *	Set. * *  4-Apr-89 Kevin C. Rushforth   Split files for revision 3. * 10-Apr-89 Scott R. Nelson	  Change vector_list to polyline. *				  Add hk_blend_op_aa.  Add culling flags. * 11-Apr-89 Scott R. Nelson	  Add bundled attributes. * 12-Apr-89 Kevin C. Rushforth	  Re-aranged a couple of things between *				  fe_globals and fe_public. * 13-Apr-89 Scott R. Nelson	  Removed enable_light from light structure. * 18-Apr-89 Scott R. Nelson	  Added state information for push and pop *				  state instructions. * 20-Apr-89 Scott R. Nelson	  Fix cmt_to_gmt instruction. * 24-Apr-89 Scott R. Nelson	  Added depth_cue_color, re-ordered commands. *  3-May-89 Scott R. Nelson	  Cache the registers. *  4-May-89 Scott R. Nelson	  Modify blend_op values. *  5-May-89 Gene Pinkston	  added triangle structures *  8-May-89 Scott R. Nelson	  Restore blend_op to previous valus. *  9-May-89 Kevin C. Rushforth	  Added HK_ to header constants. * 10-May-89 Scott R. Nelson	  Move raster_op into the state. * 15-May-89 Josh Lee		  Changed viewport_bound values type to 'int'. * 17-May-89 Josh Lee		  Added x_,y_jitter attributes. *  7-Jun-89 Ranjit Oberoi	  Added picking related commands * 22-Jun-89 Ranjit Oberoi	  Added Marker_table. * 25-Jun-89 Ranjit Oberoi	  Added picking results structures. * 30-Jun-89 Ranjit Oberoi	  Added STATE defines for filters etc. *  6-Jul-89 Ranjit Oberoi	  Deleted dot references. * 11-Jul-89 Kevin C. Rushforth	  Added ifdefs for Jet-C, moved XFORM *				  macros to fe_globals.h * 23-Jul-89 Allen M. Harris	  Added typedefs for line pattern * 23-Aug-89 Ranjit Oberoi	  Changes for user defined markers. * 24-Aug-89 Scott R. Nelson	  Remove marker_line_routine. * 29-Aug-89 Scott R. Nelson	  Add the blend_op_transp command. * 30-Aug-89 Josh Lee		  Added stochastic sampling stuff. * 31-Aug-89 Scott R. Nelson	  Changed rop_foreground, rop_background *				  and window_background to use 3 floats. *				  Added pre/post concat vt/ivt. *  1-Sep-89 Ranjit Oberoi	  A change in the marker table definition. * 11-Sep-89 Scott R. Nelson	  Re-number all attribute codes for the *				  new dispatch scheme.  Delete the attribute *				  size constants (now in fe_attribute.c). *				  Rename and add context variables. * 18-Sep-89 Nelson, Rushforth	  Add virtual communication register stuff. *				  Changed the name from fe_public to hk_public. *				  Put HK_ on ALL names in the module. * 22-Sep-89 Scott R. Nelson	  Move text_font and text_character_set *				  to special attribute processing. * 22-Sep-89 Kevin C. Rushforth	  Moved stuff from hk_text.h to hk_public.h *				  and renamed them to start with HK_ * 25-Sep-89 Kevin C. Rushforth	  Removed obsolete SET_LIGHT command * 29-Sep-89 Ranjit Oberoi	  Added nurbs/parametric defines. * 10-Oct-89 Scott R. Nelson	  Added commands. * 31-Oct-89 Kevin C. Rushforth	  Changed dpc in context to unsigned. *  6-Nov-89 Ranjit Oberoi	  Added new edge and hollow polygon attributes. * 25-Nov-89 Ranjit Oberoi	  Added tri replacement control bits define. * 28-Nov-89 Kevin C. Rushforth	  MANY changes for HIS 1.3 upgrade. * 30-Nov-89 Allen M. Harris	  Added linestyle constants for HIS 1.3 upgrade *  1-Dec-89 Allen M. Harris	  Added maximum pattern size for ldm buffers *  8-Dec-89 Kevin C. Rushforth	  Changed vp_z{front,back} to unsigned int. * 19-Dec-89 Scott R. Nelson	  Add JMPR instruction. *				  Add a set of error codes. * 15-Jan-90 Scott R. Nelson	  Update virtual communication register *				  definitions. * 17-Jan-90 Kevin C. Rushforth	  Removed quad meshes * 19-Jan-90 Scott R. Nelson	  Rearranged vcomm bits, added hk_illegal_attr * 23-Jan-90 Josh Lee		  Revised stochastic sampling attributes. * 30-Jan-90 Ranjit Oberoi	  Added interrupts related stuff. * 30-Jan-90 Josh Lee		  Added store_image_8 instruction. * 13-Feb-90 Rushforth, Nelson	  Update to match the 1.4 version of the *				  Hawk Instruction Set. * 21-Feb-90 Ranjit Oberoi	  Updates for HIS rev 1.4. *  5-Apr-90 Ranjit Oberoi	  Deleted *filter_flags from Hk_state; these  *				  were for the exclusive use by Hawk firmware. *  9-Apr-90 Kevin C. Rushforth	  Added padding to structures containing *				  double-precision floats.  Re-arranged *				  the members of Hk_state so all structres *				  containing embedded doubles are first. *				  Added a magic number and version to CTX/MCB. * 12-Apr-90 Kevin C. Rushforth	  Removed "*_stopped" flags from context, *				  Changed processor_running to hawk_stopped *				  in MCB. * 12-Apr-90 Scott R. Nelson	  Added hk_stereo_mode. * 17-Apr-90 Scott R. Nelson	  Added lookup table stuff. * 19-Apr-90 Kevin C. Rushforth	  Added new error codes. * 25-Apr-90 Kevin C. Rushforth	  Bump CTX version number for stereo change. * 27-Apr-90 Kevin C. Rushforth	  Added print_buffer field in MCB. *  4-May-90 Kevin C. Rushforth	  Added hk_scratch_buffer. * 22-May-90 Kevin C. Rushforth	  Bumped MCB version due to hk_comm change. * 16-Jul-90 Ranjit Oberoi	  Added additional HKERR_* codes. * 25-Jul-90 Kevin C. Rushforth	  Split out MCB related stuff to "gtmcb.h" * 31-Jul-90 Vic Tolomei	  Add diag_escape *  2-Aug-90 Michelle Feraud	  Put LOCORE flag around C declarations * 27-Aug-90 Scott R. Nelson	  Fixed blend constants to use maximum *				  wait states. *  9-Sep-90 Kevin C. Rushforth	  Fixed the HK_INV_* constants to match HIS * *  3-Oct-90 Ranjit Oberoi	  Deleted parent_needs and added  *				  need_from_childern arrays to the context. * 10-Oct-90 Kevin C. Rushforth	  Changes for new window_boundary semantics. * 21-Oct-90 Kevin C. Rushforth	  More efficient version of HK_EXTRACT_OP() * 25-Oct-90 Kevin C. Rushforth	  Updated blend program timing values. *  3-Jan-91 Nelson, Rushforth	  UPDATES FOR HIS 1.5 *  9-Jan-91 Kevin C. Rushforth	  Completed HIS 1.5 version * 17-Jan-91 Kevin C. Rushforth	  Added HK_NO_TRANSPARENCY value * 25-Jan-91 Kevin C. Rushforth	  Added two new EXTRACT macros *  6-Feb-91 Kevin C. Rushforth	  Added some missing HIS 1.5 constants * 24-Mar-91 Kevin C. Rushforth	  Added room for expansion to Hk_state *				  and Hk_context. * 25-Mar-91 Kevin C. Rushforth	  Added clipping limits attribute.  Added *				  save area for previous pick info. *  2-May-91 Ranjit/Kevin	  Deleted model_planes from the state part *				  of the context, thereby creating additional *				  64 reserved words for future expansion. * 28-May-91 Ranjit Oberoi        define HK_TRI_IMPLICIT_CEN for triangle_list. * 12-Jun-91 Kevin C. Rushforth	  Documentation cleanup. * 14-Jun-91 Kevin C. Rushforth	  Added definitions for polyline with header. * 20-Jun-91 Kevin C. Rushforth	  Added EPS leaf node optimization. * 21-Jun-91 Ranjit Oberoi	  Added QUM support. * 24-Jun-91 Kevin C. Rushforth	  Added conditional CEN increment. * 25-Jun-91 Kevin C. Rushforth	  Added NOTIFY_KERNEL instruction. * 27-Jun-91 Kevin C. Rushforth	  Moved user visible changes to context *				  for new pick echo attributes ahead of *				  non-user visible fields.  This breaks *				  compatibility with release 9.4.1, but *				  since PHIGS isn't using these new *				  attributes yet they have assured us *				  that it is ok. * 16-Aug-91 Ranjit Oberoi	  Added cen_state in state part of the context, *				  and leaf_cen_state in the fixed part. * 15-Nov-91 Kevin C. Rushforth	  Added new HK_UNDRAW boolean attribute. *********************************************************************** * WARNING: The context is frozen at HK_CTX_VERSION = 0x0201.  Any *	further changes must be made in a completely backward *	compatible manner.  The size of the Hk_context and Hk_state *	structures as well as the offsets of all elements *must* remain *	constant in order for existing programs to continue to run with *	new firmware. *********************************************************************** */#define HK_CTX_VERSION	0x0201		/* Current version of Hk_context *//* * Magic number for Hk_context data structure.  This should NOT be * modified. */#define HK_CTX_MAGIC	0xA7880102	/* Hawk context: Hk_context *//* *-------------------------------------------------------------- * * Instruction word definitions for primary opcode * *	The instructions are in approximately the same order as found *	in the document: Hawk Instruction Set 1.5 * *	Changes here must also be made in fe_jump_tables.c * *-------------------------------------------------------------- *//* Instructions (in approx. the same order to the Instruction Set document) */#define HK_OP_ILLEGAL			0x00	/* Illegal opcode (must be 0) */#define HK_OP_RESERVED_M		0x01	/* Reserved *//* Data manipulation instructions */#define HK_OP_NOPD			0x02#define HK_OP_LD			0x03#define HK_OP_LDU			0x04#define HK_OP_LDD			0x05#define HK_OP_ST			0x06#define HK_OP_STU			0x07#define HK_OP_STD			0x08#define HK_OP_LDSTU			0x09#define HK_OP_SWAP			0x0a#define HK_OP_PUSH			0x0b#define HK_OP_POP			0x0c#define HK_OP_BLOCK_MOVE		0x0d#define HK_OP_MOVE			0x0e#define HK_OP_ADD			0x0f#define HK_OP_ADDI			0x10#define HK_OP_SUB			0x11#define HK_OP_SUBI			0x12#define HK_OP_MULT			0x13#define HK_OP_DIV			0x14#define HK_OP_MOD			0x15#define HK_OP_AND			0x16#define HK_OP_OR			0x17#define HK_OP_XOR			0x18#define HK_OP_ABS			0x19#define HK_OP_NOT			0x1a#define HK_OP_SLL			0x1b#define HK_OP_SRL			0x1c#define HK_OP_SRA			0x1d#define HK_OP_FLOAT			0x1e#define HK_OP_FIX			0x1f#define HK_OP_FADD			0x20#define HK_OP_FSUB			0x21#define HK_OP_FMULT			0x22#define HK_OP_FDIV			0x23#define HK_OP_FMOD			0x24#define HK_OP_FABS			0x25/* NOTE: opcodes 0x26-0x2f are unused *//* Geometry instructions */#define HK_OP_POLYLINE			0x30#define HK_OP_POLYMARKER		0x31#define HK_OP_RECTANGULAR_MARKER_GRID	0x32#define HK_OP_RADIAL_MARKER_GRID	0x33#define HK_OP_TRIANGLE_LIST		0x34#define HK_OP_POLYEDGE			0x35#define HK_OP_PARAMETRIC_CURVE		0x36#define HK_OP_NURB_CURVE		0x37#define HK_OP_RTEXT			0x38#define HK_OP_ATEXT			0x39#define HK_OP_ANNOTATION_POLYLINE	0x3a#define HK_OP_ANNOTATION_TRIANGLE_LIST	0x3b/* NOTE: opcodes 0x3c-0x3f are unused *//* * Set attribute instruction.  The 8-bit attribute code overlaps the * main op-code by 3 bits, but the attributes are now grouped in sets * of 32, so it could now be considered a 5-bit code.  HASM would have * to change first if the 5-bit code is used.  Note that bundle-able * attributes can have three different main op-codes for one attribute * code. */#define HK_OP_SET_ATTR_I		0x40	/* Set attr inst (individual) */#define HK_OP_SET_ATTR_I1		0x41	/* Include all the variants */#define HK_OP_SET_ATTR_I2		0x42	/* Non-ASF in 1st group only */#define HK_OP_SET_ATTR_I3		0x43#define HK_OP_SET_ATTR_I4		0x44#define HK_OP_SET_ATTR_I5		0x45#define HK_OP_SET_ATTR_I6		0x46#define HK_OP_SET_ATTR_I7		0x47#define HK_OP_SET_ATTR_B		0x48	/* Set attr inst (bundled) */#define HK_OP_SET_ATTR_B1		0x49	/* Include all the variants */#define HK_OP_SET_ATTR_B2		0x4a#define HK_OP_SET_ATTR_B3		0x4b#define HK_OP_SET_ATTR_B4		0x4c#define HK_OP_SET_ATTR_B5		0x4d#define HK_OP_SET_ATTR_B6		0x4e#define HK_OP_SET_ATTR_B7		0x4f#define HK_OP_SET_ATTR_A		0x50	/* Set ASF inst */#define HK_OP_SET_ATTR_A1		0x51	/* Include all the variants */#define HK_OP_SET_ATTR_A2		0x52#define HK_OP_SET_ATTR_A3		0x53#define HK_OP_SET_ATTR_A4		0x54#define HK_OP_SET_ATTR_A5		0x55#define HK_OP_SET_ATTR_A6		0x56#define HK_OP_SET_ATTR_A7		0x57/* NOTE: opcodes 0x58-0x5f are unused *//* Control instructions */#define HK_OP_JMPL			0x60#define HK_OP_JMPR			0x61#define HK_OP_BLEG			0x62#define HK_OP_FBLEG			0x63#define HK_OP_BINV			0x64#define HK_OP_JPS			0x65#define HK_OP_EPS			0x66#define HK_OP_RPS			0x67#define HK_OP_PUSH_STATE		0x68#define HK_OP_POP_STATE			0x69#define HK_OP_BOUNDING_BOX_TEST		0x6a#define HK_OP_NORMAL_BUNCH_TEST		0x6b#define HK_OP_EVAL_NURB_SURFACE		0x6c#define HK_OP_EVAL_NURB_CURVE		0x6d#define HK_OP_WAIT_FOR_VERTICAL_RETRACE	0x6e#define HK_OP_FLUSH_CONTEXT		0x6f#define HK_OP_FLUSH_PARTIAL_CONTEXT	0x70#define HK_OP_FLUSH_RENDERING_PIPE	0x71#define HK_OP_LOAD_CONTEXT		0x72#define HK_OP_MOVE_CONTEXT_POINTER	0x73#define HK_OP_SLEEP			0x74#define HK_OP_WAIT			0x75#define HK_OP_TRAP			0x76#define HK_OP_TRAP_DRAW			0x77#define HK_OP_TRAP_KERNEL		0x78#define HK_OP_UPDATE_LUT		0x79#define HK_OP_NOTIFY_KERNEL		0x7a/* NOTE: opcodes 0x7b-0x7f are unused *//* Raster instructions */#define HK_OP_WINDOW_CLEAR		0x80#define HK_OP_VIEWPORT_CLEAR		0x81#define HK_OP_VIEWPORT_COPY_FRONT	0x82#define HK_OP_DRAW_IMAGE_32		0x83#define HK_OP_XFORM_DRAW_IMAGE_32	0x84#define HK_OP_SAVE_IMAGE_32		0x85#define HK_OP_DRAW_IMAGE_8		0x86#define HK_OP_XFORM_DRAW_IMAGE_8	0x87#define HK_OP_SAVE_IMAGE_8		0x88#define HK_OP_DRAW_IMAGE_1		0x89#define HK_OP_XFORM_DRAW_IMAGE_1	0x8a#define HK_OP_ZOOM_NEAREST_NEIGHBOR	0x8b#define HK_OP_ZOOM_INTERPOLATED		0x8c#define HK_OP_STOCHASTIC_STEP		0x8d#define HK_OP_STOCHASTIC_DISPLAY	0x8e/* NOTE: opcode 0x8f is unused *//* Undocumented DEBUG-ONLY instructions! MUST BE LAST! */#define HK_OP_PASS_TO_SU		0x90#define HK_OP_DIAG_ESCAPE		0x91/* *-------------------------------------------------------------- * * Attribute sub-opcodes * *	Attribute bit patterns are carefully grouped into sets of *	32 to allow nearly all of the attributes to be processed *	with table-driven code.  Any changes to these patterns require *	corresponding changes to the tables in fe_jump_tables.c and *	could affect code in fe_attribute.c also. * *	To build a proper attribute command, use the base attribute *	definition (HK_OP_SET_ATTR_I, HK_OP_SET_ATTR_B or HK_OP_SET_ATTR_A). *	To dispatch on the codes, use the full 8-bit pattern (already in *	op_jump_table). * *	The attributes are in a similar order to that found in the *	document: Hawk Instruction Set 1.5.  However, they are first *	grouped by bundle-able vs. unbundled, single-word vs. multi-word, *	and those requiring special processing. * *-------------------------------------------------------------- *//* Single word - bundle-able attributes (with op-codes 0x40, 0x48, 0x50) */#define HK_LINE_ANTIALIASING		0x00#define HK_LINE_SHADING_METHOD		0x01#define HK_LINE_STYLE			0x02#define HK_LINE_PATTERN			0x03#define HK_LINE_WIDTH			0x04#define HK_LINE_CAP			0x05#define HK_LINE_JOIN			0x06#define HK_LINE_MITER_LIMIT		0x07#define HK_FRONT_TRANSPARENCY_DEGREE	0x08#define HK_BACK_TRANSPARENCY_DEGREE	0x09#define HK_FRONT_SHADING_METHOD		0x0a#define HK_BACK_SHADING_METHOD		0x0b#define HK_FRONT_LIGHTING_DEGREE	0x0c#define HK_BACK_LIGHTING_DEGREE		0x0d#define HK_FRONT_INTERIOR_STYLE		0x0e#define HK_BACK_INTERIOR_STYLE		0x0f#define HK_HOLLOW_ANTIALIASING		0x10#define HK_EDGE				0x11#define HK_EDGE_ANTIALIASING		0x12#define HK_EDGE_STYLE			0x13#define HK_EDGE_PATTERN			0x14#define HK_EDGE_WIDTH			0x15#define HK_EDGE_CAP			0x16#define HK_EDGE_JOIN			0x17#define HK_EDGE_MITER_LIMIT		0x18#define HK_TEXT_ANTIALIASING		0x19#define HK_TEXT_EXPANSION_FACTOR	0x1a#define HK_TEXT_SPACING			0x1b#define HK_TEXT_LINE_WIDTH		0x1c#define HK_TEXT_CAP			0x1d#define HK_TEXT_JOIN			0x1e#define HK_TEXT_MITER_LIMIT		0x1f/* Note: this table is full.  Overflows must go in the next table. *//* Multiple word - bundle-able attributes (with op-codes 0x41, 0x49, 0x51) */#define HK_MARKER_ANTIALIASING		0x20	/* This is really single */#define HK_MARKER_SIZE			0x21	/* This is really single */#define HK_MARKER_TYPE			0x22	/* This is really single */#define HK_LINE_COLOR			0x23#define HK_CURVE_APPROX			0x24#define HK_FRONT_SURFACE_COLOR		0x25#define HK_BACK_SURFACE_COLOR		0x26#define HK_FRONT_MATERIAL_PROPERTIES	0x27#define HK_BACK_MATERIAL_PROPERTIES	0x28#define HK_FRONT_SPECULAR_COLOR		0x29#define HK_BACK_SPECULAR_COLOR		0x2a#define HK_FRONT_GENERAL_STYLE		0x2b#define HK_BACK_GENERAL_STYLE		0x2c#define HK_FRONT_HATCH_STYLE		0x2d#define HK_BACK_HATCH_STYLE		0x2e#define HK_ISO_CURVE_INFO		0x2f#define HK_SURF_APPROX			0x30#define HK_TRIM_APPROX			0x31#define HK_EDGE_COLOR			0x32#define HK_TEXT_COLOR			0x33#define HK_TEXT_CHARACTER_SET		0x34#define HK_TEXT_FONT			0x35#define HK_MARKER_COLOR			0x36/* Single word - unbundled attributes (with op-codes 0x42, 0x43) */#define HK_LINE_GEOM_FORMAT		0x40#define HK_TRI_GEOM_FORMAT		0x41#define HK_TRANSPARENCY_QUALITY		0x42#define HK_FACE_CULLING_MODE		0x43#define HK_USE_BACK_PROPS		0x44#define HK_SILHOUETTE_EDGE		0x45#define HK_EDGE_Z_OFFSET		0x46#define HK_TEXT_FONT_TABLE		0x47#define HK_RTEXT_PATH			0x48#define HK_RTEXT_HEIGHT			0x49#define HK_RTEXT_SLANT			0x4a#define HK_ATEXT_PATH			0x4b#define HK_ATEXT_HEIGHT			0x4c

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -