Skip to content

vkd3d-shader: Introduce vkd3d_shader_register.dimension, part 1.

Francisco Casas requested to merge fcasas/vkd3d:add_vkd3d_reg_dim_part into master

This MR replaces vkd3d_shader_register.immconst_type with vkd3d_shader_register.dimension which is intended for all register types and not just immconsts.

This dimension is parsed in tpf.c, and initialized according to the register type in d3dbc.c.

Having this field in vkd3d_shader_register allows us to avoid hardcoding special cases for the register dimensions when writing sm4 bytecode (e.g. for the sampler src register in gather instructions). Also, it allows for some fixes to d3d_asm.c, which are introduced in part 2 (https://gitlab.winehq.org/fcasas/vkd3d/-/commits/add_vkd3d_reg_dim).

Merge request reports

Loading