X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fmtypes.h;h=de10ba39a29afaf26867de453b4e4942649be380;hb=f8e4542bad7dd9bb97b2990947ef74dbb2ee75e4;hp=db4921d0106e35f4ea0f723c97289360499ba64f;hpb=fd6636ebc06d55b59851701c436b8b97f50fd7f4;p=mesa.git diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index db4921d0106..de10ba39a29 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -39,6 +39,7 @@ #include "c11/threads.h" #include "main/glheader.h" +#include "main/glthread.h" #include "main/menums.h" #include "main/config.h" #include "glapi/glapi.h" @@ -104,6 +105,7 @@ _mesa_varying_slot_in_fs(gl_varying_slot slot) case VARYING_SLOT_TESS_LEVEL_INNER: case VARYING_SLOT_BOUNDING_BOX0: case VARYING_SLOT_BOUNDING_BOX1: + case VARYING_SLOT_VIEWPORT_MASK: return GL_FALSE; default: return GL_TRUE; @@ -1311,6 +1313,9 @@ struct gl_viewport_attrib GLfloat X, Y; /**< position */ GLfloat Width, Height; /**< size */ GLfloat Near, Far; /**< Depth buffer range */ + + /**< GL_NV_viewport_swizzle */ + GLenum16 SwizzleX, SwizzleY, SwizzleZ, SwizzleW; }; @@ -1590,6 +1595,9 @@ struct gl_array_attrib /** The last VAO accessed by a DSA function */ struct gl_vertex_array_object *LastLookedUpVAO; + /** These contents are copied to newly created VAOs. */ + struct gl_vertex_array_object DefaultVAOState; + /** Array objects (GL_ARB_vertex_array_object) */ struct _mesa_HashTable *Objects; @@ -1608,6 +1616,7 @@ struct gl_array_attrib GLboolean PrimitiveRestartFixedIndex; GLboolean _PrimitiveRestart; GLuint RestartIndex; + GLuint _RestartIndex[4]; /**< Restart indices for index_size - 1. */ /*@}*/ /* GL_ARB_vertex_buffer_object */ @@ -2665,6 +2674,12 @@ struct gl_shader bool bound_sampler; bool bound_image; + /** + * Whether layer output is viewport-relative. + */ + bool redeclares_gl_layer; + bool layer_viewport_relative; + /** Global xfb_stride out qualifier if any */ GLuint TransformFeedbackBufferStride[MAX_FEEDBACK_BUFFERS]; @@ -3174,6 +3189,15 @@ struct gl_shader_compiler_options * gl_CullDistance together from * float[8] to vec4[2] **/ + GLbitfield LowerBuiltinVariablesXfb; /**< Which builtin variables should + * be lowered for transform feedback + **/ + + /** + * If we can lower the precision of variables based on precision + * qualifiers + */ + GLboolean LowerPrecision; /** * \name Forms of indirect addressing the driver cannot do. @@ -3300,9 +3324,6 @@ struct gl_shared_state GLuint TextureStateStamp; /**< state notification for shared tex */ /*@}*/ - /** Default buffer object for vertex arrays that aren't in VBOs */ - struct gl_buffer_object *NullBufferObj; - /** * \name Vertex/geometry/fragment programs */ @@ -3974,6 +3995,15 @@ struct gl_constants */ GLboolean DisableVaryingPacking; + /** + * Disable varying packing if used for transform feedback. This is needed + * for some drivers (e.g. Panfrost) where transform feedback requires + * unpacked varyings. + * + * This variable is mutually exlusive with DisableVaryingPacking. + */ + GLboolean DisableTransformFeedbackPacking; + /** * UBOs and SSBOs can be packed tightly by the OpenGL implementation when * layout is set as shared (the default) or packed. However most Mesa drivers @@ -4160,6 +4190,12 @@ struct gl_constants /** Whether the vertex buffer offset is a signed 32-bit integer. */ bool VertexBufferOffsetIsInt32; + /** Whether the driver can handle MultiDrawElements with non-VBO indices. */ + bool MultiDrawWithUserIndices; + + /** Whether out-of-order draw (Begin/End) optimizations are allowed. */ + bool AllowDrawOutOfOrder; + /** GL_ARB_gl_spirv */ struct spirv_supported_capabilities SpirVCapabilities; @@ -4167,6 +4203,9 @@ struct gl_constants struct spirv_supported_extensions *SpirVExtensions; char *VendorOverride; + + /** Buffer size used to upload vertices from glBegin/glEnd. */ + unsigned glBeginEndBufferSize; }; @@ -4337,6 +4376,7 @@ struct gl_extensions GLboolean EXT_texture_filter_anisotropic; GLboolean EXT_texture_integer; GLboolean EXT_texture_mirror_clamp; + GLboolean EXT_texture_norm16; GLboolean EXT_texture_shadow_lod; GLboolean EXT_texture_shared_exponent; GLboolean EXT_texture_snorm; @@ -4394,6 +4434,7 @@ struct gl_extensions GLboolean MESA_ycbcr_texture; GLboolean NV_compute_shader_derivatives; GLboolean NV_conditional_render; + GLboolean NV_copy_image; GLboolean NV_fill_rectangle; GLboolean NV_fog_distance; GLboolean NV_point_sprite; @@ -4407,6 +4448,8 @@ struct gl_extensions GLboolean NV_conservative_raster_dilate; GLboolean NV_conservative_raster_pre_snap_triangles; GLboolean NV_conservative_raster_pre_snap; + GLboolean NV_viewport_array2; + GLboolean NV_viewport_swizzle; GLboolean NVX_gpu_memory_info; GLboolean TDFX_texture_compression_FXT1; GLboolean OES_EGL_image; @@ -4567,7 +4610,7 @@ struct gl_dlist_state GLvertexformat ListVtxfmt; GLubyte ActiveAttribSize[VERT_ATTRIB_MAX]; - GLfloat CurrentAttrib[VERT_ATTRIB_MAX][8]; + uint32_t CurrentAttrib[VERT_ATTRIB_MAX][8]; GLubyte ActiveMaterialSize[MAT_ATTRIB_MAX]; GLfloat CurrentMaterial[MAT_ATTRIB_MAX][4]; @@ -4887,7 +4930,7 @@ struct gl_context /*@}*/ - struct glthread_state *GLThread; + struct glthread_state GLThread; struct gl_config Visual; struct gl_framebuffer *DrawBuffer; /**< buffer for writing */ @@ -5117,6 +5160,7 @@ struct gl_context struct gl_driver_flags DriverFlags; GLboolean ViewportInitialized; /**< has viewport size been initialized? */ + GLboolean _AllowDrawOutOfOrder; GLbitfield varying_vp_inputs; /**< mask of VERT_BIT_* flags */