<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Indexing by ivec causes crash"
href="https://bugs.freedesktop.org/show_bug.cgi?id=105438#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Indexing by ivec causes crash"
href="https://bugs.freedesktop.org/show_bug.cgi?id=105438">bug 105438</a>
from <span class="vcard"><a class="email" href="mailto:andriy.khulap@globallogic.com" title="Andriy Khulap <andriy.khulap@globallogic.com>"> <span class="fn">Andriy Khulap</span></a>
</span></b>
<pre>I can reproduce this issue on Skylake with most mesa versions: 11.0.0-rc1 ..
17.3.6 .. latest git master in firefox, chrome and chromium browsers.
The crash is caused by the unreachable("not reached"); trap in the end of void
nir_visitor::visit(ir_expression *ir) (src/compiler/glsl/glsl_to_nir.cpp, line
1963).
Issue can be fixed by adding empty case for ir_binop_vector_extract:
diff --git a/src/compiler/glsl/glsl_to_nir.cpp
b/src/compiler/glsl/glsl_to_nir.cpp
index c4a6d52a5b..24acfa1f8d 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -1952,6 +1952,9 @@ nir_visitor::visit(ir_expression *ir)
case ir_quadop_vector:
result = nir_vec(&b, srcs, ir->type->vector_elements);
break;
+ case ir_binop_vector_extract:
+ /* Prevent the unreachable trap */
+ break;
default:
unreachable("not reached");
or by adding its handler to special cases:
diff --git a/src/compiler/glsl/glsl_to_nir.cpp
b/src/compiler/glsl/glsl_to_nir.cpp
index c4a6d52a5b..d9efdd7170 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -1493,6 +1493,12 @@ nir_visitor::visit(ir_expression *ir)
return;
}
+ case ir_binop_vector_extract:
+ assert(ir->num_operands == 2);
+ ir->operands[0]->accept(this);
+ ir->operands[1]->accept(this);
+ return;
+
default:
break;
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>