vkd3d-shader: Emit IR CBV declaration sizes in bytes.

DXIL declares CBV sizes in bytes and they are not aligned to 16 bytes.
This commit is contained in:
Conor McCarthy
2023-10-19 13:15:46 +10:00
committed by Alexandre Julliard
parent f7525bf0c6
commit 1e5f91b371
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
3 changed files with 6 additions and 2 deletions

View File

@@ -884,6 +884,8 @@ static void shader_sm4_read_dcl_constant_buffer(struct vkd3d_shader_instruction
ins->declaration.cb.size = *tokens++;
shader_sm4_read_register_space(priv, &tokens, end, &ins->declaration.cb.range.space);
}
ins->declaration.cb.size *= VKD3D_VEC4_SIZE * sizeof(float);
}
static void shader_sm4_read_dcl_sampler(struct vkd3d_shader_instruction *ins, uint32_t opcode, uint32_t opcode_token,