- /** GL_FRAGMENT_SHADER || GL_VERTEX_SHADER || GL_GEOMETRY_SHADER_ARB ||
- * GL_TESS_CONTROL_SHADER || GL_TESS_EVALUATION_SHADER.
- * Must be the first field.
- */
- GLenum Type;
- gl_shader_stage Stage;
- GLuint Name; /**< AKA the handle */
- GLint RefCount; /**< Reference count */
- GLchar *Label; /**< GL_KHR_debug */
- GLboolean DeletePending;
- GLboolean CompileStatus;
- bool IsES; /**< True if this shader uses GLSL ES */
-
- GLuint SourceChecksum; /**< for debug/logging purposes */
- const GLchar *Source; /**< Source code string */
-
- struct gl_program *Program; /**< Post-compile assembly code */
- GLchar *InfoLog;
-
- unsigned Version; /**< GLSL version used for linking */
-
- /**
- * \name Sampler tracking
- *
- * \note Each of these fields is only set post-linking.
- */
- /*@{*/
- unsigned num_samplers; /**< Number of samplers used by this shader. */
- GLbitfield active_samplers; /**< Bitfield of which samplers are used */
- GLbitfield shadow_samplers; /**< Samplers used for shadow sampling. */
- /*@}*/
-
- /**
- * Map from sampler unit to texture unit (set by glUniform1i())
- *
- * A sampler unit is associated with each sampler uniform by the linker.
- * The sampler unit associated with each uniform is stored in the
- * \c gl_uniform_storage::sampler field.
- */
- GLubyte SamplerUnits[MAX_SAMPLERS];
- /** Which texture target is being sampled (TEXTURE_1D/2D/3D/etc_INDEX) */
- gl_texture_index SamplerTargets[MAX_SAMPLERS];
-
- /**
- * Number of default uniform block components used by this shader.
- *
- * This field is only set post-linking.
- */
- unsigned num_uniform_components;
-
- /**
- * Number of combined uniform components used by this shader.
- *
- * This field is only set post-linking. It is the sum of the uniform block
- * sizes divided by sizeof(float), and num_uniform_compoennts.
- */
- unsigned num_combined_uniform_components;
-
- /**
- * This shader's uniform/ssbo block information.
- *
- * These fields are only set post-linking.
- *
- * BufferInterfaceBlocks is a list containing both UBOs and SSBOs. This is
- * useful during the linking process so that we don't have to handle SSBOs
- * specifically.
- *
- * UniformBlocks is a list of UBOs. This is useful for backends that need
- * or prefer to see separate index spaces for UBOS and SSBOs like the GL
- * API specifies.
- *
- * ShaderStorageBlocks is a list of SSBOs. This is useful for backends that
- * need or prefer to see separate index spaces for UBOS and SSBOs like the
- * GL API specifies.
- *
- * UniformBlocks and ShaderStorageBlocks only have pointers into
- * BufferInterfaceBlocks so the actual resource information is not
- * duplicated.
- */
- unsigned NumBufferInterfaceBlocks;
- struct gl_uniform_block **BufferInterfaceBlocks;
-
- unsigned NumUniformBlocks;
- struct gl_uniform_block **UniformBlocks;
-
- unsigned NumShaderStorageBlocks;
- struct gl_uniform_block **ShaderStorageBlocks;
-
- struct exec_list *ir;
- struct exec_list *packed_varyings;
- struct exec_list *fragdata_arrays;
- struct glsl_symbol_table *symbols;
-