diff options
author | Nicolai Hähnle <[email protected]> | 2017-09-06 11:43:06 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-09-13 18:28:11 +0200 |
commit | 55ca12be9d3f6948bb6ce05da626c5ad32c1ef22 (patch) | |
tree | 7ecba286a9d4d5574ab085eb470c1b8af039365c /src/mesa | |
parent | cffc0ae0d9e572a82ce88c09e6ee8e2ed2a9be91 (diff) |
st/glsl_to_tgsi: be precise about merging scopes
enclosing_scope already contains enclosing_scope_first_read.
What we really want to check here -- not for correctness, but
for speed -- is whether last_read_scope already contains
enclosing_scope.
Reviewed-By: Gert Wollny <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp index 00ec7e749bd..c0c0aaa02f3 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp @@ -540,8 +540,8 @@ lifetime temp_comp_access::get_required_lifetime() if (enclosing_scope_first_write->contains_range_of(*enclosing_scope)) enclosing_scope = enclosing_scope_first_write; - if (enclosing_scope_first_read->contains_range_of(*enclosing_scope)) - enclosing_scope = enclosing_scope_first_read; + if (last_read_scope->contains_range_of(*enclosing_scope)) + enclosing_scope = last_read_scope; while (!enclosing_scope->contains_range_of(*enclosing_scope_first_write) || !enclosing_scope->contains_range_of(*last_read_scope)) { |