diff options
author | Jason Ekstrand <[email protected]> | 2015-07-02 15:41:02 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-09-15 11:11:50 -0700 |
commit | cadd7dd384b33a779d46bd664f456bed4a21a5b7 (patch) | |
tree | 21baadf9ba7dda2e2b264b79af9ea60fea0874eb /src/mesa/drivers/dri/i965/brw_fs.cpp | |
parent | 0c6df7a1cb593666636aed660e90be0c6aca4591 (diff) |
i965/fs: Add a very basic validation pass
Currently the validation pass only validates that regs_read and
regs_written are consistent with the sizes of VGRF's. We can add more as
we find it to be useful.
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index b9f1051eca4..63bee0aa5fd 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -4781,6 +4781,9 @@ fs_visitor::calculate_register_pressure() void fs_visitor::optimize() { + /* Start by validating the shader we currently have. */ + validate(); + /* bld is the common builder object pointing at the end of the program we * used to translate it into i965 IR. For the optimization and lowering * passes coming next, any code added after the end of the program without @@ -4797,7 +4800,10 @@ fs_visitor::optimize() assign_constant_locations(); demote_pull_constants(); + validate(); + split_virtual_grfs(); + validate(); #define OPT(pass, args...) ({ \ pass_num++; \ @@ -4811,6 +4817,8 @@ fs_visitor::optimize() backend_shader::dump_instructions(filename); \ } \ \ + validate(); \ + \ progress = progress || this_progress; \ this_progress; \ }) @@ -4872,6 +4880,8 @@ fs_visitor::optimize() OPT(lower_integer_multiplication); lower_uniform_pull_constant_loads(); + + validate(); } /** |