From ffa4534e2a4034204f3415afef27df6bd4706d5b Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Wed, 22 Feb 2023 15:47:54 -0800 Subject: [PATCH] iris, crocus: Align workaround address to 32B The workaround address is used as a source for push constants when there's no resource available, that address must be 32B aligned. This fixes invalid address being used for buffers in 3DSTATE_CONSTANT_* packets. Now that intel_debug_write_identifiers() already add the padding, there's no need to include extra "+ 8" to the offset. Thanks to Xiaoming Wang that contributed to find and fix this issue. Fixes: 2a4c361b069 ("iris: add identifier BO") Reviewed-by: Kenneth Graunke Part-of: (cherry picked from commit a4a0417263aa98ee93fe3f635fcdc54daa091013) --- .pick_status.json | 2 +- src/gallium/drivers/crocus/crocus_context.c | 2 +- src/gallium/drivers/iris/iris_screen.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 6b47f15a26e..de49ecdcb2e 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -6979,7 +6979,7 @@ "description": "iris, crocus: Align workaround address to 32B", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "2a4c361b069bb84facc7e6b8ae19908505c12850" }, diff --git a/src/gallium/drivers/crocus/crocus_context.c b/src/gallium/drivers/crocus/crocus_context.c index 903be358524..77ddb2e5234 100644 --- a/src/gallium/drivers/crocus/crocus_context.c +++ b/src/gallium/drivers/crocus/crocus_context.c @@ -61,7 +61,7 @@ crocus_init_identifier_bo(struct crocus_context *ice) ice->workaround_bo->kflags |= EXEC_OBJECT_CAPTURE; ice->workaround_offset = ALIGN( - intel_debug_write_identifiers(bo_map, 4096, "Crocus") + 8, 8); + intel_debug_write_identifiers(bo_map, 4096, "Crocus"), 32); crocus_bo_unmap(ice->workaround_bo); diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c index 90a598df7cb..1c3d5f29cb7 100644 --- a/src/gallium/drivers/iris/iris_screen.c +++ b/src/gallium/drivers/iris/iris_screen.c @@ -774,7 +774,7 @@ iris_init_identifier_bo(struct iris_screen *screen) screen->workaround_address = (struct iris_address) { .bo = screen->workaround_bo, .offset = ALIGN( - intel_debug_write_identifiers(bo_map, 4096, "Iris") + 8, 8), + intel_debug_write_identifiers(bo_map, 4096, "Iris"), 32), }; iris_bo_unmap(screen->workaround_bo);