mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-utils: Implement version reflection.
This commit is contained in:
Notes:
Henri Verbeet
2024-10-21 18:41:50 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1194
@@ -1057,13 +1057,20 @@ static HRESULT d3d12_reflection_init(struct d3d12_reflection *reflection, const
|
||||
}
|
||||
|
||||
if (FAILED(hr = parse_rdef(reflection, §ion->data)))
|
||||
{
|
||||
vkd3d_shader_free_scan_signature_info(&reflection->signature_info);
|
||||
vkd3d_shader_free_dxbc(&dxbc_desc);
|
||||
return hr;
|
||||
}
|
||||
goto fail;
|
||||
found_rdef = true;
|
||||
}
|
||||
else if (section->tag == TAG_SHDR || section->tag == TAG_SHEX)
|
||||
{
|
||||
const uint32_t *version;
|
||||
|
||||
if (!(version = get_data_ptr(§ion->data, 0, 1, sizeof(*version))))
|
||||
{
|
||||
hr = E_INVALIDARG;
|
||||
goto fail;
|
||||
}
|
||||
reflection->desc.Version = *version;
|
||||
}
|
||||
}
|
||||
|
||||
reflection->desc.InputParameters = reflection->signature_info.input.element_count;
|
||||
@@ -1073,6 +1080,11 @@ static HRESULT d3d12_reflection_init(struct d3d12_reflection *reflection, const
|
||||
vkd3d_shader_free_dxbc(&dxbc_desc);
|
||||
|
||||
return S_OK;
|
||||
|
||||
fail:
|
||||
vkd3d_shader_free_scan_signature_info(&reflection->signature_info);
|
||||
vkd3d_shader_free_dxbc(&dxbc_desc);
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT WINAPI D3DReflect(const void *data, SIZE_T data_size, REFIID iid, void **reflection)
|
||||
|
Reference in New Issue
Block a user