mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/tpf: Write non-zero static offsets in relative addressing mode in sm4_write_register_index().
This commit is contained in:
Notes:
Henri Verbeet
2025-03-12 22:20:19 +01:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1388
@@ -3462,12 +3462,16 @@ static void sm4_write_register_index(const struct tpf_compiler *tpf, const struc
|
||||
unsigned int j)
|
||||
{
|
||||
unsigned int addressing = sm4_get_index_addressing_from_reg(reg, j);
|
||||
const struct vkd3d_shader_register_index *idx = ®->idx[j];
|
||||
struct vkd3d_bytecode_buffer *buffer = tpf->buffer;
|
||||
unsigned int k;
|
||||
|
||||
if (!addressing || (addressing & VKD3D_SM4_ADDRESSING_OFFSET))
|
||||
put_u32(buffer, idx->offset);
|
||||
|
||||
if (addressing & VKD3D_SM4_ADDRESSING_RELATIVE)
|
||||
{
|
||||
const struct vkd3d_shader_src_param *idx_src = reg->idx[j].rel_addr;
|
||||
const struct vkd3d_shader_src_param *idx_src = idx->rel_addr;
|
||||
uint32_t idx_src_token;
|
||||
|
||||
VKD3D_ASSERT(idx_src);
|
||||
@@ -3482,10 +3486,6 @@ static void sm4_write_register_index(const struct tpf_compiler *tpf, const struc
|
||||
VKD3D_ASSERT(!idx_src->reg.idx[k].rel_addr);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
put_u32(tpf->buffer, reg->idx[j].offset);
|
||||
}
|
||||
}
|
||||
|
||||
static void sm4_write_dst_register(const struct tpf_compiler *tpf, const struct vkd3d_shader_dst_param *dst)
|
||||
|
Reference in New Issue
Block a user