From db0e6f9a07b49a95d99c2b2c25fd8a008466c4e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20=C5=9Alusarz?= Date: Mon, 24 Oct 2022 14:59:41 +0200 Subject: [PATCH] intel/compiler: user payload starts after TUE header & its padding All data written by the user are offset by TUE header size. Without this patch we copy the correct amount of user data, but both "from" and "to" offsets are wrong. Fixes: 37e78803d7b ("intel/compiler: use nir_lower_task_shader pass") Reviewed-by: Caio Oliveira Part-of: --- src/intel/compiler/brw_mesh.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/intel/compiler/brw_mesh.cpp b/src/intel/compiler/brw_mesh.cpp index 24082867063..3d3a36411af 100644 --- a/src/intel/compiler/brw_mesh.cpp +++ b/src/intel/compiler/brw_mesh.cpp @@ -253,6 +253,10 @@ brw_compile_task(const struct brw_compiler *compiler, nir_lower_task_shader_options lower_ts_opt = { .payload_to_shared_for_atomics = true, .payload_to_shared_for_small_types = true, + /* The actual payload data starts after the TUE header and padding, + * so skip those when copying. + */ + .payload_offset_in_bytes = prog_data->map.per_task_data_start_dw * 4, }; NIR_PASS(_, nir, nir_lower_task_shader, lower_ts_opt);