struct nir_shader *nir;
+ bool is_arb_asm; /** Is this an ARB assembly-style program */
+
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 */
GLenum ImageAccess[MAX_IMAGE_UNIFORMS];
struct gl_uniform_block **UniformBlocks;
+ struct gl_uniform_block **ShaderStorageBlocks;
+
+ /** Which texture target is being sampled
+ * (TEXTURE_1D/2D/3D/etc_INDEX)
+ */
+ gl_texture_index SamplerTargets[MAX_SAMPLERS];
union {
struct {
*/
struct gl_shader_info
{
- bool uses_gl_fragcoord;
- bool redeclares_gl_fragcoord;
- bool PostDepthCoverage;
- bool InnerCoverage;
- bool ARB_fragment_coord_conventions_enable;
-
- /**
- * Fragment shader state from GLSL 1.50 layout qualifiers.
- */
- bool origin_upper_left;
- bool pixel_center_integer;
-
- struct {
- /** Global xfb_stride out qualifier if any */
- GLuint BufferStride[MAX_FEEDBACK_BUFFERS];
- } TransformFeedback;
-
/**
* Tessellation Control shader state from layout qualifiers.
*/
* in this shader.
*/
GLenum PrimitiveMode;
- /**
- * GL_EQUAL, GL_FRACTIONAL_ODD, GL_FRACTIONAL_EVEN, or 0 if it's not set
- * in this shader.
- */
- GLenum Spacing;
+
+ enum gl_tess_spacing Spacing;
+
/**
* GL_CW, GL_CCW, or 0 if it's not set in this shader.
*/
GLenum OutputType;
} Geom;
- /**
- * Whether early fragment tests are enabled as defined by
- * ARB_shader_image_load_store.
- */
- bool EarlyFragmentTests;
-
/**
* Compute shader state from ARB_compute_shader and
* ARB_compute_variable_group_size layout qualifiers.
* \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.
*
*/
unsigned num_combined_uniform_components;
- struct gl_uniform_block **ShaderStorageBlocks;
-
struct exec_list *ir;
struct exec_list *packed_varyings;
struct exec_list *fragdata_arrays;
struct glsl_symbol_table *symbols;
- /**
- * Number of image uniforms defined in the shader. It specifies
- * the number of valid elements in the \c ImageUnits and \c
- * ImageAccess arrays.
- */
- GLuint NumImages;
-
struct gl_shader_info info;
};
-static inline GLbitfield gl_external_samplers(struct gl_linked_shader *shader)
+static inline GLbitfield gl_external_samplers(struct gl_program *prog)
{
GLbitfield external_samplers = 0;
- GLbitfield mask = shader->active_samplers;
+ GLbitfield mask = prog->SamplersUsed;
while (mask) {
int idx = u_bit_scan(&mask);
- if (shader->SamplerTargets[idx] == TEXTURE_EXTERNAL_INDEX)
+ if (prog->sh.SamplerTargets[idx] == TEXTURE_EXTERNAL_INDEX)
external_samplers |= (1 << idx);
}
*/
GLbitfield BlendSupport;
+ /**
+ * Whether early fragment tests are enabled as defined by
+ * ARB_shader_image_load_store.
+ */
+ bool EarlyFragmentTests;
+
+ bool ARB_fragment_coord_conventions_enable;
+
+ bool redeclares_gl_fragcoord;
+ bool uses_gl_fragcoord;
+
+ bool PostDepthCoverage;
+ bool InnerCoverage;
+
+ /**
+ * Fragment shader state from GLSL 1.50 layout qualifiers.
+ */
+ bool origin_upper_left;
+ bool pixel_center_integer;
+
+ /** Global xfb_stride out qualifier if any */
+ GLuint TransformFeedbackBufferStride[MAX_FEEDBACK_BUFFERS];
+
struct gl_shader_info info;
};
struct gl_active_atomic_buffer *AtomicBuffers;
unsigned NumAtomicBuffers;
+ /** List of all active resources after linking. */
+ struct gl_program_resource *ProgramResourceList;
+ unsigned NumProgramResourceList;
+
GLboolean LinkStatus; /**< GL_LINK_STATUS */
GLboolean Validated;
GLchar *InfoLog;
unsigned LastClipDistanceArraySize;
unsigned LastCullDistanceArraySize;
+ /**
+ * Total number of explicit uniform location including inactive uniforms.
+ */
+ unsigned NumExplicitUniformLocations;
+
/**
* Map of active uniform names to locations
*
*/
struct gl_linked_shader *_LinkedShaders[MESA_SHADER_STAGES];
- /** List of all active resources after linking. */
- struct gl_program_resource *ProgramResourceList;
- unsigned NumProgramResourceList;
-
/* True if any of the fragment shaders attached to this program use:
* #extension ARB_fragment_coord_conventions: enable
*/
*/
struct gl_shader_program *CurrentProgram[MESA_SHADER_STAGES];
- struct gl_shader_program *_CurrentFragmentProgram;
+ struct gl_program *_CurrentFragmentProgram;
/**
* Program used by glUniform calls.
*/
bool GLSLOptimizeConservatively;
+ /**
+ * True if gl_TessLevelInner/Outer[] in the TES should be inputs
+ * (otherwise, they're system values).
+ */
+ bool GLSLTessLevelsAsInputs;
+
/**
* Always use the GetTransformFeedbackVertexCount() driver hook, rather
* than passing the transform feedback object to the drawing function.
GLboolean ARB_explicit_uniform_location;
GLboolean ARB_gpu_shader5;
GLboolean ARB_gpu_shader_fp64;
+ GLboolean ARB_gpu_shader_int64;
GLboolean ARB_half_float_vertex;
GLboolean ARB_indirect_parameters;
GLboolean ARB_instanced_arrays;