mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/spirv: Align constant buffer sizes to 16 bytes.
DXIL constant buffer sizes are not aligned to 16 bytes.
This commit is contained in:
parent
96556a8834
commit
9b64d04ed3
Notes:
Alexandre Julliard
2023-10-19 23:23:04 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/401
@ -5639,7 +5639,8 @@ static void spirv_compiler_emit_cbv_declaration(struct spirv_compiler *compiler,
|
|||||||
reg.idx[1].offset = range->first;
|
reg.idx[1].offset = range->first;
|
||||||
reg.idx[2].offset = range->last;
|
reg.idx[2].offset = range->last;
|
||||||
|
|
||||||
size = size_in_bytes / (VKD3D_VEC4_SIZE * sizeof(uint32_t));
|
size = align(size_in_bytes, VKD3D_VEC4_SIZE * sizeof(uint32_t));
|
||||||
|
size /= VKD3D_VEC4_SIZE * sizeof(uint32_t);
|
||||||
|
|
||||||
if ((push_cb = spirv_compiler_find_push_constant_buffer(compiler, range)))
|
if ((push_cb = spirv_compiler_find_push_constant_buffer(compiler, range)))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user