Re: [Mesa-dev] [PATCH] glsl: skip comparison opt when adding vars of different size

2018-06-27 Thread Ian Romanick
The funny thing is that I just encountered a somewhat similar bug in the i965 vec4 backend. :) The ability to mix sizes like that in the IR was a mistake. We should have added swizzles to code like this so that the types would match. Alas. This patch is Reviewed-by: Ian Romanick On 06/27/201

Re: [Mesa-dev] [PATCH] glsl: skip comparison opt when adding vars of different size

2018-06-27 Thread Timothy Arceri
On 28/06/18 09:23, Timothy Arceri wrote: The spec allows adding scalars a vector or matrix. In this case the opt was losing any swizzle or size information. This fixes a bug with Doom (2016) shaders. Forgot to add: Fixes: 34ec1a24d61f ("glsl: Optimize (x + y cmp 0) into (x cmp -y).") ---

[Mesa-dev] [PATCH] glsl: skip comparison opt when adding vars of different size

2018-06-27 Thread Timothy Arceri
The spec allows adding scalars a vector or matrix. In this case the opt was losing any swizzle or size information. This fixes a bug with Doom (2016) shaders. --- src/compiler/glsl/opt_algebraic.cpp | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/compiler/glsl/opt_algebraic.cpp b/s