From: Michael Skorokhodov Date: Tue, 10 May 2022 07:48:53 +0000 (+0300) Subject: glsl: Fix ir_quadop_vector validation X-Git-Tag: upstream/22.3.5~9156 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fd75be798627df9a647205994a11a3cdf1d718b9;p=platform%2Fupstream%2Fmesa.git glsl: Fix ir_quadop_vector validation Some glcts tests have failed due to incorrect processing of `ir_quadop_vector` in `ir_validation`. e.g: `GLES31.functional.shaders.builtin_functions.integer.imulextended.int_highp_geometry` Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6461 Fixes: 23cde71b ("glsl: Stop lowering ir_quadop_vector.") Reviewed-by: Emma Anholt Signed-off-by: Mykhailo Skorokhodov Part-of: --- diff --git a/src/compiler/glsl/ir_validate.cpp b/src/compiler/glsl/ir_validate.cpp index c60c36c..89feaa7 100644 --- a/src/compiler/glsl/ir_validate.cpp +++ b/src/compiler/glsl/ir_validate.cpp @@ -942,8 +942,14 @@ ir_validate::visit_leave(ir_expression *ir) * - Number of operands must matche the size of the resulting vector. * - Base type of the operands must match the base type of the result. */ - assert(ir->type->is_vector()); switch (ir->type->vector_elements) { + case 1: + assert(ir->operands[0]->type->is_scalar()); + assert(ir->operands[0]->type->base_type == ir->type->base_type); + assert(ir->operands[1] == NULL); + assert(ir->operands[2] == NULL); + assert(ir->operands[3] == NULL); + break; case 2: assert(ir->operands[0]->type->is_scalar()); assert(ir->operands[0]->type->base_type == ir->type->base_type);