Module: Mesa Branch: master Commit: c68313868921f8d7125e46091cd92dbe00f845ec URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c68313868921f8d7125e46091cd92dbe00f845ec
Author: Mike Blumenkrantz <[email protected]> Date: Thu Apr 23 14:21:05 2020 -0400 zink: set UBO alignments in nir_intrinsic_load_uniform lowering resolves this error error: nir_intrinsic_align_offset(instr) < nir_intrinsic_align_mul(instr) (../src/compiler/nir/nir_validate.c:582) in ext_packed_depth_stencil-readdrawpixels piglit test port of f5b14d983e5afa1b8f75e6f3692830a1ee46d1df Fixes: fb64954d9dd ("nir: Validate that memory load/store ops work on whole bytes") Reviewed-by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4711> --- src/gallium/drivers/zink/zink_compiler.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/zink/zink_compiler.c b/src/gallium/drivers/zink/zink_compiler.c index c8ad749ba74..399e2cd4071 100644 --- a/src/gallium/drivers/zink/zink_compiler.c +++ b/src/gallium/drivers/zink/zink_compiler.c @@ -60,6 +60,8 @@ lower_instr(nir_intrinsic_instr *instr, nir_builder *b) load->num_components = instr->num_components; load->src[0] = nir_src_for_ssa(ubo_idx); load->src[1] = nir_src_for_ssa(ubo_offset); + assert(instr->dest.ssa.bit_size >= 8); + nir_intrinsic_set_align(load, instr->dest.ssa.bit_size / 8, 0); nir_ssa_dest_init(&load->instr, &load->dest, load->num_components, instr->dest.ssa.bit_size, instr->dest.ssa.name); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
