#include "c11/threads.h"
#include "main/glheader.h"
+#include "main/glthread.h"
#include "main/menums.h"
#include "main/config.h"
#include "glapi/glapi.h"
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;
/** The GL spec defines this as an array but >32x MSAA is madness */
GLbitfield SampleMaskValue;
+
+ /* NV_alpha_to_coverage_dither_control */
+ GLenum SampleAlphaToCoverageDitherControl;
};
GLfloat X, Y; /**< position */
GLfloat Width, Height; /**< size */
GLfloat Near, Far; /**< Depth buffer range */
+
+ /**< GL_NV_viewport_swizzle */
+ GLenum16 SwizzleX, SwizzleY, SwizzleZ, SwizzleW;
};
/** 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];
* 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.
*/
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
*/
} SupportedMultisampleModes[40];
GLint NumSupportedMultisampleModes;
- /**
- * GL_EXT_texture_multisample_blit_scaled implementation assumes that
- * samples are laid out in a rectangular grid roughly corresponding to
- * sample locations within a pixel. Below SampleMap{2,4,8}x variables
- * are used to map indices of rectangular grid to sample numbers within
- * a pixel. This mapping of indices to sample numbers must be initialized
- * by the driver for the target hardware. For example, if we have the 8X
- * MSAA sample number layout (sample positions) for XYZ hardware:
- *
- * sample indices layout sample number layout
- * --------- ---------
- * | 0 | 1 | | a | b |
- * --------- ---------
- * | 2 | 3 | | c | d |
- * --------- ---------
- * | 4 | 5 | | e | f |
- * --------- ---------
- * | 6 | 7 | | g | h |
- * --------- ---------
- *
- * Where a,b,c,d,e,f,g,h are integers between [0-7].
- *
- * Then, initialize the SampleMap8x variable for XYZ hardware as shown
- * below:
- * SampleMap8x = {a, b, c, d, e, f, g, h};
- *
- * Follow the logic for sample counts 2-8.
- *
- * For 16x the sample indices layout as a 4x4 grid as follows:
- *
- * -----------------
- * | 0 | 1 | 2 | 3 |
- * -----------------
- * | 4 | 5 | 6 | 7 |
- * -----------------
- * | 8 | 9 |10 |11 |
- * -----------------
- * |12 |13 |14 |15 |
- * -----------------
- */
- uint8_t SampleMap2x[2];
- uint8_t SampleMap4x[4];
- uint8_t SampleMap8x[8];
- uint8_t SampleMap16x[16];
-
/** GL_ARB_shader_atomic_counters */
GLuint MaxAtomicBufferBindings;
GLuint MaxAtomicBufferSize;
/** When drivers are OK with mapped buffers during draw and other calls. */
bool AllowMappedBuffersDuringExecution;
+ /**
+ * Whether buffer creation, unsynchronized mapping, unmapping, and
+ * deletion is thread-safe.
+ */
+ bool BufferCreateMapUnsynchronizedThreadSafe;
+
/** GL_ARB_get_program_binary */
GLuint NumProgramBinaryFormats;
/** 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_shader_framebuffer_fetch_non_coherent;
GLboolean MESA_shader_integer_functions;
GLboolean MESA_ycbcr_texture;
+ GLboolean NV_alpha_to_coverage_dither_control;
GLboolean NV_compute_shader_derivatives;
GLboolean NV_conditional_render;
GLboolean NV_copy_image;
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;
* while meta is in progress.
*/
GLubyte Version;
- /**
- * Force-enabled, yet unrecognized, extensions.
- * See _mesa_one_time_init_extension_overrides()
- */
-#define MAX_UNRECOGNIZED_EXTENSIONS 16
- const char *unrecognized_extensions[MAX_UNRECOGNIZED_EXTENSIONS];
};
#define _NEW_TEXTURE_MATRIX (1u << 2) /**< gl_context::TextureMatrix */
#define _NEW_COLOR (1u << 3) /**< gl_context::Color */
#define _NEW_DEPTH (1u << 4) /**< gl_context::Depth */
-#define _NEW_EVAL (1u << 5) /**< gl_context::Eval, EvalMap */
+/* gap */
#define _NEW_FOG (1u << 6) /**< gl_context::Fog */
#define _NEW_HINT (1u << 7) /**< gl_context::Hint */
#define _NEW_LIGHT (1u << 8) /**< gl_context::Light */
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];
/** gl_context::Transform::ClipPlanesEnabled */
uint64_t NewClipPlaneEnable;
+ /** gl_context::Color::ClampFragmentColor */
+ uint64_t NewFragClamp;
+
/** gl_context::Transform::DepthClamp */
uint64_t NewDepthClamp;
GLuint Name; /**< hash table ID/name */
};
+/**
+ * One element of the client attrib stack.
+ */
+struct gl_client_attrib_node
+{
+ GLbitfield Mask;
+ struct gl_array_attrib Array;
+ struct gl_vertex_array_object VAO;
+ struct gl_pixelstore_attrib Pack;
+ struct gl_pixelstore_attrib Unpack;
+};
+
/**
* Mesa rendering context.
*
/*@}*/
- struct glthread_state *GLThread;
+ struct glthread_state GLThread;
struct gl_config Visual;
struct gl_framebuffer *DrawBuffer; /**< buffer for writing */
/** \name Client attribute stack */
/*@{*/
GLuint ClientAttribStackDepth;
- struct gl_attrib_node *ClientAttribStack[MAX_CLIENT_ATTRIB_STACK_DEPTH];
+ struct gl_client_attrib_node ClientAttribStack[MAX_CLIENT_ATTRIB_STACK_DEPTH];
/*@}*/
/** \name Client attribute groups */
struct gl_driver_flags DriverFlags;
GLboolean ViewportInitialized; /**< has viewport size been initialized? */
+ GLboolean _AllowDrawOutOfOrder;
GLbitfield varying_vp_inputs; /**< mask of VERT_BIT_* flags */