We can do stuff like this:
vec1 32 ssa_207 = fsum3 ssa_209.xxx
In this case, we'd end up not swizzling in get_alu_src, and reading
components out-of-bounds, which LLVM isn't very happy about, and thus
takes punitive actions, in the form of a segfault.
We don't want that, and we already know from the opcode what the
component counts should be here.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10690>
case nir_op_fsum2:
case nir_op_fsum3:
case nir_op_fsum4:
- src_components = nir_src_num_components(instr->src[0].src);
+ src_components = nir_op_infos[instr->op].input_sizes[0];
break;
default:
src_components = num_components;
spec@!opengl es 2.0@glsl-fs-pointcoord,Fail
spec@!opengl es 3.0@gles-3.0-transform-feedback-uniform-buffer-object,Fail
spec@arb_depth_texture@depth-tex-modes,Fail
-spec@arb_fragment_program@fp-abs-01,Crash
spec@arb_framebuffer_object@fbo-blit-scaled-linear,Fail
spec@arb_framebuffer_object@fbo-gl_pointcoord,Fail
spec@arb_get_program_binary@restore-sso-program,Fail