nir: Delete all traces of nir_op_flog
[mesa.git] / src / glsl / link_uniforms.cpp
index 347f079fa42ba505b5f061027f9a5e041879ff92..2c928e1445bd09dfda2aaaffd7249eb47fb6a64b 100644 (file)
@@ -274,7 +274,7 @@ namespace {
  *
  * As uniforms are added to the active set the number of active uniforms and
  * the storage requirements for those uniforms are accumulated.  The active
- * uniforms are added the the hash table supplied to the constructor.
+ * uniforms are added to the hash table supplied to the constructor.
  *
  * If the same uniform is added multiple times (i.e., once for each shader
  * target), it will only be accounted once.
@@ -544,21 +544,27 @@ private:
       assert(!"Should not get here.");
    }
 
-   virtual void enter_record(const glsl_type *type, const char *name,
+   virtual void enter_record(const glsl_type *type, const char *,
                              bool row_major) {
+      assert(type->is_record());
+      if (this->ubo_block_index == -1)
+         return;
       this->ubo_byte_offset = glsl_align(
             this->ubo_byte_offset, type->std140_base_alignment(row_major));
    }
 
-   virtual void leave_record(const glsl_type *type, const char *name,
+   virtual void leave_record(const glsl_type *type, const char *,
                              bool row_major) {
+      assert(type->is_record());
+      if (this->ubo_block_index == -1)
+         return;
       this->ubo_byte_offset = glsl_align(
             this->ubo_byte_offset, type->std140_base_alignment(row_major));
    }
 
    virtual void visit_field(const glsl_type *type, const char *name,
                             bool row_major, const glsl_type *record_type,
-                            bool last_field)
+                            bool /* last_field */)
    {
       assert(!type->without_array()->is_record());
       assert(!type->without_array()->is_interface());