#include "c11/threads.h"
#include "main/glheader.h"
+#include "main/glthread.h"
#include "main/menums.h"
#include "main/config.h"
#include "glapi/glapi.h"
struct gl_program_parameter_list;
struct gl_shader_spirv_data;
struct set;
+struct shader_includes;
struct vbo_context;
/*@}*/
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;
{
GLenum16 Type; /**< datatype: GL_FLOAT, GL_INT, etc */
GLenum16 Format; /**< default: GL_RGBA, but may be GL_BGRA */
+ enum pipe_format _PipeFormat:16; /**< pipe_format for Gallium */
GLubyte Size:5; /**< components per element (1,2,3,4) */
GLubyte Normalized:1; /**< GL_ARB_vertex_program */
GLubyte Integer:1; /**< Integer-valued? */
GLfloat X, Y; /**< position */
GLfloat Width, Height; /**< size */
GLfloat Near, Far; /**< Depth buffer range */
+
+ /**< GL_NV_viewport_swizzle */
+ GLenum16 SwizzleX, SwizzleY, SwizzleZ, SwizzleW;
};
/** Mask indicating which vertex arrays have vertex buffer associated. */
GLbitfield VertexAttribBufferMask;
+ /** Mask indicating which vertex arrays have a non-zero instance divisor. */
+ GLbitfield NonZeroDivisorMask;
+
/** Mask of VERT_BIT_* values indicating which arrays are enabled */
GLbitfield Enabled;
*/
GLbitfield _EffEnabledVBO;
+ /** Same as _EffEnabledVBO, but for instance divisors. */
+ GLbitfield _EffEnabledNonZeroDivisor;
+
/** Denotes the way the position/generic0 attribute is mapped */
gl_attribute_map_mode _AttributeMapMode;
/** 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;
GLboolean PrimitiveRestartFixedIndex;
GLboolean _PrimitiveRestart;
GLuint RestartIndex;
+ GLuint _RestartIndex[4]; /**< Restart indices for index_size - 1. */
/*@}*/
/* GL_ARB_vertex_buffer_object */
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];
*/
union gl_constant_value *UniformDataDefaults;
+ /** Hash for quick search by name. */
+ struct hash_table_u64 *ProgramResourceHash;
+
GLboolean Validated;
/** List of all active resources after linking. */
* 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.
/** Clamp UBO and SSBO block indices so they don't go out-of-bounds. */
GLboolean ClampBlockIndicesToArrayBounds;
+ /** (driconf) Force gl_Position to be considered invariant */
+ GLboolean PositionAlwaysInvariant;
+
const struct nir_shader_compiler_options *NirOptions;
};
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
*/
struct hash_table_u64 *ImageHandles;
mtx_t HandlesMutex; /**< For texture/image handles safety */
+ /* GL_ARB_shading_language_include */
+ struct shader_includes *ShaderIncludes;
+ /* glCompileShaderInclude expects ShaderIncludes not to change while it is
+ * in progress.
+ */
+ mtx_t ShaderIncludeMutex;
+
/**
* Some context in this share group was affected by a GPU reset
*
*/
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
/** Is the drivers uniform storage packed or padded to 16 bytes. */
bool PackedDriverUniformStorage;
+ /** Does the driver make use of the NIR based GLSL linker */
+ bool UseNIRGLSLLinker;
+
+ /** Wether or not glBitmap uses red textures rather than alpha */
+ bool BitmapUsesRed;
+
+ /** 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;
struct spirv_supported_extensions *SpirVExtensions;
char *VendorOverride;
+
+ /** Buffer size used to upload vertices from glBegin/glEnd. */
+ unsigned glBeginEndBufferSize;
};
GLboolean EXT_blend_equation_separate;
GLboolean EXT_blend_func_separate;
GLboolean EXT_blend_minmax;
+ GLboolean EXT_demote_to_helper_invocation;
GLboolean EXT_depth_bounds_test;
GLboolean EXT_disjoint_timer_query;
GLboolean EXT_draw_buffers2;
+ GLboolean EXT_EGL_image_storage;
GLboolean EXT_float_blend;
GLboolean EXT_framebuffer_multisample;
GLboolean EXT_framebuffer_multisample_blit_scaled;
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;
GLboolean ATI_texture_env_combine3;
GLboolean ATI_fragment_shader;
GLboolean GREMEDY_string_marker;
+ GLboolean INTEL_blackhole_render;
GLboolean INTEL_conservative_rasterization;
GLboolean INTEL_performance_query;
GLboolean INTEL_shader_atomic_float_minmax;
+ GLboolean INTEL_shader_integer_functions2;
GLboolean KHR_blend_equation_advanced;
GLboolean KHR_blend_equation_advanced_coherent;
GLboolean KHR_robustness;
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;
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;
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];
/*@}*/
- struct glthread_state *GLThread;
+ struct glthread_state GLThread;
struct gl_config Visual;
struct gl_framebuffer *DrawBuffer; /**< buffer for writing */
struct gl_driver_flags DriverFlags;
GLboolean ViewportInitialized; /**< has viewport size been initialized? */
+ GLboolean _AllowDrawOutOfOrder;
GLbitfield varying_vp_inputs; /**< mask of VERT_BIT_* flags */
GLfloat ConservativeRasterDilate;
GLenum16 ConservativeRasterMode;
+ GLboolean IntelBlackholeRender; /**< GL_INTEL_blackhole_render */
+
/** Does glVertexAttrib(0) alias glVertex()? */
bool _AttribZeroAliasesVertex;