]> git.tdb.fi Git - libs/gl.git/commitdiff
Add an internal error for invalid equality comparison in SPIR-V
authorMikko Rasa <tdb@tdb.fi>
Thu, 6 Oct 2022 10:48:26 +0000 (13:48 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 6 Oct 2022 10:48:26 +0000 (13:48 +0300)
source/glsl/spirv.cpp

index 404ffaf3735fe3f575ea62e8c93037095f78a781..6d52c20ecc9fe4e9928d45f74ef40a5e02fe35ee 100644 (file)
@@ -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;
                }
        }