nvk: Add a _pad field to nvk_cbuf

We use nvk_cbuf as a key in a hash table in nvk_nir_lower_descriptors()
so we want to make sure it always gets fully initialized.

Fixes: f1c909edd5 ("nvk/nir: Add cbuf analysis to nvi_nir_lower_descriptors()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10956
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28564>
(cherry picked from commit f30ce26569)
This commit is contained in:
Faith Ekstrand 2024-04-03 19:51:21 -05:00 committed by Eric Engestrom
parent 661c93900c
commit f0e045931f
2 changed files with 3 additions and 1 deletions

View file

@ -3284,7 +3284,7 @@
"description": "nvk: Add a _pad field to nvk_cbuf",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "f1c909edd5c9159609ab27e7b6a7374796cceab3",
"notes": null

View file

@ -39,8 +39,10 @@ struct nvk_cbuf {
enum nvk_cbuf_type type;
uint8_t desc_set;
uint8_t dynamic_idx;
uint8_t _pad;
uint32_t desc_offset;
};
static_assert(sizeof(struct nvk_cbuf) == 8, "This struct has no holes");
struct nvk_cbuf_map {
uint32_t cbuf_count;