122144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes 27c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell/* 37c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell * Mesa 3-D graphics library 47c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell * Version: 3.5 522144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * 622144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. 722144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * 87c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell * Permission is hereby granted, free of charge, to any person obtaining a 97c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell * copy of this software and associated documentation files (the "Software"), 107c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell * to deal in the Software without restriction, including without limitation 117c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell * the rights to use, copy, modify, merge, publish, distribute, sublicense, 127c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell * and/or sell copies of the Software, and to permit persons to whom the 137c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell * Software is furnished to do so, subject to the following conditions: 1422144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * 157c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell * The above copyright notice and this permission notice shall be included 167c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell * in all copies or substantial portions of the Software. 1722144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * 187c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 197c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 207c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 217c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 227c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 237c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 247c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell * 257c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell * Authors: 2605a4b37707d2c598ea68c05d07a3d65bcbf5a076Brian Paul * Keith Whitwell <keith@tungstengraphics.com> 277c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell */ 287c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell 29d43a5943d8952367d9292653800b47a85f905343Keith Whitwell/* Public interface to the swrast_setup module. This module provides 30d43a5943d8952367d9292653800b47a85f905343Keith Whitwell * an implementation of the driver interface to t_vb_render.c, and uses 31d43a5943d8952367d9292653800b47a85f905343Keith Whitwell * the software rasterizer (swrast) to perform actual rasterization. 321182ffeec39bf419928ba862c225e80a439fee7aKeith Whitwell * 331182ffeec39bf419928ba862c225e80a439fee7aKeith Whitwell * The internals of the implementation are private, but can be hooked 341182ffeec39bf419928ba862c225e80a439fee7aKeith Whitwell * into tnl at any time (except between RenderStart/RenderEnd) by 351182ffeec39bf419928ba862c225e80a439fee7aKeith Whitwell * calling _swsetup_Wakeup(). 367c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell */ 377c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell 387c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell#ifndef SWRAST_SETUP_H 397c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell#define SWRAST_SETUP_H 407c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell 41790734045b69c47b1525fbf9106a7ca5a8eb7416Keith Whitwell#include "swrast/swrast.h" 42790734045b69c47b1525fbf9106a7ca5a8eb7416Keith Whitwell 4322144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughesextern GLboolean 44f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_swsetup_CreateContext( struct gl_context *ctx ); 457c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell 4622144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughesextern void 47f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_swsetup_DestroyContext( struct gl_context *ctx ); 487c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell 4922144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughesextern void 50f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_swsetup_InvalidateState( struct gl_context *ctx, GLuint new_state ); 517c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell 5222144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughesextern void 53f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_swsetup_Wakeup( struct gl_context *ctx ); 545c1e7fa6ee72f4403d9ec9d12830dd689b966e71Keith Whitwell 55790734045b69c47b1525fbf9106a7ca5a8eb7416Keith Whitwell/* Helper function to translate a hardware vertex (as understood by 56790734045b69c47b1525fbf9106a7ca5a8eb7416Keith Whitwell * the tnl/t_vertex.c code) to a swrast vertex. 57790734045b69c47b1525fbf9106a7ca5a8eb7416Keith Whitwell */ 58790734045b69c47b1525fbf9106a7ca5a8eb7416Keith Whitwellextern void 59f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_swsetup_Translate( struct gl_context *ctx, const void *vertex, SWvertex *dest ); 60790734045b69c47b1525fbf9106a7ca5a8eb7416Keith Whitwell 617c20642b1091df1aab7d9076a3fe2fb11c6f011cKeith Whitwell#endif 62