sp_headers.h

Go to the documentation of this file.
00001 /**************************************************************************
00002  * 
00003  * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
00004  * All Rights Reserved.
00005  *
00006  * Permission is hereby granted, free of charge, to any person obtaining a
00007  * 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, sub license, 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 portions
00016  * of the Software.
00017  * 
00018  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00019  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00020  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
00021  * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
00022  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
00023  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
00024  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00025  * 
00026  **************************************************************************/
00027 
00028 /* Authors:  Keith Whitwell <keith@tungstengraphics.com>
00029  */
00030 
00031 #ifndef SP_HEADERS_H
00032 #define SP_HEADERS_H
00033 
00034 #include "pipe/p_state.h"
00035 #include "tgsi/tgsi_exec.h"
00036 
00037 #define PRIM_POINT 1
00038 #define PRIM_LINE  2
00039 #define PRIM_TRI   3
00040 
00041 
00042 /* The rasterizer generates 2x2 quads of fragment and feeds them to
00043  * the current fp_machine (see below).
00044  * Remember that Y=0=top with Y increasing down the window.
00045  */
00046 #define QUAD_TOP_LEFT     0
00047 #define QUAD_TOP_RIGHT    1
00048 #define QUAD_BOTTOM_LEFT  2
00049 #define QUAD_BOTTOM_RIGHT 3
00050 
00051 #define MASK_TOP_LEFT     (1 << QUAD_TOP_LEFT)
00052 #define MASK_TOP_RIGHT    (1 << QUAD_TOP_RIGHT)
00053 #define MASK_BOTTOM_LEFT  (1 << QUAD_BOTTOM_LEFT)
00054 #define MASK_BOTTOM_RIGHT (1 << QUAD_BOTTOM_RIGHT)
00055 #define MASK_ALL          0xf
00056 
00057 
00062 struct quad_header_input
00063 {
00064    int x0;
00065    int y0;
00066    float coverage[QUAD_SIZE];    
00067    unsigned facing:1;   
00068    unsigned prim:2;     
00069 };
00070 
00071 struct quad_header_inout
00072 {
00073    unsigned mask:4;
00074 };
00075 
00076 struct quad_header_output
00077 {
00079    float color[PIPE_MAX_COLOR_BUFS][NUM_CHANNELS][QUAD_SIZE];
00080    float depth[QUAD_SIZE];
00081 };
00082 
00083 struct quad_header {
00084    struct quad_header_input input;
00085    struct quad_header_inout inout;
00086    struct quad_header_output output;
00087 
00088    const struct tgsi_interp_coef *coef;
00089    const struct tgsi_interp_coef *posCoef;
00090 
00091    unsigned nr_attrs;
00092 };
00093 
00094 #endif /* SP_HEADERS_H */
00095 

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