freedreno/ir3: split out regmask
[mesa.git] / src / freedreno / ir3 / ir3_shader.c
index 984ae57418daf5397af96177a273773713fc682e..146cc352f1c57176f8cc64b735cb47408fcb6fe0 100644 (file)
@@ -176,13 +176,15 @@ compile_variant(struct ir3_shader_variant *v)
 {
        int ret = ir3_compile_shader_nir(v->shader->compiler, v);
        if (ret) {
-               debug_error("compile failed!");
+               _debug_printf("compile failed! (%s:%s)", v->shader->nir->info.name,
+                               v->shader->nir->info.label);
                return false;
        }
 
        assemble_variant(v);
        if (!v->bin) {
-               debug_error("assemble failed!");
+               _debug_printf("assemble failed! (%s:%s)", v->shader->nir->info.name,
+                               v->shader->nir->info.label);
                return false;
        }
 
@@ -354,6 +356,10 @@ ir3_setup_used_key(struct ir3_shader *shader)
                        key->color_two_side = true;
                }
 
+               if (info->inputs_read & VARYING_BIT_LAYER) {
+                       key->layer_zero = true;
+               }
+
                if ((info->outputs_written & ~(FRAG_RESULT_DEPTH |
                                                                FRAG_RESULT_STENCIL |
                                                                FRAG_RESULT_SAMPLE_MASK)) != 0) {
@@ -396,7 +402,7 @@ trim_constlens(unsigned *constlens,
       cur_total += constlens[i];
    }
 
-   unsigned max_stage;
+   unsigned max_stage = 0;
    unsigned max_const = 0;
    uint32_t trimmed = 0;