Module: Mesa Branch: staging/22.3 Commit: bfa7e3a749c004d5f1971efea8d18adb30b640c0 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bfa7e3a749c004d5f1971efea8d18adb30b640c0
Author: Marcin Ĺšlusarz <[email protected]> Date: Mon Oct 24 14:59:41 2022 +0200 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19409> (cherry picked from commit db0e6f9a07b49a95d99c2b2c25fd8a008466c4e8) --- .pick_status.json | 2 +- src/intel/compiler/brw_mesh.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 37524dc28ec..5785a2cd093 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -211,7 +211,7 @@ "description": "intel/compiler: user payload starts after TUE header & its padding", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "37e78803d7b088afde8c79b7cf82ee29d4835651" }, diff --git a/src/intel/compiler/brw_mesh.cpp b/src/intel/compiler/brw_mesh.cpp index 2d777c37074..1e60d9d97b3 100644 --- a/src/intel/compiler/brw_mesh.cpp +++ b/src/intel/compiler/brw_mesh.cpp @@ -251,6 +251,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);
