[Mesa-dev] [Bug 104803] SIGSEGV in state_tracker/st_glsl_to_tgsi_temprename.cpp
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Jan 26 16:30:58 UTC 2018
https://bugs.freedesktop.org/show_bug.cgi?id=104803
--- Comment #4 from Brian Paul <brianp at vmware.com> ---
This patch seems to fix the crash, but I'm not sure it's actually correct.
Gert will have to take a look.
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 76b3f43..54802b3 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp
@@ -791,7 +791,8 @@ lifetime temp_comp_access::get_required_lifetime()
const prog_scope *conditional =
enclosing_scope_first_write->enclosing_conditional();
if (conditional && !conditional->contains_range_of(*last_read_scope) &&
(conditional->is_switchcase_scope_in_loop() ||
- conditional_ifelse_write_in_loop())) {
+ conditional_ifelse_write_in_loop()) &&
+ conditional->outermost_loop()) {
keep_for_full_loop = true;
enclosing_scope_first_write = conditional->outermost_loop();
}
@@ -800,6 +801,8 @@ lifetime temp_comp_access::get_required_lifetime()
* required first read before write scope, and last read scope.
*/
const prog_scope *enclosing_scope = enclosing_scope_first_read;
+ assert(enclosing_scope);
+ assert(enclosing_scope_first_write);
if (enclosing_scope_first_write->contains_range_of(*enclosing_scope))
enclosing_scope = enclosing_scope_first_write;
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180126/a0bf6113/attachment.html>
More information about the mesa-dev
mailing list