From 5c134d44d6cd9145b810c216cb6fca7af16b0af4 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Fri, 24 Nov 2023 19:06:32 +1100 Subject: [PATCH] include: D3D12_RT_FORMAT_ARRAY remove typedef to make header compatible with windows. windows d3d12.idl doesn't have this as a typedef. --- include/vkd3d_d3d12.idl | 4 ++-- libs/vkd3d/state.c | 2 +- libs/vkd3d/vkd3d_private.h | 2 +- tests/d3d12.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/vkd3d_d3d12.idl b/include/vkd3d_d3d12.idl index cdd3acec..9b1b494c 100644 --- a/include/vkd3d_d3d12.idl +++ b/include/vkd3d_d3d12.idl @@ -2129,11 +2129,11 @@ typedef struct D3D12_PIPELINE_STATE_STREAM_DESC void *pPipelineStateSubobjectStream; } D3D12_PIPELINE_STATE_STREAM_DESC; -typedef struct D3D12_RT_FORMAT_ARRAY +struct D3D12_RT_FORMAT_ARRAY { DXGI_FORMAT RTFormats[D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT]; UINT NumRenderTargets; -} D3D12_RT_FORMAT_ARRAY; +}; typedef enum D3D12_PIPELINE_STATE_SUBOBJECT_TYPE { diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index de0e04ea..6665a1fd 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -1839,7 +1839,7 @@ static HRESULT pipeline_state_desc_from_d3d12_stream_desc(struct d3d12_pipeline_ [D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_INPUT_LAYOUT] = DCL_SUBOBJECT_INFO(D3D12_INPUT_LAYOUT_DESC, input_layout), [D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_IB_STRIP_CUT_VALUE] = DCL_SUBOBJECT_INFO(D3D12_INDEX_BUFFER_STRIP_CUT_VALUE, strip_cut_value), [D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PRIMITIVE_TOPOLOGY] = DCL_SUBOBJECT_INFO(D3D12_PRIMITIVE_TOPOLOGY_TYPE, primitive_topology_type), - [D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RENDER_TARGET_FORMATS] = DCL_SUBOBJECT_INFO(D3D12_RT_FORMAT_ARRAY, rtv_formats), + [D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RENDER_TARGET_FORMATS] = DCL_SUBOBJECT_INFO(struct D3D12_RT_FORMAT_ARRAY, rtv_formats), [D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL_FORMAT] = DCL_SUBOBJECT_INFO(DXGI_FORMAT, dsv_format), [D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_DESC] = DCL_SUBOBJECT_INFO(DXGI_SAMPLE_DESC, sample_desc), [D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_NODE_MASK] = DCL_SUBOBJECT_INFO(UINT, node_mask), diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 04ba3498..e0eb9f3d 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1334,7 +1334,7 @@ struct d3d12_pipeline_state_desc D3D12_INPUT_LAYOUT_DESC input_layout; D3D12_INDEX_BUFFER_STRIP_CUT_VALUE strip_cut_value; D3D12_PRIMITIVE_TOPOLOGY_TYPE primitive_topology_type; - D3D12_RT_FORMAT_ARRAY rtv_formats; + struct D3D12_RT_FORMAT_ARRAY rtv_formats; DXGI_FORMAT dsv_format; DXGI_SAMPLE_DESC sample_desc; D3D12_VIEW_INSTANCING_DESC view_instancing_desc; diff --git a/tests/d3d12.c b/tests/d3d12.c index 8727fd9e..91e91608 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -3265,7 +3265,7 @@ static void test_create_pipeline_state(void) struct d3d12_render_target_formats_subobject { DECLSPEC_ALIGN(sizeof(void *)) D3D12_PIPELINE_STATE_SUBOBJECT_TYPE type; - D3D12_RT_FORMAT_ARRAY render_target_formats; + struct D3D12_RT_FORMAT_ARRAY render_target_formats; }; struct d3d12_depth_stencil_format_subobject