From a0d2b531e00ae60e969bbc2062fc6ee377dba55e Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Wed, 24 Apr 2024 09:59:26 +0300 Subject: [PATCH] anv: fix push constant subgroup_id location Signed-off-by: Lionel Landwerlin Fixes: 7c76125db2 ("anv: use 2 different buffers for surfaces/samplers in descriptor sets") Reviewed-by: Ivan Briano Part-of: (cherry picked from commit 3716bd704f8259545d34c73c2d065be7008f147f) --- .pick_status.json | 2 +- src/intel/vulkan/anv_private.h | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 20bcef24a74..50528227fe5 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1524,7 +1524,7 @@ "description": "anv: fix push constant subgroup_id location", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "7c76125db25db9bdf5521baf7c848ccd4bd37b5f", "notes": null diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 0ca6250835a..7c0c81e3b79 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -3390,6 +3390,12 @@ struct anv_push_constants { */ uint32_t surfaces_base_offset; + /* Robust access pushed registers. */ + uint64_t push_reg_mask[MESA_SHADER_STAGES]; + + /** Ray query globals (RT_DISPATCH_GLOBALS) */ + uint64_t ray_query_globals; + union { struct { /** Dynamic MSAA value */ @@ -3410,16 +3416,12 @@ struct anv_push_constants { * * This is never set by software but is implicitly filled out when * uploading the push constants for compute shaders. + * + * This *MUST* be the last field of the anv_push_constants structure. */ uint32_t subgroup_id; } cs; }; - - /* Robust access pushed registers. */ - uint64_t push_reg_mask[MESA_SHADER_STAGES]; - - /** Ray query globals (RT_DISPATCH_GLOBALS) */ - uint64_t ray_query_globals; }; struct anv_surface_state {