nvk: Add hopper shared memory window alignment

This changes to need 4GB alignment on hopper and later.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
This commit is contained in:
Dave Airlie 2025-04-15 07:07:40 +10:00 committed by Marge Bot
parent 46c72f69f9
commit 50a312ef24

View file

@ -60,7 +60,14 @@ nvk_push_dispatch_state_init(struct nvk_queue *queue, struct nv_push *p)
*
* Really?!? TODO: Fix this for realz.
*/
uint64_t temp = 0xfeULL << 24;
uint64_t temp;
/* shared memory window needs 4GB alignment on hopper+ */
if (pdev->info.cls_compute >= HOPPER_COMPUTE_A)
temp = 1ULL << 32;
else
temp = 0xfeULL << 24;
P_MTHD(p, NVC3C0, SET_SHADER_SHARED_MEMORY_WINDOW_A);
P_NVC3C0_SET_SHADER_SHARED_MEMORY_WINDOW_A(p, temp >> 32);
P_NVC3C0_SET_SHADER_SHARED_MEMORY_WINDOW_B(p, temp & 0xffffffff);