brw_gs.h

Go to the documentation of this file.
00001 /*
00002  Copyright (C) Intel Corp.  2006.  All Rights Reserved.
00003  Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
00004  develop this 3D driver.
00005  
00006  Permission is hereby granted, free of charge, to any person obtaining
00007  a copy of this software and associated documentation files (the
00008  "Software"), to deal in the Software without restriction, including
00009  without limitation the rights to use, copy, modify, merge, publish,
00010  distribute, sublicense, and/or sell copies of the Software, and to
00011  permit persons to whom the Software is furnished to do so, subject to
00012  the following conditions:
00013  
00014  The above copyright notice and this permission notice (including the
00015  next paragraph) shall be included in all copies or substantial
00016  portions of the Software.
00017  
00018  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00019  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00020  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00021  IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
00022  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00023  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00024  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00025  
00026  **********************************************************************/
00027  /*
00028   * Authors:
00029   *   Keith Whitwell <keith@tungstengraphics.com>
00030   */
00031  
00032 
00033 #ifndef BRW_GS_H
00034 #define BRW_GS_H
00035 
00036 
00037 #include "brw_context.h"
00038 #include "brw_eu.h"
00039 
00040 #define MAX_GS_VERTS (4)             
00041 
00042 struct brw_gs_prog_key {
00043    unsigned attrs:32;
00044    unsigned primitive:4;
00045    unsigned hint_gs_always:1;
00046    unsigned need_gs_prog:1;
00047    unsigned pad:26;
00048 };
00049 
00050 struct brw_gs_compile {
00051    struct brw_compile func;
00052    struct brw_gs_prog_key key;
00053    struct brw_gs_prog_data prog_data;
00054    
00055    struct {
00056       struct brw_reg R0;
00057       struct brw_reg vertex[MAX_GS_VERTS];
00058    } reg;
00059 
00060    /* 3 different ways of expressing vertex size:
00061     */
00062    unsigned nr_attrs;
00063    unsigned nr_regs;
00064    unsigned nr_bytes;
00065 };
00066 
00067 #define ATTR_SIZE  (4*4)
00068 
00069 void brw_gs_quads( struct brw_gs_compile *c );
00070 void brw_gs_quad_strip( struct brw_gs_compile *c );
00071 void brw_gs_tris( struct brw_gs_compile *c );
00072 void brw_gs_lines( struct brw_gs_compile *c );
00073 void brw_gs_points( struct brw_gs_compile *c );
00074 
00075 #endif

Generated on Tue Sep 29 06:25:16 2009 for Gallium3D by  doxygen 1.5.4