nir/glsl: Use lower_outputs_to_temporaries instead of relying on GLSL IR
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 8 Sep 2015 21:31:11 +0000 (14:31 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 9 Sep 2015 19:29:38 +0000 (12:29 -0700)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/nir/glsl_to_nir.cpp
src/mesa/drivers/dri/i965/brw_shader.cpp

index 0712908eee8f2a748e19364be200d8bb05dcf9c4..ad7d7dddeaf7814708d9eb1d80eed395aa0ec8ec 100644 (file)
@@ -138,6 +138,8 @@ glsl_to_nir(struct gl_shader *sh, const nir_shader_compiler_options *options)
    v2.run(sh->ir);
    visit_exec_list(sh->ir, &v1);
 
+   nir_lower_outputs_to_temporaries(shader);
+
    return shader;
 }
 
index 445764d3d065b5b2b1b0e2fc138f851c3d8f7828..de1a7fe81a8f672c2ed75a8ef401073ba07be1b3 100644 (file)
@@ -322,9 +322,6 @@ process_glsl_ir(gl_shader_stage stage,
                                         options, ctx->Const.NativeIntegers) || progress;
    } while (progress);
 
-   if (options->NirOptions != NULL)
-      lower_output_reads(stage, shader->ir);
-
    validate_ir_tree(shader->ir);
 
    /* Now that we've finished altering the linked IR, reparent any live IR back