nir: Delete all traces of nir_op_flog
[mesa.git] / src / glsl / lower_variable_index_to_cond_assign.cpp
index 0f507279382d583cbd442056025516f978f16c33..d878cb078115cbdb7b232f42c8f29810c059fd5c 100644 (file)
@@ -76,7 +76,7 @@ compare_index_block(exec_list *instructions, ir_variable *index,
    ir_rvalue *broadcast_index = new(mem_ctx) ir_dereference_variable(index);
 
    assert(index->type->is_scalar());
-   assert(index->type->base_type == GLSL_TYPE_INT);
+   assert(index->type->base_type == GLSL_TYPE_INT || index->type->base_type == GLSL_TYPE_UINT);
    assert(components >= 1 && components <= 4);
 
    if (components > 1) {
@@ -122,6 +122,7 @@ is_array_or_matrix(const ir_rvalue *ir)
    return (ir->type->is_array() || ir->type->is_matrix());
 }
 
+namespace {
 /**
  * Replace a dereference of a variable with a specified r-value
  *
@@ -191,6 +192,12 @@ struct assignment_generator
    ir_variable* var;
 
    assignment_generator()
+      : base_ir(NULL),
+        rvalue(NULL),
+        old_index(NULL),
+        is_write(false),
+        write_mask(0),
+        var(NULL)
    {
    }
 
@@ -358,7 +365,7 @@ public:
       if (var == NULL)
         return this->lower_temps;
 
-      switch (var->mode) {
+      switch (var->data.mode) {
       case ir_var_auto:
       case ir_var_temporary:
         return this->lower_temps;
@@ -512,6 +519,8 @@ public:
    }
 };
 
+} /* anonymous namespace */
+
 bool
 lower_variable_index_to_cond_assign(exec_list *instructions,
                                    bool lower_input,