13a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org/**************************************************************************
23a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org *
33a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
43a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * All Rights Reserved.
53a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org *
63a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * Permission is hereby granted, free of charge, to any person obtaining a
73a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * copy of this software and associated documentation files (the
83a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * "Software"), to deal in the Software without restriction, including
93a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * without limitation the rights to use, copy, modify, merge, publish,
103a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * distribute, sub license, and/or sell copies of the Software, and to
113a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * permit persons to whom the Software is furnished to do so, subject to
123a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * the following conditions:
133a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org *
143a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * The above copyright notice and this permission notice (including the
153a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * next paragraph) shall be included in all copies or substantial portions
163a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * of the Software.
173a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org *
183a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
193a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
203a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
213a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
223a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
233a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
243a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
253a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org *
263a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org **************************************************************************/
273a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org
283a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org/* Authors:  Keith Whitwell <keith@tungstengraphics.com>
293a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org */
303a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org
313a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org#ifndef SP_QUAD_PIPE_H
323a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org#define SP_QUAD_PIPE_H
333a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org
343a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org
353a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.orgstruct softpipe_context;
363a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.orgstruct quad_header;
373a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org
383a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org
393a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org/**
403a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * Fragment processing is performed on 2x2 blocks of pixels called "quads".
413a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * Quad processing is performed with a pipeline of stages represented by
423a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org * this type.
433a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org */
443a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.orgstruct quad_stage {
453a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org   struct softpipe_context *softpipe;
463a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org
473a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org   struct quad_stage *next;
483a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org
493a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org   void (*begin)(struct quad_stage *qs);
503a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org
513a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org   /** the stage action */
523a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org   void (*run)(struct quad_stage *qs, struct quad_header *quad[], unsigned nr);
533a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org
543a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org   void (*destroy)(struct quad_stage *qs);
553a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org};
563a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org
573a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org
583a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.orgstruct quad_stage *sp_quad_polygon_stipple_stage( struct softpipe_context *softpipe );
593a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.orgstruct quad_stage *sp_quad_earlyz_stage( struct softpipe_context *softpipe );
603a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.orgstruct quad_stage *sp_quad_shade_stage( struct softpipe_context *softpipe );
613a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.orgstruct quad_stage *sp_quad_alpha_test_stage( struct softpipe_context *softpipe );
623a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.orgstruct quad_stage *sp_quad_stencil_test_stage( struct softpipe_context *softpipe );
633a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.orgstruct quad_stage *sp_quad_depth_test_stage( struct softpipe_context *softpipe );
643a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.orgstruct quad_stage *sp_quad_occlusion_stage( struct softpipe_context *softpipe );
653a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.orgstruct quad_stage *sp_quad_coverage_stage( struct softpipe_context *softpipe );
663a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.orgstruct quad_stage *sp_quad_blend_stage( struct softpipe_context *softpipe );
673a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.orgstruct quad_stage *sp_quad_colormask_stage( struct softpipe_context *softpipe );
683a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.orgstruct quad_stage *sp_quad_output_stage( struct softpipe_context *softpipe );
693a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org
703a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.orgvoid sp_build_quad_pipeline(struct softpipe_context *sp);
713a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org
723a0db227ffe90888ad760c61a63226988c974e0apatrick@chromium.org#endif /* SP_QUAD_PIPE_H */
73