mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader: Add a register index to struct vkd3d_shader_immediate_constant_buffer.
This commit is contained in:
committed by
Alexandre Julliard
parent
ef940cb778
commit
cb88844a3d
Notes:
Alexandre Julliard
2023-12-07 22:47:09 +01: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/477
@@ -792,6 +792,7 @@ static void shader_sm4_read_shader_data(struct vkd3d_shader_instruction *ins, ui
|
||||
ins->handler_idx = VKD3DSIH_INVALID;
|
||||
return;
|
||||
}
|
||||
icb->register_idx = 0;
|
||||
icb->data_type = VKD3D_DATA_FLOAT;
|
||||
icb->component_count = VKD3D_VEC4_SIZE;
|
||||
icb->element_count = icb_size / VKD3D_VEC4_SIZE;
|
||||
@@ -1931,6 +1932,15 @@ static bool shader_sm4_read_param(struct vkd3d_shader_sm4_parser *priv, const ui
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (register_type == VKD3D_SM4_RT_IMMCONSTBUFFER)
|
||||
{
|
||||
if (param->idx_count != 1)
|
||||
{
|
||||
WARN("Unexpected idx count %u.\n", param->idx_count);
|
||||
vkd3d_shader_parser_error(&priv->p, VKD3D_SHADER_ERROR_TPF_INVALID_REGISTER_INDEX_COUNT,
|
||||
"Invalid index count %u for immediate const buffer register; expected count 1.", param->idx_count);
|
||||
}
|
||||
}
|
||||
else if (!shader_is_sm_5_1(priv) && vsir_register_is_descriptor(param))
|
||||
{
|
||||
/* SM5.1 places a symbol identifier in idx[0] and moves
|
||||
|
||||
Reference in New Issue
Block a user