From 2151e4a005fa39ac909457176fb33dd2e816d6f9 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 6 Oct 2022 13:48:26 +0300 Subject: [PATCH] Add an internal error for invalid equality comparison in SPIR-V --- source/glsl/spirv.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/glsl/spirv.cpp b/source/glsl/spirv.cpp index 404ffaf3..6d52c20e 100644 --- a/source/glsl/spirv.cpp +++ b/source/glsl/spirv.cpp @@ -917,9 +917,10 @@ void SpirVGenerator::visit(BinaryExpression &binary) compare_id = write_construct(bool_vec_type_id, column_ids, n_elems); } + else + throw internal_error("unsupported types for non-scalar equality comparison"); - if(compare_id) - r_expression_result_id = write_expression(combine_op, result_type_id, compare_id); + r_expression_result_id = write_expression(combine_op, result_type_id, compare_id); return; } } -- 2.45.2