summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser_extras.h
diff options
context:
space:
mode:
authorFabian Bieler <[email protected]>2014-03-20 22:44:43 +0100
committerMarek Olšák <[email protected]>2015-07-23 00:59:26 +0200
commit497eb295838baccde1420adfcc4ef7e8fdddd774 (patch)
tree517e56ea50330d128fca0ae95b4f7bf6a324fa6a /src/glsl/glsl_parser_extras.h
parent206af9d049cab6e794db5abf63e3d11281343423 (diff)
glsl: add tessellation shader parsing support (v2)
v2: Fixed things that Ken suggested. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser_extras.h')
-rw-r--r--src/glsl/glsl_parser_extras.h31
1 files changed, 26 insertions, 5 deletions
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
index 4996b845044..de8f8c417fc 100644
--- a/src/glsl/glsl_parser_extras.h
+++ b/src/glsl/glsl_parser_extras.h
@@ -277,15 +277,19 @@ struct _mesa_glsl_parse_state {
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;
/**
@@ -303,7 +307,10 @@ struct _mesa_glsl_parse_state {
*/
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;
/**
@@ -383,6 +390,9 @@ struct _mesa_glsl_parse_state {
/* ARB_viewport_array */
unsigned MaxViewports;
+
+ /* ARB_tessellation_shader */
+ unsigned MaxPatchVertices;
} Const;
/**
@@ -475,6 +485,8 @@ struct _mesa_glsl_parse_state {
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;
@@ -545,6 +557,15 @@ struct _mesa_glsl_parse_state {
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];