mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Introduce a helper function to chain vkd3d structures.
Analogous to vk_prepend_struct(). Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e328d0b178
commit
6a88c57f5d
@ -2689,12 +2689,11 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
|
||||
goto fail;
|
||||
}
|
||||
|
||||
shader_interface.next = shader_stages[i].stage == xfb_stage ? &xfb_info : NULL;
|
||||
shader_interface.next = NULL;
|
||||
if (shader_stages[i].stage == xfb_stage)
|
||||
vkd3d_prepend_struct(&shader_interface, &xfb_info);
|
||||
if (target_info)
|
||||
{
|
||||
target_info->next = shader_interface.next;
|
||||
shader_interface.next = target_info;
|
||||
}
|
||||
vkd3d_prepend_struct(&shader_interface, target_info);
|
||||
|
||||
if (FAILED(hr = create_shader_stage(device, &graphics->stages[graphics->stage_count],
|
||||
shader_stages[i].stage, b, &shader_interface)))
|
||||
|
@ -1395,4 +1395,17 @@ static inline void vk_prepend_struct(void *header, void *structure)
|
||||
vk_header->pNext = vk_structure;
|
||||
}
|
||||
|
||||
static inline void vkd3d_prepend_struct(void *header, void *structure)
|
||||
{
|
||||
struct
|
||||
{
|
||||
unsigned int type;
|
||||
const void *next;
|
||||
} *vkd3d_header = header, *vkd3d_structure = structure;
|
||||
|
||||
assert(!vkd3d_structure->next);
|
||||
vkd3d_structure->next = vkd3d_header->next;
|
||||
vkd3d_header->next = vkd3d_structure;
|
||||
}
|
||||
|
||||
#endif /* __VKD3D_PRIVATE_H */
|
||||
|
Loading…
Reference in New Issue
Block a user