i965/vs: Add support for emitting DPH opcodes.
[mesa.git] / src / mesa / swrast / s_context.h
index 2fb61eaee5a165485bbe2960b2c0fba7c601fb8a..18353c4167b399b0ea24f711224cdba6fa299c64 100644 (file)
 #include "main/mtypes.h"
 #include "program/prog_execute.h"
 #include "swrast.h"
+#include "s_fragprog.h"
 #include "s_span.h"
 
 
 typedef void (*texture_sample_func)(struct gl_context *ctx,
+                                    const struct gl_sampler_object *samp,
                                     const struct gl_texture_object *tObj,
                                     GLuint n, const GLfloat texcoords[][4],
                                     const GLfloat lambda[], GLfloat rgba[][4]);
@@ -120,14 +122,10 @@ typedef void (*FetchTexelFunc)(const struct swrast_texture_image *texImage,
                                GLfloat *texelOut);
 
 
-typedef void (*StoreTexelFunc)(struct swrast_texture_image *texImage,
-                               GLint col, GLint row, GLint img,
-                               const void *texel);
-
 /**
  * Subclass of gl_texture_image.
  * We need extra fields/info to keep tracking of mapped texture buffers,
- * strides and Fetch/Store functions.
+ * strides and Fetch functions.
  */
 struct swrast_texture_image
 {
@@ -148,7 +146,6 @@ struct swrast_texture_image
    GLubyte *Buffer;
 
    FetchTexelFunc FetchTexel;
-   StoreTexelFunc Store;
 };
 
 
@@ -180,6 +177,9 @@ struct swrast_renderbuffer
    /** These fields are only valid while buffer is mapped for rendering */
    GLubyte *Map;
    GLint RowStride;    /**< in bytes */
+
+   /** For span rendering */
+   GLenum ColorType;
 };
 
 
@@ -307,6 +307,13 @@ typedef struct
    /** State used during execution of fragment programs */
    struct gl_program_machine FragProgMachine;
 
+   /** Temporary arrays for stencil operations.  To avoid large stack
+    * allocations.
+    */
+   struct {
+      GLubyte *buf1, *buf2, *buf3, *buf4;
+   } stencil_temp;
+
 } SWcontext;