lavapipe: fix fsum with swizzle
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>
This commit is contained in:
parent
aa765c54bd
commit
39a938ecf4
|
@ -1004,7 +1004,7 @@ static void visit_alu(struct lp_build_nir_context *bld_base, const nir_alu_instr
|
||||||
case nir_op_fsum2:
|
case nir_op_fsum2:
|
||||||
case nir_op_fsum3:
|
case nir_op_fsum3:
|
||||||
case nir_op_fsum4:
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
src_components = num_components;
|
src_components = num_components;
|
||||||
|
|
|
@ -64,7 +64,6 @@ spec@!opengl 3.2@gl-3.2-adj-prims pv-first,Fail
|
||||||
spec@!opengl es 2.0@glsl-fs-pointcoord,Fail
|
spec@!opengl es 2.0@glsl-fs-pointcoord,Fail
|
||||||
spec@!opengl es 3.0@gles-3.0-transform-feedback-uniform-buffer-object,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_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-blit-scaled-linear,Fail
|
||||||
spec@arb_framebuffer_object@fbo-gl_pointcoord,Fail
|
spec@arb_framebuffer_object@fbo-gl_pointcoord,Fail
|
||||||
spec@arb_get_program_binary@restore-sso-program,Fail
|
spec@arb_get_program_binary@restore-sso-program,Fail
|
||||||
|
|
Loading…
Reference in New Issue