nir/spirv: Array lengths are constants not literals
[mesa.git] / src / glsl / ir.h
index 32a766ef0f0994b514830f0ce675817d071318bd..bdc932ef538aaacf6186f68b7b59d3e60ace1926 100644 (file)
@@ -658,6 +658,13 @@ public:
        */
       unsigned assigned:1;
 
+      /**
+       * When separate shader programs are enabled, only input/outputs between
+       * the stages of a multi-stage separate program can be safely removed
+       * from the shader interface. Other input/outputs must remains active.
+       */
+      unsigned always_active_io:1;
+
       /**
        * Enum indicating how the variable was declared.  See
        * ir_var_declaration_type.
@@ -770,6 +777,19 @@ public:
        */
       unsigned index:1;
 
+      /**
+       * Precision qualifier.
+       *
+       * In desktop GLSL we do not care about precision qualifiers at all, in
+       * fact, the spec says that precision qualifiers are ignored.
+       *
+       * To make things easy, we make it so that this field is always
+       * GLSL_PRECISION_NONE on desktop shaders. This way all the variables
+       * have the same precision value and the checks we add in the compiler
+       * for this field will never break a desktop shader compile.
+       */
+      unsigned precision:2;
+
       /**
        * \brief Layout qualifier for gl_FragDepth.
        *
@@ -1158,6 +1178,8 @@ public:
     */
    int num_subroutine_types;
    const struct glsl_type **subroutine_types;
+
+   int subroutine_index;
 };
 
 inline const char *ir_function_signature::function_name() const
@@ -1952,6 +1974,7 @@ enum ir_texture_opcode {
    ir_tg4,             /**< Texture gather */
    ir_query_levels,     /**< Texture levels query */
    ir_texture_samples,  /**< Texture samples query */
+   ir_samples_identical, /**< Query whether all samples are definitely identical. */
 };
 
 
@@ -1978,6 +2001,7 @@ enum ir_texture_opcode {
  * (lod <type> <sampler> <coordinate>)
  * (tg4 <type> <sampler> <coordinate> <offset> <component>)
  * (query_levels <type> <sampler>)
+ * (samples_identical <sampler> <coordinate>)
  */
 class ir_texture : public ir_rvalue {
 public: