Merge remote-tracking branch 'mesa-public/master' into vulkan
[mesa.git] / src / glsl / ast.h
index 3d0e173c73755286899da445bf2d067969d538f3..eb6d84616711b2a71438ec4afd8a155e7b32ab9c 100644 (file)
@@ -304,6 +304,16 @@ private:
     * Is this function call actually a constructor?
     */
    bool cons;
+   ir_rvalue *
+   handle_method(exec_list *instructions,
+                 struct _mesa_glsl_parse_state *state);
+};
+
+class ast_subroutine_list : public ast_node
+{
+public:
+   virtual void print(void) const;
+   exec_list declarations;
 };
 
 class ast_array_specifier : public ast_node {
@@ -517,6 +527,9 @@ struct ast_type_qualifier {
          unsigned explicit_stream:1; /**< stream value assigned explicitly by shader code */
          /** \} */
 
+         /** \name Vulkan qualifiers */
+         unsigned vk_set:1;
+
         /** \name Layout qualifiers for GL_ARB_tessellation_shader */
         /** \{ */
         /* tess eval input layout */
@@ -527,6 +540,12 @@ struct ast_type_qualifier {
         /* tess control output layout */
         unsigned vertices:1;
         /** \} */
+
+         /** \name Qualifiers for GL_ARB_shader_subroutine */
+        /** \{ */
+         unsigned subroutine:1;  /**< Is this marked 'subroutine' */
+         unsigned subroutine_def:1; /**< Is this marked 'subroutine' with a list of types */
+        /** \} */
       }
       /** \brief Set of flags, accessed by name. */
       q;
@@ -623,6 +642,11 @@ struct ast_type_qualifier {
     */
    glsl_base_type image_base_type;
 
+   /**
+    * Vulkan descriptor set
+    */
+   int set;
+
    /**
     * Return true if and only if an interpolation qualifier is present.
     */
@@ -669,6 +693,7 @@ struct ast_type_qualifier {
                            ast_type_qualifier q,
                            ast_node* &node);
 
+   ast_subroutine_list *subroutine_list;
 };
 
 class ast_declarator_list;