From: Józef Kucia jkucia@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- include/vkd3d.h | 13 +++++++++++++ libs/vkd3d-utils/vkd3d_utils.map | 2 ++ libs/vkd3d-utils/vkd3d_utils_main.c | 24 ++++++++++++++++++++---- libs/vkd3d/vkd3d.map | 2 ++ libs/vkd3d/vkd3d_main.c | 24 ++++++++++++++++++++---- 5 files changed, 57 insertions(+), 8 deletions(-)
diff --git a/include/vkd3d.h b/include/vkd3d.h index 39c4c6bdd1bc..24cb34eb3c34 100644 --- a/include/vkd3d.h +++ b/include/vkd3d.h @@ -154,9 +154,15 @@ ULONG vkd3d_resource_incref(ID3D12Resource *resource); HRESULT vkd3d_serialize_root_signature(const D3D12_ROOT_SIGNATURE_DESC *desc, D3D_ROOT_SIGNATURE_VERSION version, ID3DBlob **blob, ID3DBlob **error_blob);
+HRESULT vkd3d_serialize_versioned_root_signature(const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *desc, + ID3DBlob **blob, ID3DBlob **error_blob); + HRESULT vkd3d_create_root_signature_deserializer(const void *data, SIZE_T data_size, REFIID iid, void **deserializer);
+HRESULT vkd3d_create_versioned_root_signature_deserializer(const void *data, SIZE_T data_size, + REFIID iid, void **deserializer); + DXGI_FORMAT vkd3d_get_dxgi_format(VkFormat format); VkFormat vkd3d_get_vk_format(DXGI_FORMAT format);
@@ -190,9 +196,16 @@ typedef ULONG (*PFN_vkd3d_resource_incref)(ID3D12Resource *resource); typedef HRESULT (*PFN_vkd3d_serialize_root_signature)(const D3D12_ROOT_SIGNATURE_DESC *desc, D3D_ROOT_SIGNATURE_VERSION version, ID3DBlob **blob, ID3DBlob **error_blob);
+typedef HRESULT (*PFN_vkd3d_serialize_versioned_root_signature)(const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *desc, + ID3DBlob **blob, ID3DBlob **error_blob); + typedef HRESULT (*PFN_vkd3d_create_root_signature_deserializer)(const void *data, SIZE_T data_size, REFIID iid, void **deserializer);
+typedef HRESULT (*PFN_vkd3d_create_versioned_root_signature_deserializer)(const void *data, SIZE_T data_size, + REFIID iid, void **deserializer); + +typedef DXGI_FORMAT (*PFN_vkd3d_get_dxgi_format)(VkFormat format); typedef VkFormat (*PFN_vkd3d_get_vk_format)(DXGI_FORMAT format);
#ifdef __cplusplus diff --git a/libs/vkd3d-utils/vkd3d_utils.map b/libs/vkd3d-utils/vkd3d_utils.map index 79858e502eec..9d95a8410406 100644 --- a/libs/vkd3d-utils/vkd3d_utils.map +++ b/libs/vkd3d-utils/vkd3d_utils.map @@ -3,8 +3,10 @@ VKD3D_1_0 global: D3D12CreateDevice; D3D12CreateRootSignatureDeserializer; + D3D12CreateVersionedRootSignatureDeserializer; D3D12GetDebugInterface; D3D12SerializeRootSignature; + D3D12SerializeVersionedRootSignature; vkd3d_create_event; vkd3d_destroy_event; vkd3d_signal_event; diff --git a/libs/vkd3d-utils/vkd3d_utils_main.c b/libs/vkd3d-utils/vkd3d_utils_main.c index 03f9f52261ad..d06a7503b8da 100644 --- a/libs/vkd3d-utils/vkd3d_utils_main.c +++ b/libs/vkd3d-utils/vkd3d_utils_main.c @@ -87,13 +87,29 @@ HRESULT WINAPI D3D12CreateRootSignatureDeserializer(const void *data, SIZE_T dat return vkd3d_create_root_signature_deserializer(data, data_size, iid, deserializer); }
-HRESULT WINAPI D3D12SerializeRootSignature(const D3D12_ROOT_SIGNATURE_DESC *root_signature_desc, +HRESULT WINAPI D3D12CreateVersionedRootSignatureDeserializer(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_versioned_root_signature_deserializer(data, data_size, iid, deserializer); +} + +HRESULT WINAPI D3D12SerializeRootSignature(const D3D12_ROOT_SIGNATURE_DESC *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); + TRACE("desc %p, version %#x, blob %p, error_blob %p.\n", desc, version, blob, error_blob); + + return vkd3d_serialize_root_signature(desc, version, blob, error_blob); +} + +HRESULT WINAPI D3D12SerializeVersionedRootSignature(const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *desc, + ID3DBlob **blob, ID3DBlob **error_blob) +{ + TRACE("desc %p, blob %p, error_blob %p.\n", desc, blob, error_blob);
- return vkd3d_serialize_root_signature(root_signature_desc, version, blob, error_blob); + return vkd3d_serialize_versioned_root_signature(desc, blob, error_blob); }
/* Events */ diff --git a/libs/vkd3d/vkd3d.map b/libs/vkd3d/vkd3d.map index f43c85c1f9d4..6f1f376113e0 100644 --- a/libs/vkd3d/vkd3d.map +++ b/libs/vkd3d/vkd3d.map @@ -6,6 +6,7 @@ global: vkd3d_create_image_resource; vkd3d_create_instance; vkd3d_create_root_signature_deserializer; + vkd3d_create_versioned_root_signature_deserializer; vkd3d_get_device_parent; vkd3d_get_dxgi_format; vkd3d_get_vk_device; @@ -20,6 +21,7 @@ global: vkd3d_resource_decref; vkd3d_resource_incref; vkd3d_serialize_root_signature; + vkd3d_serialize_versioned_root_signature;
local: *; }; diff --git a/libs/vkd3d/vkd3d_main.c b/libs/vkd3d/vkd3d_main.c index 5e93a2a77407..8f9351bbacac 100644 --- a/libs/vkd3d/vkd3d_main.c +++ b/libs/vkd3d/vkd3d_main.c @@ -205,6 +205,15 @@ HRESULT vkd3d_create_root_signature_deserializer(const void *data, SIZE_T data_s &IID_ID3D12RootSignatureDeserializer, iid, deserializer); }
+HRESULT vkd3d_create_versioned_root_signature_deserializer(const void *data, SIZE_T data_size, + REFIID iid, void **deserializer) +{ + FIXME("data %p, data_size %lu, iid %s, deserializer %p stub!\n", + data, data_size, debugstr_guid(iid), deserializer); + + return E_NOTIMPL; +} + /* ID3DBlob */ struct d3d_blob { @@ -319,7 +328,7 @@ static HRESULT d3d_blob_create(void *buffer, SIZE_T size, struct d3d_blob **blob return S_OK; }
-HRESULT vkd3d_serialize_root_signature(const D3D12_ROOT_SIGNATURE_DESC *root_signature_desc, +HRESULT vkd3d_serialize_root_signature(const D3D12_ROOT_SIGNATURE_DESC *desc, D3D_ROOT_SIGNATURE_VERSION version, ID3DBlob **blob, ID3DBlob **error_blob) { struct vkd3d_shader_code dxbc; @@ -327,8 +336,7 @@ HRESULT vkd3d_serialize_root_signature(const D3D12_ROOT_SIGNATURE_DESC *root_sig HRESULT hr; int ret;
- TRACE("root_signature_desc %p, version %#x, blob %p, error_blob %p.\n", - root_signature_desc, version, blob, error_blob); + TRACE("desc %p, version %#x, blob %p, error_blob %p.\n", desc, version, blob, error_blob);
if (!blob) { @@ -340,7 +348,7 @@ HRESULT vkd3d_serialize_root_signature(const D3D12_ROOT_SIGNATURE_DESC *root_sig *error_blob = NULL;
if ((ret = vkd3d_shader_serialize_root_signature( - (const struct vkd3d_root_signature_desc *)root_signature_desc, + (const struct vkd3d_root_signature_desc *)desc, (enum vkd3d_root_signature_version)version, &dxbc)) < 0) { WARN("Failed to serialize root signature, vkd3d result %d.\n", ret); @@ -360,3 +368,11 @@ HRESULT vkd3d_serialize_root_signature(const D3D12_ROOT_SIGNATURE_DESC *root_sig
return S_OK; } + +HRESULT vkd3d_serialize_versioned_root_signature(const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *desc, + ID3DBlob **blob, ID3DBlob **error_blob) +{ + FIXME("desc %p, blob %p, error_blob %p stub!\n", desc, blob, error_blob); + + return E_NOTIMPL; +}