diff options
author | Kenneth Graunke <[email protected]> | 2015-04-07 15:05:12 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2015-04-11 11:38:14 -0700 |
commit | f41f07f685e7f585e433b5fd1fadf602e74f0f1e (patch) | |
tree | 216163c69870de9d23549db500b279443e4e1910 /src/mesa/drivers | |
parent | 8e414cbdec76ce33a16425631ac87cb4ba827409 (diff) |
i965: Move lower_output_reads to brw_link_shader().
This makes it so emit_nir_code() doesn't modify the GLSL IR.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_shader.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index c179d7137a8..6bb52ebd877 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp @@ -90,7 +90,6 @@ fs_visitor::emit_nir_code() nir_shader *nir; /* First, lower the GLSL IR or Mesa IR to NIR */ if (shader_prog) { - lower_output_reads(shader->base.ir); nir = glsl_to_nir(&shader->base, options); } else { nir = prog_to_nir(prog, options); diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index bf9aceb9923..87000776f1d 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.cpp +++ b/src/mesa/drivers/dri/i965/brw_shader.cpp @@ -199,6 +199,9 @@ process_glsl_ir(struct brw_context *brw, options, ctx->Const.NativeIntegers) || progress; } while (progress); + if (options->NirOptions != NULL) + lower_output_reads(shader->ir); + validate_ir_tree(shader->ir); /* Now that we've finished altering the linked IR, reparent any live IR back |