*/
struct gl_light
{
- struct gl_light *next; /**< double linked list with sentinel */
- struct gl_light *prev;
-
GLfloat Ambient[4]; /**< ambient color */
GLfloat Diffuse[4]; /**< diffuse color */
GLfloat Specular[4]; /**< specular color */
* Derived state for optimizations:
*/
/*@{*/
+ GLbitfield _EnabledLights; /**< bitmask containing enabled lights */
+
GLboolean _NeedEyeCoords;
GLboolean _NeedVertices; /**< Use fast shader? */
- struct gl_light EnabledList; /**< List sentinel */
GLfloat _BaseColor[2][3];
/*@}*/
GLboolean SmoothFlag; /**< True if GL_POINT_SMOOTH is enabled */
GLboolean _Attenuated; /**< True if Params != [1, 0, 0] */
GLboolean PointSprite; /**< GL_NV/ARB_point_sprite */
- GLboolean CoordReplace[MAX_TEXTURE_COORD_UNITS]; /**< GL_ARB_point_sprite*/
+ GLbitfield CoordReplace; /**< GL_ARB_point_sprite*/
GLenum SpriteRMode; /**< GL_NV_point_sprite (only!) */
GLenum SpriteOrigin; /**< GL_ARB_point_sprite */
};
* Subroutine uniform remap table
* based on the program level uniform remap table.
*/
+ GLuint NumSubroutineUniforms; /* non-sparse total */
GLuint NumSubroutineUniformRemapTable;
struct gl_uniform_storage **SubroutineUniformRemapTable;
* and storage for them.
*/
GLuint NumSubroutineFunctions;
+ GLuint MaxSubroutineFunctionIndex;
struct gl_subroutine_function *SubroutineFunctions;
};
*/
const struct glsl_type *type;
+ /**
+ * If the variable is in an interface block, this is the type of the block.
+ */
+ const struct glsl_type *interface_type;
+
+ /**
+ * For variables inside structs (possibly recursively), this is the
+ * outermost struct type.
+ */
+ const struct glsl_type *outermost_struct_type;
+
/**
* Declared name of the variable
*/
* \sa (n)ir_variable_mode
*/
unsigned mode:4;
+
+ /**
+ * Interpolation mode for shader inputs / outputs
+ *
+ * \sa ir_variable_interpolation
+ */
+ unsigned interpolation:2;
+
+ /**
+ * Was the location explicitly set in the shader?
+ *
+ * If the location is explicitly set in the shader, it \b cannot be changed
+ * by the linker or by the API (e.g., calls to \c glBindAttribLocation have
+ * no effect).
+ */
+ unsigned explicit_location:1;
+
+ /**
+ * Precision qualifier.
+ */
+ unsigned precision:2;
};
/**
GLboolean LowerBufferInterfaceBlocks; /**< Lower UBO and SSBO access to intrinsics. */
+ /** 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. */
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
+ * other builtin variables. */
};
GLboolean ARB_shader_bit_encoding;
GLboolean ARB_shader_clock;
GLboolean ARB_shader_draw_parameters;
+ GLboolean ARB_shader_group_vote;
GLboolean ARB_shader_image_load_store;
GLboolean ARB_shader_image_size;
GLboolean ARB_shader_precision;
GLboolean EXT_vertex_array_bgra;
GLboolean OES_copy_image;
GLboolean OES_sample_variables;
+ GLboolean OES_shader_io_blocks;
GLboolean OES_standard_derivatives;
GLboolean OES_texture_buffer;
/* vendor extensions */
GLboolean ATI_separate_stencil;
GLboolean GREMEDY_string_marker;
GLboolean INTEL_performance_query;
+ GLboolean KHR_robustness;
GLboolean KHR_texture_compression_astc_hdr;
GLboolean KHR_texture_compression_astc_ldr;
GLboolean MESA_pack_invert;
*/
struct _glapi_table *BeginEnd;
/**
- * Tracks the current dispatch table out of the 3 above, so that it can be
+ * Dispatch table for when a graphics reset has happened.
+ */
+ struct _glapi_table *ContextLost;
+ /**
+ * Tracks the current dispatch table out of the 4 above, so that it can be
* re-set on glXMakeCurrent().
*/
struct _glapi_table *CurrentDispatch;
DEBUG_INCOMPLETE_FBO = (1 << 3)
};
-/**
- * Checks if the active fragment shader program can have side effects due
- * to use of things like atomic buffers or images
- */
-static inline bool
-_mesa_active_fragment_shader_has_side_effects(const struct gl_context *ctx)
-{
- const struct gl_shader *sh;
-
- if (!ctx->_Shader->_CurrentFragmentProgram)
- return false;
-
- sh = ctx->_Shader->_CurrentFragmentProgram->_LinkedShaders[MESA_SHADER_FRAGMENT];
- return sh->NumAtomicBuffers > 0 ||
- sh->NumImages > 0 ||
- sh->NumShaderStorageBlocks > 0;
-}
-
#ifdef __cplusplus
}
#endif