nak: Align shader data to the min CBuf alignment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
This commit is contained in:

committed by
Marge Bot

parent
8050b57c28
commit
05bbfa7963
@@ -616,7 +616,9 @@ nvk_shader_upload(struct nvk_device *dev, struct nvk_shader *shader)
|
|||||||
|
|
||||||
uint32_t data_offset = 0;
|
uint32_t data_offset = 0;
|
||||||
if (shader->data_size > 0) {
|
if (shader->data_size > 0) {
|
||||||
total_size = align(total_size, nvk_min_cbuf_alignment(&pdev->info));
|
uint32_t cbuf_alignment = nvk_min_cbuf_alignment(&pdev->info);
|
||||||
|
alignment = MAX2(alignment, cbuf_alignment);
|
||||||
|
total_size = align(total_size, cbuf_alignment);
|
||||||
data_offset = total_size;
|
data_offset = total_size;
|
||||||
total_size += shader->data_size;
|
total_size += shader->data_size;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user