#endif
+/** Set a single bit */
+#define BITFIELD_BIT(b) ((GLbitfield)1 << (b))
+/** Set all bits up to excluding bit b */
+#define BITFIELD_MASK(b) \
+ ((b) == 32 ? (~(GLbitfield)0) : BITFIELD_BIT(b) - 1)
+/** Set count bits starting from bit b */
+#define BITFIELD_RANGE(b, count) \
+ (BITFIELD_MASK((b) + (count)) & ~BITFIELD_MASK(b))
+
+
/**
* \name 64-bit extension of GLbitfield.
*/
struct gl_uniform_storage;
struct prog_instruction;
struct gl_program_parameter_list;
+struct gl_shader_spirv_data;
struct set;
-struct set_entry;
struct vbo_context;
/*@}*/
GLsizei Stride; /**< User-specified stride */
GLuint InstanceDivisor; /**< GL_ARB_instanced_arrays */
struct gl_buffer_object *BufferObj; /**< GL_ARB_vertex_buffer_object */
- GLbitfield64 _BoundArrays; /**< Arrays bound to this binding point */
+ GLbitfield _BoundArrays; /**< Arrays bound to this binding point */
};
struct gl_vertex_buffer_binding BufferBinding[VERT_ATTRIB_MAX];
/** Mask indicating which vertex arrays have vertex buffer associated. */
- GLbitfield64 VertexAttribBufferMask;
+ GLbitfield VertexAttribBufferMask;
/** Mask of VERT_BIT_* values indicating which arrays are enabled */
- GLbitfield64 _Enabled;
+ GLbitfield _Enabled;
/** Mask of VERT_BIT_* values indicating changed/dirty arrays */
- GLbitfield64 NewArrays;
+ GLbitfield NewArrays;
/** The index buffer (also known as the element array buffer in OpenGL). */
struct gl_buffer_object *IndexBufferObj;
GLubyte numArithInstr[2];
GLubyte regsAssigned[2];
GLubyte NumPasses; /**< 1 or 2 */
+ /** Current compile stage: 0 setup pass1, 1 arith pass1, 2 setup pass2, 3 arith pass2 */
GLubyte cur_pass;
GLubyte last_optype;
GLboolean interpinp1;
GLboolean isValid;
+ /** Array of 2 bit values for each tex unit to remember whether
+ * STR or STQ swizzle was used
+ */
GLuint swizzlerq;
struct gl_program *Program;
};
GLuint TransformFeedbackBufferStride[MAX_FEEDBACK_BUFFERS];
struct gl_shader_info info;
+
+ /* ARB_gl_spirv related data */
+ struct gl_shader_spirv_data *spirv_data;
};
unsigned NumUniformDataSlots;
union gl_constant_value *UniformDataSlots;
- /* TODO: This used by Gallium drivers to skip the cache on tgsi fallback.
- * All structures (gl_program, uniform storage, etc) will get recreated
- * even though we have already loaded them from cache. We should instead
- * switch to storing the GLSL metadata and TGSI IR in a single cache item
- * like the i965 driver does with NIR.
+ /* Used to hold initial uniform values for program binary restores.
+ *
+ * From the ARB_get_program_binary spec:
+ *
+ * "A successful call to ProgramBinary will reset all uniform
+ * variables to their initial values. The initial value is either
+ * the value of the variable's initializer as specified in the
+ * original shader source, or 0 if no initializer was present.
*/
- bool skip_cache;
+ union gl_constant_value *UniformDataDefaults;
+
GLboolean Validated;
/** List of all active resources after linking. */
/** EXT_external_objects */
struct _mesa_HashTable *MemoryObjects;
+ /**
+ * Some context in this share group was affected by a disjoint
+ * operation. This operation can be anything that has effects on
+ * values of timer queries in such manner that they become invalid for
+ * performance metrics. As example gpu reset, counter overflow or gpu
+ * frequency changes.
+ */
+ bool DisjointOperation;
};
GLuint MaxShaderStorageBlocks;
};
-
/**
* Constants which may be overridden by device driver during context creation
* but are never changed after that.
*/
GLboolean AllowGLSLBuiltinVariableRedeclaration;
+ /**
+ * Allow GLSL interpolation qualifier mismatch across shader stages.
+ */
+ GLboolean AllowGLSLCrossStageInterpolationMismatch;
+
/**
* Allow creating a higher compat profile (version 3.1+) for apps that
* request it. Be careful when adding that driconf option because some
GLuint MaxTessPatchComponents;
GLuint MaxTessControlTotalOutputComponents;
bool LowerTessLevel; /**< Lower gl_TessLevel* from float[n] to vecn? */
- bool LowerTCSPatchVerticesIn; /**< Lower gl_PatchVerticesIn to a uniform */
- bool LowerTESPatchVerticesIn; /**< Lower gl_PatchVerticesIn to a uniform */
bool PrimitiveRestartForPatches;
bool LowerCsDerivedVariables; /**< Lower gl_GlobalInvocationID and
* gl_LocalInvocationIndex based on
/** When drivers are OK with mapped buffers during draw and other calls. */
bool AllowMappedBuffersDuringExecution;
+
+ /** GL_ARB_get_program_binary */
+ GLuint NumProgramBinaryFormats;
};
GLboolean ARB_enhanced_layouts;
GLboolean ARB_explicit_attrib_location;
GLboolean ARB_explicit_uniform_location;
+ GLboolean ARB_gl_spirv;
GLboolean ARB_gpu_shader5;
GLboolean ARB_gpu_shader_fp64;
GLboolean ARB_gpu_shader_int64;
GLboolean EXT_blend_func_separate;
GLboolean EXT_blend_minmax;
GLboolean EXT_depth_bounds_test;
+ GLboolean EXT_disjoint_timer_query;
GLboolean EXT_draw_buffers2;
GLboolean EXT_framebuffer_multisample;
GLboolean EXT_framebuffer_multisample_blit_scaled;
GLboolean ViewportInitialized; /**< has viewport size been initialized? */
- GLbitfield64 varying_vp_inputs; /**< mask of VERT_BIT_* flags */
+ GLbitfield varying_vp_inputs; /**< mask of VERT_BIT_* flags */
/** \name Derived state */
GLbitfield _ImageTransferState;/**< bitwise-or of IMAGE_*_BIT flags */
GLfloat _EyeZDir[3];
- GLfloat _ModelViewInvScale;
+ GLfloat _ModelViewInvScale; /* may be for model- or eyespace lighting */
+ GLfloat _ModelViewInvScaleEyespace; /* always factor defined in spec */
GLboolean _NeedEyeCoords;
GLboolean _ForceEyeCoords;