[PATCH 3/5] d3dcompiler: Check for implicit type compatibility in implicit_conversion().
Matteo Bruni
matteo.mystral at gmail.com
Tue Mar 3 07:09:30 CST 2020
On Mon, Mar 2, 2020 at 5:56 AM Zebediah Figura <z.figura12 at gmail.com> wrote:
> @@ -1328,13 +1345,14 @@ struct hlsl_ir_expr *new_expr(enum hlsl_ir_expr_op op, struct hlsl_ir_node **ope
> operands[i]->loc.line, operands[i]->loc.col, HLSL_LEVEL_WARNING,
> "implicit truncation of vector/matrix type");
> }
> - operands[i] = implicit_conversion(operands[i], type, &operands[i]->loc);
> - if (!operands[i])
> +
> + if (!(cast = new_cast(operands[i], type, &operands[i]->loc)))
> {
> - ERR("Impossible to convert expression operand %u to %s\n", i + 1, debug_hlsl_type(type));
> d3dcompiler_free(expr);
> return NULL;
> }
Again, not something that changed with this patch, it just made me
think. This implicit conversion is unchecked: is it correct to do so?
More information about the wine-devel
mailing list