summaryrefslogtreecommitdiff
path: root/lib/mesa/src/compiler/glsl/loop_analysis.cpp
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-01-22 02:13:18 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-01-22 02:13:18 +0000
commitfdcc03929065b5bf5dd93553db219ea3e05c8c34 (patch)
treeca90dc8d9e89febdcd4160956c1b8ec098a4efc9 /lib/mesa/src/compiler/glsl/loop_analysis.cpp
parent3c9de4a7e13712b5696750bbd59a18c848742022 (diff)
Import Mesa 19.2.8
Diffstat (limited to 'lib/mesa/src/compiler/glsl/loop_analysis.cpp')
-rw-r--r--lib/mesa/src/compiler/glsl/loop_analysis.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/mesa/src/compiler/glsl/loop_analysis.cpp b/lib/mesa/src/compiler/glsl/loop_analysis.cpp
index e90eb1ccd..aae8fc62c 100644
--- a/lib/mesa/src/compiler/glsl/loop_analysis.cpp
+++ b/lib/mesa/src/compiler/glsl/loop_analysis.cpp
@@ -107,7 +107,7 @@ calculate_iterations(ir_rvalue *from, ir_rvalue *to, ir_rvalue *increment,
return -1;
}
- if (!iter->type->is_integer()) {
+ if (!iter->type->is_integer_32()) {
const ir_expression_operation op = iter->type->is_double()
? ir_unop_d2i : ir_unop_f2i;
ir_rvalue *cast =
@@ -288,6 +288,9 @@ loop_state::get(const ir_loop *ir)
loop_variable *
loop_variable_state::get(const ir_variable *ir)
{
+ if (ir == NULL)
+ return NULL;
+
hash_entry *entry = _mesa_hash_table_search(this->var_hash, ir);
return entry ? (loop_variable *) entry->data : NULL;
}