return ARB_gpu_shader_fp64_enable || is_version(400, 0);
}
+ bool has_420pack() const
+ {
+ return ARB_shading_language_420pack_enable || is_version(420, 0);
+ }
+
+ bool has_compute_shader() const
+ {
+ return ARB_compute_shader_enable || is_version(430, 310);
+ }
+
void process_version_directive(YYLTYPE *locp, int version,
const char *ident);
bool fs_redeclares_gl_fragcoord_with_no_layout_qualifiers;
/**
- * True if a geometry shader input primitive type was specified using a
- * layout directive.
+ * True if a geometry shader input primitive type or tessellation control
+ * output vertices were specified using a layout directive.
*
- * Note: this value is computed at ast_to_hir time rather than at parse
+ * Note: these values are computed at ast_to_hir time rather than at parse
* time.
*/
bool gs_input_prim_type_specified;
+ bool tcs_output_vertices_specified;
- /** Input layout qualifiers from GLSL 1.50. (geometry shader controls)*/
+ /**
+ * Input layout qualifiers from GLSL 1.50 (geometry shader controls),
+ * and GLSL 4.00 (tessellation evaluation shader)
+ */
struct ast_type_qualifier *in_qualifier;
/**
*/
unsigned cs_input_local_size[3];
- /** Output layout qualifiers from GLSL 1.50. (geometry shader controls)*/
+ /**
+ * Output layout qualifiers from GLSL 1.50 (geometry shader controls),
+ * and GLSL 4.00 (tessellation control shader).
+ */
struct ast_type_qualifier *out_qualifier;
/**
/* ARB_shader_atomic_counters */
unsigned MaxVertexAtomicCounters;
+ unsigned MaxTessControlAtomicCounters;
+ unsigned MaxTessEvaluationAtomicCounters;
unsigned MaxGeometryAtomicCounters;
unsigned MaxFragmentAtomicCounters;
unsigned MaxCombinedAtomicCounters;
* 3.10.
*/
unsigned MaxVertexAtomicCounterBuffers;
+ unsigned MaxTessControlAtomicCounterBuffers;
+ unsigned MaxTessEvaluationAtomicCounterBuffers;
unsigned MaxGeometryAtomicCounterBuffers;
unsigned MaxFragmentAtomicCounterBuffers;
unsigned MaxCombinedAtomicCounterBuffers;
/* ARB_shader_image_load_store */
unsigned MaxImageUnits;
- unsigned MaxCombinedImageUnitsAndFragmentOutputs;
+ unsigned MaxCombinedShaderOutputResources;
unsigned MaxImageSamples;
unsigned MaxVertexImageUniforms;
+ unsigned MaxTessControlImageUniforms;
+ unsigned MaxTessEvaluationImageUniforms;
unsigned MaxGeometryImageUniforms;
unsigned MaxFragmentImageUniforms;
unsigned MaxCombinedImageUniforms;
/* ARB_viewport_array */
unsigned MaxViewports;
+
+ /* ARB_tessellation_shader */
+ unsigned MaxPatchVertices;
+ unsigned MaxTessGenLevel;
+ unsigned MaxTessControlInputComponents;
+ unsigned MaxTessControlOutputComponents;
+ unsigned MaxTessControlTextureImageUnits;
+ unsigned MaxTessEvaluationInputComponents;
+ unsigned MaxTessEvaluationOutputComponents;
+ unsigned MaxTessEvaluationTextureImageUnits;
+ unsigned MaxTessPatchComponents;
+ unsigned MaxTessControlTotalOutputComponents;
+ unsigned MaxTessControlUniformComponents;
+ unsigned MaxTessEvaluationUniformComponents;
} Const;
/**
bool ARB_shader_bit_encoding_warn;
bool ARB_shader_image_load_store_enable;
bool ARB_shader_image_load_store_warn;
+ bool ARB_shader_image_size_enable;
+ bool ARB_shader_image_size_warn;
bool ARB_shader_precision_enable;
bool ARB_shader_precision_warn;
bool ARB_shader_stencil_export_enable;
bool ARB_shader_stencil_export_warn;
bool ARB_shader_storage_buffer_object_enable;
bool ARB_shader_storage_buffer_object_warn;
+ bool ARB_shader_subroutine_enable;
+ bool ARB_shader_subroutine_warn;
bool ARB_shader_texture_lod_enable;
bool ARB_shader_texture_lod_warn;
bool ARB_shading_language_420pack_enable;
bool ARB_shading_language_420pack_warn;
bool ARB_shading_language_packing_enable;
bool ARB_shading_language_packing_warn;
+ bool ARB_tessellation_shader_enable;
+ bool ARB_tessellation_shader_warn;
bool ARB_texture_cube_map_array_enable;
bool ARB_texture_cube_map_array_warn;
bool ARB_texture_gather_enable;
bool fs_early_fragment_tests;
+ /**
+ * For tessellation control shaders, size of the most recently seen output
+ * declaration that was a sized array, or 0 if no sized output array
+ * declarations have been seen.
+ *
+ * Unused for other shader types.
+ */
+ unsigned tcs_output_size;
+
/** Atomic counter offsets by binding */
unsigned atomic_counter_offsets[MAX_COMBINED_ATOMIC_BUFFERS];
bool allow_extension_directive_midshader;
+
+ /**
+ * Known subroutine type declarations.
+ */
+ int num_subroutine_types;
+ ir_function **subroutine_types;
+
+ /**
+ * Functions that are associated with
+ * subroutine types.
+ */
+ int num_subroutines;
+ ir_function **subroutines;
+
+ /**
+ * field selection temporary parser storage -
+ * did the parser just parse a dot.
+ */
+ bool is_field;
};
# define YYLLOC_DEFAULT(Current, Rhs, N) \