s_span.h revision 67074332728acba86da7630353673b458713bb8a
1e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell/* 2e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell * Mesa 3-D graphics library 367074332728acba86da7630353673b458713bb8aBrian Paul * Version: 6.5 45e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen * 5e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. 65e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen * 7e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell * Permission is hereby granted, free of charge, to any person obtaining a 8e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell * copy of this software and associated documentation files (the "Software"), 9e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell * to deal in the Software without restriction, including without limitation 10e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell * the rights to use, copy, modify, merge, publish, distribute, sublicense, 11e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell * and/or sell copies of the Software, and to permit persons to whom the 12e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell * Software is furnished to do so, subject to the following conditions: 135e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen * 14e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell * The above copyright notice and this permission notice shall be included 15e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell * in all copies or substantial portions of the Software. 165e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen * 17e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 18e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 20e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 21e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell */ 24e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell 25e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell 26e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell#ifndef S_SPAN_H 27e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell#define S_SPAN_H 28e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell 29e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell 305e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen#include "mtypes.h" 31e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell#include "swrast.h" 32e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell 33e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell 345071b0812fc73bcba92e2b6fcbad2f53f063fc32Brian Paulextern void 3545bc887da226403f2c41077e40ca38b6f60f1359Brian Paul_swrast_span_default_z( GLcontext *ctx, struct sw_span *span ); 36e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell 375071b0812fc73bcba92e2b6fcbad2f53f063fc32Brian Paulextern void 3845bc887da226403f2c41077e40ca38b6f60f1359Brian Paul_swrast_span_interpolate_z( const GLcontext *ctx, struct sw_span *span ); 39711e27fda27e4235b20a4cf73c2767c984ab2b81Brian Paul 40711e27fda27e4235b20a4cf73c2767c984ab2b81Brian Paulextern void 4145bc887da226403f2c41077e40ca38b6f60f1359Brian Paul_swrast_span_default_fog( GLcontext *ctx, struct sw_span *span ); 422a182a98973edc9ecf2936b1288485bb2b3fa722Brian Paul 432a182a98973edc9ecf2936b1288485bb2b3fa722Brian Paulextern void 4445bc887da226403f2c41077e40ca38b6f60f1359Brian Paul_swrast_span_default_color( GLcontext *ctx, struct sw_span *span ); 45e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell 464753d60dd070bb08d0116076bcc08025c86ce857Brian Paulextern void 4745bc887da226403f2c41077e40ca38b6f60f1359Brian Paul_swrast_span_default_texcoords( GLcontext *ctx, struct sw_span *span ); 4810f30eb43835c57c00783390a02d72daf4f78e26Brian Paul 49350353adcd75f94fda63c787c86961716114e0bfBrian Paulextern GLfloat 5045bc887da226403f2c41077e40ca38b6f60f1359Brian Paul_swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy, 51a803b0c891404dcd7c376e91f6a033cd4e42abc3Brian Paul GLfloat dqdx, GLfloat dqdy, GLfloat texW, GLfloat texH, 52a803b0c891404dcd7c376e91f6a033cd4e42abc3Brian Paul GLfloat s, GLfloat t, GLfloat q, GLfloat invQ); 53350353adcd75f94fda63c787c86961716114e0bfBrian Paul 5410f30eb43835c57c00783390a02d72daf4f78e26Brian Paulextern void 5545bc887da226403f2c41077e40ca38b6f60f1359Brian Paul_swrast_write_index_span( GLcontext *ctx, struct sw_span *span); 56b7f5e92f1749ce4601a758f66ddc64959f11742bBrian Paul 5710f30eb43835c57c00783390a02d72daf4f78e26Brian Paul 5810f30eb43835c57c00783390a02d72daf4f78e26Brian Paulextern void 5945bc887da226403f2c41077e40ca38b6f60f1359Brian Paul_swrast_write_rgba_span( GLcontext *ctx, struct sw_span *span); 60b7f5e92f1749ce4601a758f66ddc64959f11742bBrian Paul 61e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell 625071b0812fc73bcba92e2b6fcbad2f53f063fc32Brian Paulextern void 63e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul_swrast_read_rgba_span( GLcontext *ctx, struct gl_renderbuffer *rb, 64a803b0c891404dcd7c376e91f6a033cd4e42abc3Brian Paul GLuint n, GLint x, GLint y, GLchan rgba[][4] ); 65e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell 665071b0812fc73bcba92e2b6fcbad2f53f063fc32Brian Paulextern void 67e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul_swrast_read_index_span( GLcontext *ctx, struct gl_renderbuffer *rb, 68a803b0c891404dcd7c376e91f6a033cd4e42abc3Brian Paul GLuint n, GLint x, GLint y, GLuint indx[] ); 69e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell 7067074332728acba86da7630353673b458713bb8aBrian Paulextern void 7167074332728acba86da7630353673b458713bb8aBrian Paul_swrast_get_values(GLcontext *ctx, struct gl_renderbuffer *rb, 7267074332728acba86da7630353673b458713bb8aBrian Paul GLuint count, const GLint x[], const GLint y[], 7367074332728acba86da7630353673b458713bb8aBrian Paul void *values, GLuint valueSize); 7467074332728acba86da7630353673b458713bb8aBrian Paul 75e3a051e0538a605551f4d58294c94f5eb00ed07fKeith Whitwell#endif 76