From: Józef Kucia jkucia@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- libs/vkd3d/state.c | 10 +++++----- libs/vkd3d/vkd3d_main.c | 15 ++++++++------- libs/vkd3d/vkd3d_private.h | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index df96ae440704..980d9edde608 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -999,8 +999,8 @@ HRESULT d3d12_root_signature_create(struct d3d12_device *device, const struct vkd3d_shader_code dxbc = {bytecode, bytecode_length}; union { - D3D12_ROOT_SIGNATURE_DESC d3d12; - struct vkd3d_root_signature_desc vkd3d; + D3D12_VERSIONED_ROOT_SIGNATURE_DESC d3d12; + struct vkd3d_versioned_root_signature_desc vkd3d; } root_signature_desc; struct d3d12_root_signature *object; HRESULT hr; @@ -1014,12 +1014,12 @@ HRESULT d3d12_root_signature_create(struct d3d12_device *device,
if (!(object = vkd3d_malloc(sizeof(*object)))) { - vkd3d_shader_free_root_signature_v_1_0(&root_signature_desc.vkd3d); + vkd3d_shader_free_root_signature(&root_signature_desc.vkd3d); return E_OUTOFMEMORY; }
- hr = d3d12_root_signature_init(object, device, &root_signature_desc.d3d12); - vkd3d_shader_free_root_signature_v_1_0(&root_signature_desc.vkd3d); + hr = d3d12_root_signature_init(object, device, &root_signature_desc.d3d12.u.Desc_1_0); + vkd3d_shader_free_root_signature(&root_signature_desc.vkd3d); if (FAILED(hr)) { vkd3d_free(object); diff --git a/libs/vkd3d/vkd3d_main.c b/libs/vkd3d/vkd3d_main.c index e095fdf49318..7775077cb56f 100644 --- a/libs/vkd3d/vkd3d_main.c +++ b/libs/vkd3d/vkd3d_main.c @@ -87,8 +87,8 @@ struct d3d12_root_signature_deserializer
union { - D3D12_ROOT_SIGNATURE_DESC d3d12; - struct vkd3d_root_signature_desc vkd3d; + D3D12_VERSIONED_ROOT_SIGNATURE_DESC d3d12; + struct vkd3d_versioned_root_signature_desc vkd3d; } desc; };
@@ -140,7 +140,7 @@ static ULONG STDMETHODCALLTYPE d3d12_root_signature_deserializer_Release(ID3D12R
if (!refcount) { - vkd3d_shader_free_root_signature_v_1_0(&deserializer->desc.vkd3d); + vkd3d_shader_free_root_signature(&deserializer->desc.vkd3d); vkd3d_free(deserializer); }
@@ -154,7 +154,8 @@ static const D3D12_ROOT_SIGNATURE_DESC * STDMETHODCALLTYPE d3d12_root_signature_
TRACE("iface %p.\n", iface);
- return &deserializer->desc.d3d12; + assert(deserializer->desc.d3d12.Version == D3D_ROOT_SIGNATURE_VERSION_1_0); + return &deserializer->desc.d3d12.u.Desc_1_0; }
static const struct ID3D12RootSignatureDeserializerVtbl d3d12_root_signature_deserializer_vtbl = @@ -168,7 +169,7 @@ static const struct ID3D12RootSignatureDeserializerVtbl d3d12_root_signature_des };
int vkd3d_parse_root_signature_v_1_0(const struct vkd3d_shader_code *dxbc, - struct vkd3d_root_signature_desc *out_desc) + struct vkd3d_versioned_root_signature_desc *out_desc) { struct vkd3d_versioned_root_signature_desc desc, converted_desc; int ret; @@ -181,7 +182,7 @@ int vkd3d_parse_root_signature_v_1_0(const struct vkd3d_shader_code *dxbc,
if (desc.version == VKD3D_ROOT_SIGNATURE_VERSION_1_0) { - *out_desc = desc.u.v_1_0; + *out_desc = desc; } else { @@ -195,7 +196,7 @@ int vkd3d_parse_root_signature_v_1_0(const struct vkd3d_shader_code *dxbc, return ret; }
- *out_desc = converted_desc.u.v_1_0; + *out_desc = converted_desc; }
return ret; diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index c680a04a2567..ba586b44aab2 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -620,7 +620,7 @@ HRESULT d3d12_root_signature_create(struct d3d12_device *device, const void *byt struct d3d12_root_signature *unsafe_impl_from_ID3D12RootSignature(ID3D12RootSignature *iface) DECLSPEC_HIDDEN;
int vkd3d_parse_root_signature_v_1_0(const struct vkd3d_shader_code *dxbc, - struct vkd3d_root_signature_desc *desc) DECLSPEC_HIDDEN; + struct vkd3d_versioned_root_signature_desc *desc) DECLSPEC_HIDDEN;
struct d3d12_graphics_pipeline_state {