/**
- * Client vertex array attributes
+ * Vertex array information which is derived from gl_array_attributes
+ * and gl_vertex_buffer_binding information. Used by the VBO module and
+ * device drivers.
*/
-struct gl_client_array
+struct gl_vertex_array
{
GLint Size; /**< components per element (1,2,3,4) */
GLenum Type; /**< datatype: GL_FLOAT, GL_INT, etc */
* This is a legacy data structure created from gl_vertex_attrib_array and
* gl_vertex_buffer_binding, for compatibility with existing driver code.
*/
- struct gl_client_array _VertexAttrib[VERT_ATTRIB_MAX];
+ struct gl_vertex_array _VertexAttrib[VERT_ATTRIB_MAX];
/** Vertex attribute arrays */
struct gl_array_attributes VertexAttrib[VERT_ATTRIB_MAX];
/** Vertex buffer bindings */
- struct gl_vertex_buffer_binding VertexBinding[VERT_ATTRIB_MAX];
+ struct gl_vertex_buffer_binding BufferBinding[VERT_ATTRIB_MAX];
/** Mask indicating which vertex arrays have vertex buffer associated. */
GLbitfield64 VertexAttribBufferMask;
* Vertex arrays as consumed by a driver.
* The array pointer is set up only by the VBO module.
*/
- const struct gl_client_array **_DrawArrays; /**< 0..VERT_ATTRIB_MAX-1 */
+ const struct gl_vertex_array **_DrawArrays; /**< 0..VERT_ATTRIB_MAX-1 */
/** Legal array datatypes and the API for which they have been computed */
GLbitfield LegalTypesMask;
*/
struct gl_program
{
+ /** FIXME: This must be first until we split shader_info from nir_shader */
+ struct shader_info info;
+
mtx_t Mutex;
GLuint Id;
GLint RefCount;
GLenum Target; /**< GL_VERTEX/FRAGMENT_PROGRAM_ARB, GL_GEOMETRY_PROGRAM_NV */
GLenum Format; /**< String encoding format */
- struct prog_instruction *Instructions;
-
struct nir_shader *nir;
- struct shader_info info;
-
GLbitfield64 SecondaryOutputsWritten; /**< Subset of OutputsWritten outputs written with non-zero index. */
GLbitfield TexturesUsed[MAX_COMBINED_TEXTURE_IMAGE_UNITS]; /**< TEXTURE_x_BIT bitmask */
GLbitfield SamplersUsed; /**< Bitfield of which samplers are used */
GLbitfield ShadowSamplers; /**< Texture units used for shadow sampling. */
GLbitfield ExternalSamplersUsed; /**< Texture units used for samplerExternalOES */
- GLboolean UsesGather; /**< Does this program use gather4 at all? */
-
/* Vertex and geometry shaders fields */
unsigned ClipDistanceArraySize;
unsigned CullDistanceArraySize;
/** Named parameters, constants, etc. from program text */
struct gl_program_parameter_list *Parameters;
- /**
- * Local parameters used by the program.
- *
- * It's dynamically allocated because it is rarely used (just
- * assembly-style programs), and MAX_PROGRAM_LOCAL_PARAMS entries once it's
- * allocated.
- */
- GLfloat (*LocalParams)[4];
-
/** Map from sampler unit to texture unit (set by glUniform1i()) */
GLubyte SamplerUnits[MAX_SAMPLERS];
- /** Bitmask of which register files are read/written with indirect
- * addressing. Mask of (1 << PROGRAM_x) bits.
- */
- GLbitfield IndirectRegisterFiles;
-
- /** Logical counts */
- /*@{*/
- GLuint NumInstructions;
- GLuint NumTemporaries;
- GLuint NumParameters;
- GLuint NumAttributes;
- GLuint NumAddressRegs;
- GLuint NumAluInstructions;
- GLuint NumTexInstructions;
- GLuint NumTexIndirections;
- /*@}*/
- /** Native, actual h/w counts */
- /*@{*/
- GLuint NumNativeInstructions;
- GLuint NumNativeTemporaries;
- GLuint NumNativeParameters;
- GLuint NumNativeAttributes;
- GLuint NumNativeAddressRegs;
- GLuint NumNativeAluInstructions;
- GLuint NumNativeTexInstructions;
- GLuint NumNativeTexIndirections;
- /*@}*/
-
- /** Used by ARB assembly-style programs. Can only be true for vertex
- * programs.
- */
- GLboolean IsPositionInvariant;
+ union {
+ /** ARB assembly-style program fields */
+ struct {
+ struct prog_instruction *Instructions;
+
+ /**
+ * Local parameters used by the program.
+ *
+ * It's dynamically allocated because it is rarely used (just
+ * assembly-style programs), and MAX_PROGRAM_LOCAL_PARAMS entries
+ * once it's allocated.
+ */
+ GLfloat (*LocalParams)[4];
+
+ /** Bitmask of which register files are read/written with indirect
+ * addressing. Mask of (1 << PROGRAM_x) bits.
+ */
+ GLbitfield IndirectRegisterFiles;
+
+ /** Logical counts */
+ /*@{*/
+ GLuint NumInstructions;
+ GLuint NumTemporaries;
+ GLuint NumParameters;
+ GLuint NumAttributes;
+ GLuint NumAddressRegs;
+ GLuint NumAluInstructions;
+ GLuint NumTexInstructions;
+ GLuint NumTexIndirections;
+ /*@}*/
+ /** Native, actual h/w counts */
+ /*@{*/
+ GLuint NumNativeInstructions;
+ GLuint NumNativeTemporaries;
+ GLuint NumNativeParameters;
+ GLuint NumNativeAttributes;
+ GLuint NumNativeAddressRegs;
+ GLuint NumNativeAluInstructions;
+ GLuint NumNativeTexInstructions;
+ GLuint NumNativeTexIndirections;
+ /*@}*/
+
+ /** Used by ARB assembly-style programs. Can only be true for vertex
+ * programs.
+ */
+ GLboolean IsPositionInvariant;
+ } arb;
+ };
};
/** Clamp UBO and SSBO block indices so they don't go out-of-bounds. */
GLboolean ClampBlockIndicesToArrayBounds;
- GLboolean LowerShaderSharedVariables; /**< Lower compute shader shared
- * variable access to intrinsics. */
-
const struct nir_shader_compiler_options *NirOptions;
};
/* GL_ARB_robustness */
GLenum ResetStrategy;
+ /* GL_KHR_robustness */
+ GLboolean RobustAccess;
+
/* GL_ARB_blend_func_extended */
GLuint MaxDualSourceDrawBuffers;
DEBUG_SILENT = (1 << 0),
DEBUG_ALWAYS_FLUSH = (1 << 1),
DEBUG_INCOMPLETE_TEXTURE = (1 << 2),
- DEBUG_INCOMPLETE_FBO = (1 << 3)
+ DEBUG_INCOMPLETE_FBO = (1 << 3),
+ DEBUG_CONTEXT = (1 << 4)
};
#ifdef __cplusplus