00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #pragma once
00012
00013
00016
00017 struct NvFlowDepthStencilViewDescD3D12
00018 {
00019 D3D12_CPU_DESCRIPTOR_HANDLE dsvHandle;
00020 D3D12_DEPTH_STENCIL_VIEW_DESC dsvDesc;
00021 ID3D12Resource* dsvResource;
00022 D3D12_RESOURCE_STATES dsvCurrentState;
00023
00024 D3D12_CPU_DESCRIPTOR_HANDLE srvHandle;
00025 D3D12_SHADER_RESOURCE_VIEW_DESC srvDesc;
00026 ID3D12Resource* srvResource;
00027 D3D12_RESOURCE_STATES srvCurrentState;
00028
00029 D3D12_VIEWPORT viewport;
00030 };
00031
00032 struct NvFlowRenderTargetViewDescD3D12
00033 {
00034 D3D12_CPU_DESCRIPTOR_HANDLE rtvHandle;
00035 D3D12_RENDER_TARGET_VIEW_DESC rtvDesc;
00036 ID3D12Resource* resource;
00037 D3D12_RESOURCE_STATES currentState;
00038 D3D12_VIEWPORT viewport;
00039 D3D12_RECT scissor;
00040 };
00041
00042 struct NvFlowDescriptorReserveHandleD3D12
00043 {
00044 ID3D12DescriptorHeap* heap;
00045 NvFlowUint descriptorSize;
00046 D3D12_CPU_DESCRIPTOR_HANDLE cpuHandle;
00047 D3D12_GPU_DESCRIPTOR_HANDLE gpuHandle;
00048 };
00049
00050 struct NvFlowDynamicDescriptorHeapD3D12
00051 {
00052 void* userdata;
00053 NvFlowDescriptorReserveHandleD3D12 (*reserveDescriptors)(void* userdata, NvFlowUint numDescriptors, NvFlowUint64 lastFenceCompleted, NvFlowUint64 nextFenceValue);
00054 };
00055
00056 struct NvFlowContextDescD3D12
00057 {
00058 ID3D12Device* device;
00059 ID3D12CommandQueue* commandQueue;
00060 ID3D12Fence* commandQueueFence;
00061 ID3D12GraphicsCommandList* commandList;
00062 UINT64 lastFenceCompleted;
00063 UINT64 nextFenceValue;
00064
00065 NvFlowDynamicDescriptorHeapD3D12 dynamicHeapCbvSrvUav;
00066 };
00067
00068 struct NvFlowResourceViewDescD3D12
00069 {
00070 D3D12_CPU_DESCRIPTOR_HANDLE srvHandle;
00071 D3D12_SHADER_RESOURCE_VIEW_DESC srvDesc;
00072 ID3D12Resource* resource;
00073 D3D12_RESOURCE_STATES* currentState;
00074 };
00075
00076 struct NvFlowResourceRWViewDescD3D12
00077 {
00078 NvFlowResourceViewDescD3D12 resourceView;
00079 D3D12_CPU_DESCRIPTOR_HANDLE uavHandle;
00080 D3D12_UNORDERED_ACCESS_VIEW_DESC uavDesc;
00081 };
00082
00091 NV_FLOW_API NvFlowContext* NvFlowCreateContextD3D12(NvFlowUint version, const NvFlowContextDescD3D12* desc);
00092
00101 NV_FLOW_API NvFlowDepthStencilView* NvFlowCreateDepthStencilViewD3D12(NvFlowContext* context, const NvFlowDepthStencilViewDescD3D12* desc);
00102
00111 NV_FLOW_API NvFlowRenderTargetView* NvFlowCreateRenderTargetViewD3D12(NvFlowContext* context, const NvFlowRenderTargetViewDescD3D12* desc);
00112
00119 NV_FLOW_API void NvFlowUpdateContextD3D12(NvFlowContext* context, const NvFlowContextDescD3D12* desc);
00120
00127 NV_FLOW_API void NvFlowUpdateContextDescD3D12(NvFlowContext* context, NvFlowContextDescD3D12* desc);
00128
00136 NV_FLOW_API void NvFlowUpdateDepthStencilViewD3D12(NvFlowContext* context, NvFlowDepthStencilView* view, const NvFlowDepthStencilViewDescD3D12* desc);
00137
00145 NV_FLOW_API void NvFlowUpdateRenderTargetViewD3D12(NvFlowContext* context, NvFlowRenderTargetView* view, const NvFlowRenderTargetViewDescD3D12* desc);
00146
00154 NV_FLOW_API void NvFlowUpdateResourceViewDescD3D12(NvFlowContext* context, NvFlowResource* resource, NvFlowResourceViewDescD3D12* desc);
00155
00163 NV_FLOW_API void NvFlowUpdateResourceRWViewDescD3D12(NvFlowContext* context, NvFlowResourceRW* resourceRW, NvFlowResourceRWViewDescD3D12* desc);
00164