mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader: Make the control point count the outer dimension of I/O arrays.
The relative-addressed case in shader_register_normalise_arrayed_addressing() leaves the control point id in idx[0], while for constant register indices it is placed in idx[1]. The latter case could be fixed instead, but placing the control point count in the outer dimension is more logical.
This commit is contained in:
committed by
Alexandre Julliard
parent
b8561d6fd2
commit
4c30b23821
Notes:
Alexandre Julliard
2024-01-17 22:43:37 +01:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/537
@@ -929,6 +929,13 @@ static unsigned int shader_register_normalise_arrayed_addressing(struct vkd3d_sh
|
||||
reg->idx[id_idx + 1].rel_addr = NULL;
|
||||
reg->idx[id_idx + 1].offset = reg->idx[id_idx].offset;
|
||||
reg->idx[id_idx].offset -= register_index;
|
||||
if (id_idx)
|
||||
{
|
||||
/* idx[id_idx] now contains the array index, which must be moved below the control point id. */
|
||||
struct vkd3d_shader_register_index tmp = reg->idx[id_idx];
|
||||
reg->idx[id_idx] = reg->idx[id_idx - 1];
|
||||
reg->idx[id_idx - 1] = tmp;
|
||||
}
|
||||
++id_idx;
|
||||
}
|
||||
/* Otherwise we have no address for the arrayed register, so insert one. This happens e.g. where
|
||||
|
Reference in New Issue
Block a user