X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fmtypes.h;h=e447e4ce23b60b751647afc884195bd0db76d445;hb=e9d9dab0cd8614898ecc2aceb49d8faf354cdbdf;hp=26ec8d55957798fe71dda871070ad1eff386f1c3;hpb=96a30b06dbc60ff63392cf8ae9dcb3d245b41c27;p=mesa.git diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 26ec8d55957..e447e4ce23b 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -83,6 +83,7 @@ /*@{*/ struct _mesa_HashTable; struct gl_attrib_node; +struct gl_meta_state; struct gl_pixelstore_attrib; struct gl_program_cache; struct gl_texture_format; @@ -770,6 +771,7 @@ struct gl_light_attrib GLboolean Enabled; /**< Lighting enabled flag */ GLenum ShadeModel; /**< GL_FLAT or GL_SMOOTH */ + GLenum ProvokingVertex; /**< GL_EXT_provoking_vertex */ GLenum ColorMaterialFace; /**< GL_FRONT, BACK or FRONT_AND_BACK */ GLenum ColorMaterialMode; /**< GL_AMBIENT, GL_DIFFUSE, etc */ GLbitfield ColorMaterialBitmask; /**< bitmask formed from Face and Mode */ @@ -1498,14 +1500,17 @@ struct gl_buffer_object { GLint RefCount; GLuint Name; - GLenum Usage; - GLenum Access; - GLvoid *Pointer; /**< Only valid while buffer is mapped */ - GLintptr Offset; /**< mapped offset */ - GLsizeiptr Length; /**< mapped length */ - GLsizeiptrARB Size; /**< Size of storage in bytes */ - GLubyte *Data; /**< Location of storage either in RAM or VRAM. */ - GLboolean Written; /**< Ever written to? (for debugging) */ + GLenum Usage; /**< GL_STREAM_DRAW_ARB, GL_STREAM_READ_ARB, etc. */ + GLsizeiptrARB Size; /**< Size of buffer storage in bytes */ + GLubyte *Data; /**< Location of storage either in RAM or VRAM. */ + /** Fields describing a mapped buffer */ + /*@{*/ + GLbitfield AccessFlags; /**< Mask of GL_MAP_x_BIT flags */ + GLvoid *Pointer; /**< User-space address of mapping */ + GLintptr Offset; /**< Mapped offset */ + GLsizeiptr Length; /**< Mapped length */ + /*@}*/ + GLboolean Written; /**< Ever written to? (for debugging) */ }; @@ -1559,6 +1564,7 @@ struct gl_array_object GLint RefCount; _glthread_Mutex Mutex; + GLboolean VBOonly; /**< require all arrays to live in VBOs? */ /** Conventional vertex arrays */ /*@{*/ @@ -1604,6 +1610,9 @@ struct gl_array_attrib /** The default vertex array object */ struct gl_array_object *DefaultArrayObj; + /** Array objects (GL_ARB/APPLE_vertex_array_object) */ + struct _mesa_HashTable *Objects; + GLint ActiveTexture; /**< Client Active Texture */ GLuint LockFirst; /**< GL_EXT_compiled_vertex_array */ GLuint LockCount; /**< GL_EXT_compiled_vertex_array */ @@ -1996,6 +2005,7 @@ struct gl_shader GLboolean Main; /**< shader defines main() */ GLboolean UnresolvedRefs; const GLchar *Source; /**< Source code string */ + GLuint SourceChecksum; /**< for debug/logging purposes */ struct gl_program *Program; /**< Post-compile assembly code */ GLchar *InfoLog; struct gl_sl_pragmas Pragmas; @@ -2045,6 +2055,7 @@ struct gl_shader_state struct gl_shader_program *CurrentProgram; /**< The user-bound program */ /** Driver-selectable options: */ GLboolean EmitHighLevelInstructions; /**< IF/ELSE/ENDIF vs. BRA, etc. */ + GLboolean EmitContReturn; /**< Emit CONT/RET opcodes? */ GLboolean EmitCondCodes; /**< Use condition codes? */ GLboolean EmitComments; /**< Annotated instructions */ void *MemPool; @@ -2115,9 +2126,6 @@ struct gl_shared_state struct _mesa_HashTable *FrameBuffers; #endif - /** Objects associated with the GL_APPLE_vertex_array_object extension. */ - struct _mesa_HashTable *ArrayObjects; - void *DriverData; /**< Device driver shared state */ }; @@ -2421,6 +2429,9 @@ struct gl_constants GLuint MaxVarying; /**< Number of float[4] varying parameters */ GLbitfield SupportedBumpUnits; /**> units supporting GL_ATI_envmap_bumpmap as targets */ + + /**< GL_EXT_provoking_vertex */ + GLboolean QuadsFollowProvokingVertexConvention; }; @@ -2440,6 +2451,7 @@ struct gl_extensions GLboolean ARB_framebuffer_object; GLboolean ARB_half_float_pixel; GLboolean ARB_imaging; + GLboolean ARB_map_buffer_range; GLboolean ARB_multisample; GLboolean ARB_multitexture; GLboolean ARB_occlusion_query; @@ -2459,6 +2471,7 @@ struct gl_extensions GLboolean ARB_texture_mirrored_repeat; GLboolean ARB_texture_non_power_of_two; GLboolean ARB_transpose_matrix; + GLboolean ARB_vertex_array_object; GLboolean ARB_vertex_buffer_object; GLboolean ARB_vertex_program; GLboolean ARB_vertex_shader; @@ -2490,6 +2503,7 @@ struct gl_extensions GLboolean EXT_pixel_buffer_object; GLboolean EXT_point_parameters; GLboolean EXT_polygon_offset; + GLboolean EXT_provoking_vertex; GLboolean EXT_rescale_normal; GLboolean EXT_shadow_funcs; GLboolean EXT_secondary_color; @@ -2822,6 +2836,13 @@ struct gl_dlist_state GLubyte ActiveEdgeFlag; GLboolean CurrentEdgeFlag; + + struct { + /* State known to have been set by the currently-compiling display + * list. Used to eliminate some redundant state changes. + */ + GLenum ShadeModel; + } Current; }; @@ -2962,14 +2983,25 @@ struct __GLcontextRec struct gl_buffer_object *CopyWriteBuffer; /**< GL_ARB_copy_buffer */ /*@}*/ + struct gl_meta_state *Meta; /**< for "meta" operations */ + #if FEATURE_EXT_framebuffer_object struct gl_renderbuffer *CurrentRenderbuffer; #endif GLenum ErrorValue; /**< Last error code */ + + /** + * Recognize and silence repeated error debug messages in buggy apps. + */ + const char *ErrorDebugFmtString; + GLuint ErrorDebugCount; + GLenum RenderMode; /**< either GL_RENDER, GL_SELECT, GL_FEEDBACK */ GLbitfield NewState; /**< bitwise-or of _NEW_* flags */ + GLboolean ViewportInitialized; /**< has viewport size been initialized? */ + GLbitfield varying_vp_inputs; /**< mask of VERT_BIT_* flags */ /** \name Derived state */