X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fdd.h;h=4679be72f7659d0737a9bbe0cb4d1c2228dfb039;hb=0203136e69bfa711edd69a4f69c4539cd877b5cb;hp=ce5e158626616b0573671a76476775f22beec131;hpb=41865d991f5703b6a9faa33ee6ac1d256af5c2a2;p=mesa.git diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index ce5e1586266..4679be72f76 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -182,10 +182,10 @@ struct dd_function_table { * * This is called by the \c _mesa_store_tex[sub]image[123]d() fallback * functions. The driver should examine \p internalFormat and return a - * pointer to an appropriate gl_texture_format. + * gl_format value. */ - const struct gl_texture_format *(*ChooseTextureFormat)( GLcontext *ctx, - GLint internalFormat, GLenum srcFormat, GLenum srcType ); + GLuint (*ChooseTextureFormat)( GLcontext *ctx, GLint internalFormat, + GLenum srcFormat, GLenum srcType ); /** * Called by glTexImage1D(). @@ -475,13 +475,6 @@ struct dd_function_table { struct gl_texture_object *texObj, struct gl_texture_image *texImage); - /** - * Called to query number of bytes of storage needed to store the - * specified compressed texture. - */ - GLuint (*CompressedTextureSize)( GLcontext *ctx, GLsizei width, - GLsizei height, GLsizei depth, - GLenum format ); /*@}*/ /** @@ -544,17 +537,6 @@ struct dd_function_table { GLboolean (*IsTextureResident)( GLcontext *ctx, struct gl_texture_object *t ); - /** - * Called by glPrioritizeTextures(). - */ - void (*PrioritizeTexture)( GLcontext *ctx, struct gl_texture_object *t, - GLclampf priority ); - - /** - * Called by glActiveTextureARB() to set current texture unit. - */ - void (*ActiveTexture)( GLcontext *ctx, GLuint texUnitNumber ); - /** * Called when the texture's color lookup table is changed. * @@ -599,9 +581,13 @@ struct dd_function_table { struct gl_program * (*NewProgram)(GLcontext *ctx, GLenum target, GLuint id); /** Delete a program */ void (*DeleteProgram)(GLcontext *ctx, struct gl_program *prog); - /** Notify driver that a program string has been specified. */ - void (*ProgramStringNotify)(GLcontext *ctx, GLenum target, - struct gl_program *prog); + /** + * Notify driver that a program string (and GPU code) has been specified + * or modified. Return GL_TRUE or GL_FALSE to indicate if the program is + * supported by the driver. + */ + GLboolean (*ProgramStringNotify)(GLcontext *ctx, GLenum target, + struct gl_program *prog); /** Query if program can be loaded onto hardware */ GLboolean (*IsProgramNative)(GLcontext *ctx, GLenum target, @@ -634,8 +620,6 @@ struct dd_function_table { void (*ClearColor)(GLcontext *ctx, const GLfloat color[4]); /** Specify the clear value for the depth buffer */ void (*ClearDepth)(GLcontext *ctx, GLclampd d); - /** Specify the clear value for the color index buffers */ - void (*ClearIndex)(GLcontext *ctx, GLuint index); /** Specify the clear value for the stencil buffer */ void (*ClearStencil)(GLcontext *ctx, GLint s); /** Specify a plane against which all geometry is clipped */ @@ -643,6 +627,8 @@ struct dd_function_table { /** Enable and disable writing of frame buffer color components */ void (*ColorMask)(GLcontext *ctx, GLboolean rmask, GLboolean gmask, GLboolean bmask, GLboolean amask ); + void (*ColorMaskIndexed)(GLcontext *ctx, GLuint buf, GLboolean rmask, + GLboolean gmask, GLboolean bmask, GLboolean amask); /** Cause a material color to track the current color */ void (*ColorMaterial)(GLcontext *ctx, GLenum face, GLenum mode); /** Specify whether front- or back-facing facets can be culled */ @@ -665,8 +651,6 @@ struct dd_function_table { void (*Fogfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); /** Specify implementation-specific hints */ void (*Hint)(GLcontext *ctx, GLenum target, GLenum mode); - /** Control the writing of individual bits in the color index buffers */ - void (*IndexMask)(GLcontext *ctx, GLuint mask); /** Set light source parameters. * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already * been transformed to eye-space. @@ -717,40 +701,11 @@ struct dd_function_table { void (*TexParameter)(GLcontext *ctx, GLenum target, struct gl_texture_object *texObj, GLenum pname, const GLfloat *params); - void (*TextureMatrix)(GLcontext *ctx, GLuint unit, const GLmatrix *mat); /** Set the viewport */ void (*Viewport)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); /*@}*/ - /** - * \name Vertex array functions - * - * Called by the corresponding OpenGL functions. - */ - /*@{*/ - void (*VertexPointer)(GLcontext *ctx, GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr); - void (*NormalPointer)(GLcontext *ctx, GLenum type, - GLsizei stride, const GLvoid *ptr); - void (*ColorPointer)(GLcontext *ctx, GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr); - void (*FogCoordPointer)(GLcontext *ctx, GLenum type, - GLsizei stride, const GLvoid *ptr); - void (*IndexPointer)(GLcontext *ctx, GLenum type, - GLsizei stride, const GLvoid *ptr); - void (*SecondaryColorPointer)(GLcontext *ctx, GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr); - void (*TexCoordPointer)(GLcontext *ctx, GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr); - void (*EdgeFlagPointer)(GLcontext *ctx, GLsizei stride, const GLvoid *ptr); - void (*VertexAttribPointer)(GLcontext *ctx, GLuint index, GLint size, - GLenum type, GLsizei stride, const GLvoid *ptr); - void (*LockArraysEXT)( GLcontext *ctx, GLint first, GLsizei count ); - void (*UnlockArraysEXT)( GLcontext *ctx ); - /*@}*/ - - /** * \name State-query functions * @@ -808,19 +763,36 @@ struct dd_function_table { /* May return NULL if MESA_MAP_NOWAIT_BIT is set in access: */ - void * (*MapBufferRange)( GLcontext *ctx, GLenum target, - GLintptr offset, GLsizeiptr length, GLbitfield access, + void * (*MapBufferRange)( GLcontext *ctx, GLenum target, GLintptr offset, + GLsizeiptr length, GLbitfield access, struct gl_buffer_object *obj); - void (*FlushMappedBufferRange) (GLcontext *ctx, GLenum target, - GLintptr offset, GLsizeiptr length, - struct gl_buffer_object *obj); + void (*FlushMappedBufferRange)(GLcontext *ctx, GLenum target, + GLintptr offset, GLsizeiptr length, + struct gl_buffer_object *obj); GLboolean (*UnmapBuffer)( GLcontext *ctx, GLenum target, struct gl_buffer_object *obj ); /*@}*/ #endif + /** + * \name Functions for GL_APPLE_object_purgeable + */ +#if FEATURE_APPLE_object_purgeable + /*@{*/ + /* variations on ObjectPurgeable */ + GLenum (*BufferObjectPurgeable)( GLcontext *ctx, struct gl_buffer_object *obj, GLenum option ); + GLenum (*RenderObjectPurgeable)( GLcontext *ctx, struct gl_renderbuffer *obj, GLenum option ); + GLenum (*TextureObjectPurgeable)( GLcontext *ctx, struct gl_texture_object *obj, GLenum option ); + + /* variations on ObjectUnpurgeable */ + GLenum (*BufferObjectUnpurgeable)( GLcontext *ctx, struct gl_buffer_object *obj, GLenum option ); + GLenum (*RenderObjectUnpurgeable)( GLcontext *ctx, struct gl_renderbuffer *obj, GLenum option ); + GLenum (*TextureObjectUnpurgeable)( GLcontext *ctx, struct gl_texture_object *obj, GLenum option ); + /*@}*/ +#endif + /** * \name Functions for GL_EXT_framebuffer_object */ @@ -829,7 +801,8 @@ 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 *fbread); + struct gl_framebuffer *drawFb, + struct gl_framebuffer *readFb); void (*FramebufferRenderbuffer)(GLcontext *ctx, struct gl_framebuffer *fb, GLenum attachment, @@ -1060,6 +1033,32 @@ struct dd_function_table { GLbitfield, GLuint64); /*@}*/ #endif + + /** GL_NV_conditional_render */ + void (*BeginConditionalRender)(GLcontext *ctx, struct gl_query_object *q, + GLenum mode); + void (*EndConditionalRender)(GLcontext *ctx, struct gl_query_object *q); + +#if FEATURE_OES_draw_texture + /** + * \name GL_OES_draw_texture interface + */ + /*@{*/ + void (*DrawTex)(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, + GLfloat width, GLfloat height); + /*@}*/ +#endif + +#if FEATURE_OES_EGL_image + void (*EGLImageTargetTexture2D)(GLcontext *ctx, GLenum target, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage, + GLeglImageOES image_handle); + void (*EGLImageTargetRenderbufferStorage)(GLcontext *ctx, + struct gl_renderbuffer *rb, + void *image_handle); +#endif + }; @@ -1073,7 +1072,7 @@ struct dd_function_table { * These are the initial values to be installed into dispatch by * mesa. If the T&L driver wants to modify the dispatch table * while installed, it must do so itself. It would be possible for - * the vertexformat to install it's own initial values for these + * the vertexformat to install its own initial values for these * functions, but this way there is an obvious list of what is * expected of the driver. * @@ -1187,6 +1186,11 @@ typedef struct { const GLvoid **indices, GLsizei primcount, const GLint *basevertex); + void (GLAPIENTRYP DrawArraysInstanced)(GLenum mode, GLint first, + GLsizei count, GLsizei primcount); + void (GLAPIENTRYP DrawElementsInstanced)(GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices, + GLsizei primcount); /*@}*/ /**