diff --git a/include/vkd3d.h b/include/vkd3d.h index 79f7dcff..8cc9a679 100644 --- a/include/vkd3d.h +++ b/include/vkd3d.h @@ -52,6 +52,12 @@ VkPhysicalDevice vkd3d_get_vk_physical_device(ID3D12Device *device); VkQueue vkd3d_get_vk_queue(ID3D12CommandQueue *queue); uint32_t vkd3d_get_vk_queue_family_index(ID3D12CommandQueue *queue); +HRESULT vkd3d_serialize_root_signature(const D3D12_ROOT_SIGNATURE_DESC *root_signature_desc, + D3D_ROOT_SIGNATURE_VERSION version, ID3DBlob **blob, ID3DBlob **error_blob); + +HRESULT vkd3d_create_root_signature_deserializer(const void *data, SIZE_T data_size, + REFIID iid, void **deserializer); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/libs/vkd3d-utils/vkd3d_utils_main.c b/libs/vkd3d-utils/vkd3d_utils_main.c index 12c9f99f..1d0bde1d 100644 --- a/libs/vkd3d-utils/vkd3d_utils_main.c +++ b/libs/vkd3d-utils/vkd3d_utils_main.c @@ -43,6 +43,24 @@ HRESULT WINAPI D3D12CreateDevice(IUnknown *adapter, return vkd3d_create_device(&create_info, riid, device); } +HRESULT WINAPI D3D12CreateRootSignatureDeserializer(const void *data, SIZE_T data_size, + REFIID iid, void **deserializer) +{ + TRACE("data %p, data_size %lu, iid %s, deserializer %p.\n", + data, data_size, debugstr_guid(iid), deserializer); + + return vkd3d_create_root_signature_deserializer(data, data_size, iid, deserializer); +} + +HRESULT WINAPI D3D12SerializeRootSignature(const D3D12_ROOT_SIGNATURE_DESC *root_signature_desc, + D3D_ROOT_SIGNATURE_VERSION version, ID3DBlob **blob, ID3DBlob **error_blob) +{ + TRACE("root_signature_desc %p, version %#x, blob %p, error_blob %p.\n", + root_signature_desc, version, blob, error_blob); + + return vkd3d_serialize_root_signature(root_signature_desc, version, blob, error_blob); +} + /* Events */ HANDLE vkd3d_create_event(void) { diff --git a/libs/vkd3d/vkd3d_main.c b/libs/vkd3d/vkd3d_main.c index d77bae02..d1cb87be 100644 --- a/libs/vkd3d/vkd3d_main.c +++ b/libs/vkd3d/vkd3d_main.c @@ -146,15 +146,15 @@ static HRESULT d3d12_root_signature_deserializer_init(struct d3d12_root_signatur return S_OK; } -HRESULT WINAPI D3D12CreateRootSignatureDeserializer(const void *data, SIZE_T data_size, - REFIID riid, void **deserializer) +HRESULT vkd3d_create_root_signature_deserializer(const void *data, SIZE_T data_size, + REFIID iid, void **deserializer) { struct vkd3d_shader_code dxbc = {data, data_size}; struct d3d12_root_signature_deserializer *object; HRESULT hr; - TRACE("data %p, data_size %lu, riid %s, deserializer %p.\n", - data, data_size, debugstr_guid(riid), deserializer); + TRACE("data %p, data_size %lu, iid %s, deserializer %p.\n", + data, data_size, debugstr_guid(iid), deserializer); if (!(object = vkd3d_malloc(sizeof(*object)))) return E_OUTOFMEMORY; @@ -166,7 +166,7 @@ HRESULT WINAPI D3D12CreateRootSignatureDeserializer(const void *data, SIZE_T dat } return return_interface((IUnknown *)&object->ID3D12RootSignatureDeserializer_iface, - &IID_ID3D12RootSignatureDeserializer, riid, deserializer); + &IID_ID3D12RootSignatureDeserializer, iid, deserializer); } /* ID3DBlob */ @@ -283,7 +283,7 @@ static HRESULT d3d_blob_create(void *buffer, SIZE_T size, struct d3d_blob **blob return S_OK; } -HRESULT WINAPI D3D12SerializeRootSignature(const D3D12_ROOT_SIGNATURE_DESC *root_signature_desc, +HRESULT vkd3d_serialize_root_signature(const D3D12_ROOT_SIGNATURE_DESC *root_signature_desc, D3D_ROOT_SIGNATURE_VERSION version, ID3DBlob **blob, ID3DBlob **error_blob) { struct vkd3d_shader_code dxbc;