mesa: added ctx->Driver.ValidateFramebuffer() callback
[mesa.git] / src / mesa / main / dd.h
index 90c1f69c3d131067af3fa69e56572a6cd115748b..989791f39f19baa59bcf408e95cad3279cc1b09a 100644 (file)
@@ -110,6 +110,11 @@ struct dd_function_table {
    void (*Accum)( GLcontext *ctx, GLenum op, GLfloat value );
 
 
+   /**
+    * Execute glRasterPos, updating the ctx->Current.Raster fields
+    */
+   void (*RasterPos)( GLcontext *ctx, const GLfloat v[4] );
+
    /**
     * \name Image-related functions
     */
@@ -327,6 +332,12 @@ struct dd_function_table {
                               GLint x, GLint y,
                               GLsizei width, GLsizei height );
 
+   /**
+    * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled.
+    */
+   void (*GenerateMipmap)(GLcontext *ctx, GLenum target,
+                          struct gl_texture_object *texObj);
+
    /**
     * Called by glTexImage[123]D when user specifies a proxy texture
     * target.  
@@ -445,8 +456,8 @@ struct dd_function_table {
     */
    void (*GetCompressedTexImage)(GLcontext *ctx, GLenum target, GLint level,
                                  GLvoid *img,
-                                 const struct gl_texture_object *texObj,
-                                 const struct gl_texture_image *texImage);
+                                 struct gl_texture_object *texObj,
+                                 struct gl_texture_image *texImage);
 
    /**
     * Called to query number of bytes of storage needed to store the
@@ -493,6 +504,11 @@ struct dd_function_table {
     */
    void (*FreeTexImageData)( GLcontext *ctx, struct gl_texture_image *tImage );
 
+   /** Map texture image data into user space */
+   void (*MapTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
+   /** Unmap texture images from user space */
+   void (*UnmapTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
+
    /**
     * Note: no context argument.  This function doesn't initially look
     * like it belongs here, except that the driver is the only entity
@@ -570,9 +586,9 @@ struct dd_function_table {
    /** Notify driver that a program string has been specified. */
    void (*ProgramStringNotify)(GLcontext *ctx, GLenum target, 
                               struct gl_program *prog);
-   /** Get value of a fragment program register during program execution. */
-   void (*GetFragmentProgramRegister)(GLcontext *ctx, enum register_file file,
-                                      GLuint index, GLfloat val[4]);
+   /** Get value of a program register during program execution. */
+   void (*GetProgramRegister)(GLcontext *ctx, enum register_file file,
+                              GLuint index, GLfloat val[4]);
 
    /** Query if program can be loaded onto hardware */
    GLboolean (*IsProgramNative)(GLcontext *ctx, GLenum target, 
@@ -782,7 +798,7 @@ struct dd_function_table {
    struct gl_framebuffer * (*NewFramebuffer)(GLcontext *ctx, GLuint name);
    struct gl_renderbuffer * (*NewRenderbuffer)(GLcontext *ctx, GLuint name);
    void (*BindFramebuffer)(GLcontext *ctx, GLenum target,
-                           struct gl_framebuffer *fb);
+                           struct gl_framebuffer *fb, struct gl_framebuffer *fbread);
    void (*FramebufferRenderbuffer)(GLcontext *ctx, 
                                    struct gl_framebuffer *fb,
                                    GLenum attachment,
@@ -792,6 +808,8 @@ struct dd_function_table {
                          struct gl_renderbuffer_attachment *att);
    void (*FinishRenderTexture)(GLcontext *ctx,
                                struct gl_renderbuffer_attachment *att);
+   void (*ValidateFramebuffer)(GLcontext *ctx,
+                               struct gl_framebuffer *fb);
    /*@}*/
 #endif
 #if FEATURE_EXT_framebuffer_blit
@@ -806,9 +824,11 @@ struct dd_function_table {
     */
    /*@{*/
    struct gl_query_object * (*NewQueryObject)(GLcontext *ctx, GLuint id);
-   void (*BeginQuery)(GLcontext *ctx, GLenum target,
-                      struct gl_query_object *q);
-   void (*EndQuery)(GLcontext *ctx, GLenum target, struct gl_query_object *q);
+   void (*DeleteQuery)(GLcontext *ctx, struct gl_query_object *q);
+   void (*BeginQuery)(GLcontext *ctx, struct gl_query_object *q);
+   void (*EndQuery)(GLcontext *ctx, struct gl_query_object *q);
+   void (*CheckQuery)(GLcontext *ctx, struct gl_query_object *q);
+   void (*WaitQuery)(GLcontext *ctx, struct gl_query_object *q);
    /*@}*/
 
 
@@ -857,6 +877,8 @@ struct dd_function_table {
                            GLsizei *length, GLcharARB *sourceOut);
    void (*GetUniformfv)(GLcontext *ctx, GLuint program, GLint location,
                         GLfloat *params);
+   void (*GetUniformiv)(GLcontext *ctx, GLuint program, GLint location,
+                        GLint *params);
    GLint (*GetUniformLocation)(GLcontext *ctx, GLuint program,
                                const GLcharARB *name);
    GLboolean (*IsProgram)(GLcontext *ctx, GLuint name);
@@ -899,9 +921,9 @@ struct dd_function_table {
    void (*ValidateTnlModule)( GLcontext *ctx, GLuint new_state );
 
 
-#define PRIM_OUTSIDE_BEGIN_END   GL_POLYGON+1
-#define PRIM_INSIDE_UNKNOWN_PRIM GL_POLYGON+2
-#define PRIM_UNKNOWN             GL_POLYGON+3
+#define PRIM_OUTSIDE_BEGIN_END   (GL_POLYGON+1)
+#define PRIM_INSIDE_UNKNOWN_PRIM (GL_POLYGON+2)
+#define PRIM_UNKNOWN             (GL_POLYGON+3)
 
    /**
     * Set by the driver-supplied T&L engine.