aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Macklin <[email protected]>2017-06-09 13:41:15 +1200
committerMiles Macklin <[email protected]>2017-06-09 13:41:15 +1200
commit688b5f42e9bfe498d7af7075d4d8f4429867f3a3 (patch)
tree7e0d0e7c95298f0418723abd92f61ac6e16b055e
parentUpdate README.md (diff)
downloadflex-688b5f42e9bfe498d7af7075d4d8f4429867f3a3.tar.xz
flex-688b5f42e9bfe498d7af7075d4d8f4429867f3a3.zip
1.2.0.beta.11.2.0.beta.1
-rw-r--r--.gitignore6
-rw-r--r--README.md4
-rw-r--r--bin/linux64/NvFlexDemoDebugCUDA_x64bin11831737 -> 11999005 bytes
-rw-r--r--bin/linux64/NvFlexDemoReleaseCUDA_x64bin8068141 -> 8171502 bytes
-rw-r--r--bin/win32/NvFlexDebugCUDA_x86.dllbin3747184 -> 3955568 bytes
-rw-r--r--bin/win32/NvFlexDebugCUDA_x86.dll.pdbbin4435968 -> 4411392 bytes
-rw-r--r--bin/win32/NvFlexDebugD3D_x86.dllbin1722736 -> 1921392 bytes
-rw-r--r--bin/win32/NvFlexDebugD3D_x86.dll.pdbbin5279744 -> 5287936 bytes
-rw-r--r--bin/win32/NvFlexDemoDebugCUDA_x86.exebin1989632 -> 2028544 bytes
-rw-r--r--bin/win32/NvFlexDemoDebugCUDA_x86.exe.pdbbin8171520 -> 8343552 bytes
-rw-r--r--bin/win32/NvFlexDemoDebugD3D_x86.exebin2057728 -> 2426368 bytes
-rw-r--r--bin/win32/NvFlexDemoDebugD3D_x86.exe.pdbbin8835072 -> 10891264 bytes
-rw-r--r--bin/win32/NvFlexDemoReleaseCUDA_x86.exebin1009152 -> 1039872 bytes
-rw-r--r--bin/win32/NvFlexDemoReleaseCUDA_x86.exe.pdbbin9383936 -> 9629696 bytes
-rw-r--r--bin/win32/NvFlexDemoReleaseD3D_x86.exebin1076736 -> 1300480 bytes
-rw-r--r--bin/win32/NvFlexDemoReleaseD3D_x86.exe.pdbbin10088448 -> 12193792 bytes
-rw-r--r--bin/win32/NvFlexDeviceDebug_x86.dllbin491888 -> 491888 bytes
-rw-r--r--bin/win32/NvFlexDeviceDebug_x86.dll.pdbbin2134016 -> 2134016 bytes
-rw-r--r--bin/win32/NvFlexDeviceRelease_x86.dllbin135024 -> 135024 bytes
-rw-r--r--bin/win32/NvFlexDeviceRelease_x86.dll.pdbbin1634304 -> 1634304 bytes
-rw-r--r--bin/win32/NvFlexExtDebugCUDA_x86.dllbin977776 -> 980848 bytes
-rw-r--r--bin/win32/NvFlexExtDebugCUDA_x86.dll.pdbbin4845568 -> 4845568 bytes
-rw-r--r--bin/win32/NvFlexExtDebugD3D_x86.dllbin830832 -> 833392 bytes
-rw-r--r--bin/win32/NvFlexExtDebugD3D_x86.dll.pdbbin4861952 -> 4870144 bytes
-rw-r--r--bin/win32/NvFlexExtReleaseCUDA_x86.dllbin514928 -> 519024 bytes
-rw-r--r--bin/win32/NvFlexExtReleaseCUDA_x86.dll.pdbbin5140480 -> 5148672 bytes
-rw-r--r--bin/win32/NvFlexExtReleaseD3D_x86.dllbin357744 -> 362352 bytes
-rw-r--r--bin/win32/NvFlexExtReleaseD3D_x86.dll.pdbbin5001216 -> 5017600 bytes
-rw-r--r--bin/win32/NvFlexReleaseCUDA_x86.dllbin878960 -> 905584 bytes
-rw-r--r--bin/win32/NvFlexReleaseCUDA_x86.dll.pdbbin4329472 -> 4313088 bytes
-rw-r--r--bin/win32/NvFlexReleaseD3D_x86.dllbin1070448 -> 1231216 bytes
-rw-r--r--bin/win32/NvFlexReleaseD3D_x86.dll.pdbbin5468160 -> 5484544 bytes
-rw-r--r--bin/win32/nvToolsExt32_1.dllbin0 -> 40960 bytes
-rw-r--r--bin/win64/NvFlexDebugCUDA_x64.dllbin4207984 -> 4440944 bytes
-rw-r--r--bin/win64/NvFlexDebugCUDA_x64.dll.pdbbin4337664 -> 4321280 bytes
-rw-r--r--bin/win64/NvFlexDebugD3D_x64.dllbin2020720 -> 2253680 bytes
-rw-r--r--bin/win64/NvFlexDebugD3D_x64.dll.pdbbin5345280 -> 5410816 bytes
-rw-r--r--bin/win64/NvFlexDemoDebugCUDA_x64.exebin2471424 -> 2523648 bytes
-rw-r--r--bin/win64/NvFlexDemoDebugCUDA_x64.exe.pdbbin8507392 -> 8695808 bytes
-rw-r--r--bin/win64/NvFlexDemoDebugD3D_x64.exebin2560512 -> 3018752 bytes
-rw-r--r--bin/win64/NvFlexDemoDebugD3D_x64.exe.pdbbin9162752 -> 11268096 bytes
-rw-r--r--bin/win64/NvFlexDemoReleaseCUDA_x64.exebin1213440 -> 1247232 bytes
-rw-r--r--bin/win64/NvFlexDemoReleaseCUDA_x64.exe.pdbbin9342976 -> 9588736 bytes
-rw-r--r--bin/win64/NvFlexDemoReleaseD3D_x64.exebin1295360 -> 1547776 bytes
-rw-r--r--bin/win64/NvFlexDemoReleaseD3D_x64.exe.pdbbin10072064 -> 12177408 bytes
-rw-r--r--bin/win64/NvFlexDeviceDebug_x64.dllbin604016 -> 604016 bytes
-rw-r--r--bin/win64/NvFlexDeviceDebug_x64.dll.pdbbin2109440 -> 2109440 bytes
-rw-r--r--bin/win64/NvFlexDeviceRelease_x64.dllbin145264 -> 145264 bytes
-rw-r--r--bin/win64/NvFlexDeviceRelease_x64.dll.pdbbin1462272 -> 1462272 bytes
-rw-r--r--bin/win64/NvFlexExtDebugCUDA_x64.dllbin1193840 -> 1197424 bytes
-rw-r--r--bin/win64/NvFlexExtDebugCUDA_x64.dll.pdbbin4894720 -> 4902912 bytes
-rw-r--r--bin/win64/NvFlexExtDebugD3D_x64.dllbin1036656 -> 1040240 bytes
-rw-r--r--bin/win64/NvFlexExtDebugD3D_x64.dll.pdbbin4894720 -> 4902912 bytes
-rw-r--r--bin/win64/NvFlexExtReleaseCUDA_x64.dllbin491376 -> 494960 bytes
-rw-r--r--bin/win64/NvFlexExtReleaseCUDA_x64.dll.pdbbin4861952 -> 4878336 bytes
-rw-r--r--bin/win64/NvFlexExtReleaseD3D_x64.dllbin426352 -> 429936 bytes
-rw-r--r--bin/win64/NvFlexExtReleaseD3D_x64.dll.pdbbin4829184 -> 4845568 bytes
-rw-r--r--bin/win64/NvFlexReleaseCUDA_x64.dllbin877936 -> 906096 bytes
-rw-r--r--bin/win64/NvFlexReleaseCUDA_x64.dll.pdbbin4124672 -> 4116480 bytes
-rw-r--r--bin/win64/NvFlexReleaseD3D_x64.dllbin1188208 -> 1382256 bytes
-rw-r--r--bin/win64/NvFlexReleaseD3D_x64.dll.pdbbin5369856 -> 5459968 bytes
-rw-r--r--bin/win64/nvToolsExt64_1.dllbin0 -> 48128 bytes
-rw-r--r--core/core.h2
-rw-r--r--core/platform.cpp2
-rw-r--r--core/platform.h2
-rw-r--r--core/voxelize.cpp4
-rw-r--r--core/voxelize.h2
-rw-r--r--demo/benchmark.h444
-rw-r--r--demo/compiler/makeandroid/Makefile22
-rw-r--r--demo/compiler/makeandroid/Makefile.flexDemoCUDA.mk25
-rw-r--r--demo/compiler/makeandroid/Makefile.flexExtCUDA.mk48
-rw-r--r--demo/compiler/makelinux64/Makefile.flexDemoCUDA.mk4
-rw-r--r--demo/compiler/vc12win32/flexDemoCUDA.vcxproj8
-rw-r--r--demo/compiler/vc12win32/flexDemoCUDA.vcxproj.filters6
-rw-r--r--demo/compiler/vc12win32/flexDemoD3D.vcxproj342
-rw-r--r--demo/compiler/vc12win32/flexDemoD3D.vcxproj.filters304
-rw-r--r--demo/compiler/vc12win64/flexDemoCUDA.vcxproj8
-rw-r--r--demo/compiler/vc12win64/flexDemoCUDA.vcxproj.filters6
-rw-r--r--demo/compiler/vc12win64/flexDemoD3D.vcxproj342
-rw-r--r--demo/compiler/vc12win64/flexDemoD3D.vcxproj.filters304
-rw-r--r--demo/compiler/vc14win32/flexDemoCUDA.vcxproj8
-rw-r--r--demo/compiler/vc14win32/flexDemoCUDA.vcxproj.filters6
-rw-r--r--demo/compiler/vc14win32/flexDemoD3D.vcxproj343
-rw-r--r--demo/compiler/vc14win32/flexDemoD3D.vcxproj.filters304
-rw-r--r--demo/compiler/vc14win64/flexDemoCUDA.vcxproj8
-rw-r--r--demo/compiler/vc14win64/flexDemoCUDA.vcxproj.filters6
-rw-r--r--demo/compiler/vc14win64/flexDemoD3D.vcxproj343
-rw-r--r--demo/compiler/vc14win64/flexDemoD3D.vcxproj.filters304
-rw-r--r--demo/compiler/xpj/flexDemoCUDA.xpj82
-rw-r--r--demo/compiler/xpj/flexDemoD3D.xpj132
-rw-r--r--demo/d3d/appGraphCtx.h47
-rw-r--r--demo/d3d/appGraphCtxLoader.cpp72
-rw-r--r--demo/d3d/demoContext.h93
-rw-r--r--demo/d3d/imguiGraph.cpp (renamed from demo/d3d11/imguiGraph.cpp)11
-rw-r--r--demo/d3d/imguiGraph.h63
-rw-r--r--demo/d3d/imguiGraphLoader.cpp84
-rw-r--r--demo/d3d/loader.cpp27
-rw-r--r--demo/d3d/loader.h24
-rw-r--r--demo/d3d/loaderMacros.h65
-rw-r--r--demo/d3d/renderParamsD3D.cpp178
-rw-r--r--demo/d3d/renderParamsD3D.h248
-rw-r--r--demo/d3d/shaderCommonD3D.h19
-rw-r--r--demo/d3d/shaders/blurDepthPS.hlsl (renamed from demo/d3d11/shaders/blurDepthPS.hlsl)23
-rw-r--r--demo/d3d/shaders/blurDepthPS.hlsl.h (renamed from demo/d3d11/shaders/blurDepthPS.hlsl.h)731
-rw-r--r--demo/d3d/shaders/compositePS.hlsl (renamed from demo/d3d11/shaders/compositePS.hlsl)50
-rw-r--r--demo/d3d/shaders/compositePS.hlsl.h (renamed from demo/d3d11/shaders/compositePS.hlsl.h)2105
-rw-r--r--demo/d3d/shaders/debugLinePS.hlsl (renamed from demo/d3d11/shaders/debugLinePS.hlsl)0
-rw-r--r--demo/d3d/shaders/debugLinePS.hlsl.h (renamed from demo/d3d11/shaders/debugLinePS.hlsl.h)0
-rw-r--r--demo/d3d/shaders/debugLineVS.hlsl (renamed from demo/d3d11/shaders/debugLineVS.hlsl)0
-rw-r--r--demo/d3d/shaders/debugLineVS.hlsl.h (renamed from demo/d3d11/shaders/debugLineVS.hlsl.h)0
-rw-r--r--demo/d3d/shaders/diffuseGS.hlsl83
-rw-r--r--demo/d3d/shaders/diffuseGS.hlsl.h (renamed from demo/d3d11/shaders/diffuseGS.hlsl.h)42
-rw-r--r--demo/d3d/shaders/diffusePS.hlsl (renamed from demo/d3d11/shaders/diffusePS.hlsl)12
-rw-r--r--demo/d3d/shaders/diffusePS.hlsl.h (renamed from demo/d3d11/shaders/diffusePS.hlsl.h)12
-rw-r--r--demo/d3d/shaders/diffuseVS.hlsl (renamed from demo/d3d11/shaders/diffuseVS.hlsl)1
-rw-r--r--demo/d3d/shaders/diffuseVS.hlsl.h (renamed from demo/d3d11/shaders/diffuseVS.hlsl.h)0
-rw-r--r--demo/d3d/shaders/ellipsoidDepthGS.hlsl65
-rw-r--r--demo/d3d/shaders/ellipsoidDepthGS.hlsl.h (renamed from demo/d3d11/shaders/ellipsoidDepthGS.hlsl.h)176
-rw-r--r--demo/d3d/shaders/ellipsoidDepthPS.hlsl (renamed from demo/d3d11/shaders/ellipsoidDepthPS.hlsl)54
-rw-r--r--demo/d3d/shaders/ellipsoidDepthPS.hlsl.h643
-rw-r--r--demo/d3d/shaders/ellipsoidDepthVS.hlsl118
-rw-r--r--demo/d3d/shaders/ellipsoidDepthVS.hlsl.h (renamed from demo/d3d11/shaders/ellipsoidDepthVS.hlsl.h)1083
-rw-r--r--demo/d3d/shaders/imguiPS.hlsl (renamed from demo/d3d11/shaders/imguiPS.hlsl)0
-rw-r--r--demo/d3d/shaders/imguiPS.hlsl.h (renamed from demo/d3d11/shaders/imguiPS.hlsl.h)0
-rw-r--r--demo/d3d/shaders/imguiVS.hlsl (renamed from demo/d3d11/shaders/imguiVS.hlsl)0
-rw-r--r--demo/d3d/shaders/imguiVS.hlsl.h (renamed from demo/d3d11/shaders/imguiVS.hlsl.h)0
-rw-r--r--demo/d3d/shaders/meshAsyncComputeBenchPS.hlsl3
-rw-r--r--demo/d3d/shaders/meshAsyncComputeBenchPS.hlsl.h1558
-rw-r--r--demo/d3d/shaders/meshPS.hlsl (renamed from demo/d3d11/shaders/meshPS.hlsl)43
-rw-r--r--demo/d3d/shaders/meshPS.hlsl.h (renamed from demo/d3d11/shaders/meshPS.hlsl.h)1975
-rw-r--r--demo/d3d/shaders/meshShadowPS.hlsl (renamed from demo/d3d11/shaders/meshShadowPS.hlsl)5
-rw-r--r--demo/d3d/shaders/meshShadowPS.hlsl.h (renamed from demo/d3d11/shaders/meshShadowPS.hlsl.h)67
-rw-r--r--demo/d3d/shaders/meshVS.hlsl35
-rw-r--r--demo/d3d/shaders/meshVS.hlsl.h (renamed from demo/d3d11/shaders/meshVS.hlsl.h)640
-rw-r--r--demo/d3d/shaders/passThroughVS.hlsl14
-rw-r--r--demo/d3d/shaders/passThroughVS.hlsl.h (renamed from demo/d3d11/shaders/passThroughVS.hlsl.h)80
-rw-r--r--demo/d3d/shaders/pointGS.hlsl68
-rw-r--r--demo/d3d/shaders/pointGS.hlsl.h (renamed from demo/d3d11/shaders/pointGS.hlsl.h)585
-rw-r--r--demo/d3d/shaders/pointPS.hlsl81
-rw-r--r--demo/d3d/shaders/pointPS.hlsl.h (renamed from demo/d3d11/shaders/pointPS.hlsl.h)500
-rw-r--r--demo/d3d/shaders/pointShadowPS.hlsl17
-rw-r--r--demo/d3d/shaders/pointShadowPS.hlsl.h157
-rw-r--r--demo/d3d/shaders/pointVS.hlsl (renamed from demo/d3d11/shaders/pointVS.hlsl)11
-rw-r--r--demo/d3d/shaders/pointVS.hlsl.h (renamed from demo/d3d11/shaders/pointVS.hlsl.h)12
-rw-r--r--demo/d3d/shaders/shaderCommon.h (renamed from demo/d3d11/shaders/shaderCommon.h)65
-rw-r--r--demo/d3d/shadersDemoContext.cpp184
-rw-r--r--demo/d3d/shadersDemoContext.h21
-rw-r--r--demo/d3d11/appD3D11Ctx.cpp303
-rw-r--r--demo/d3d11/appD3D11Ctx.h76
-rw-r--r--demo/d3d11/debugLineRender.h199
-rw-r--r--demo/d3d11/debugLineRenderD3D11.cpp170
-rw-r--r--demo/d3d11/debugLineRenderD3D11.h42
-rw-r--r--demo/d3d11/demoContextD3D11.cpp1147
-rw-r--r--demo/d3d11/demoContextD3D11.h113
-rw-r--r--demo/d3d11/diffuseRender.h69
-rw-r--r--demo/d3d11/diffuseRenderD3D11.cpp (renamed from demo/d3d11/diffuseRender.cpp)103
-rw-r--r--demo/d3d11/diffuseRenderD3D11.h76
-rw-r--r--demo/d3d11/fluidRender.cpp458
-rw-r--r--demo/d3d11/fluidRender.h126
-rw-r--r--demo/d3d11/fluidRenderD3D11.cpp365
-rw-r--r--demo/d3d11/fluidRenderD3D11.h109
-rw-r--r--demo/d3d11/imguiGraph.h29
-rw-r--r--demo/d3d11/imguiGraphD3D11.cpp44
-rw-r--r--demo/d3d11/imguiGraphD3D11.h50
-rw-r--r--demo/d3d11/imguiInteropD3D11.cpp51
-rw-r--r--demo/d3d11/meshRender.cpp221
-rw-r--r--demo/d3d11/meshRender.h297
-rw-r--r--demo/d3d11/meshRenderD3D11.cpp341
-rw-r--r--demo/d3d11/meshRenderD3D11.h74
-rw-r--r--demo/d3d11/pointRender.h88
-rw-r--r--demo/d3d11/pointRenderD3D11.cpp (renamed from demo/d3d11/pointRender.cpp)111
-rw-r--r--demo/d3d11/pointRenderD3D11.h43
-rw-r--r--demo/d3d11/renderTargetD3D11.cpp (renamed from demo/d3d11/renderTarget.cpp)8
-rw-r--r--demo/d3d11/renderTargetD3D11.h (renamed from demo/d3d11/renderTarget.h)8
-rw-r--r--demo/d3d11/shaders/diffuseGS.hlsl176
-rw-r--r--demo/d3d11/shaders/ellipsoidDepthGS.hlsl127
-rw-r--r--demo/d3d11/shaders/ellipsoidDepthPS.hlsl.h662
-rw-r--r--demo/d3d11/shaders/ellipsoidDepthVS.hlsl195
-rw-r--r--demo/d3d11/shaders/meshVS.hlsl91
-rw-r--r--demo/d3d11/shaders/passThroughVS.hlsl26
-rw-r--r--demo/d3d11/shaders/pointGS.hlsl84
-rw-r--r--demo/d3d11/shaders/pointPS.hlsl103
-rw-r--r--demo/d3d11/shadersD3D11.cpp1041
-rw-r--r--demo/d3d11/shadowMapD3D11.cpp (renamed from demo/d3d11/shadowMap.cpp)12
-rw-r--r--demo/d3d11/shadowMapD3D11.h (renamed from demo/d3d11/shadowMap.h)5
-rw-r--r--demo/d3d12/NvCoDx12CircularResourceHeap.cpp204
-rw-r--r--demo/d3d12/NvCoDx12CircularResourceHeap.h234
-rw-r--r--demo/d3d12/NvCoDx12CounterFence.cpp71
-rw-r--r--demo/d3d12/NvCoDx12CounterFence.h82
-rw-r--r--demo/d3d12/NvCoDx12DescriptorHeap.cpp54
-rw-r--r--demo/d3d12/NvCoDx12DescriptorHeap.h116
-rw-r--r--demo/d3d12/NvCoDx12Handle.h162
-rw-r--r--demo/d3d12/NvCoDx12HelperUtil.cpp89
-rw-r--r--demo/d3d12/NvCoDx12HelperUtil.h52
-rw-r--r--demo/d3d12/NvCoDx12RenderTarget.cpp324
-rw-r--r--demo/d3d12/NvCoDx12RenderTarget.h122
-rw-r--r--demo/d3d12/NvCoDx12Resource.cpp167
-rw-r--r--demo/d3d12/NvCoDx12Resource.h140
-rw-r--r--demo/d3d12/NvCoDx12ResourceScopeManager.cpp179
-rw-r--r--demo/d3d12/NvCoDx12ResourceScopeManager.h100
-rw-r--r--demo/d3d12/NvCoDxDebugUtil.cpp32
-rw-r--r--demo/d3d12/NvCoDxDebugUtil.h37
-rw-r--r--demo/d3d12/NvCoDxFormatUtil.cpp173
-rw-r--r--demo/d3d12/NvCoDxFormatUtil.h41
-rw-r--r--demo/d3d12/NvCoFreeList.cpp232
-rw-r--r--demo/d3d12/NvCoFreeList.h154
-rw-r--r--demo/d3d12/NvResult.h137
-rw-r--r--demo/d3d12/appD3D12Ctx.cpp1210
-rw-r--r--demo/d3d12/appD3D12Ctx.h181
-rw-r--r--demo/d3d12/bufferD3D12.cpp118
-rw-r--r--demo/d3d12/bufferD3D12.h38
-rw-r--r--demo/d3d12/demoContextD3D12.cpp1410
-rw-r--r--demo/d3d12/demoContextD3D12.h256
-rw-r--r--demo/d3d12/diffusePointRenderPipelineD3D12.cpp223
-rw-r--r--demo/d3d12/diffusePointRenderPipelineD3D12.h54
-rw-r--r--demo/d3d12/fluidCompositeRenderPipelineD3D12.cpp166
-rw-r--r--demo/d3d12/fluidCompositeRenderPipelineD3D12.h54
-rw-r--r--demo/d3d12/fluidEllipsoidRenderPipelineD3D12.cpp176
-rw-r--r--demo/d3d12/fluidEllipsoidRenderPipelineD3D12.h60
-rw-r--r--demo/d3d12/fluidSmoothRenderPipelineD3D12.cpp158
-rw-r--r--demo/d3d12/fluidSmoothRenderPipelineD3D12.h55
-rw-r--r--demo/d3d12/imguiGraphD3D12.cpp667
-rw-r--r--demo/d3d12/imguiGraphD3D12.h91
-rw-r--r--demo/d3d12/imguiInteropD3D12.cpp61
-rw-r--r--demo/d3d12/lineRenderPipelineD3D12.cpp140
-rw-r--r--demo/d3d12/lineRenderPipelineD3D12.h65
-rw-r--r--demo/d3d12/meshRenderPipelineD3D12.cpp284
-rw-r--r--demo/d3d12/meshRenderPipelineD3D12.h66
-rw-r--r--demo/d3d12/meshRenderer.cpp15
-rw-r--r--demo/d3d12/meshRenderer.h194
-rw-r--r--demo/d3d12/meshRendererD3D12.cpp419
-rw-r--r--demo/d3d12/meshRendererD3D12.h175
-rw-r--r--demo/d3d12/meshUtil.cpp33
-rw-r--r--demo/d3d12/meshUtil.h26
-rw-r--r--demo/d3d12/pipelineUtilD3D12.cpp78
-rw-r--r--demo/d3d12/pipelineUtilD3D12.h37
-rw-r--r--demo/d3d12/pointRenderPipelineD3D12.cpp227
-rw-r--r--demo/d3d12/pointRenderPipelineD3D12.h60
-rw-r--r--demo/d3d12/renderStateD3D12.cpp67
-rw-r--r--demo/d3d12/renderStateD3D12.h74
-rw-r--r--demo/helpers.h104
-rw-r--r--demo/imgui.cpp180
-rw-r--r--demo/imgui.h18
-rw-r--r--demo/main.cpp722
-rw-r--r--demo/opengl/shadersGL.cpp379
-rw-r--r--demo/scenes.h2
-rw-r--r--demo/scenes/adhesion.h1
-rw-r--r--demo/scenes/armadilloshower.h1
-rw-r--r--demo/scenes/bouyancy.h1
-rw-r--r--demo/scenes/bunnybath.h1
-rw-r--r--demo/scenes/ccdfluid.h1
-rw-r--r--demo/scenes/dambreak.h1
-rw-r--r--demo/scenes/debris.h7
-rw-r--r--demo/scenes/envcloth.h5
-rw-r--r--demo/scenes/fluidblock.h1
-rw-r--r--demo/scenes/fluidclothcoupling.h1
-rw-r--r--demo/scenes/forcefield.h2
-rw-r--r--demo/scenes/gamemesh.h3
-rw-r--r--demo/scenes/googun.h1
-rw-r--r--demo/scenes/granularpile.h7
-rw-r--r--demo/scenes/granularshape.h3
-rw-r--r--demo/scenes/inflatable.h2
-rw-r--r--demo/scenes/lighthouse.h1
-rw-r--r--demo/scenes/localspacecloth.h1
-rw-r--r--demo/scenes/localspacefluid.h1
-rw-r--r--demo/scenes/lowdimensionalshapes.h1
-rw-r--r--demo/scenes/melting.h3
-rw-r--r--demo/scenes/mixedpile.h7
-rw-r--r--demo/scenes/parachutingbunnies.h1
-rw-r--r--demo/scenes/plasticstack.h50
-rw-r--r--demo/scenes/player.h4
-rw-r--r--demo/scenes/rayleightaylor.h2
-rw-r--r--demo/scenes/rigidfluidcoupling.h5
-rw-r--r--demo/scenes/rigidrotation.h20
-rw-r--r--demo/scenes/rockpool.h3
-rw-r--r--demo/scenes/shapechannels.h48
-rw-r--r--demo/scenes/softbody.h350
-rw-r--r--demo/scenes/surfacetension.h1
-rw-r--r--demo/scenes/tearing.h6
-rw-r--r--demo/scenes/thinbox.h1
-rw-r--r--demo/scenes/triggervolume.h4
-rw-r--r--demo/scenes/viscosity.h3
-rw-r--r--demo/scenes/waterballoon.h8
-rw-r--r--demo/shaders.h108
-rw-r--r--doc/.buildinfo2
-rw-r--r--doc/_sources/manual.txt107
-rw-r--r--doc/_static/api/_nv_flex_8h.html942
-rw-r--r--doc/_static/api/_nv_flex_8h_source.html1227
-rw-r--r--doc/_static/api/_nv_flex_device_8h.html4
-rw-r--r--doc/_static/api/_nv_flex_device_8h_source.html4
-rw-r--r--doc/_static/api/_nv_flex_ext_8h.html42
-rw-r--r--doc/_static/api/_nv_flex_ext_8h_source.html905
-rw-r--r--doc/_static/api/dir_d44c64559bbebec7f509842c48db8b23.html4
-rw-r--r--doc/_static/api/files.html4
-rw-r--r--doc/_static/api/globals.html121
-rw-r--r--doc/_static/api/globals_enum.html7
-rw-r--r--doc/_static/api/globals_eval.html49
-rw-r--r--doc/_static/api/globals_func.html73
-rw-r--r--doc/_static/api/globals_type.html4
-rw-r--r--doc/_static/api/index.html4
-rw-r--r--doc/_static/api/struct_nv_flex_solver_callback.html4
-rw-r--r--doc/_static/api/struct_nv_flex_vector.html48
-rw-r--r--doc/genindex.html33
-rw-r--r--doc/index.html33
-rw-r--r--doc/manual.html128
-rw-r--r--doc/objects.invbin604 -> 604 bytes
-rw-r--r--doc/releasenotes.html99
-rw-r--r--doc/search.html33
-rw-r--r--doc/searchindex.js2
-rw-r--r--extensions/compiler/makeandroid/Makefile19
-rw-r--r--extensions/compiler/makeandroid/Makefile.flexExtCUDA.mk48
-rw-r--r--extensions/compiler/makeandroid_aarch64/Makefile202
-rw-r--r--extensions/compiler/makeandroid_aarch64/Makefile.flexCUDA.mk227
-rw-r--r--extensions/compiler/makeandroid_aarch64/Makefile.flexExtCUDA.mk207
-rw-r--r--extensions/compiler/vc12win32/vc120.pdbbin487424 -> 528384 bytes
-rw-r--r--extensions/compiler/vc12win64/vc120.pdbbin479232 -> 528384 bytes
-rw-r--r--extensions/compiler/vc14win32/vc140.pdbbin0 -> 405504 bytes
-rw-r--r--extensions/compiler/xpj/flexExtCUDA.xpj44
-rw-r--r--extensions/compiler/xpj/flexExtD3D12.xpj170
-rw-r--r--extensions/dx/flexExt.cpp2
-rw-r--r--extensions/flexExtContainer.cpp86
-rw-r--r--extensions/flexExtRigid.cpp51
-rw-r--r--extensions/flexExtSoft.cpp66
-rw-r--r--external/D3D12/include/PIXEventsCommon.h491
-rw-r--r--external/D3D12/include/PIXEventsGenerated.h10754
-rw-r--r--external/D3D12/include/dxgi.h2953
-rw-r--r--external/D3D12/include/dxgi1_2.h2474
-rw-r--r--external/D3D12/include/dxgi1_3.h2121
-rw-r--r--external/D3D12/include/dxgi1_4.h1494
-rw-r--r--external/D3D12/include/dxgitype.h149
-rw-r--r--external/D3D12/include/pix3.h126
-rw-r--r--external/D3D12/include/pix3_win.h61
-rw-r--r--external/cub-1.3.2/cub/warp/specializations/warp_scan_smem.cuh3
-rw-r--r--include/NvFlex.h342
-rw-r--r--include/NvFlexExt.h17
-rw-r--r--lib/linux64/NvFlexDebugCUDA_x64.abin3566368 -> 3663958 bytes
-rw-r--r--lib/linux64/NvFlexDeviceDebug_x64.abin21700 -> 21700 bytes
-rw-r--r--lib/linux64/NvFlexDeviceRelease_x64.abin6188 -> 6188 bytes
-rw-r--r--lib/linux64/NvFlexExtDebugCUDA_x64.abin4093552 -> 4101330 bytes
-rw-r--r--lib/linux64/NvFlexExtReleaseCUDA_x64.abin276022 -> 282496 bytes
-rw-r--r--lib/linux64/NvFlexReleaseCUDA_x64.abin3442176 -> 3539766 bytes
-rw-r--r--lib/win32/NvFlexDebugCUDA_x86.libbin17800 -> 19860 bytes
-rw-r--r--lib/win32/NvFlexDebugD3D_x86.libbin22558 -> 24802 bytes
-rw-r--r--lib/win32/NvFlexDeviceDebug_x86.libbin2766 -> 2766 bytes
-rw-r--r--lib/win32/NvFlexDeviceRelease_x86.libbin2796 -> 2796 bytes
-rw-r--r--lib/win32/NvFlexExtDebugCUDA_x86.libbin11256 -> 11842 bytes
-rw-r--r--lib/win32/NvFlexExtDebugD3D_x86.libbin11204 -> 11788 bytes
-rw-r--r--lib/win32/NvFlexExtReleaseCUDA_x86.libbin11350 -> 11940 bytes
-rw-r--r--lib/win32/NvFlexExtReleaseD3D_x86.libbin11298 -> 11886 bytes
-rw-r--r--lib/win32/NvFlexReleaseCUDA_x86.libbin17958 -> 20034 bytes
-rw-r--r--lib/win32/NvFlexReleaseD3D_x86.libbin22742 -> 25004 bytes
-rw-r--r--lib/win64/NvFlexDebugCUDA_x64.libbin17466 -> 19486 bytes
-rw-r--r--lib/win64/NvFlexDebugD3D_x64.libbin22288 -> 24486 bytes
-rw-r--r--lib/win64/NvFlexDeviceDebug_x64.libbin2774 -> 2774 bytes
-rw-r--r--lib/win64/NvFlexDeviceRelease_x64.libbin2804 -> 2804 bytes
-rw-r--r--lib/win64/NvFlexExtDebugCUDA_x64.libbin11086 -> 11662 bytes
-rw-r--r--lib/win64/NvFlexExtDebugD3D_x64.libbin11040 -> 11614 bytes
-rw-r--r--lib/win64/NvFlexExtReleaseCUDA_x64.libbin11180 -> 11760 bytes
-rw-r--r--lib/win64/NvFlexExtReleaseD3D_x64.libbin11134 -> 11712 bytes
-rw-r--r--lib/win64/NvFlexReleaseCUDA_x64.libbin17624 -> 19660 bytes
-rw-r--r--lib/win64/NvFlexReleaseD3D_x64.libbin22472 -> 24688 bytes
-rw-r--r--release_notes.txt25
-rw-r--r--src/dx/context/Context.h37
-rw-r--r--src/dx/context/Device.h12
-rw-r--r--src/dx/context/NvFlexTypes.h1
365 files changed, 48973 insertions, 11913 deletions
diff --git a/.gitignore b/.gitignore
index 4c58b9b..7f06484 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,8 @@
+# we do not store binary outputs in Flex
+
+# windows
+*.exp
+*.ilk
+
# android
*.apk \ No newline at end of file
diff --git a/README.md b/README.md
index 179054c..3dab564 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-NVIDIA Flex - 1.1.0
+NVIDIA Flex - 1.2.0
===================
Flex is a particle-based simulation library designed for real-time applications.
@@ -92,7 +92,7 @@ Known Issues
============
* Crash with inflatable scenes on Intel HD Graphics 530
-
+* MSAA is broken on D3D12 and currently disabled
Acknowledgements
================
diff --git a/bin/linux64/NvFlexDemoDebugCUDA_x64 b/bin/linux64/NvFlexDemoDebugCUDA_x64
index e2a12a7..5804292 100644
--- a/bin/linux64/NvFlexDemoDebugCUDA_x64
+++ b/bin/linux64/NvFlexDemoDebugCUDA_x64
Binary files differ
diff --git a/bin/linux64/NvFlexDemoReleaseCUDA_x64 b/bin/linux64/NvFlexDemoReleaseCUDA_x64
index 6964559..d5c6b22 100644
--- a/bin/linux64/NvFlexDemoReleaseCUDA_x64
+++ b/bin/linux64/NvFlexDemoReleaseCUDA_x64
Binary files differ
diff --git a/bin/win32/NvFlexDebugCUDA_x86.dll b/bin/win32/NvFlexDebugCUDA_x86.dll
index a5db95e..6cf58ef 100644
--- a/bin/win32/NvFlexDebugCUDA_x86.dll
+++ b/bin/win32/NvFlexDebugCUDA_x86.dll
Binary files differ
diff --git a/bin/win32/NvFlexDebugCUDA_x86.dll.pdb b/bin/win32/NvFlexDebugCUDA_x86.dll.pdb
index f089e3d..64b575d 100644
--- a/bin/win32/NvFlexDebugCUDA_x86.dll.pdb
+++ b/bin/win32/NvFlexDebugCUDA_x86.dll.pdb
Binary files differ
diff --git a/bin/win32/NvFlexDebugD3D_x86.dll b/bin/win32/NvFlexDebugD3D_x86.dll
index 5a47117..e9bd619 100644
--- a/bin/win32/NvFlexDebugD3D_x86.dll
+++ b/bin/win32/NvFlexDebugD3D_x86.dll
Binary files differ
diff --git a/bin/win32/NvFlexDebugD3D_x86.dll.pdb b/bin/win32/NvFlexDebugD3D_x86.dll.pdb
index 6e0d513..6de77b3 100644
--- a/bin/win32/NvFlexDebugD3D_x86.dll.pdb
+++ b/bin/win32/NvFlexDebugD3D_x86.dll.pdb
Binary files differ
diff --git a/bin/win32/NvFlexDemoDebugCUDA_x86.exe b/bin/win32/NvFlexDemoDebugCUDA_x86.exe
index c2de79a..163b8b1 100644
--- a/bin/win32/NvFlexDemoDebugCUDA_x86.exe
+++ b/bin/win32/NvFlexDemoDebugCUDA_x86.exe
Binary files differ
diff --git a/bin/win32/NvFlexDemoDebugCUDA_x86.exe.pdb b/bin/win32/NvFlexDemoDebugCUDA_x86.exe.pdb
index 86df5af..db5d77c 100644
--- a/bin/win32/NvFlexDemoDebugCUDA_x86.exe.pdb
+++ b/bin/win32/NvFlexDemoDebugCUDA_x86.exe.pdb
Binary files differ
diff --git a/bin/win32/NvFlexDemoDebugD3D_x86.exe b/bin/win32/NvFlexDemoDebugD3D_x86.exe
index 9c2b4c7..5e96714 100644
--- a/bin/win32/NvFlexDemoDebugD3D_x86.exe
+++ b/bin/win32/NvFlexDemoDebugD3D_x86.exe
Binary files differ
diff --git a/bin/win32/NvFlexDemoDebugD3D_x86.exe.pdb b/bin/win32/NvFlexDemoDebugD3D_x86.exe.pdb
index 762ef24..479454d 100644
--- a/bin/win32/NvFlexDemoDebugD3D_x86.exe.pdb
+++ b/bin/win32/NvFlexDemoDebugD3D_x86.exe.pdb
Binary files differ
diff --git a/bin/win32/NvFlexDemoReleaseCUDA_x86.exe b/bin/win32/NvFlexDemoReleaseCUDA_x86.exe
index bf27faa..5a4dffc 100644
--- a/bin/win32/NvFlexDemoReleaseCUDA_x86.exe
+++ b/bin/win32/NvFlexDemoReleaseCUDA_x86.exe
Binary files differ
diff --git a/bin/win32/NvFlexDemoReleaseCUDA_x86.exe.pdb b/bin/win32/NvFlexDemoReleaseCUDA_x86.exe.pdb
index c2a7a3d..18533e8 100644
--- a/bin/win32/NvFlexDemoReleaseCUDA_x86.exe.pdb
+++ b/bin/win32/NvFlexDemoReleaseCUDA_x86.exe.pdb
Binary files differ
diff --git a/bin/win32/NvFlexDemoReleaseD3D_x86.exe b/bin/win32/NvFlexDemoReleaseD3D_x86.exe
index 73691dc..2e7a852 100644
--- a/bin/win32/NvFlexDemoReleaseD3D_x86.exe
+++ b/bin/win32/NvFlexDemoReleaseD3D_x86.exe
Binary files differ
diff --git a/bin/win32/NvFlexDemoReleaseD3D_x86.exe.pdb b/bin/win32/NvFlexDemoReleaseD3D_x86.exe.pdb
index 5c3f7fb..5d9f2e6 100644
--- a/bin/win32/NvFlexDemoReleaseD3D_x86.exe.pdb
+++ b/bin/win32/NvFlexDemoReleaseD3D_x86.exe.pdb
Binary files differ
diff --git a/bin/win32/NvFlexDeviceDebug_x86.dll b/bin/win32/NvFlexDeviceDebug_x86.dll
index 3cebdf2..1a516d9 100644
--- a/bin/win32/NvFlexDeviceDebug_x86.dll
+++ b/bin/win32/NvFlexDeviceDebug_x86.dll
Binary files differ
diff --git a/bin/win32/NvFlexDeviceDebug_x86.dll.pdb b/bin/win32/NvFlexDeviceDebug_x86.dll.pdb
index 7cfdc33..1c22469 100644
--- a/bin/win32/NvFlexDeviceDebug_x86.dll.pdb
+++ b/bin/win32/NvFlexDeviceDebug_x86.dll.pdb
Binary files differ
diff --git a/bin/win32/NvFlexDeviceRelease_x86.dll b/bin/win32/NvFlexDeviceRelease_x86.dll
index 9cd3bdb..304c17a 100644
--- a/bin/win32/NvFlexDeviceRelease_x86.dll
+++ b/bin/win32/NvFlexDeviceRelease_x86.dll
Binary files differ
diff --git a/bin/win32/NvFlexDeviceRelease_x86.dll.pdb b/bin/win32/NvFlexDeviceRelease_x86.dll.pdb
index d12ec64..fd3e6be 100644
--- a/bin/win32/NvFlexDeviceRelease_x86.dll.pdb
+++ b/bin/win32/NvFlexDeviceRelease_x86.dll.pdb
Binary files differ
diff --git a/bin/win32/NvFlexExtDebugCUDA_x86.dll b/bin/win32/NvFlexExtDebugCUDA_x86.dll
index a545cab..43c77cd 100644
--- a/bin/win32/NvFlexExtDebugCUDA_x86.dll
+++ b/bin/win32/NvFlexExtDebugCUDA_x86.dll
Binary files differ
diff --git a/bin/win32/NvFlexExtDebugCUDA_x86.dll.pdb b/bin/win32/NvFlexExtDebugCUDA_x86.dll.pdb
index 82c1754..b201c82 100644
--- a/bin/win32/NvFlexExtDebugCUDA_x86.dll.pdb
+++ b/bin/win32/NvFlexExtDebugCUDA_x86.dll.pdb
Binary files differ
diff --git a/bin/win32/NvFlexExtDebugD3D_x86.dll b/bin/win32/NvFlexExtDebugD3D_x86.dll
index 2d2842f..c32ee68 100644
--- a/bin/win32/NvFlexExtDebugD3D_x86.dll
+++ b/bin/win32/NvFlexExtDebugD3D_x86.dll
Binary files differ
diff --git a/bin/win32/NvFlexExtDebugD3D_x86.dll.pdb b/bin/win32/NvFlexExtDebugD3D_x86.dll.pdb
index 049cf6b..e269107 100644
--- a/bin/win32/NvFlexExtDebugD3D_x86.dll.pdb
+++ b/bin/win32/NvFlexExtDebugD3D_x86.dll.pdb
Binary files differ
diff --git a/bin/win32/NvFlexExtReleaseCUDA_x86.dll b/bin/win32/NvFlexExtReleaseCUDA_x86.dll
index 2aad0be..ec0ef32 100644
--- a/bin/win32/NvFlexExtReleaseCUDA_x86.dll
+++ b/bin/win32/NvFlexExtReleaseCUDA_x86.dll
Binary files differ
diff --git a/bin/win32/NvFlexExtReleaseCUDA_x86.dll.pdb b/bin/win32/NvFlexExtReleaseCUDA_x86.dll.pdb
index d091f2d..e4bc9fc 100644
--- a/bin/win32/NvFlexExtReleaseCUDA_x86.dll.pdb
+++ b/bin/win32/NvFlexExtReleaseCUDA_x86.dll.pdb
Binary files differ
diff --git a/bin/win32/NvFlexExtReleaseD3D_x86.dll b/bin/win32/NvFlexExtReleaseD3D_x86.dll
index ceb283f..9885ddc 100644
--- a/bin/win32/NvFlexExtReleaseD3D_x86.dll
+++ b/bin/win32/NvFlexExtReleaseD3D_x86.dll
Binary files differ
diff --git a/bin/win32/NvFlexExtReleaseD3D_x86.dll.pdb b/bin/win32/NvFlexExtReleaseD3D_x86.dll.pdb
index c5c29d8..86d816e 100644
--- a/bin/win32/NvFlexExtReleaseD3D_x86.dll.pdb
+++ b/bin/win32/NvFlexExtReleaseD3D_x86.dll.pdb
Binary files differ
diff --git a/bin/win32/NvFlexReleaseCUDA_x86.dll b/bin/win32/NvFlexReleaseCUDA_x86.dll
index 994c078..7ef55d7 100644
--- a/bin/win32/NvFlexReleaseCUDA_x86.dll
+++ b/bin/win32/NvFlexReleaseCUDA_x86.dll
Binary files differ
diff --git a/bin/win32/NvFlexReleaseCUDA_x86.dll.pdb b/bin/win32/NvFlexReleaseCUDA_x86.dll.pdb
index 645def3..64513ec 100644
--- a/bin/win32/NvFlexReleaseCUDA_x86.dll.pdb
+++ b/bin/win32/NvFlexReleaseCUDA_x86.dll.pdb
Binary files differ
diff --git a/bin/win32/NvFlexReleaseD3D_x86.dll b/bin/win32/NvFlexReleaseD3D_x86.dll
index 40e4000..430f0a2 100644
--- a/bin/win32/NvFlexReleaseD3D_x86.dll
+++ b/bin/win32/NvFlexReleaseD3D_x86.dll
Binary files differ
diff --git a/bin/win32/NvFlexReleaseD3D_x86.dll.pdb b/bin/win32/NvFlexReleaseD3D_x86.dll.pdb
index 66b51b1..b15bcc9 100644
--- a/bin/win32/NvFlexReleaseD3D_x86.dll.pdb
+++ b/bin/win32/NvFlexReleaseD3D_x86.dll.pdb
Binary files differ
diff --git a/bin/win32/nvToolsExt32_1.dll b/bin/win32/nvToolsExt32_1.dll
new file mode 100644
index 0000000..ccba99b
--- /dev/null
+++ b/bin/win32/nvToolsExt32_1.dll
Binary files differ
diff --git a/bin/win64/NvFlexDebugCUDA_x64.dll b/bin/win64/NvFlexDebugCUDA_x64.dll
index f6766b8..2881f01 100644
--- a/bin/win64/NvFlexDebugCUDA_x64.dll
+++ b/bin/win64/NvFlexDebugCUDA_x64.dll
Binary files differ
diff --git a/bin/win64/NvFlexDebugCUDA_x64.dll.pdb b/bin/win64/NvFlexDebugCUDA_x64.dll.pdb
index f5a7bb7..3ed3ac8 100644
--- a/bin/win64/NvFlexDebugCUDA_x64.dll.pdb
+++ b/bin/win64/NvFlexDebugCUDA_x64.dll.pdb
Binary files differ
diff --git a/bin/win64/NvFlexDebugD3D_x64.dll b/bin/win64/NvFlexDebugD3D_x64.dll
index 3987e11..de835e4 100644
--- a/bin/win64/NvFlexDebugD3D_x64.dll
+++ b/bin/win64/NvFlexDebugD3D_x64.dll
Binary files differ
diff --git a/bin/win64/NvFlexDebugD3D_x64.dll.pdb b/bin/win64/NvFlexDebugD3D_x64.dll.pdb
index eebd8af..d06f951 100644
--- a/bin/win64/NvFlexDebugD3D_x64.dll.pdb
+++ b/bin/win64/NvFlexDebugD3D_x64.dll.pdb
Binary files differ
diff --git a/bin/win64/NvFlexDemoDebugCUDA_x64.exe b/bin/win64/NvFlexDemoDebugCUDA_x64.exe
index 161b37e..3a4e649 100644
--- a/bin/win64/NvFlexDemoDebugCUDA_x64.exe
+++ b/bin/win64/NvFlexDemoDebugCUDA_x64.exe
Binary files differ
diff --git a/bin/win64/NvFlexDemoDebugCUDA_x64.exe.pdb b/bin/win64/NvFlexDemoDebugCUDA_x64.exe.pdb
index a066993..b439215 100644
--- a/bin/win64/NvFlexDemoDebugCUDA_x64.exe.pdb
+++ b/bin/win64/NvFlexDemoDebugCUDA_x64.exe.pdb
Binary files differ
diff --git a/bin/win64/NvFlexDemoDebugD3D_x64.exe b/bin/win64/NvFlexDemoDebugD3D_x64.exe
index 75773b4..dd4c12f 100644
--- a/bin/win64/NvFlexDemoDebugD3D_x64.exe
+++ b/bin/win64/NvFlexDemoDebugD3D_x64.exe
Binary files differ
diff --git a/bin/win64/NvFlexDemoDebugD3D_x64.exe.pdb b/bin/win64/NvFlexDemoDebugD3D_x64.exe.pdb
index a976c83..377c4d3 100644
--- a/bin/win64/NvFlexDemoDebugD3D_x64.exe.pdb
+++ b/bin/win64/NvFlexDemoDebugD3D_x64.exe.pdb
Binary files differ
diff --git a/bin/win64/NvFlexDemoReleaseCUDA_x64.exe b/bin/win64/NvFlexDemoReleaseCUDA_x64.exe
index a5e1d87..0bc8026 100644
--- a/bin/win64/NvFlexDemoReleaseCUDA_x64.exe
+++ b/bin/win64/NvFlexDemoReleaseCUDA_x64.exe
Binary files differ
diff --git a/bin/win64/NvFlexDemoReleaseCUDA_x64.exe.pdb b/bin/win64/NvFlexDemoReleaseCUDA_x64.exe.pdb
index 2fac616..61e3b97 100644
--- a/bin/win64/NvFlexDemoReleaseCUDA_x64.exe.pdb
+++ b/bin/win64/NvFlexDemoReleaseCUDA_x64.exe.pdb
Binary files differ
diff --git a/bin/win64/NvFlexDemoReleaseD3D_x64.exe b/bin/win64/NvFlexDemoReleaseD3D_x64.exe
index 6d22653..32bf4dc 100644
--- a/bin/win64/NvFlexDemoReleaseD3D_x64.exe
+++ b/bin/win64/NvFlexDemoReleaseD3D_x64.exe
Binary files differ
diff --git a/bin/win64/NvFlexDemoReleaseD3D_x64.exe.pdb b/bin/win64/NvFlexDemoReleaseD3D_x64.exe.pdb
index 32c586d..85e2cb7 100644
--- a/bin/win64/NvFlexDemoReleaseD3D_x64.exe.pdb
+++ b/bin/win64/NvFlexDemoReleaseD3D_x64.exe.pdb
Binary files differ
diff --git a/bin/win64/NvFlexDeviceDebug_x64.dll b/bin/win64/NvFlexDeviceDebug_x64.dll
index c456adf..25a929a 100644
--- a/bin/win64/NvFlexDeviceDebug_x64.dll
+++ b/bin/win64/NvFlexDeviceDebug_x64.dll
Binary files differ
diff --git a/bin/win64/NvFlexDeviceDebug_x64.dll.pdb b/bin/win64/NvFlexDeviceDebug_x64.dll.pdb
index 0ca8c85..56d28fd 100644
--- a/bin/win64/NvFlexDeviceDebug_x64.dll.pdb
+++ b/bin/win64/NvFlexDeviceDebug_x64.dll.pdb
Binary files differ
diff --git a/bin/win64/NvFlexDeviceRelease_x64.dll b/bin/win64/NvFlexDeviceRelease_x64.dll
index 11d6e7f..2f07259 100644
--- a/bin/win64/NvFlexDeviceRelease_x64.dll
+++ b/bin/win64/NvFlexDeviceRelease_x64.dll
Binary files differ
diff --git a/bin/win64/NvFlexDeviceRelease_x64.dll.pdb b/bin/win64/NvFlexDeviceRelease_x64.dll.pdb
index 53fbe4c..4223b08 100644
--- a/bin/win64/NvFlexDeviceRelease_x64.dll.pdb
+++ b/bin/win64/NvFlexDeviceRelease_x64.dll.pdb
Binary files differ
diff --git a/bin/win64/NvFlexExtDebugCUDA_x64.dll b/bin/win64/NvFlexExtDebugCUDA_x64.dll
index 1c2d5b9..b45d858 100644
--- a/bin/win64/NvFlexExtDebugCUDA_x64.dll
+++ b/bin/win64/NvFlexExtDebugCUDA_x64.dll
Binary files differ
diff --git a/bin/win64/NvFlexExtDebugCUDA_x64.dll.pdb b/bin/win64/NvFlexExtDebugCUDA_x64.dll.pdb
index 7d5c6c0..741c4ae 100644
--- a/bin/win64/NvFlexExtDebugCUDA_x64.dll.pdb
+++ b/bin/win64/NvFlexExtDebugCUDA_x64.dll.pdb
Binary files differ
diff --git a/bin/win64/NvFlexExtDebugD3D_x64.dll b/bin/win64/NvFlexExtDebugD3D_x64.dll
index 4c95ce1..1953ec7 100644
--- a/bin/win64/NvFlexExtDebugD3D_x64.dll
+++ b/bin/win64/NvFlexExtDebugD3D_x64.dll
Binary files differ
diff --git a/bin/win64/NvFlexExtDebugD3D_x64.dll.pdb b/bin/win64/NvFlexExtDebugD3D_x64.dll.pdb
index 1e1d2b4..2e4e542 100644
--- a/bin/win64/NvFlexExtDebugD3D_x64.dll.pdb
+++ b/bin/win64/NvFlexExtDebugD3D_x64.dll.pdb
Binary files differ
diff --git a/bin/win64/NvFlexExtReleaseCUDA_x64.dll b/bin/win64/NvFlexExtReleaseCUDA_x64.dll
index b887851..b45e0a5 100644
--- a/bin/win64/NvFlexExtReleaseCUDA_x64.dll
+++ b/bin/win64/NvFlexExtReleaseCUDA_x64.dll
Binary files differ
diff --git a/bin/win64/NvFlexExtReleaseCUDA_x64.dll.pdb b/bin/win64/NvFlexExtReleaseCUDA_x64.dll.pdb
index 74034fd..070ec30 100644
--- a/bin/win64/NvFlexExtReleaseCUDA_x64.dll.pdb
+++ b/bin/win64/NvFlexExtReleaseCUDA_x64.dll.pdb
Binary files differ
diff --git a/bin/win64/NvFlexExtReleaseD3D_x64.dll b/bin/win64/NvFlexExtReleaseD3D_x64.dll
index 46e0973..fdac877 100644
--- a/bin/win64/NvFlexExtReleaseD3D_x64.dll
+++ b/bin/win64/NvFlexExtReleaseD3D_x64.dll
Binary files differ
diff --git a/bin/win64/NvFlexExtReleaseD3D_x64.dll.pdb b/bin/win64/NvFlexExtReleaseD3D_x64.dll.pdb
index 70067d4..5fa99fa 100644
--- a/bin/win64/NvFlexExtReleaseD3D_x64.dll.pdb
+++ b/bin/win64/NvFlexExtReleaseD3D_x64.dll.pdb
Binary files differ
diff --git a/bin/win64/NvFlexReleaseCUDA_x64.dll b/bin/win64/NvFlexReleaseCUDA_x64.dll
index f443ff6..1809418 100644
--- a/bin/win64/NvFlexReleaseCUDA_x64.dll
+++ b/bin/win64/NvFlexReleaseCUDA_x64.dll
Binary files differ
diff --git a/bin/win64/NvFlexReleaseCUDA_x64.dll.pdb b/bin/win64/NvFlexReleaseCUDA_x64.dll.pdb
index 26751ae..97d7051 100644
--- a/bin/win64/NvFlexReleaseCUDA_x64.dll.pdb
+++ b/bin/win64/NvFlexReleaseCUDA_x64.dll.pdb
Binary files differ
diff --git a/bin/win64/NvFlexReleaseD3D_x64.dll b/bin/win64/NvFlexReleaseD3D_x64.dll
index 8eb99a6..94ab368 100644
--- a/bin/win64/NvFlexReleaseD3D_x64.dll
+++ b/bin/win64/NvFlexReleaseD3D_x64.dll
Binary files differ
diff --git a/bin/win64/NvFlexReleaseD3D_x64.dll.pdb b/bin/win64/NvFlexReleaseD3D_x64.dll.pdb
index e7dfcc3..6c140fc 100644
--- a/bin/win64/NvFlexReleaseD3D_x64.dll.pdb
+++ b/bin/win64/NvFlexReleaseD3D_x64.dll.pdb
Binary files differ
diff --git a/bin/win64/nvToolsExt64_1.dll b/bin/win64/nvToolsExt64_1.dll
new file mode 100644
index 0000000..b5c05d9
--- /dev/null
+++ b/bin/win64/nvToolsExt64_1.dll
Binary files differ
diff --git a/core/core.h b/core/core.h
index 7c7d940..48a2918 100644
--- a/core/core.h
+++ b/core/core.h
@@ -37,7 +37,7 @@
#define VERBOSE(a)
#endif
-#define Super __super
+//#define Super __super
// basically just a collection of macros and types
#ifndef UNUSED
diff --git a/core/platform.cpp b/core/platform.cpp
index 8846e9b..8c451ab 100644
--- a/core/platform.cpp
+++ b/core/platform.cpp
@@ -39,7 +39,7 @@
using namespace std;
-#ifdef WIN32
+#if defined(WIN32) || defined(WIN64)
#include <windows.h>
#include <commdlg.h>
diff --git a/core/platform.h b/core/platform.h
index 9b7a473..b58d03f 100644
--- a/core/platform.h
+++ b/core/platform.h
@@ -44,7 +44,7 @@ std::string GetWorkingDirectory();
#include <android/log.h>
-#ifndef
+#ifndef LOGE
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR , "Flex", __VA_ARGS__)
#endif
diff --git a/core/voxelize.cpp b/core/voxelize.cpp
index 8172aea..647ceb4 100644
--- a/core/voxelize.cpp
+++ b/core/voxelize.cpp
@@ -28,12 +28,12 @@
#include "aabbtree.h"
#include "mesh.h"
-void Voxelize(const float* vertices, int numVertices, const int* indices, int numTriangleIndices, uint32_t width, uint32_t height, uint32_t depth, uint32_t* volume, Vec3 minExtents, Vec3 maxExtents)
+void Voxelize(const Vec3* vertices, int numVertices, const int* indices, int numTriangleIndices, uint32_t width, uint32_t height, uint32_t depth, uint32_t* volume, Vec3 minExtents, Vec3 maxExtents)
{
memset(volume, 0, sizeof(uint32_t)*width*height*depth);
// build an aabb tree of the mesh
- AABBTree tree((const Vec3*)vertices, numVertices, (const uint32_t*)indices, numTriangleIndices/3);
+ AABBTree tree(vertices, numVertices, (const uint32_t*)indices, numTriangleIndices/3);
// parity count method, single pass
const Vec3 extents(maxExtents-minExtents);
diff --git a/core/voxelize.h b/core/voxelize.h
index deb99b5..958dbf5 100644
--- a/core/voxelize.h
+++ b/core/voxelize.h
@@ -30,4 +30,4 @@
struct Mesh;
// voxelizes a mesh using a single pass parity algorithm
-void Voxelize(const float* vertices, int numVertices, const int* indices, int numTriangleIndices, uint32_t width, uint32_t height, uint32_t depth, uint32_t* volume, Vec3 minExtents, Vec3 maxExtents); \ No newline at end of file
+void Voxelize(const Vec3* vertices, int numVertices, const int* indices, int numTriangleIndices, uint32_t width, uint32_t height, uint32_t depth, uint32_t* volume, Vec3 minExtents, Vec3 maxExtents); \ No newline at end of file
diff --git a/demo/benchmark.h b/demo/benchmark.h
index c0ab7c2..d04e780 100644
--- a/demo/benchmark.h
+++ b/demo/benchmark.h
@@ -27,166 +27,402 @@
#pragma once
+
+
#include <iomanip>
+#include <algorithm>
+#include <stdint.h>
const char* g_benchmarkFilename = "../../benchmark.txt";
-std::ofstream g_benchmarkFile;
+std::wofstream g_benchmarkFile;
-// returns the new scene if one is requested
-int BenchmarkUpdate()
+const int benchmarkPhaseFrameCount = 400;
+const int benchmarkEndWarmup = 200;
+
+const int benchmarkAsyncOffDummyOnBeginFrame = benchmarkPhaseFrameCount;
+const int benchmarkAsyncOnDummyOnBeginFrame = benchmarkPhaseFrameCount*2;
+const int benchmarkEndFrame = benchmarkPhaseFrameCount*3;
+const char* benchmarkList[] = { "Env Cloth Small", "Viscosity Med", "Inflatables", "Game Mesh Particles", "Rigid4" };
+const char* benchmarkChartPrefix[] = { "EnvClothSmall", "ViscosityMed", "Inflatables", "GameMeshParticles", "Rigid4" }; //no spaces
+int numBenchmarks = sizeof(benchmarkList)/sizeof(benchmarkList[0]);
+
+struct GpuTimers
+{
+ unsigned long long renderBegin;
+ unsigned long long renderEnd;
+ unsigned long long renderFreq;
+ unsigned long long computeBegin;
+ unsigned long long computeEnd;
+ unsigned long long computeFreq;
+
+ static const int maxTimerCount = 4;
+ double timers[benchmarkEndFrame][maxTimerCount];
+ int timerCount[benchmarkEndFrame];
+};
+
+
+struct TimerTotals
{
- // Enable console benchmark profiling
- static NvFlexTimers sTimersSum;
- static std::vector<NvFlexDetailTimer> sDTimersSum;
- static float sTotalFrameTime = 0.0f;
- static int sSamples = 0;
+ std::vector<NvFlexDetailTimer> detailTimers;
+
+ float frameTime;
+ int samples;
- static int benchmarkIter = 0;
- const int numBenchmarks = 5;
- const char* benchmarkList[numBenchmarks] = { "Env Cloth Small", "Viscosity Med", "Inflatables", "Game Mesh Particles", "Rigid4" };
- const char* benchmarkChartPrefix[numBenchmarks] = { "EnvClothSmall", "ViscosityMed", "Inflatables", "GameMeshParticles", "Rigid4" }; //no spaces
- //float benchmarkEnergyCheck[numBenchmarks] = { 6000, 1000, 1000, 150426, 63710 };
+ float frameTimeAsync;
+ int samplesAsync;
- int newScene = -1;
+ float computeTimeAsyncOff;
+ float computeTimeAsyncOn;
+ int computeSamples;
+
+ TimerTotals() : frameTime(0), samples(0), frameTimeAsync(0), samplesAsync(0), computeTimeAsyncOff(0), computeTimeAsyncOn(0), computeSamples(0) {}
+};
+
+GpuTimers g_GpuTimers;
+
+int g_benchmarkFrame = 0;
+int g_benchmarkScene = 0;
+int g_benchmarkSceneNumber;
+
+#if defined(__linux__)
+int sprintf_s(char* const buffer, size_t const bufferCount,
+ const char* format,...)
+{
+ va_list args;
+ va_start(args, format);
+ int retval = vsprintf(buffer, format, args);
+ va_end(args);
+
+ return retval;
+}
+#endif
+
+//-----------------------------------------------------------------------------
+char* removeSpaces(const char* in)
+{
+ int len = strlen(in);
+ char* out = new char[len+1];
- if (g_benchmark && benchmarkIter == 0 && g_frame == 1)
+ int i = 0;
+ int j = 0;
+ while (in[i] != 0)
{
- // check and see if the first scene is the same as the first benchmark
- // switch to benchmark if it is not the same
- if (strcmp(benchmarkList[0], g_scenes[g_scene]->GetName()) == 0)
- benchmarkIter++;
- else
- g_frame = -1;
+ if (in[i] != ' ')
+ {
+ out[j] = in[i];
+ j++;
+ }
+ i++;
}
+ out[j] = 0;
+
+ return out;
+}
+//-----------------------------------------------------------------------------
+void ProcessGpuTimes()
+{
+ static bool timerfirstTime = true;
+
+ double renderTime;
+ double compTime;
+ double unionTime;
+ double overlapBeginTime;
+
+ int numParticles = NvFlexGetActiveCount(g_solver);
- if (g_frame == 200)
+ renderTime = double(g_GpuTimers.renderEnd - g_GpuTimers.renderBegin) / double(g_GpuTimers.renderFreq);
+ compTime = double(g_GpuTimers.computeEnd - g_GpuTimers.computeBegin) / double(g_GpuTimers.computeFreq);
+
+ uint64_t minTime = min(g_GpuTimers.renderBegin, g_GpuTimers.computeBegin);
+ uint64_t maxTime = max(g_GpuTimers.renderEnd, g_GpuTimers.computeEnd);
+ unionTime = double(maxTime - minTime) / double(g_GpuTimers.computeFreq);
+
+ overlapBeginTime = abs((long long)g_GpuTimers.renderBegin - (long long)g_GpuTimers.computeBegin) / double(g_GpuTimers.computeFreq);
+
+ if (!timerfirstTime && g_benchmarkFrame < benchmarkEndFrame)
{
- memset(&sTimersSum, 0, sizeof(NvFlexTimers));
- sTotalFrameTime = 0.0f;
- sSamples = 0;
- g_emit = true;
- sDTimersSum.resize(g_numDetailTimers);
+ if (g_useAsyncCompute)
+ {
+ g_GpuTimers.timers[g_benchmarkFrame][0] = numParticles;
+ g_GpuTimers.timers[g_benchmarkFrame][1] = unionTime * 1000;
+ g_GpuTimers.timers[g_benchmarkFrame][2] = overlapBeginTime * 1000;
+ g_GpuTimers.timers[g_benchmarkFrame][3] = g_realdt * 1000;
+ g_GpuTimers.timerCount[g_benchmarkFrame] = 4;
+ }
+ else
+ {
+ g_GpuTimers.timers[g_benchmarkFrame][0] = numParticles;
+ g_GpuTimers.timers[g_benchmarkFrame][1] = renderTime * 1000;
+ g_GpuTimers.timers[g_benchmarkFrame][2] = compTime * 1000;
+ g_GpuTimers.timers[g_benchmarkFrame][3] = g_realdt * 1000;
+ g_GpuTimers.timerCount[g_benchmarkFrame] = 4;
+ }
}
- if (g_frame >= 200 && g_frame < 400)
+ timerfirstTime = false;
+}
+//-----------------------------------------------------------------------------
+void UpdateTotals(TimerTotals& totals)
+{
+ // Phase 0B, async off, dummy work off
+ if (benchmarkEndWarmup <= g_benchmarkFrame && g_benchmarkFrame < benchmarkAsyncOffDummyOnBeginFrame)
{
- sTotalFrameTime += g_realdt * 1000.0f; //convert to milliseconds
+ totals.frameTime += g_realdt * 1000.0f; //convert to milliseconds
for (int i = 0; i < g_numDetailTimers; i++) {
- sDTimersSum[i].name = g_detailTimers[i].name;
- sDTimersSum[i].time += g_detailTimers[i].time;
+ strcpy(totals.detailTimers[i].name,g_detailTimers[i].name);
+ totals.detailTimers[i].time += g_detailTimers[i].time;
}
- sTimersSum.total += g_timers.total;
+ totals.samples++;
+ }
- sSamples++;
+ // Phase 2B, async on, dummy work on
+ if (benchmarkAsyncOnDummyOnBeginFrame + benchmarkEndWarmup <= g_benchmarkFrame)
+ {
+ float offGraphics = (float)g_GpuTimers.timers[g_benchmarkFrame - benchmarkPhaseFrameCount][1];
+ float offCompute = (float)g_GpuTimers.timers[g_benchmarkFrame - benchmarkPhaseFrameCount][2];
+ float onBoth = (float)g_GpuTimers.timers[g_benchmarkFrame][1];
+
+ float onCompute = onBoth - offGraphics;
+
+ totals.computeTimeAsyncOff += offCompute;
+ totals.computeTimeAsyncOn += onCompute;
+ totals.computeSamples++;
+
+ totals.frameTimeAsync += g_realdt * 1000.0f; //convert to milliseconds
+ totals.samplesAsync++;
}
- if (g_frame == 400)
+}
+//-----------------------------------------------------------------------------
+void BeginNewPhaseIfNecessary(int& sceneToSwitchTo,TimerTotals& totals)
+{
+ // Are we beginning phase 0B?
+ if (g_benchmarkFrame == benchmarkEndWarmup)
{
+ totals.frameTime = 0.0f;
+ totals.samples = 0;
+ g_emit = true;
+ totals.detailTimers.resize(g_numDetailTimers);
- for (int i = 0; i < g_numDetailTimers; i++) {
- sDTimersSum[i].time /= sSamples;
+ for (int i = 0; i != g_numDetailTimers; i++)
+ {
+ totals.detailTimers[i].name = new char[256];
}
+ }
- if (g_teamCity)
- {
- const char* prefix = benchmarkChartPrefix[benchmarkIter - 1];
+ // Are we beginning phase 1?
+ if (g_benchmarkFrame == benchmarkAsyncOffDummyOnBeginFrame)
+ {
+ sceneToSwitchTo = g_benchmarkSceneNumber;
+ g_useAsyncCompute = false;
+ g_increaseGfxLoadForAsyncComputeTesting = true;
+ }
- float exclusive = 0.0f;
+ // Are we beginning phase 2?
+ if (g_benchmarkFrame == benchmarkAsyncOnDummyOnBeginFrame)
+ {
+ sceneToSwitchTo = g_benchmarkSceneNumber;
+ g_useAsyncCompute = true;
+ g_increaseGfxLoadForAsyncComputeTesting = true;
+ }
- for (int i = 0; i < g_numDetailTimers - 1; i++) {
- exclusive += sDTimersSum[i].time;
- }
+ // Are we beginning phase 2B?
+ if (g_benchmarkFrame == benchmarkAsyncOnDummyOnBeginFrame + benchmarkEndWarmup)
+ {
+ totals.frameTimeAsync = 0.0f;
+ totals.samplesAsync = 0;
+ totals.computeTimeAsyncOff = 0.0f;
+ totals.computeTimeAsyncOn = 0.0f;
+ totals.computeSamples = 0;
+ g_emit = true;
+ }
+}
+//-----------------------------------------------------------------------------
+void WriteSceneResults(TimerTotals& totals)
+{
+ // Write results for scene
+ for (int i = 0; i < g_numDetailTimers; i++) {
+ totals.detailTimers[i].time /= totals.samples;
+ }
- printf("##teamcity[buildStatisticValue key='%s_FrameTime' value='%f']\n", prefix, sTotalFrameTime / sSamples);
- printf("##teamcity[buildStatisticValue key='%s_SumKernel' value='%f']\n", prefix, exclusive);
+ if (g_profile && g_teamCity)
+ {
+ const char* prefix = benchmarkChartPrefix[g_benchmarkScene - 1];
- for (int i = 0; i < g_numDetailTimers - 1; i++) {
- printf("##teamcity[buildStatisticValue key='%s_%s' value='%f']\n", prefix, sDTimersSum[i].name, sDTimersSum[i].time);
- }
- printf("\n");
+ float exclusive = 0.0f;
+
+ for (int i = 0; i < g_numDetailTimers - 1; i++) {
+ exclusive += totals.detailTimers[i].time;
}
- else
- {
- printf("Scene: %s\n", g_scenes[g_scene]->GetName());
- printf("FrameTime %f\n", sTotalFrameTime / sSamples);
- printf("________________________________\n");
- float exclusive = 0.0f;
-
- for (int i = 0; i < g_numDetailTimers-1; i++) {
- exclusive += sDTimersSum[i].time;
- printf("%s %f\n", sDTimersSum[i].name, sDTimersSum[i].time);
- }
- printf("Sum(exclusive) %f\n", exclusive);
- printf("Sum(inclusive) %f\n", sDTimersSum[g_numDetailTimers - 1].time);
- printf("________________________________\n");
+
+ printf("##teamcity[buildStatisticValue key='%s_FrameTime' value='%f']\n", prefix, totals.frameTime / totals.samples);
+ printf("##teamcity[buildStatisticValue key='%s_SumKernel' value='%f']\n", prefix, exclusive);
+
+ for (int i = 0; i < g_numDetailTimers - 1; i++) {
+ printf("##teamcity[buildStatisticValue key='%s_%s' value='%f']\n", prefix, totals.detailTimers[i].name, totals.detailTimers[i].time);
}
+ printf("\n");
+ }
- // Dumping benchmark data to txt files
+ printf("Scene: %s\n", g_scenes[g_scene]->GetName());
+ printf("FrameTime %f\n", totals.frameTime / totals.samples);
+ printf("________________________________\n");
+ float exclusive = 0.0f;
- g_benchmarkFile.open(g_benchmarkFilename, std::ofstream::out | std::ofstream::app);
- g_benchmarkFile << std::fixed << std::setprecision(6);
- g_benchmarkFile << "Scene: " << g_scenes[g_scene]->GetName() << std::endl;
- g_benchmarkFile << "FrameTime " << sTotalFrameTime / sSamples << std::endl;
- g_benchmarkFile << "________________________________" << std::endl;
+ for (int i = 0; i < g_numDetailTimers - 1; i++) {
+ exclusive += totals.detailTimers[i].time;
+ printf("%s %f\n", totals.detailTimers[i].name, totals.detailTimers[i].time);
+ }
+ printf("Sum(exclusive) %f\n", exclusive);
+ printf("Sum(inclusive) %f\n", totals.detailTimers[g_numDetailTimers - 1].time);
+ printf("________________________________\n");
+
+ // Dumping benchmark data to txt files
+
+ g_benchmarkFile.open(g_benchmarkFilename, std::ofstream::out | std::ofstream::app);
+ g_benchmarkFile << std::fixed << std::setprecision(6);
+ g_benchmarkFile << "Scene: " << g_scenes[g_scene]->GetName() << std::endl;
+ g_benchmarkFile << "FrameTime " << totals.frameTime / totals.samples << std::endl;
+ g_benchmarkFile << "________________________________" << std::endl;
+
+ if (g_profile)
+ {
float exclusive = 0.0f;
+ g_benchmarkFile << std::fixed << std::setprecision(6);
+
for (int i = 0; i < g_numDetailTimers - 1; i++) {
- exclusive += sDTimersSum[i].time;
- g_benchmarkFile << sDTimersSum[i].name<<" "<< sDTimersSum[i].time << std::endl;
+ exclusive += totals.detailTimers[i].time;
+ g_benchmarkFile << totals.detailTimers[i].name << " " << totals.detailTimers[i].time << std::endl;
+
+ delete totals.detailTimers[i].name;
}
- g_benchmarkFile << "Sum(exclusive) "<< exclusive << std::endl;
- g_benchmarkFile << "Sum(inclusive) "<< sDTimersSum[g_numDetailTimers - 1].time<< std::endl;
+ g_benchmarkFile << "Sum(exclusive) " << exclusive << std::endl;
+ g_benchmarkFile << "Sum(inclusive) " << totals.detailTimers[g_numDetailTimers - 1].time << std::endl;
g_benchmarkFile << "________________________________" << std::endl << std::endl;
- g_benchmarkFile.close();
+ }
- if (g_benchmark)
+ if (g_outputAllFrameTimes)
+ {
+ for (int i = 0; i != benchmarkEndFrame; i++)
{
+ g_benchmarkFile << g_GpuTimers.timers[i][3] << std::endl;
+ }
-#if 0
- // Do basic kinetic energy verification check to ensure that the benchmark runs correctly
- NvFlexGetVelocities(g_flex, g_buffers->velocities.buffer, g_buffers->velocities.size());
+ // Per frame timers
+ for (int i = benchmarkAsyncOffDummyOnBeginFrame; i != benchmarkAsyncOnDummyOnBeginFrame; i++)
+ {
+ for (int j = 0; j != g_GpuTimers.timerCount[i]; j++)
+ {
+ g_benchmarkFile << g_GpuTimers.timers[i][j] << " ";
+ }
- float sumVelocities = 0.0f;
- for (int i = 0; i < g_buffers->velocities.size(); ++i)
+ for (int j = 0; j != g_GpuTimers.timerCount[i + benchmarkPhaseFrameCount]; j++)
{
- sumVelocities += g_buffers->velocities[i].x * g_buffers->velocities[i].x + g_buffers->velocities[i].y * g_buffers->velocities[i].y + g_buffers->velocities[i].z * g_buffers->velocities[i].z;
+ g_benchmarkFile << g_GpuTimers.timers[i + benchmarkPhaseFrameCount][j] << " ";
}
- // Tolerance 50%
- int benchmark_id = benchmarkIter - 1;
- if (sumVelocities > (benchmarkEnergyCheck[benchmark_id] * 1.50) ||
- sumVelocities < (benchmarkEnergyCheck[benchmark_id] * 0.50))
- printf("Benchmark kinetic energy verification failed! Expected: [%f], Actual: [%f]\n\n", benchmarkEnergyCheck[benchmark_id], sumVelocities);
-#endif
- g_frame = -1;
+ g_benchmarkFile << std::endl;
}
+
}
- if (g_benchmark && g_frame == -1)
+ g_benchmarkFile.close();
+
+ if (g_benchmark)
{
- if (benchmarkIter == numBenchmarks)
- exit(0);
- for (int i = 0; i < int(g_scenes.size()); ++i)
+#if 0
+ // Do basic kinetic energy verification check to ensure that the benchmark runs correctly
+ NvFlexGetVelocities(g_flex, g_buffers->velocities.buffer, g_buffers->velocities.size());
+
+ float sumVelocities = 0.0f;
+ for (int i = 0; i < g_buffers->velocities.size(); ++i)
{
- if (strcmp(benchmarkList[benchmarkIter], g_scenes[i]->GetName()) == 0)
- newScene = i;
+ sumVelocities += g_buffers->velocities[i].x * g_buffers->velocities[i].x + g_buffers->velocities[i].y * g_buffers->velocities[i].y + g_buffers->velocities[i].z * g_buffers->velocities[i].z;
}
- assert(newScene != -1);
+ // Tolerance 50%
+ int benchmark_id = g_benchmarkScene - 1;
+ if (sumVelocities >(benchmarkEnergyCheck[benchmark_id] * 1.50) ||
+ sumVelocities < (benchmarkEnergyCheck[benchmark_id] * 0.50))
+ printf("Benchmark kinetic energy verification failed! Expected: [%f], Actual: [%f]\n\n", benchmarkEnergyCheck[benchmark_id], sumVelocities);
+#endif
- benchmarkIter++;
}
-
- return newScene;
}
-
-void BenchmarkInit()
+//-----------------------------------------------------------------------------
+int GoToNextScene()
{
- g_benchmarkFile.open(g_benchmarkFilename, std::ofstream::out | std::ofstream::app);
- g_benchmarkFile << "Compute Device: " << g_deviceName << std::endl;
- g_benchmarkFile << "HLSL Extensions: " << (g_extensions ? "ON" : "OFF") << std::endl << std::endl;
- g_benchmarkFile.close();
+ int sceneToSwitchTo = -1;
+
+ // Advance to next benchmark scene
+ for (int i = 0; i < int(g_scenes.size()); ++i)
+ {
+ if (strcmp(benchmarkList[g_benchmarkScene], g_scenes[i]->GetName()) == 0)
+ {
+ sceneToSwitchTo = i;
+ g_benchmarkSceneNumber = i;
+ }
+ }
+ assert(sceneToSwitchTo != -1);
+
+ g_useAsyncCompute = false;
+ g_increaseGfxLoadForAsyncComputeTesting = false;
+
+ return sceneToSwitchTo;
}
+//-----------------------------------------------------------------------------
+// Returns scene number if benchmark wants to switch scene, -1 otherwise
+//-----------------------------------------------------------------------------
+int BenchmarkUpdate()
+{
+ static TimerTotals s_totals;
+ int sceneToSwitchTo = -1;
+
+ if (!g_benchmark) return sceneToSwitchTo;
+
+ ProcessGpuTimes();
+ UpdateTotals(s_totals);
+
+ // Next frame
+ g_benchmarkFrame++;
+
+ BeginNewPhaseIfNecessary(sceneToSwitchTo, s_totals);
+
+ // Check whether at end of scene
+ if (g_benchmarkFrame == benchmarkEndFrame)
+ {
+ WriteSceneResults(s_totals);
+ // Next scene
+ g_benchmarkScene++;
+ // Go to next scene, or exit if all scenes done
+ if (g_benchmarkScene != numBenchmarks)
+ {
+ sceneToSwitchTo = GoToNextScene();
+
+ g_benchmarkFrame = 0;
+ g_frame = -1;
+ }
+ else
+ {
+ exit(0);
+ }
+ }
+
+ return sceneToSwitchTo;
+}
+//-----------------------------------------------------------------------------
+int BenchmarkInit()
+{
+ int sceneToSwitchTo = GoToNextScene();
+
+ return sceneToSwitchTo;
+}
+//-----------------------------------------------------------------------------
+void BenchmarkUpdateGraph()
+{
+}
+//-----------------------------------------------------------------------------
diff --git a/demo/compiler/makeandroid/Makefile b/demo/compiler/makeandroid/Makefile
index 0b462ff..02650e4 100644
--- a/demo/compiler/makeandroid/Makefile
+++ b/demo/compiler/makeandroid/Makefile
@@ -2,11 +2,11 @@
# Makefile generated by XPJ for android
DEPSDIR = .deps
-NDKROOT = "$(NDK_ROOT)"/"$(NDK_VERSION)"
-NDK_BIN_DIR = "$(NDK_ROOT)"/"$(NDK_VERSION)"/toolchains/"$(NDK_TOOLCHAIN)"/prebuilt/"linux-x86_64"/bin
+NDKROOT = ./../../../../../../external/android-ndk/android-ndk-r10e-linux
+NDK_BIN_DIR = ./../../../../../../external/android-ndk/android-ndk-r10e-linux/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin
NDK_PREFIX = arm-linux-androideabi-
-JAVA_HOME = ./../xpj/"$(JAVA_HOME)"
-ANT_TOOL = ./../xpj/"$(ANT_HOME}"/bin/ant
+JAVA_HOME = ./../../../../../../external/java/jdk1.8.0_20
+ANT_TOOL = ./../../../../../../external/ant/apache-ant-1.8.2/bin/ant
#default defines
OBJS_DIR = build
RMDIR = rm -fr
@@ -23,22 +23,20 @@ OBJCOPY = $(NDK_BIN_DIR)/$(NDK_PREFIX)objcopy
all: debug release
-debug: build_flexExtCUDA_debug
+debug: build_flexCUDA_debug build_flexExtCUDA_debug
-release: build_flexExtCUDA_release build_flexDemoCUDA_release
+release: build_flexDevice_release build_flexCUDA_release build_flexExtCUDA_release build_flexDemoCUDA_release
-clean: clean_flexExtCUDA_release clean_flexExtCUDA_debug clean_flexDemoCUDA_release
+clean: clean_flexDevice_release clean_flexCUDA_release clean_flexCUDA_debug clean_flexExtCUDA_release clean_flexExtCUDA_debug clean_flexDemoCUDA_release
rm -rf $(DEPSDIR)
-clean_release: clean_flexExtCUDA_release clean_flexDemoCUDA_release
- rm -rf $(DEPSDIR)
-
-
-clean_debug: clean_flexExtCUDA_debug clean_flexDemoCUDA_debug
+clean_release: clean_flexDevice_release clean_flexCUDA_release clean_flexExtCUDA_release clean_flexDemoCUDA_release
rm -rf $(DEPSDIR)
+include Makefile.flexDevice.mk
+include Makefile.flexCUDA.mk
include Makefile.flexExtCUDA.mk
include Makefile.flexDemoCUDA.mk
diff --git a/demo/compiler/makeandroid/Makefile.flexDemoCUDA.mk b/demo/compiler/makeandroid/Makefile.flexDemoCUDA.mk
index dbfbaab..74e8454 100644
--- a/demo/compiler/makeandroid/Makefile.flexDemoCUDA.mk
+++ b/demo/compiler/makeandroid/Makefile.flexDemoCUDA.mk
@@ -18,6 +18,9 @@ flexDemoCUDA_cppfiles += ./../../../core/sdf.cpp
flexDemoCUDA_cppfiles += ./../../../core/tga.cpp
flexDemoCUDA_cppfiles += ./../../../core/voxelize.cpp
flexDemoCUDA_cppfiles += ./../../../external/egl_setup/egl_setup.cpp
+flexDemoCUDA_cppfiles += ./../../android/android_main.cpp
+flexDemoCUDA_cppfiles += ./../../android/android_mainRender.cpp
+flexDemoCUDA_cfiles += ./../../android/android_native_app_glue.c
flexDemoCUDA_cpp_release_dep = $(addprefix $(DEPSDIR)/flexDemoCUDA/release/, $(subst ./, , $(subst ../, , $(patsubst %.cpp, %.cpp.P, $(flexDemoCUDA_cppfiles)))))
flexDemoCUDA_cc_release_dep = $(addprefix $(DEPSDIR)/, $(subst ./, , $(subst ../, , $(patsubst %.cc, %.cc.release.P, $(flexDemoCUDA_ccfiles)))))
@@ -26,15 +29,15 @@ flexDemoCUDA_release_dep = $(flexDemoCUDA_cpp_release_dep) $(flexDemoCUDA_c
-include $(flexDemoCUDA_release_dep)
flexDemoCUDA_release_hpaths :=
flexDemoCUDA_release_hpaths += ./../../..
-flexDemoCUDA_release_hpaths += $(NDK_ROOT)/$(NDK_VERSION)/platforms/android-15/arch-arm/usr/include
-flexDemoCUDA_release_hpaths += $(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/stlport/stlport
-flexDemoCUDA_release_hpaths += $(CUDA_PATH)/targets/armv7-linux-androideabi/include
+flexDemoCUDA_release_hpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-15/arch-arm/usr/include
+flexDemoCUDA_release_hpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/stlport/stlport
+flexDemoCUDA_release_hpaths += ./../../../../../../external/CUDA/cuda-6.0-linux/targets/armv7-linux-androideabi/include
flexDemoCUDA_release_hpaths += ./../../../external/egl_setup
flexDemoCUDA_release_hpaths += ./../../../external/regal_static/include
flexDemoCUDA_release_lpaths :=
-flexDemoCUDA_release_lpaths += $(CUDA_PATH)/targets/armv7-linux-androideabi/lib
+flexDemoCUDA_release_lpaths += ./../../../../../../external/CUDA/cuda-6.0-linux/targets/armv7-linux-androideabi/lib
flexDemoCUDA_release_lpaths += ./../../../lib/android
-flexDemoCUDA_release_lpaths += $(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/stlport/libs/armeabi-v7a
+flexDemoCUDA_release_lpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/stlport/libs/armeabi-v7a
flexDemoCUDA_release_lpaths += ./../../../external/regal_static/lib/armeabi-v7a
flexDemoCUDA_release_lpaths += ./../../../lib/android
flexDemoCUDA_release_defines := $(flexDemoCUDA_custom_defines)
@@ -44,6 +47,8 @@ flexDemoCUDA_release_defines += ANDROID_PLAT=1
flexDemoCUDA_release_defines += DISABLE_IMPORTGL
flexDemoCUDA_release_defines += NDEBUG
flexDemoCUDA_release_libraries :=
+flexDemoCUDA_release_libraries += NvFlexReleaseCUDA_armv7l
+flexDemoCUDA_release_libraries += flexDevice_x64
flexDemoCUDA_release_libraries += flexExt_cuda_release_armv7l
flexDemoCUDA_release_libraries += android
flexDemoCUDA_release_libraries += stdc++
@@ -62,14 +67,16 @@ flexDemoCUDA_release_common_cflags := $(flexDemoCUDA_custom_cflags)
flexDemoCUDA_release_common_cflags += -MMD
flexDemoCUDA_release_common_cflags += $(addprefix -D, $(flexDemoCUDA_release_defines))
flexDemoCUDA_release_common_cflags += $(addprefix -I, $(flexDemoCUDA_release_hpaths))
-flexDemoCUDA_release_common_cflags += -std=c++11 -fno-exceptions -fno-rtti
-flexDemoCUDA_release_common_cflags += -fpic -fPIC -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -O2 -g -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300
flexDemoCUDA_release_cflags := $(flexDemoCUDA_release_common_cflags)
+flexDemoCUDA_release_cflags += -std=c++11 -fno-exceptions -fno-rtti
+flexDemoCUDA_release_cflags += -fpic -fPIC -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -O2 -g -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300
flexDemoCUDA_release_cppflags := $(flexDemoCUDA_release_common_cflags)
+flexDemoCUDA_release_cppflags += -std=c++11 -fno-exceptions -fno-rtti
+flexDemoCUDA_release_cppflags += -fpic -fPIC -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -O2 -g -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300
flexDemoCUDA_release_lflags := $(flexDemoCUDA_custom_lflags)
flexDemoCUDA_release_lflags += $(addprefix -L, $(flexDemoCUDA_release_lpaths))
flexDemoCUDA_release_lflags += -Wl,--start-group $(addprefix -l, $(flexDemoCUDA_release_libraries)) -Wl,--end-group
-flexDemoCUDA_release_lflags += --sysroot="$(NDK_ROOT)"/"$(NDK_VERSION)"/platforms/android-15/arch-arm -shared -Wl,--no-undefined
+flexDemoCUDA_release_lflags += --sysroot=/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-15/arch-arm -shared -Wl,--no-undefined
flexDemoCUDA_release_objsdir = $(OBJS_DIR)/flexDemoCUDA_release
flexDemoCUDA_release_cpp_o = $(addprefix $(flexDemoCUDA_release_objsdir)/, $(subst ./, , $(subst ../, , $(patsubst %.cpp, %.cpp.o, $(flexDemoCUDA_cppfiles)))))
flexDemoCUDA_release_cc_o = $(addprefix $(flexDemoCUDA_release_objsdir)/, $(subst ./, , $(subst ../, , $(patsubst %.cc, %.cc.o, $(flexDemoCUDA_ccfiles)))))
@@ -91,7 +98,7 @@ antbuild_flexDemoCUDA_release: preantbuild_flexDemoCUDA_release
mainbuild_flexDemoCUDA_release: prebuild_flexDemoCUDA_release $(flexDemoCUDA_release_bin)
prebuild_flexDemoCUDA_release:
-$(flexDemoCUDA_release_bin): $(flexDemoCUDA_release_obj) build_flexExtCUDA_release
+$(flexDemoCUDA_release_bin): $(flexDemoCUDA_release_obj) build_flexCUDA_release build_flexDevice_release build_flexExtCUDA_release
mkdir -p `dirname ./../android/flex_project/libs/armeabi-v7a/libflexDemo.so`
$(CXX) -shared $(flexDemoCUDA_release_obj) $(flexDemoCUDA_release_lflags) -lc -o $@
$(ECHO) building $@ complete!
diff --git a/demo/compiler/makeandroid/Makefile.flexExtCUDA.mk b/demo/compiler/makeandroid/Makefile.flexExtCUDA.mk
index 8a33251..9e4826c 100644
--- a/demo/compiler/makeandroid/Makefile.flexExtCUDA.mk
+++ b/demo/compiler/makeandroid/Makefile.flexExtCUDA.mk
@@ -24,28 +24,32 @@ flexExtCUDA_debug_dep = $(flexExtCUDA_cpp_debug_dep) $(flexExtCUDA_cc_debug
-include $(flexExtCUDA_debug_dep)
flexExtCUDA_release_hpaths :=
flexExtCUDA_release_hpaths += ./../../..
-flexExtCUDA_release_hpaths += $(NDK_ROOT)/$(NDK_VERSION)/platforms/android-15/arch-arm/usr/include
-flexExtCUDA_release_hpaths += $(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/stlport/stlport
-flexExtCUDA_release_hpaths += $(CUDA_PATH)/targets/armv7-linux-androideabi/include
+flexExtCUDA_release_hpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-15/arch-arm/usr/include
+flexExtCUDA_release_hpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/stlport/stlport
+flexExtCUDA_release_hpaths += ./../../../../../../external/CUDA/cuda-6.0-linux/targets/armv7-linux-androideabi/include
flexExtCUDA_release_lpaths :=
-flexExtCUDA_release_lpaths += $(CUDA_PATH)/targets/armv7-linux-androideabi/lib
+flexExtCUDA_release_lpaths += ./../../../../../../external/CUDA/cuda-6.0-linux/targets/armv7-linux-androideabi/lib
+flexExtCUDA_release_lpaths += ./../../../lib/android
+flexExtCUDA_release_lpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/stlport/libs/armeabi-v7a
flexExtCUDA_release_lpaths += ./../../../lib/android
-flexExtCUDA_release_lpaths += $(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/stlport/libs/armeabi-v7a
flexExtCUDA_release_defines := $(flexExtCUDA_custom_defines)
flexExtCUDA_release_defines += android
flexExtCUDA_release_defines += ANDROID=1
flexExtCUDA_release_defines += ANDROID_PLAT=1
flexExtCUDA_release_defines += DISABLE_IMPORTGL
flexExtCUDA_release_libraries :=
+flexExtCUDA_release_libraries += NvFlexReleaseCUDA_armv7l
flexExtCUDA_release_libraries += ./../../../lib/android/libNvFlexRelease_armv7l.a
flexExtCUDA_release_common_cflags := $(flexExtCUDA_custom_cflags)
flexExtCUDA_release_common_cflags += -MMD
flexExtCUDA_release_common_cflags += $(addprefix -D, $(flexExtCUDA_release_defines))
flexExtCUDA_release_common_cflags += $(addprefix -I, $(flexExtCUDA_release_hpaths))
-flexExtCUDA_release_common_cflags += -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
-flexExtCUDA_release_common_cflags += -O3 -ffast-math
flexExtCUDA_release_cflags := $(flexExtCUDA_release_common_cflags)
+flexExtCUDA_release_cflags += -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
+flexExtCUDA_release_cflags += -O3 -ffast-math
flexExtCUDA_release_cppflags := $(flexExtCUDA_release_common_cflags)
+flexExtCUDA_release_cppflags += -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
+flexExtCUDA_release_cppflags += -O3 -ffast-math
flexExtCUDA_release_lflags := $(flexExtCUDA_custom_lflags)
flexExtCUDA_release_lflags += $(addprefix -L, $(flexExtCUDA_release_lpaths))
flexExtCUDA_release_lflags += -Wl,--start-group $(addprefix -l, $(flexExtCUDA_release_libraries)) -Wl,--end-group
@@ -68,15 +72,15 @@ postbuild_flexExtCUDA_release: mainbuild_flexExtCUDA_release
mainbuild_flexExtCUDA_release: prebuild_flexExtCUDA_release $(flexExtCUDA_release_bin)
prebuild_flexExtCUDA_release:
-$(flexExtCUDA_release_bin): $(flexExtCUDA_release_obj)
+$(flexExtCUDA_release_bin): $(flexExtCUDA_release_obj) build_flexCUDA_release
mkdir -p `dirname ./../../../lib/android/libflexExt_cuda_release_armv7l.a`
@$(AR) rcs $(flexExtCUDA_release_bin) $(flexExtCUDA_release_obj)
$(ECHO) building $@ complete!
$(flexExtCUDA_release_cuda_extensions_cuda_flexExt_cu_o): $(flexExtCUDA_cuda_extensions_cuda_flexExt_cu)
@mkdir -p `dirname $(OBJS_DIR)/flexExtCUDA_release/cuda/extensions/cudaflexExt.o`
- $(ECHO) "$(CUDA_PATH)/bin/nvcc" -ccbin $(NDK_ROOT)/$(NDK_VERSION)/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -target-cpu-arch=ARM -m32 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"$(CUDA_PATH)/targets/armv7-linux-androideabi/include" -I"../../.." -I"$(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/stlport/stlport" -I"$(NDK_ROOT)/$(NDK_VERSION)/platforms/android-15/arch-arm/usr/include" --compile "./../../../extensions/cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_release/cuda/extensions/cudaflexExt.o"
- "$(CUDA_PATH)/bin/nvcc" -ccbin $(NDK_ROOT)/$(NDK_VERSION)/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -target-cpu-arch=ARM -m32 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"$(CUDA_PATH)/targets/armv7-linux-androideabi/include" -I"../../.." -I"$(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/stlport/stlport" -I"$(NDK_ROOT)/$(NDK_VERSION)/platforms/android-15/arch-arm/usr/include" --compile "./../../../extensions/cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_release/cuda/extensions/cudaflexExt.o"
+ $(ECHO) "../../../../../../external/CUDA/cuda-6.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -target-cpu-arch=ARM -m32 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-6.0-linux/targets/armv7-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/stlport/stlport" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-15/arch-arm/usr/include" --compile "../../../extensions/cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_release/cuda/extensions/cudaflexExt.o"
+ "../../../../../../external/CUDA/cuda-6.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -target-cpu-arch=ARM -m32 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-6.0-linux/targets/armv7-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/stlport/stlport" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-15/arch-arm/usr/include" --compile "../../../extensions/cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_release/cuda/extensions/cudaflexExt.o"
flexExtCUDA_release_DEPDIR = $(dir $(@))/$(*F)
$(flexExtCUDA_release_cpp_o): $(flexExtCUDA_release_objsdir)/%.o:
@@ -111,28 +115,32 @@ $(flexExtCUDA_release_c_o): $(flexExtCUDA_release_objsdir)/%.o:
flexExtCUDA_debug_hpaths :=
flexExtCUDA_debug_hpaths += ./../../..
-flexExtCUDA_debug_hpaths += $(NDK_ROOT)/$(NDK_VERSION)/platforms/android-15/arch-arm/usr/include
-flexExtCUDA_debug_hpaths += $(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/stlport/stlport
-flexExtCUDA_debug_hpaths += $(CUDA_PATH)/targets/armv7-linux-androideabi/include
+flexExtCUDA_debug_hpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-15/arch-arm/usr/include
+flexExtCUDA_debug_hpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/stlport/stlport
+flexExtCUDA_debug_hpaths += ./../../../../../../external/CUDA/cuda-6.0-linux/targets/armv7-linux-androideabi/include
flexExtCUDA_debug_lpaths :=
-flexExtCUDA_debug_lpaths += $(CUDA_PATH)/targets/armv7-linux-androideabi/lib
+flexExtCUDA_debug_lpaths += ./../../../../../../external/CUDA/cuda-6.0-linux/targets/armv7-linux-androideabi/lib
+flexExtCUDA_debug_lpaths += ./../../../lib/android
+flexExtCUDA_debug_lpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/stlport/libs/armeabi-v7a
flexExtCUDA_debug_lpaths += ./../../../lib/android
-flexExtCUDA_debug_lpaths += $(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/stlport/libs/armeabi-v7a
flexExtCUDA_debug_defines := $(flexExtCUDA_custom_defines)
flexExtCUDA_debug_defines += android
flexExtCUDA_debug_defines += ANDROID=1
flexExtCUDA_debug_defines += ANDROID_PLAT=1
flexExtCUDA_debug_defines += DISABLE_IMPORTGL
flexExtCUDA_debug_libraries :=
+flexExtCUDA_debug_libraries += NvFlexDebugCUDA_armv7l
flexExtCUDA_debug_libraries += ./../../../lib/android/libNvFlexDebug_armv7l.a
flexExtCUDA_debug_common_cflags := $(flexExtCUDA_custom_cflags)
flexExtCUDA_debug_common_cflags += -MMD
flexExtCUDA_debug_common_cflags += $(addprefix -D, $(flexExtCUDA_debug_defines))
flexExtCUDA_debug_common_cflags += $(addprefix -I, $(flexExtCUDA_debug_hpaths))
-flexExtCUDA_debug_common_cflags += -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
-flexExtCUDA_debug_common_cflags += -g -O0
flexExtCUDA_debug_cflags := $(flexExtCUDA_debug_common_cflags)
+flexExtCUDA_debug_cflags += -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
+flexExtCUDA_debug_cflags += -g -O0
flexExtCUDA_debug_cppflags := $(flexExtCUDA_debug_common_cflags)
+flexExtCUDA_debug_cppflags += -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
+flexExtCUDA_debug_cppflags += -g -O0
flexExtCUDA_debug_lflags := $(flexExtCUDA_custom_lflags)
flexExtCUDA_debug_lflags += $(addprefix -L, $(flexExtCUDA_debug_lpaths))
flexExtCUDA_debug_lflags += -Wl,--start-group $(addprefix -l, $(flexExtCUDA_debug_libraries)) -Wl,--end-group
@@ -155,15 +163,15 @@ postbuild_flexExtCUDA_debug: mainbuild_flexExtCUDA_debug
mainbuild_flexExtCUDA_debug: prebuild_flexExtCUDA_debug $(flexExtCUDA_debug_bin)
prebuild_flexExtCUDA_debug:
-$(flexExtCUDA_debug_bin): $(flexExtCUDA_debug_obj)
+$(flexExtCUDA_debug_bin): $(flexExtCUDA_debug_obj) build_flexCUDA_debug
mkdir -p `dirname ./../../../lib/android/libflexExt_cuda_debug_armv7l.a`
@$(AR) rcs $(flexExtCUDA_debug_bin) $(flexExtCUDA_debug_obj)
$(ECHO) building $@ complete!
$(flexExtCUDA_debug_cuda_extensions_cuda_flexExt_cu_o): $(flexExtCUDA_cuda_extensions_cuda_flexExt_cu)
@mkdir -p `dirname $(OBJS_DIR)/flexExtCUDA_debug/cuda/extensions/cudaflexExt.o`
- $(ECHO) "$(CUDA_PATH)/bin/nvcc" -ccbin $(NDK_ROOT)/$(NDK_VERSION)/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -target-cpu-arch=ARM -m32 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"$(CUDA_PATH)/targets/armv7-linux-androideabi/include" -I"../../.." -I"$(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/stlport/stlport" -I"$(NDK_ROOT)/$(NDK_VERSION)/platforms/android-15/arch-arm/usr/include" --compile "./../../../extensions/cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_debug/cuda/extensions/cudaflexExt.o"
- "$(CUDA_PATH)/bin/nvcc" -ccbin $(NDK_ROOT)/$(NDK_VERSION)/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -target-cpu-arch=ARM -m32 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"$(CUDA_PATH)/targets/armv7-linux-androideabi/include" -I"../../.." -I"$(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/stlport/stlport" -I"$(NDK_ROOT)/$(NDK_VERSION)/platforms/android-15/arch-arm/usr/include" --compile "./../../../extensions/cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_debug/cuda/extensions/cudaflexExt.o"
+ $(ECHO) "../../../../../../external/CUDA/cuda-6.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -target-cpu-arch=ARM -m32 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-6.0-linux/targets/armv7-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/stlport/stlport" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-15/arch-arm/usr/include" --compile "../../../extensions/cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_debug/cuda/extensions/cudaflexExt.o"
+ "../../../../../../external/CUDA/cuda-6.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -target-cpu-arch=ARM -m32 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-6.0-linux/targets/armv7-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/stlport/stlport" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-15/arch-arm/usr/include" --compile "../../../extensions/cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_debug/cuda/extensions/cudaflexExt.o"
flexExtCUDA_debug_DEPDIR = $(dir $(@))/$(*F)
$(flexExtCUDA_debug_cpp_o): $(flexExtCUDA_debug_objsdir)/%.o:
diff --git a/demo/compiler/makelinux64/Makefile.flexDemoCUDA.mk b/demo/compiler/makelinux64/Makefile.flexDemoCUDA.mk
index 152205d..f37fc83 100644
--- a/demo/compiler/makelinux64/Makefile.flexDemoCUDA.mk
+++ b/demo/compiler/makelinux64/Makefile.flexDemoCUDA.mk
@@ -54,7 +54,7 @@ flexDemoCUDA_release_cppflags := $(flexDemoCUDA_release_common_cflags)
flexDemoCUDA_release_lflags := $(flexDemoCUDA_custom_lflags)
flexDemoCUDA_release_lflags += $(addprefix -L, $(flexDemoCUDA_release_lpaths))
flexDemoCUDA_release_lflags += -Wl,--start-group $(addprefix -l, $(flexDemoCUDA_release_libraries)) -Wl,--end-group
-flexDemoCUDA_release_lflags += -g -L../../../external/glew/lib/linux -L/usr/lib -L"../../../lib/linux64" -L../../../external/SDL2-2.0.4/lib/x64/ -L$(CUDA_PATH)/lib64 -lGL -lglut -lGLU -lGLEW -lcudart_static -ldl
+flexDemoCUDA_release_lflags += -g -L../../../external/glew/lib/linux -L/usr/lib -L"../../../lib/linux64" -L../../../external/SDL2-2.0.4/lib/x64/ -L$(CUDA_PATH)/lib64 -lGL -lglut -lGLU -lGLEW -lcudart_static -ldl -lrt -pthread
flexDemoCUDA_release_lflags += -m64
flexDemoCUDA_release_objsdir = $(OBJS_DIR)/flexDemoCUDA_release
flexDemoCUDA_release_cpp_o = $(addprefix $(flexDemoCUDA_release_objsdir)/, $(subst ./, , $(subst ../, , $(patsubst %.cpp, %.cpp.o, $(flexDemoCUDA_cppfiles)))))
@@ -136,7 +136,7 @@ flexDemoCUDA_debug_cppflags := $(flexDemoCUDA_debug_common_cflags)
flexDemoCUDA_debug_lflags := $(flexDemoCUDA_custom_lflags)
flexDemoCUDA_debug_lflags += $(addprefix -L, $(flexDemoCUDA_debug_lpaths))
flexDemoCUDA_debug_lflags += -Wl,--start-group $(addprefix -l, $(flexDemoCUDA_debug_libraries)) -Wl,--end-group
-flexDemoCUDA_debug_lflags += -g -L../../../external/glew/lib/linux -L/usr/lib -L"../../../lib/linux64" -L../../../external/SDL2-2.0.4/lib/x64/ -L$(CUDA_PATH)/lib64 -lGL -lglut -lGLU -lGLEW -lcudart_static -ldl
+flexDemoCUDA_debug_lflags += -g -L../../../external/glew/lib/linux -L/usr/lib -L"../../../lib/linux64" -L../../../external/SDL2-2.0.4/lib/x64/ -L$(CUDA_PATH)/lib64 -lGL -lglut -lGLU -lGLEW -lcudart_static -ldl -lrt -pthread
flexDemoCUDA_debug_lflags += -m64
flexDemoCUDA_debug_objsdir = $(OBJS_DIR)/flexDemoCUDA_debug
flexDemoCUDA_debug_cpp_o = $(addprefix $(flexDemoCUDA_debug_objsdir)/, $(subst ./, , $(subst ../, , $(patsubst %.cpp, %.cpp.o, $(flexDemoCUDA_cppfiles)))))
diff --git a/demo/compiler/vc12win32/flexDemoCUDA.vcxproj b/demo/compiler/vc12win32/flexDemoCUDA.vcxproj
index 5073547..aa6f0ae 100644
--- a/demo/compiler/vc12win32/flexDemoCUDA.vcxproj
+++ b/demo/compiler/vc12win32/flexDemoCUDA.vcxproj
@@ -55,7 +55,7 @@
<PrecompiledHeaderFile></PrecompiledHeaderFile>
</ClCompile>
<Link>
- <AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../lib/win32/NvFlexDebugCUDA_x86.lib;./../../../lib/win32/NvFlexExtDebugCUDA_x86.lib;./../../../lib/win32/NvFlexDeviceDebug_x86.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2main.lib;./../../../external/glew/lib/win32/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../lib/win32/NvFlexDebugCUDA_x86.lib;./../../../lib/win32/NvFlexExtDebugCUDA_x86.lib;./../../../lib/win32/NvFlexDeviceDebug_x86.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2main.lib;./../../../external/NvToolsExt/lib/Win32/nvToolsExt32_1.lib;./../../../external/glew/lib/win32/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)NvFlexDemoDebugCUDA_x86.exe</OutputFile>
<AdditionalLibraryDirectories>$(CUDA_PATH)/lib/win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)/NvFlexDemoDebugCUDA_x86.exe.pdb</ProgramDatabaseFile>
@@ -95,7 +95,7 @@
<PrecompiledHeaderFile></PrecompiledHeaderFile>
</ClCompile>
<Link>
- <AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../lib/win32/NvFlexReleaseCUDA_x86.lib;./../../../lib/win32/NvFlexExtReleaseCUDA_x86.lib;./../../../lib/win32/NvFlexDeviceRelease_x86.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2main.lib;./../../../external/glew/lib/win32/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../lib/win32/NvFlexReleaseCUDA_x86.lib;./../../../lib/win32/NvFlexExtReleaseCUDA_x86.lib;./../../../lib/win32/NvFlexDeviceRelease_x86.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2main.lib;./../../../external/NvToolsExt/lib/Win32/nvToolsExt32_1.lib;./../../../external/glew/lib/win32/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)NvFlexDemoReleaseCUDA_x86.exe</OutputFile>
<AdditionalLibraryDirectories>$(CUDA_PATH)/lib/win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)/NvFlexDemoReleaseCUDA_x86.exe.pdb</ProgramDatabaseFile>
@@ -184,8 +184,6 @@
</ClInclude>
<ClInclude Include="..\..\scenes\plasticbody.h">
</ClInclude>
- <ClInclude Include="..\..\scenes\plasticstack.h">
- </ClInclude>
<ClInclude Include="..\..\scenes\player.h">
</ClInclude>
<ClInclude Include="..\..\scenes\potpourri.h">
@@ -206,6 +204,8 @@
</ClInclude>
<ClInclude Include="..\..\scenes\sdfcollision.h">
</ClInclude>
+ <ClInclude Include="..\..\scenes\shapechannels.h">
+ </ClInclude>
<ClInclude Include="..\..\scenes\shapecollision.h">
</ClInclude>
<ClInclude Include="..\..\scenes\softbody.h">
diff --git a/demo/compiler/vc12win32/flexDemoCUDA.vcxproj.filters b/demo/compiler/vc12win32/flexDemoCUDA.vcxproj.filters
index 45f6d6c..e5989dc 100644
--- a/demo/compiler/vc12win32/flexDemoCUDA.vcxproj.filters
+++ b/demo/compiler/vc12win32/flexDemoCUDA.vcxproj.filters
@@ -111,9 +111,6 @@
<ClInclude Include="..\..\scenes\plasticbody.h">
<Filter>demo\scenes</Filter>
</ClInclude>
- <ClInclude Include="..\..\scenes\plasticstack.h">
- <Filter>demo\scenes</Filter>
- </ClInclude>
<ClInclude Include="..\..\scenes\player.h">
<Filter>demo\scenes</Filter>
</ClInclude>
@@ -144,6 +141,9 @@
<ClInclude Include="..\..\scenes\sdfcollision.h">
<Filter>demo\scenes</Filter>
</ClInclude>
+ <ClInclude Include="..\..\scenes\shapechannels.h">
+ <Filter>demo\scenes</Filter>
+ </ClInclude>
<ClInclude Include="..\..\scenes\shapecollision.h">
<Filter>demo\scenes</Filter>
</ClInclude>
diff --git a/demo/compiler/vc12win32/flexDemoD3D.vcxproj b/demo/compiler/vc12win32/flexDemoD3D.vcxproj
index 4708dba..264f9d9 100644
--- a/demo/compiler/vc12win32/flexDemoD3D.vcxproj
+++ b/demo/compiler/vc12win32/flexDemoD3D.vcxproj
@@ -47,15 +47,15 @@
<FloatingPointModel>Precise</FloatingPointModel>
<AdditionalOptions> /d2Zi+</AdditionalOptions>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(CUDA_PATH)/include;$(CUDA_PATH)/extras/cupti/include;./../../..;./../..;./../../d3d11;./../../../external/SDL2-2.0.4/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CONSOLE;WIN32;_CRT_SECURE_NO_WARNINGS;FLEX_DX;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;FLEX_DIRECT_COMPUTE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(CUDA_PATH)/include;$(CUDA_PATH)/extras/cupti/include;./../../..;./../..;./../../d3d11;./../../d3d12;./../../../external/SDL2-2.0.4/include;./../../../external/D3D12/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CONSOLE;WIN32;_CRT_SECURE_NO_WARNINGS;FLEX_DX;FLEX_DX12;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;FLEX_DIRECT_COMPUTE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
</ClCompile>
<Link>
- <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2main.lib;./../../../lib/win32/NvFlexDebugD3D_x86.lib;./../../../lib/win32/NvFlexExtDebugD3D_x86.lib;./../../../external/glew/lib/win32/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;d3dcompiler.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2main.lib;./../../../external/NvToolsExt/lib/Win32/nvToolsExt32_1.lib;./../../../external/D3D12/libs/x86/d3d12.lib;./../../../lib/win32/NvFlexDebugD3D_x86.lib;./../../../lib/win32/NvFlexExtDebugD3D_x86.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)NvFlexDemoDebugD3D_x86.exe</OutputFile>
<AdditionalLibraryDirectories>$(CUDA_PATH)/lib/win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)/NvFlexDemoDebugD3D_x86.exe.pdb</ProgramDatabaseFile>
@@ -86,15 +86,15 @@
<FloatingPointModel>Fast</FloatingPointModel>
<AdditionalOptions> /d2Zi+</AdditionalOptions>
<Optimization>Full</Optimization>
- <AdditionalIncludeDirectories>$(CUDA_PATH)/include;$(CUDA_PATH)/extras/cupti/include;./../../..;./../..;./../../d3d11;./../../../external/SDL2-2.0.4/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CONSOLE;WIN32;_CRT_SECURE_NO_WARNINGS;FLEX_DX;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(CUDA_PATH)/include;$(CUDA_PATH)/extras/cupti/include;./../../..;./../..;./../../d3d11;./../../d3d12;./../../../external/SDL2-2.0.4/include;./../../../external/D3D12/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CONSOLE;WIN32;_CRT_SECURE_NO_WARNINGS;FLEX_DX;FLEX_DX12;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
</ClCompile>
<Link>
- <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2main.lib;./../../../lib/win32/NvFlexReleaseD3D_x86.lib;./../../../lib/win32/NvFlexExtReleaseD3D_x86.lib;./../../../external/glew/lib/win32/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;d3dcompiler.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2main.lib;./../../../external/NvToolsExt/lib/Win32/nvToolsExt32_1.lib;./../../../external/D3D12/libs/x86/d3d12.lib;./../../../lib/win32/NvFlexReleaseD3D_x86.lib;./../../../lib/win32/NvFlexExtReleaseD3D_x86.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)NvFlexDemoReleaseD3D_x86.exe</OutputFile>
<AdditionalLibraryDirectories>$(CUDA_PATH)/lib/win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)/NvFlexDemoReleaseD3D_x86.exe.pdb</ProgramDatabaseFile>
@@ -183,8 +183,6 @@
</ClInclude>
<ClInclude Include="..\..\scenes\plasticbody.h">
</ClInclude>
- <ClInclude Include="..\..\scenes\plasticstack.h">
- </ClInclude>
<ClInclude Include="..\..\scenes\player.h">
</ClInclude>
<ClInclude Include="..\..\scenes\potpourri.h">
@@ -205,6 +203,8 @@
</ClInclude>
<ClInclude Include="..\..\scenes\sdfcollision.h">
</ClInclude>
+ <ClInclude Include="..\..\scenes\shapechannels.h">
+ </ClInclude>
<ClInclude Include="..\..\scenes\shapecollision.h">
</ClInclude>
<ClInclude Include="..\..\scenes\softbody.h">
@@ -325,56 +325,200 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
+ <ClInclude Include="..\..\d3d12\appD3D12Ctx.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\bufferD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\demoContextD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\diffusePointRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidCompositeRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidEllipsoidRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidSmoothRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\imguiGraphD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\lineRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRenderer.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRendererD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshUtil.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12CircularResourceHeap.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12CounterFence.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12DescriptorHeap.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12Handle.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12HelperUtil.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12RenderTarget.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12Resource.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12ResourceScopeManager.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDxDebugUtil.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDxFormatUtil.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoFreeList.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvResult.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\pipelineUtilD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\pointRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\renderStateD3D12.h">
+ </ClInclude>
+ <ClCompile Include="..\..\d3d12\appD3D12Ctx.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\bufferD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\demoContextD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\diffusePointRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidCompositeRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidEllipsoidRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidSmoothRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\imguiGraphD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\imguiInteropD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\lineRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRenderer.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRendererD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshUtil.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12CircularResourceHeap.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12CounterFence.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12DescriptorHeap.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12HelperUtil.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12RenderTarget.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12Resource.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12ResourceScopeManager.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDxDebugUtil.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDxFormatUtil.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoFreeList.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\pipelineUtilD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\pointRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\renderStateD3D12.cpp">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
<ClInclude Include="..\..\d3d11\appD3D11Ctx.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\debugLineRender.h">
+ <ClInclude Include="..\..\d3d11\debugLineRenderD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\diffuseRender.h">
+ <ClInclude Include="..\..\d3d11\demoContextD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\fluidRender.h">
+ <ClInclude Include="..\..\d3d11\diffuseRenderD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\imguiGraph.h">
+ <ClInclude Include="..\..\d3d11\fluidRenderD3D11.h">
</ClInclude>
<ClInclude Include="..\..\d3d11\imguiGraphD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\meshRender.h">
+ <ClInclude Include="..\..\d3d11\meshRenderD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\pointRender.h">
+ <ClInclude Include="..\..\d3d11\pointRenderD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\renderTarget.h">
+ <ClInclude Include="..\..\d3d11\renderTargetD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\shadowMap.h">
+ <ClInclude Include="..\..\d3d11\shadowMapD3D11.h">
</ClInclude>
<ClCompile Include="..\..\d3d11\appD3D11Ctx.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\diffuseRender.cpp">
+ <ClCompile Include="..\..\d3d11\debugLineRenderD3D11.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\fluidRender.cpp">
+ <ClCompile Include="..\..\d3d11\demoContextD3D11.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\imguiGraph.cpp">
+ <ClCompile Include="..\..\d3d11\diffuseRenderD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\fluidRenderD3D11.cpp">
</ClCompile>
<ClCompile Include="..\..\d3d11\imguiGraphD3D11.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\meshRender.cpp">
+ <ClCompile Include="..\..\d3d11\imguiInteropD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\meshRenderD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\pointRenderD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\renderTargetD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\shadowMapD3D11.cpp">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\d3d\appGraphCtx.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\demoContext.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\imguiGraph.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\loader.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\loaderMacros.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\renderParamsD3D.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\shaderCommonD3D.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\shadersDemoContext.h">
+ </ClInclude>
+ <ClCompile Include="..\..\d3d\appGraphCtxLoader.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\pointRender.cpp">
+ <ClCompile Include="..\..\d3d\imguiGraph.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\renderTarget.cpp">
+ <ClCompile Include="..\..\d3d\imguiGraphLoader.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\shadersD3D11.cpp">
+ <ClCompile Include="..\..\d3d\loader.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\shadowMap.cpp">
+ <ClCompile Include="..\..\d3d\renderParamsD3D.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\shadersDemoContext.cpp">
</ClCompile>
</ItemGroup>
<ItemGroup>
- <FxCompile Include="./../../d3d11/shaders/debugLineVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/debugLineVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">debugLineVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -382,17 +526,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">debugLineVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/debugLinePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/debugLinePS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">debugLinePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -400,17 +544,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">debugLinePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/imguiPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/imguiPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">imguiPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -418,17 +562,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">imguiPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/imguiVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/imguiVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">imguiVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -436,17 +580,35 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">imguiVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
+ </FxCompile>
+ <FxCompile Include="./../../d3d/shaders/meshPS.hlsl">
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
+ <ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
+ <EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
+ <DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
+ <EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">meshPS</EntryPointName>
+ <TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
+ <ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
+ <EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</EnableDebuggingInformation>
+ <DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
+ <EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">meshPS</EntryPointName>
+ <TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshAsyncComputeBenchPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">meshPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -454,17 +616,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">meshPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshShadowPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshShadowPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">meshPS_Shadow</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -472,17 +634,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">meshPS_Shadow</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">meshVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -490,17 +652,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">meshVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">pointVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -508,17 +670,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">pointVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointGS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">pointGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -526,17 +688,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">pointGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">pointPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -544,17 +706,35 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">pointPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
+ </FxCompile>
+ <FxCompile Include="./../../d3d/shaders/pointShadowPS.hlsl">
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
+ <ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
+ <EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
+ <DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
+ <EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">pointShadowPS</EntryPointName>
+ <TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
+ <ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
+ <EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</EnableDebuggingInformation>
+ <DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
+ <EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">pointShadowPS</EntryPointName>
+ <TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffuseVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffuseVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">diffuseVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -562,17 +742,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">diffuseVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffuseGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffuseGS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">diffuseGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -580,17 +760,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">diffuseGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffusePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffusePS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">diffusePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -598,17 +778,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">diffusePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">ellipsoidDepthVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -616,17 +796,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">ellipsoidDepthVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthGS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">ellipsoidDepthGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -634,17 +814,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">ellipsoidDepthGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">ellipsoidDepthPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -652,17 +832,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">ellipsoidDepthPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/passThroughVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/passThroughVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">passThroughVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -670,17 +850,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">passThroughVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/blurDepthPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/blurDepthPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">blurDepthPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -688,17 +868,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">blurDepthPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/compositePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/compositePS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">compositePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -706,7 +886,7 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">compositePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
</ItemGroup>
diff --git a/demo/compiler/vc12win32/flexDemoD3D.vcxproj.filters b/demo/compiler/vc12win32/flexDemoD3D.vcxproj.filters
index 15615f5..b7f0548 100644
--- a/demo/compiler/vc12win32/flexDemoD3D.vcxproj.filters
+++ b/demo/compiler/vc12win32/flexDemoD3D.vcxproj.filters
@@ -111,9 +111,6 @@
<ClInclude Include="..\..\scenes\plasticbody.h">
<Filter>demo\scenes</Filter>
</ClInclude>
- <ClInclude Include="..\..\scenes\plasticstack.h">
- <Filter>demo\scenes</Filter>
- </ClInclude>
<ClInclude Include="..\..\scenes\player.h">
<Filter>demo\scenes</Filter>
</ClInclude>
@@ -144,6 +141,9 @@
<ClInclude Include="..\..\scenes\sdfcollision.h">
<Filter>demo\scenes</Filter>
</ClInclude>
+ <ClInclude Include="..\..\scenes\shapechannels.h">
+ <Filter>demo\scenes</Filter>
+ </ClInclude>
<ClInclude Include="..\..\scenes\shapecollision.h">
<Filter>demo\scenes</Filter>
</ClInclude>
@@ -328,6 +328,177 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
+ <Filter Include="d3d12">
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\d3d12\appD3D12Ctx.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\bufferD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\demoContextD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\diffusePointRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidCompositeRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidEllipsoidRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidSmoothRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\imguiGraphD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\lineRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRenderer.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRendererD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshUtil.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12CircularResourceHeap.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12CounterFence.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12DescriptorHeap.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12Handle.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12HelperUtil.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12RenderTarget.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12Resource.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12ResourceScopeManager.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDxDebugUtil.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDxFormatUtil.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoFreeList.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvResult.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\pipelineUtilD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\pointRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\renderStateD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClCompile Include="..\..\d3d12\appD3D12Ctx.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\bufferD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\demoContextD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\diffusePointRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidCompositeRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidEllipsoidRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidSmoothRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\imguiGraphD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\imguiInteropD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\lineRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRenderer.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRendererD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshUtil.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12CircularResourceHeap.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12CounterFence.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12DescriptorHeap.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12HelperUtil.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12RenderTarget.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12Resource.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12ResourceScopeManager.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDxDebugUtil.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDxFormatUtil.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoFreeList.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\pipelineUtilD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\pointRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\renderStateD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
<Filter Include="d3d11">
</Filter>
</ItemGroup>
@@ -335,121 +506,178 @@
<ClInclude Include="..\..\d3d11\appD3D11Ctx.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\debugLineRender.h">
+ <ClInclude Include="..\..\d3d11\debugLineRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\diffuseRender.h">
+ <ClInclude Include="..\..\d3d11\demoContextD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\fluidRender.h">
+ <ClInclude Include="..\..\d3d11\diffuseRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\imguiGraph.h">
+ <ClInclude Include="..\..\d3d11\fluidRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
<ClInclude Include="..\..\d3d11\imguiGraphD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\meshRender.h">
+ <ClInclude Include="..\..\d3d11\meshRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\pointRender.h">
+ <ClInclude Include="..\..\d3d11\pointRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\renderTarget.h">
+ <ClInclude Include="..\..\d3d11\renderTargetD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\shadowMap.h">
+ <ClInclude Include="..\..\d3d11\shadowMapD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
<ClCompile Include="..\..\d3d11\appD3D11Ctx.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\diffuseRender.cpp">
+ <ClCompile Include="..\..\d3d11\debugLineRenderD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\fluidRender.cpp">
+ <ClCompile Include="..\..\d3d11\demoContextD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\imguiGraph.cpp">
+ <ClCompile Include="..\..\d3d11\diffuseRenderD3D11.cpp">
+ <Filter>d3d11</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\fluidRenderD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
<ClCompile Include="..\..\d3d11\imguiGraphD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\meshRender.cpp">
+ <ClCompile Include="..\..\d3d11\imguiInteropD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\pointRender.cpp">
+ <ClCompile Include="..\..\d3d11\meshRenderD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\renderTarget.cpp">
+ <ClCompile Include="..\..\d3d11\pointRenderD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\shadersD3D11.cpp">
+ <ClCompile Include="..\..\d3d11\renderTargetD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\shadowMap.cpp">
+ <ClCompile Include="..\..\d3d11\shadowMapD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
</ItemGroup>
+ <ItemGroup>
+ <Filter Include="d3d">
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\d3d\appGraphCtx.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\demoContext.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\imguiGraph.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\loader.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\loaderMacros.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\renderParamsD3D.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\shaderCommonD3D.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\shadersDemoContext.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClCompile Include="..\..\d3d\appGraphCtxLoader.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\imguiGraph.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\imguiGraphLoader.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\loader.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\renderParamsD3D.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\shadersDemoContext.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ </ItemGroup>
<ItemGroup><Filter Include="Shader Files"></Filter></ItemGroup>
<ItemGroup>
- <FxCompile Include="./../../d3d11/shaders/debugLineVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/debugLineVS.hlsl">
+ <Filter>Shader Files</Filter>
+ </FxCompile>
+ <FxCompile Include="./../../d3d/shaders/debugLinePS.hlsl">
+ <Filter>Shader Files</Filter>
+ </FxCompile>
+ <FxCompile Include="./../../d3d/shaders/imguiPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/debugLinePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/imguiVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/imguiPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/imguiVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshAsyncComputeBenchPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshShadowPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshShadowPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointGS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointShadowPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffuseVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffuseVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffuseGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffuseGS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffusePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffusePS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthGS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/passThroughVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/passThroughVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/blurDepthPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/blurDepthPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/compositePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/compositePS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
</ItemGroup>
diff --git a/demo/compiler/vc12win64/flexDemoCUDA.vcxproj b/demo/compiler/vc12win64/flexDemoCUDA.vcxproj
index d00d61c..e37c7e7 100644
--- a/demo/compiler/vc12win64/flexDemoCUDA.vcxproj
+++ b/demo/compiler/vc12win64/flexDemoCUDA.vcxproj
@@ -55,7 +55,7 @@
<PrecompiledHeaderFile></PrecompiledHeaderFile>
</ClCompile>
<Link>
- <AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../lib/win64/NvFlexDebugCUDA_x64.lib;./../../../lib/win64/NvFlexExtDebugCUDA_x64.lib;./../../../lib/win64/NvFlexDeviceDebug_x64.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2main.lib;./../../../external/glew/lib/x64/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../lib/win64/NvFlexDebugCUDA_x64.lib;./../../../lib/win64/NvFlexExtDebugCUDA_x64.lib;./../../../lib/win64/NvFlexDeviceDebug_x64.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2main.lib;./../../../external/NvToolsExt/lib/x64/nvToolsExt64_1.lib;./../../../external/glew/lib/x64/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)NvFlexDemoDebugCUDA_x64.exe</OutputFile>
<AdditionalLibraryDirectories>$(CUDA_PATH)/lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)/NvFlexDemoDebugCUDA_x64.exe.pdb</ProgramDatabaseFile>
@@ -95,7 +95,7 @@
<PrecompiledHeaderFile></PrecompiledHeaderFile>
</ClCompile>
<Link>
- <AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../lib/win64/NvFlexReleaseCUDA_x64.lib;./../../../lib/win64/NvFlexExtReleaseCUDA_x64.lib;./../../../lib/win64/NvFlexDeviceRelease_x64.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2main.lib;./../../../external/glew/lib/x64/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../lib/win64/NvFlexReleaseCUDA_x64.lib;./../../../lib/win64/NvFlexExtReleaseCUDA_x64.lib;./../../../lib/win64/NvFlexDeviceRelease_x64.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2main.lib;./../../../external/NvToolsExt/lib/x64/nvToolsExt64_1.lib;./../../../external/glew/lib/x64/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)NvFlexDemoReleaseCUDA_x64.exe</OutputFile>
<AdditionalLibraryDirectories>$(CUDA_PATH)/lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)/NvFlexDemoReleaseCUDA_x64.exe.pdb</ProgramDatabaseFile>
@@ -184,8 +184,6 @@
</ClInclude>
<ClInclude Include="..\..\scenes\plasticbody.h">
</ClInclude>
- <ClInclude Include="..\..\scenes\plasticstack.h">
- </ClInclude>
<ClInclude Include="..\..\scenes\player.h">
</ClInclude>
<ClInclude Include="..\..\scenes\potpourri.h">
@@ -206,6 +204,8 @@
</ClInclude>
<ClInclude Include="..\..\scenes\sdfcollision.h">
</ClInclude>
+ <ClInclude Include="..\..\scenes\shapechannels.h">
+ </ClInclude>
<ClInclude Include="..\..\scenes\shapecollision.h">
</ClInclude>
<ClInclude Include="..\..\scenes\softbody.h">
diff --git a/demo/compiler/vc12win64/flexDemoCUDA.vcxproj.filters b/demo/compiler/vc12win64/flexDemoCUDA.vcxproj.filters
index 45f6d6c..e5989dc 100644
--- a/demo/compiler/vc12win64/flexDemoCUDA.vcxproj.filters
+++ b/demo/compiler/vc12win64/flexDemoCUDA.vcxproj.filters
@@ -111,9 +111,6 @@
<ClInclude Include="..\..\scenes\plasticbody.h">
<Filter>demo\scenes</Filter>
</ClInclude>
- <ClInclude Include="..\..\scenes\plasticstack.h">
- <Filter>demo\scenes</Filter>
- </ClInclude>
<ClInclude Include="..\..\scenes\player.h">
<Filter>demo\scenes</Filter>
</ClInclude>
@@ -144,6 +141,9 @@
<ClInclude Include="..\..\scenes\sdfcollision.h">
<Filter>demo\scenes</Filter>
</ClInclude>
+ <ClInclude Include="..\..\scenes\shapechannels.h">
+ <Filter>demo\scenes</Filter>
+ </ClInclude>
<ClInclude Include="..\..\scenes\shapecollision.h">
<Filter>demo\scenes</Filter>
</ClInclude>
diff --git a/demo/compiler/vc12win64/flexDemoD3D.vcxproj b/demo/compiler/vc12win64/flexDemoD3D.vcxproj
index 50513db..d30d642 100644
--- a/demo/compiler/vc12win64/flexDemoD3D.vcxproj
+++ b/demo/compiler/vc12win64/flexDemoD3D.vcxproj
@@ -47,15 +47,15 @@
<FloatingPointModel>Precise</FloatingPointModel>
<AdditionalOptions> /d2Zi+</AdditionalOptions>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(CUDA_PATH)/include;$(CUDA_PATH)/extras/cupti/include;./../../..;./../..;./../../d3d11;./../../../external/SDL2-2.0.4/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CONSOLE;WIN32;_CRT_SECURE_NO_WARNINGS;FLEX_DX;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(CUDA_PATH)/include;$(CUDA_PATH)/extras/cupti/include;./../../..;./../..;./../../d3d11;./../../d3d12;./../../../external/SDL2-2.0.4/include;./../../../external/D3D12/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CONSOLE;WIN32;_CRT_SECURE_NO_WARNINGS;FLEX_DX;FLEX_DX12;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
</ClCompile>
<Link>
- <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2main.lib;./../../../lib/win64/NvFlexDebugD3D_x64.lib;./../../../lib/win64/NvFlexExtDebugD3D_x64.lib;./../../../external/glew/lib/x64/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;d3dcompiler.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2main.lib;./../../../external/NvToolsExt/lib/x64/nvToolsExt64_1.lib;./../../../external/D3D12/libs/x64/d3d12.lib;./../../../lib/win64/NvFlexDebugD3D_x64.lib;./../../../lib/win64/NvFlexExtDebugD3D_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)NvFlexDemoDebugD3D_x64.exe</OutputFile>
<AdditionalLibraryDirectories>$(CUDA_PATH)/lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)/NvFlexDemoDebugD3D_x64.exe.pdb</ProgramDatabaseFile>
@@ -86,15 +86,15 @@
<FloatingPointModel>Fast</FloatingPointModel>
<AdditionalOptions> /d2Zi+</AdditionalOptions>
<Optimization>Full</Optimization>
- <AdditionalIncludeDirectories>$(CUDA_PATH)/include;$(CUDA_PATH)/extras/cupti/include;./../../..;./../..;./../../d3d11;./../../../external/SDL2-2.0.4/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CONSOLE;WIN32;_CRT_SECURE_NO_WARNINGS;FLEX_DX;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(CUDA_PATH)/include;$(CUDA_PATH)/extras/cupti/include;./../../..;./../..;./../../d3d11;./../../d3d12;./../../../external/SDL2-2.0.4/include;./../../../external/D3D12/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CONSOLE;WIN32;_CRT_SECURE_NO_WARNINGS;FLEX_DX;FLEX_DX12;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
</ClCompile>
<Link>
- <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2main.lib;./../../../lib/win64/NvFlexReleaseD3D_x64.lib;./../../../lib/win64/NvFlexExtReleaseD3D_x64.lib;./../../../external/glew/lib/x64/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;d3dcompiler.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2main.lib;./../../../external/NvToolsExt/lib/x64/nvToolsExt64_1.lib;./../../../external/D3D12/libs/x64/d3d12.lib;./../../../lib/win64/NvFlexReleaseD3D_x64.lib;./../../../lib/win64/NvFlexExtReleaseD3D_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)NvFlexDemoReleaseD3D_x64.exe</OutputFile>
<AdditionalLibraryDirectories>$(CUDA_PATH)/lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)/NvFlexDemoReleaseD3D_x64.exe.pdb</ProgramDatabaseFile>
@@ -183,8 +183,6 @@
</ClInclude>
<ClInclude Include="..\..\scenes\plasticbody.h">
</ClInclude>
- <ClInclude Include="..\..\scenes\plasticstack.h">
- </ClInclude>
<ClInclude Include="..\..\scenes\player.h">
</ClInclude>
<ClInclude Include="..\..\scenes\potpourri.h">
@@ -205,6 +203,8 @@
</ClInclude>
<ClInclude Include="..\..\scenes\sdfcollision.h">
</ClInclude>
+ <ClInclude Include="..\..\scenes\shapechannels.h">
+ </ClInclude>
<ClInclude Include="..\..\scenes\shapecollision.h">
</ClInclude>
<ClInclude Include="..\..\scenes\softbody.h">
@@ -325,56 +325,200 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
+ <ClInclude Include="..\..\d3d12\appD3D12Ctx.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\bufferD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\demoContextD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\diffusePointRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidCompositeRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidEllipsoidRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidSmoothRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\imguiGraphD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\lineRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRenderer.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRendererD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshUtil.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12CircularResourceHeap.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12CounterFence.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12DescriptorHeap.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12Handle.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12HelperUtil.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12RenderTarget.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12Resource.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12ResourceScopeManager.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDxDebugUtil.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDxFormatUtil.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoFreeList.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvResult.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\pipelineUtilD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\pointRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\renderStateD3D12.h">
+ </ClInclude>
+ <ClCompile Include="..\..\d3d12\appD3D12Ctx.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\bufferD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\demoContextD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\diffusePointRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidCompositeRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidEllipsoidRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidSmoothRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\imguiGraphD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\imguiInteropD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\lineRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRenderer.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRendererD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshUtil.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12CircularResourceHeap.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12CounterFence.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12DescriptorHeap.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12HelperUtil.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12RenderTarget.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12Resource.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12ResourceScopeManager.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDxDebugUtil.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDxFormatUtil.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoFreeList.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\pipelineUtilD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\pointRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\renderStateD3D12.cpp">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
<ClInclude Include="..\..\d3d11\appD3D11Ctx.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\debugLineRender.h">
+ <ClInclude Include="..\..\d3d11\debugLineRenderD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\diffuseRender.h">
+ <ClInclude Include="..\..\d3d11\demoContextD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\fluidRender.h">
+ <ClInclude Include="..\..\d3d11\diffuseRenderD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\imguiGraph.h">
+ <ClInclude Include="..\..\d3d11\fluidRenderD3D11.h">
</ClInclude>
<ClInclude Include="..\..\d3d11\imguiGraphD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\meshRender.h">
+ <ClInclude Include="..\..\d3d11\meshRenderD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\pointRender.h">
+ <ClInclude Include="..\..\d3d11\pointRenderD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\renderTarget.h">
+ <ClInclude Include="..\..\d3d11\renderTargetD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\shadowMap.h">
+ <ClInclude Include="..\..\d3d11\shadowMapD3D11.h">
</ClInclude>
<ClCompile Include="..\..\d3d11\appD3D11Ctx.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\diffuseRender.cpp">
+ <ClCompile Include="..\..\d3d11\debugLineRenderD3D11.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\fluidRender.cpp">
+ <ClCompile Include="..\..\d3d11\demoContextD3D11.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\imguiGraph.cpp">
+ <ClCompile Include="..\..\d3d11\diffuseRenderD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\fluidRenderD3D11.cpp">
</ClCompile>
<ClCompile Include="..\..\d3d11\imguiGraphD3D11.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\meshRender.cpp">
+ <ClCompile Include="..\..\d3d11\imguiInteropD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\meshRenderD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\pointRenderD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\renderTargetD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\shadowMapD3D11.cpp">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\d3d\appGraphCtx.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\demoContext.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\imguiGraph.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\loader.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\loaderMacros.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\renderParamsD3D.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\shaderCommonD3D.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\shadersDemoContext.h">
+ </ClInclude>
+ <ClCompile Include="..\..\d3d\appGraphCtxLoader.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\pointRender.cpp">
+ <ClCompile Include="..\..\d3d\imguiGraph.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\renderTarget.cpp">
+ <ClCompile Include="..\..\d3d\imguiGraphLoader.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\shadersD3D11.cpp">
+ <ClCompile Include="..\..\d3d\loader.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\shadowMap.cpp">
+ <ClCompile Include="..\..\d3d\renderParamsD3D.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\shadersDemoContext.cpp">
</ClCompile>
</ItemGroup>
<ItemGroup>
- <FxCompile Include="./../../d3d11/shaders/debugLineVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/debugLineVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">debugLineVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -382,17 +526,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">debugLineVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/debugLinePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/debugLinePS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">debugLinePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -400,17 +544,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">debugLinePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/imguiPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/imguiPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">imguiPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -418,17 +562,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">imguiPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/imguiVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/imguiVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">imguiVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -436,17 +580,35 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">imguiVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
+ </FxCompile>
+ <FxCompile Include="./../../d3d/shaders/meshPS.hlsl">
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
+ <ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
+ <EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
+ <DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
+ <EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">meshPS</EntryPointName>
+ <TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
+ <ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
+ <EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</EnableDebuggingInformation>
+ <DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
+ <EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">meshPS</EntryPointName>
+ <TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshAsyncComputeBenchPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">meshPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -454,17 +616,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">meshPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshShadowPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshShadowPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">meshPS_Shadow</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -472,17 +634,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">meshPS_Shadow</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">meshVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -490,17 +652,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">meshVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">pointVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -508,17 +670,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">pointVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointGS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">pointGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -526,17 +688,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">pointGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">pointPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -544,17 +706,35 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">pointPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
+ </FxCompile>
+ <FxCompile Include="./../../d3d/shaders/pointShadowPS.hlsl">
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
+ <ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
+ <EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
+ <DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
+ <EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">pointShadowPS</EntryPointName>
+ <TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
+ <ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
+ <EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</EnableDebuggingInformation>
+ <DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
+ <EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">pointShadowPS</EntryPointName>
+ <TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffuseVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffuseVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">diffuseVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -562,17 +742,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">diffuseVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffuseGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffuseGS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">diffuseGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -580,17 +760,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">diffuseGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffusePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffusePS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">diffusePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -598,17 +778,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">diffusePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">ellipsoidDepthVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -616,17 +796,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">ellipsoidDepthVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthGS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">ellipsoidDepthGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -634,17 +814,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">ellipsoidDepthGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">ellipsoidDepthPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -652,17 +832,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">ellipsoidDepthPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/passThroughVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/passThroughVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">passThroughVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -670,17 +850,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">passThroughVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/blurDepthPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/blurDepthPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">blurDepthPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -688,17 +868,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">blurDepthPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/compositePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/compositePS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">compositePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -706,7 +886,7 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">compositePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
</ItemGroup>
diff --git a/demo/compiler/vc12win64/flexDemoD3D.vcxproj.filters b/demo/compiler/vc12win64/flexDemoD3D.vcxproj.filters
index 15615f5..b7f0548 100644
--- a/demo/compiler/vc12win64/flexDemoD3D.vcxproj.filters
+++ b/demo/compiler/vc12win64/flexDemoD3D.vcxproj.filters
@@ -111,9 +111,6 @@
<ClInclude Include="..\..\scenes\plasticbody.h">
<Filter>demo\scenes</Filter>
</ClInclude>
- <ClInclude Include="..\..\scenes\plasticstack.h">
- <Filter>demo\scenes</Filter>
- </ClInclude>
<ClInclude Include="..\..\scenes\player.h">
<Filter>demo\scenes</Filter>
</ClInclude>
@@ -144,6 +141,9 @@
<ClInclude Include="..\..\scenes\sdfcollision.h">
<Filter>demo\scenes</Filter>
</ClInclude>
+ <ClInclude Include="..\..\scenes\shapechannels.h">
+ <Filter>demo\scenes</Filter>
+ </ClInclude>
<ClInclude Include="..\..\scenes\shapecollision.h">
<Filter>demo\scenes</Filter>
</ClInclude>
@@ -328,6 +328,177 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
+ <Filter Include="d3d12">
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\d3d12\appD3D12Ctx.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\bufferD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\demoContextD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\diffusePointRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidCompositeRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidEllipsoidRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidSmoothRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\imguiGraphD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\lineRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRenderer.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRendererD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshUtil.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12CircularResourceHeap.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12CounterFence.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12DescriptorHeap.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12Handle.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12HelperUtil.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12RenderTarget.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12Resource.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12ResourceScopeManager.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDxDebugUtil.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDxFormatUtil.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoFreeList.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvResult.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\pipelineUtilD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\pointRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\renderStateD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClCompile Include="..\..\d3d12\appD3D12Ctx.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\bufferD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\demoContextD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\diffusePointRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidCompositeRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidEllipsoidRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidSmoothRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\imguiGraphD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\imguiInteropD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\lineRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRenderer.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRendererD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshUtil.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12CircularResourceHeap.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12CounterFence.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12DescriptorHeap.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12HelperUtil.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12RenderTarget.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12Resource.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12ResourceScopeManager.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDxDebugUtil.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDxFormatUtil.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoFreeList.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\pipelineUtilD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\pointRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\renderStateD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
<Filter Include="d3d11">
</Filter>
</ItemGroup>
@@ -335,121 +506,178 @@
<ClInclude Include="..\..\d3d11\appD3D11Ctx.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\debugLineRender.h">
+ <ClInclude Include="..\..\d3d11\debugLineRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\diffuseRender.h">
+ <ClInclude Include="..\..\d3d11\demoContextD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\fluidRender.h">
+ <ClInclude Include="..\..\d3d11\diffuseRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\imguiGraph.h">
+ <ClInclude Include="..\..\d3d11\fluidRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
<ClInclude Include="..\..\d3d11\imguiGraphD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\meshRender.h">
+ <ClInclude Include="..\..\d3d11\meshRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\pointRender.h">
+ <ClInclude Include="..\..\d3d11\pointRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\renderTarget.h">
+ <ClInclude Include="..\..\d3d11\renderTargetD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\shadowMap.h">
+ <ClInclude Include="..\..\d3d11\shadowMapD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
<ClCompile Include="..\..\d3d11\appD3D11Ctx.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\diffuseRender.cpp">
+ <ClCompile Include="..\..\d3d11\debugLineRenderD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\fluidRender.cpp">
+ <ClCompile Include="..\..\d3d11\demoContextD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\imguiGraph.cpp">
+ <ClCompile Include="..\..\d3d11\diffuseRenderD3D11.cpp">
+ <Filter>d3d11</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\fluidRenderD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
<ClCompile Include="..\..\d3d11\imguiGraphD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\meshRender.cpp">
+ <ClCompile Include="..\..\d3d11\imguiInteropD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\pointRender.cpp">
+ <ClCompile Include="..\..\d3d11\meshRenderD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\renderTarget.cpp">
+ <ClCompile Include="..\..\d3d11\pointRenderD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\shadersD3D11.cpp">
+ <ClCompile Include="..\..\d3d11\renderTargetD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\shadowMap.cpp">
+ <ClCompile Include="..\..\d3d11\shadowMapD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
</ItemGroup>
+ <ItemGroup>
+ <Filter Include="d3d">
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\d3d\appGraphCtx.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\demoContext.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\imguiGraph.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\loader.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\loaderMacros.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\renderParamsD3D.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\shaderCommonD3D.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\shadersDemoContext.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClCompile Include="..\..\d3d\appGraphCtxLoader.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\imguiGraph.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\imguiGraphLoader.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\loader.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\renderParamsD3D.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\shadersDemoContext.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ </ItemGroup>
<ItemGroup><Filter Include="Shader Files"></Filter></ItemGroup>
<ItemGroup>
- <FxCompile Include="./../../d3d11/shaders/debugLineVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/debugLineVS.hlsl">
+ <Filter>Shader Files</Filter>
+ </FxCompile>
+ <FxCompile Include="./../../d3d/shaders/debugLinePS.hlsl">
+ <Filter>Shader Files</Filter>
+ </FxCompile>
+ <FxCompile Include="./../../d3d/shaders/imguiPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/debugLinePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/imguiVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/imguiPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/imguiVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshAsyncComputeBenchPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshShadowPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshShadowPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointGS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointShadowPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffuseVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffuseVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffuseGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffuseGS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffusePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffusePS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthGS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/passThroughVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/passThroughVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/blurDepthPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/blurDepthPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/compositePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/compositePS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
</ItemGroup>
diff --git a/demo/compiler/vc14win32/flexDemoCUDA.vcxproj b/demo/compiler/vc14win32/flexDemoCUDA.vcxproj
index d9aca99..984c2e4 100644
--- a/demo/compiler/vc14win32/flexDemoCUDA.vcxproj
+++ b/demo/compiler/vc14win32/flexDemoCUDA.vcxproj
@@ -55,7 +55,7 @@
<PrecompiledHeaderFile></PrecompiledHeaderFile>
</ClCompile>
<Link>
- <AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../lib/win32/NvFlexDebugCUDA_x86.lib;./../../../lib/win32/NvFlexExtDebugCUDA_x86.lib;./../../../lib/win32/NvFlexDeviceDebug_x86.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2main.lib;./../../../external/glew/lib/win32/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../lib/win32/NvFlexDebugCUDA_x86.lib;./../../../lib/win32/NvFlexExtDebugCUDA_x86.lib;./../../../lib/win32/NvFlexDeviceDebug_x86.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2main.lib;./../../../external/NvToolsExt/lib/Win32/nvToolsExt32_1.lib;./../../../external/glew/lib/win32/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)NvFlexDemoDebugCUDA_x86.exe</OutputFile>
<AdditionalLibraryDirectories>$(CUDA_PATH)/lib/win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)/NvFlexDemoDebugCUDA_x86.exe.pdb</ProgramDatabaseFile>
@@ -95,7 +95,7 @@
<PrecompiledHeaderFile></PrecompiledHeaderFile>
</ClCompile>
<Link>
- <AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../lib/win32/NvFlexReleaseCUDA_x86.lib;./../../../lib/win32/NvFlexExtReleaseCUDA_x86.lib;./../../../lib/win32/NvFlexDeviceRelease_x86.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2main.lib;./../../../external/glew/lib/win32/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../lib/win32/NvFlexReleaseCUDA_x86.lib;./../../../lib/win32/NvFlexExtReleaseCUDA_x86.lib;./../../../lib/win32/NvFlexDeviceRelease_x86.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2main.lib;./../../../external/NvToolsExt/lib/Win32/nvToolsExt32_1.lib;./../../../external/glew/lib/win32/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)NvFlexDemoReleaseCUDA_x86.exe</OutputFile>
<AdditionalLibraryDirectories>$(CUDA_PATH)/lib/win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)/NvFlexDemoReleaseCUDA_x86.exe.pdb</ProgramDatabaseFile>
@@ -184,8 +184,6 @@
</ClInclude>
<ClInclude Include="..\..\scenes\plasticbody.h">
</ClInclude>
- <ClInclude Include="..\..\scenes\plasticstack.h">
- </ClInclude>
<ClInclude Include="..\..\scenes\player.h">
</ClInclude>
<ClInclude Include="..\..\scenes\potpourri.h">
@@ -206,6 +204,8 @@
</ClInclude>
<ClInclude Include="..\..\scenes\sdfcollision.h">
</ClInclude>
+ <ClInclude Include="..\..\scenes\shapechannels.h">
+ </ClInclude>
<ClInclude Include="..\..\scenes\shapecollision.h">
</ClInclude>
<ClInclude Include="..\..\scenes\softbody.h">
diff --git a/demo/compiler/vc14win32/flexDemoCUDA.vcxproj.filters b/demo/compiler/vc14win32/flexDemoCUDA.vcxproj.filters
index 45f6d6c..e5989dc 100644
--- a/demo/compiler/vc14win32/flexDemoCUDA.vcxproj.filters
+++ b/demo/compiler/vc14win32/flexDemoCUDA.vcxproj.filters
@@ -111,9 +111,6 @@
<ClInclude Include="..\..\scenes\plasticbody.h">
<Filter>demo\scenes</Filter>
</ClInclude>
- <ClInclude Include="..\..\scenes\plasticstack.h">
- <Filter>demo\scenes</Filter>
- </ClInclude>
<ClInclude Include="..\..\scenes\player.h">
<Filter>demo\scenes</Filter>
</ClInclude>
@@ -144,6 +141,9 @@
<ClInclude Include="..\..\scenes\sdfcollision.h">
<Filter>demo\scenes</Filter>
</ClInclude>
+ <ClInclude Include="..\..\scenes\shapechannels.h">
+ <Filter>demo\scenes</Filter>
+ </ClInclude>
<ClInclude Include="..\..\scenes\shapecollision.h">
<Filter>demo\scenes</Filter>
</ClInclude>
diff --git a/demo/compiler/vc14win32/flexDemoD3D.vcxproj b/demo/compiler/vc14win32/flexDemoD3D.vcxproj
index 6744073..a926666 100644
--- a/demo/compiler/vc14win32/flexDemoD3D.vcxproj
+++ b/demo/compiler/vc14win32/flexDemoD3D.vcxproj
@@ -13,6 +13,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{EF4EDDD8-2620-47AA-E75D-4C682C276C02}</ProjectGuid>
<RootNamespace>flexDemoD3D</RootNamespace>
+ <WindowsTargetPlatformVersion>10.0.10586.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug|Win32'" Label="Configuration">
@@ -47,15 +48,15 @@
<FloatingPointModel>Precise</FloatingPointModel>
<AdditionalOptions> /d2Zi+</AdditionalOptions>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(CUDA_PATH)/include;$(CUDA_PATH)/extras/cupti/include;./../../..;./../..;./../../d3d11;./../../../external/SDL2-2.0.4/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CONSOLE;WIN32;_CRT_SECURE_NO_WARNINGS;FLEX_DX;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;FLEX_DIRECT_COMPUTE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(CUDA_PATH)/include;$(CUDA_PATH)/extras/cupti/include;./../../..;./../..;./../../d3d11;./../../d3d12;./../../../external/SDL2-2.0.4/include;./../../../external/D3D12/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CONSOLE;WIN32;_CRT_SECURE_NO_WARNINGS;FLEX_DX;FLEX_DX12;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;FLEX_DIRECT_COMPUTE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
</ClCompile>
<Link>
- <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2main.lib;./../../../lib/win32/NvFlexDebugD3D_x86.lib;./../../../lib/win32/NvFlexExtDebugD3D_x86.lib;./../../../external/glew/lib/win32/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;d3dcompiler.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2main.lib;./../../../external/NvToolsExt/lib/Win32/nvToolsExt32_1.lib;./../../../external/D3D12/libs/x86/d3d12.lib;./../../../lib/win32/NvFlexDebugD3D_x86.lib;./../../../lib/win32/NvFlexExtDebugD3D_x86.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)NvFlexDemoDebugD3D_x86.exe</OutputFile>
<AdditionalLibraryDirectories>$(CUDA_PATH)/lib/win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)/NvFlexDemoDebugD3D_x86.exe.pdb</ProgramDatabaseFile>
@@ -86,15 +87,15 @@
<FloatingPointModel>Fast</FloatingPointModel>
<AdditionalOptions> /d2Zi+</AdditionalOptions>
<Optimization>Full</Optimization>
- <AdditionalIncludeDirectories>$(CUDA_PATH)/include;$(CUDA_PATH)/extras/cupti/include;./../../..;./../..;./../../d3d11;./../../../external/SDL2-2.0.4/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CONSOLE;WIN32;_CRT_SECURE_NO_WARNINGS;FLEX_DX;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(CUDA_PATH)/include;$(CUDA_PATH)/extras/cupti/include;./../../..;./../..;./../../d3d11;./../../d3d12;./../../../external/SDL2-2.0.4/include;./../../../external/D3D12/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CONSOLE;WIN32;_CRT_SECURE_NO_WARNINGS;FLEX_DX;FLEX_DX12;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
</ClCompile>
<Link>
- <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2main.lib;./../../../lib/win32/NvFlexReleaseD3D_x86.lib;./../../../lib/win32/NvFlexExtReleaseD3D_x86.lib;./../../../external/glew/lib/win32/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;d3dcompiler.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x86/SDL2main.lib;./../../../external/NvToolsExt/lib/Win32/nvToolsExt32_1.lib;./../../../external/D3D12/libs/x86/d3d12.lib;./../../../lib/win32/NvFlexReleaseD3D_x86.lib;./../../../lib/win32/NvFlexExtReleaseD3D_x86.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)NvFlexDemoReleaseD3D_x86.exe</OutputFile>
<AdditionalLibraryDirectories>$(CUDA_PATH)/lib/win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)/NvFlexDemoReleaseD3D_x86.exe.pdb</ProgramDatabaseFile>
@@ -183,8 +184,6 @@
</ClInclude>
<ClInclude Include="..\..\scenes\plasticbody.h">
</ClInclude>
- <ClInclude Include="..\..\scenes\plasticstack.h">
- </ClInclude>
<ClInclude Include="..\..\scenes\player.h">
</ClInclude>
<ClInclude Include="..\..\scenes\potpourri.h">
@@ -205,6 +204,8 @@
</ClInclude>
<ClInclude Include="..\..\scenes\sdfcollision.h">
</ClInclude>
+ <ClInclude Include="..\..\scenes\shapechannels.h">
+ </ClInclude>
<ClInclude Include="..\..\scenes\shapecollision.h">
</ClInclude>
<ClInclude Include="..\..\scenes\softbody.h">
@@ -325,56 +326,200 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
+ <ClInclude Include="..\..\d3d12\appD3D12Ctx.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\bufferD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\demoContextD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\diffusePointRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidCompositeRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidEllipsoidRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidSmoothRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\imguiGraphD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\lineRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRenderer.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRendererD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshUtil.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12CircularResourceHeap.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12CounterFence.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12DescriptorHeap.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12Handle.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12HelperUtil.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12RenderTarget.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12Resource.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12ResourceScopeManager.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDxDebugUtil.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDxFormatUtil.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoFreeList.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvResult.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\pipelineUtilD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\pointRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\renderStateD3D12.h">
+ </ClInclude>
+ <ClCompile Include="..\..\d3d12\appD3D12Ctx.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\bufferD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\demoContextD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\diffusePointRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidCompositeRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidEllipsoidRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidSmoothRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\imguiGraphD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\imguiInteropD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\lineRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRenderer.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRendererD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshUtil.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12CircularResourceHeap.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12CounterFence.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12DescriptorHeap.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12HelperUtil.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12RenderTarget.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12Resource.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12ResourceScopeManager.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDxDebugUtil.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDxFormatUtil.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoFreeList.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\pipelineUtilD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\pointRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\renderStateD3D12.cpp">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
<ClInclude Include="..\..\d3d11\appD3D11Ctx.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\debugLineRender.h">
+ <ClInclude Include="..\..\d3d11\debugLineRenderD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\diffuseRender.h">
+ <ClInclude Include="..\..\d3d11\demoContextD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\fluidRender.h">
+ <ClInclude Include="..\..\d3d11\diffuseRenderD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\imguiGraph.h">
+ <ClInclude Include="..\..\d3d11\fluidRenderD3D11.h">
</ClInclude>
<ClInclude Include="..\..\d3d11\imguiGraphD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\meshRender.h">
+ <ClInclude Include="..\..\d3d11\meshRenderD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\pointRender.h">
+ <ClInclude Include="..\..\d3d11\pointRenderD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\renderTarget.h">
+ <ClInclude Include="..\..\d3d11\renderTargetD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\shadowMap.h">
+ <ClInclude Include="..\..\d3d11\shadowMapD3D11.h">
</ClInclude>
<ClCompile Include="..\..\d3d11\appD3D11Ctx.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\diffuseRender.cpp">
+ <ClCompile Include="..\..\d3d11\debugLineRenderD3D11.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\fluidRender.cpp">
+ <ClCompile Include="..\..\d3d11\demoContextD3D11.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\imguiGraph.cpp">
+ <ClCompile Include="..\..\d3d11\diffuseRenderD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\fluidRenderD3D11.cpp">
</ClCompile>
<ClCompile Include="..\..\d3d11\imguiGraphD3D11.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\meshRender.cpp">
+ <ClCompile Include="..\..\d3d11\imguiInteropD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\meshRenderD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\pointRenderD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\renderTargetD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\shadowMapD3D11.cpp">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\d3d\appGraphCtx.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\demoContext.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\imguiGraph.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\loader.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\loaderMacros.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\renderParamsD3D.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\shaderCommonD3D.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\shadersDemoContext.h">
+ </ClInclude>
+ <ClCompile Include="..\..\d3d\appGraphCtxLoader.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\pointRender.cpp">
+ <ClCompile Include="..\..\d3d\imguiGraph.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\renderTarget.cpp">
+ <ClCompile Include="..\..\d3d\imguiGraphLoader.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\shadersD3D11.cpp">
+ <ClCompile Include="..\..\d3d\loader.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\shadowMap.cpp">
+ <ClCompile Include="..\..\d3d\renderParamsD3D.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\shadersDemoContext.cpp">
</ClCompile>
</ItemGroup>
<ItemGroup>
- <FxCompile Include="./../../d3d11/shaders/debugLineVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/debugLineVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">debugLineVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -382,17 +527,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">debugLineVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/debugLinePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/debugLinePS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">debugLinePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -400,17 +545,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">debugLinePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/imguiPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/imguiPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">imguiPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -418,17 +563,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">imguiPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/imguiVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/imguiVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">imguiVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -436,17 +581,35 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">imguiVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
+ </FxCompile>
+ <FxCompile Include="./../../d3d/shaders/meshPS.hlsl">
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
+ <ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
+ <EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
+ <DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
+ <EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">meshPS</EntryPointName>
+ <TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
+ <ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
+ <EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</EnableDebuggingInformation>
+ <DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
+ <EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">meshPS</EntryPointName>
+ <TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshAsyncComputeBenchPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">meshPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -454,17 +617,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">meshPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshShadowPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshShadowPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">meshPS_Shadow</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -472,17 +635,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">meshPS_Shadow</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">meshVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -490,17 +653,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">meshVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">pointVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -508,17 +671,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">pointVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointGS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">pointGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -526,17 +689,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">pointGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">pointPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -544,17 +707,35 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">pointPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
+ </FxCompile>
+ <FxCompile Include="./../../d3d/shaders/pointShadowPS.hlsl">
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
+ <ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
+ <EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
+ <DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
+ <EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">pointShadowPS</EntryPointName>
+ <TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
+ <ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
+ <EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</EnableDebuggingInformation>
+ <DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
+ <EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">pointShadowPS</EntryPointName>
+ <TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffuseVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffuseVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">diffuseVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -562,17 +743,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">diffuseVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffuseGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffuseGS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">diffuseGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -580,17 +761,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">diffuseGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffusePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffusePS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">diffusePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -598,17 +779,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">diffusePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">ellipsoidDepthVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -616,17 +797,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">ellipsoidDepthVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthGS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">ellipsoidDepthGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -634,17 +815,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">ellipsoidDepthGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">ellipsoidDepthPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -652,17 +833,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">ellipsoidDepthPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/passThroughVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/passThroughVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">passThroughVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -670,17 +851,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">passThroughVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/blurDepthPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/blurDepthPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">blurDepthPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -688,17 +869,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">blurDepthPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/compositePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/compositePS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">compositePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|Win32'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|Win32'">5.0</ShaderModel>
@@ -706,7 +887,7 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|Win32'">compositePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|Win32'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|Win32'"> </ObjectFileOutput>
</FxCompile>
</ItemGroup>
diff --git a/demo/compiler/vc14win32/flexDemoD3D.vcxproj.filters b/demo/compiler/vc14win32/flexDemoD3D.vcxproj.filters
index 15615f5..b7f0548 100644
--- a/demo/compiler/vc14win32/flexDemoD3D.vcxproj.filters
+++ b/demo/compiler/vc14win32/flexDemoD3D.vcxproj.filters
@@ -111,9 +111,6 @@
<ClInclude Include="..\..\scenes\plasticbody.h">
<Filter>demo\scenes</Filter>
</ClInclude>
- <ClInclude Include="..\..\scenes\plasticstack.h">
- <Filter>demo\scenes</Filter>
- </ClInclude>
<ClInclude Include="..\..\scenes\player.h">
<Filter>demo\scenes</Filter>
</ClInclude>
@@ -144,6 +141,9 @@
<ClInclude Include="..\..\scenes\sdfcollision.h">
<Filter>demo\scenes</Filter>
</ClInclude>
+ <ClInclude Include="..\..\scenes\shapechannels.h">
+ <Filter>demo\scenes</Filter>
+ </ClInclude>
<ClInclude Include="..\..\scenes\shapecollision.h">
<Filter>demo\scenes</Filter>
</ClInclude>
@@ -328,6 +328,177 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
+ <Filter Include="d3d12">
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\d3d12\appD3D12Ctx.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\bufferD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\demoContextD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\diffusePointRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidCompositeRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidEllipsoidRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidSmoothRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\imguiGraphD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\lineRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRenderer.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRendererD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshUtil.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12CircularResourceHeap.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12CounterFence.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12DescriptorHeap.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12Handle.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12HelperUtil.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12RenderTarget.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12Resource.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12ResourceScopeManager.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDxDebugUtil.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDxFormatUtil.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoFreeList.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvResult.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\pipelineUtilD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\pointRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\renderStateD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClCompile Include="..\..\d3d12\appD3D12Ctx.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\bufferD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\demoContextD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\diffusePointRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidCompositeRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidEllipsoidRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidSmoothRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\imguiGraphD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\imguiInteropD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\lineRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRenderer.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRendererD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshUtil.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12CircularResourceHeap.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12CounterFence.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12DescriptorHeap.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12HelperUtil.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12RenderTarget.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12Resource.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12ResourceScopeManager.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDxDebugUtil.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDxFormatUtil.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoFreeList.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\pipelineUtilD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\pointRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\renderStateD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
<Filter Include="d3d11">
</Filter>
</ItemGroup>
@@ -335,121 +506,178 @@
<ClInclude Include="..\..\d3d11\appD3D11Ctx.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\debugLineRender.h">
+ <ClInclude Include="..\..\d3d11\debugLineRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\diffuseRender.h">
+ <ClInclude Include="..\..\d3d11\demoContextD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\fluidRender.h">
+ <ClInclude Include="..\..\d3d11\diffuseRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\imguiGraph.h">
+ <ClInclude Include="..\..\d3d11\fluidRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
<ClInclude Include="..\..\d3d11\imguiGraphD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\meshRender.h">
+ <ClInclude Include="..\..\d3d11\meshRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\pointRender.h">
+ <ClInclude Include="..\..\d3d11\pointRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\renderTarget.h">
+ <ClInclude Include="..\..\d3d11\renderTargetD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\shadowMap.h">
+ <ClInclude Include="..\..\d3d11\shadowMapD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
<ClCompile Include="..\..\d3d11\appD3D11Ctx.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\diffuseRender.cpp">
+ <ClCompile Include="..\..\d3d11\debugLineRenderD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\fluidRender.cpp">
+ <ClCompile Include="..\..\d3d11\demoContextD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\imguiGraph.cpp">
+ <ClCompile Include="..\..\d3d11\diffuseRenderD3D11.cpp">
+ <Filter>d3d11</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\fluidRenderD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
<ClCompile Include="..\..\d3d11\imguiGraphD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\meshRender.cpp">
+ <ClCompile Include="..\..\d3d11\imguiInteropD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\pointRender.cpp">
+ <ClCompile Include="..\..\d3d11\meshRenderD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\renderTarget.cpp">
+ <ClCompile Include="..\..\d3d11\pointRenderD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\shadersD3D11.cpp">
+ <ClCompile Include="..\..\d3d11\renderTargetD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\shadowMap.cpp">
+ <ClCompile Include="..\..\d3d11\shadowMapD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
</ItemGroup>
+ <ItemGroup>
+ <Filter Include="d3d">
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\d3d\appGraphCtx.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\demoContext.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\imguiGraph.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\loader.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\loaderMacros.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\renderParamsD3D.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\shaderCommonD3D.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\shadersDemoContext.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClCompile Include="..\..\d3d\appGraphCtxLoader.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\imguiGraph.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\imguiGraphLoader.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\loader.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\renderParamsD3D.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\shadersDemoContext.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ </ItemGroup>
<ItemGroup><Filter Include="Shader Files"></Filter></ItemGroup>
<ItemGroup>
- <FxCompile Include="./../../d3d11/shaders/debugLineVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/debugLineVS.hlsl">
+ <Filter>Shader Files</Filter>
+ </FxCompile>
+ <FxCompile Include="./../../d3d/shaders/debugLinePS.hlsl">
+ <Filter>Shader Files</Filter>
+ </FxCompile>
+ <FxCompile Include="./../../d3d/shaders/imguiPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/debugLinePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/imguiVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/imguiPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/imguiVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshAsyncComputeBenchPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshShadowPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshShadowPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointGS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointShadowPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffuseVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffuseVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffuseGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffuseGS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffusePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffusePS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthGS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/passThroughVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/passThroughVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/blurDepthPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/blurDepthPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/compositePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/compositePS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
</ItemGroup>
diff --git a/demo/compiler/vc14win64/flexDemoCUDA.vcxproj b/demo/compiler/vc14win64/flexDemoCUDA.vcxproj
index 056fb6d..8b4c665 100644
--- a/demo/compiler/vc14win64/flexDemoCUDA.vcxproj
+++ b/demo/compiler/vc14win64/flexDemoCUDA.vcxproj
@@ -55,7 +55,7 @@
<PrecompiledHeaderFile></PrecompiledHeaderFile>
</ClCompile>
<Link>
- <AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../lib/win64/NvFlexDebugCUDA_x64.lib;./../../../lib/win64/NvFlexExtDebugCUDA_x64.lib;./../../../lib/win64/NvFlexDeviceDebug_x64.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2main.lib;./../../../external/glew/lib/x64/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../lib/win64/NvFlexDebugCUDA_x64.lib;./../../../lib/win64/NvFlexExtDebugCUDA_x64.lib;./../../../lib/win64/NvFlexDeviceDebug_x64.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2main.lib;./../../../external/NvToolsExt/lib/x64/nvToolsExt64_1.lib;./../../../external/glew/lib/x64/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)NvFlexDemoDebugCUDA_x64.exe</OutputFile>
<AdditionalLibraryDirectories>$(CUDA_PATH)/lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)/NvFlexDemoDebugCUDA_x64.exe.pdb</ProgramDatabaseFile>
@@ -95,7 +95,7 @@
<PrecompiledHeaderFile></PrecompiledHeaderFile>
</ClCompile>
<Link>
- <AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../lib/win64/NvFlexReleaseCUDA_x64.lib;./../../../lib/win64/NvFlexExtReleaseCUDA_x64.lib;./../../../lib/win64/NvFlexDeviceRelease_x64.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2main.lib;./../../../external/glew/lib/x64/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../lib/win64/NvFlexReleaseCUDA_x64.lib;./../../../lib/win64/NvFlexExtReleaseCUDA_x64.lib;./../../../lib/win64/NvFlexDeviceRelease_x64.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2main.lib;./../../../external/NvToolsExt/lib/x64/nvToolsExt64_1.lib;./../../../external/glew/lib/x64/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)NvFlexDemoReleaseCUDA_x64.exe</OutputFile>
<AdditionalLibraryDirectories>$(CUDA_PATH)/lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)/NvFlexDemoReleaseCUDA_x64.exe.pdb</ProgramDatabaseFile>
@@ -184,8 +184,6 @@
</ClInclude>
<ClInclude Include="..\..\scenes\plasticbody.h">
</ClInclude>
- <ClInclude Include="..\..\scenes\plasticstack.h">
- </ClInclude>
<ClInclude Include="..\..\scenes\player.h">
</ClInclude>
<ClInclude Include="..\..\scenes\potpourri.h">
@@ -206,6 +204,8 @@
</ClInclude>
<ClInclude Include="..\..\scenes\sdfcollision.h">
</ClInclude>
+ <ClInclude Include="..\..\scenes\shapechannels.h">
+ </ClInclude>
<ClInclude Include="..\..\scenes\shapecollision.h">
</ClInclude>
<ClInclude Include="..\..\scenes\softbody.h">
diff --git a/demo/compiler/vc14win64/flexDemoCUDA.vcxproj.filters b/demo/compiler/vc14win64/flexDemoCUDA.vcxproj.filters
index 45f6d6c..e5989dc 100644
--- a/demo/compiler/vc14win64/flexDemoCUDA.vcxproj.filters
+++ b/demo/compiler/vc14win64/flexDemoCUDA.vcxproj.filters
@@ -111,9 +111,6 @@
<ClInclude Include="..\..\scenes\plasticbody.h">
<Filter>demo\scenes</Filter>
</ClInclude>
- <ClInclude Include="..\..\scenes\plasticstack.h">
- <Filter>demo\scenes</Filter>
- </ClInclude>
<ClInclude Include="..\..\scenes\player.h">
<Filter>demo\scenes</Filter>
</ClInclude>
@@ -144,6 +141,9 @@
<ClInclude Include="..\..\scenes\sdfcollision.h">
<Filter>demo\scenes</Filter>
</ClInclude>
+ <ClInclude Include="..\..\scenes\shapechannels.h">
+ <Filter>demo\scenes</Filter>
+ </ClInclude>
<ClInclude Include="..\..\scenes\shapecollision.h">
<Filter>demo\scenes</Filter>
</ClInclude>
diff --git a/demo/compiler/vc14win64/flexDemoD3D.vcxproj b/demo/compiler/vc14win64/flexDemoD3D.vcxproj
index 9b3dfae..3fbd922 100644
--- a/demo/compiler/vc14win64/flexDemoD3D.vcxproj
+++ b/demo/compiler/vc14win64/flexDemoD3D.vcxproj
@@ -13,6 +13,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{EF4EDDD8-2620-47AA-E75D-4C682C276C02}</ProjectGuid>
<RootNamespace>flexDemoD3D</RootNamespace>
+ <WindowsTargetPlatformVersion>10.0.10586.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug|x64'" Label="Configuration">
@@ -47,15 +48,15 @@
<FloatingPointModel>Precise</FloatingPointModel>
<AdditionalOptions> /d2Zi+</AdditionalOptions>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(CUDA_PATH)/include;$(CUDA_PATH)/extras/cupti/include;./../../..;./../..;./../../d3d11;./../../../external/SDL2-2.0.4/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CONSOLE;WIN32;_CRT_SECURE_NO_WARNINGS;FLEX_DX;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(CUDA_PATH)/include;$(CUDA_PATH)/extras/cupti/include;./../../..;./../..;./../../d3d11;./../../d3d12;./../../../external/SDL2-2.0.4/include;./../../../external/D3D12/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CONSOLE;WIN32;_CRT_SECURE_NO_WARNINGS;FLEX_DX;FLEX_DX12;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
</ClCompile>
<Link>
- <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2main.lib;./../../../lib/win64/NvFlexDebugD3D_x64.lib;./../../../lib/win64/NvFlexExtDebugD3D_x64.lib;./../../../external/glew/lib/x64/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;d3dcompiler.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2main.lib;./../../../external/NvToolsExt/lib/x64/nvToolsExt64_1.lib;./../../../external/D3D12/libs/x64/d3d12.lib;./../../../lib/win64/NvFlexDebugD3D_x64.lib;./../../../lib/win64/NvFlexExtDebugD3D_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)NvFlexDemoDebugD3D_x64.exe</OutputFile>
<AdditionalLibraryDirectories>$(CUDA_PATH)/lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)/NvFlexDemoDebugD3D_x64.exe.pdb</ProgramDatabaseFile>
@@ -86,15 +87,15 @@
<FloatingPointModel>Fast</FloatingPointModel>
<AdditionalOptions> /d2Zi+</AdditionalOptions>
<Optimization>Full</Optimization>
- <AdditionalIncludeDirectories>$(CUDA_PATH)/include;$(CUDA_PATH)/extras/cupti/include;./../../..;./../..;./../../d3d11;./../../../external/SDL2-2.0.4/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CONSOLE;WIN32;_CRT_SECURE_NO_WARNINGS;FLEX_DX;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(CUDA_PATH)/include;$(CUDA_PATH)/extras/cupti/include;./../../..;./../..;./../../d3d11;./../../d3d12;./../../../external/SDL2-2.0.4/include;./../../../external/D3D12/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CONSOLE;WIN32;_CRT_SECURE_NO_WARNINGS;FLEX_DX;FLEX_DX12;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
</ClCompile>
<Link>
- <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2main.lib;./../../../lib/win64/NvFlexReleaseD3D_x64.lib;./../../../lib/win64/NvFlexExtReleaseD3D_x64.lib;./../../../external/glew/lib/x64/glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;d3dcompiler.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2.lib;./../../../external/SDL2-2.0.4/lib/x64/SDL2main.lib;./../../../external/NvToolsExt/lib/x64/nvToolsExt64_1.lib;./../../../external/D3D12/libs/x64/d3d12.lib;./../../../lib/win64/NvFlexReleaseD3D_x64.lib;./../../../lib/win64/NvFlexExtReleaseD3D_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)NvFlexDemoReleaseD3D_x64.exe</OutputFile>
<AdditionalLibraryDirectories>$(CUDA_PATH)/lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)/NvFlexDemoReleaseD3D_x64.exe.pdb</ProgramDatabaseFile>
@@ -183,8 +184,6 @@
</ClInclude>
<ClInclude Include="..\..\scenes\plasticbody.h">
</ClInclude>
- <ClInclude Include="..\..\scenes\plasticstack.h">
- </ClInclude>
<ClInclude Include="..\..\scenes\player.h">
</ClInclude>
<ClInclude Include="..\..\scenes\potpourri.h">
@@ -205,6 +204,8 @@
</ClInclude>
<ClInclude Include="..\..\scenes\sdfcollision.h">
</ClInclude>
+ <ClInclude Include="..\..\scenes\shapechannels.h">
+ </ClInclude>
<ClInclude Include="..\..\scenes\shapecollision.h">
</ClInclude>
<ClInclude Include="..\..\scenes\softbody.h">
@@ -325,56 +326,200 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
+ <ClInclude Include="..\..\d3d12\appD3D12Ctx.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\bufferD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\demoContextD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\diffusePointRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidCompositeRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidEllipsoidRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidSmoothRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\imguiGraphD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\lineRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRenderer.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRendererD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshUtil.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12CircularResourceHeap.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12CounterFence.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12DescriptorHeap.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12Handle.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12HelperUtil.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12RenderTarget.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12Resource.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12ResourceScopeManager.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDxDebugUtil.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDxFormatUtil.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoFreeList.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvResult.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\pipelineUtilD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\pointRenderPipelineD3D12.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\renderStateD3D12.h">
+ </ClInclude>
+ <ClCompile Include="..\..\d3d12\appD3D12Ctx.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\bufferD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\demoContextD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\diffusePointRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidCompositeRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidEllipsoidRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidSmoothRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\imguiGraphD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\imguiInteropD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\lineRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRenderer.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRendererD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshUtil.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12CircularResourceHeap.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12CounterFence.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12DescriptorHeap.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12HelperUtil.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12RenderTarget.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12Resource.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12ResourceScopeManager.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDxDebugUtil.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDxFormatUtil.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoFreeList.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\pipelineUtilD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\pointRenderPipelineD3D12.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\renderStateD3D12.cpp">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
<ClInclude Include="..\..\d3d11\appD3D11Ctx.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\debugLineRender.h">
+ <ClInclude Include="..\..\d3d11\debugLineRenderD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\diffuseRender.h">
+ <ClInclude Include="..\..\d3d11\demoContextD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\fluidRender.h">
+ <ClInclude Include="..\..\d3d11\diffuseRenderD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\imguiGraph.h">
+ <ClInclude Include="..\..\d3d11\fluidRenderD3D11.h">
</ClInclude>
<ClInclude Include="..\..\d3d11\imguiGraphD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\meshRender.h">
+ <ClInclude Include="..\..\d3d11\meshRenderD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\pointRender.h">
+ <ClInclude Include="..\..\d3d11\pointRenderD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\renderTarget.h">
+ <ClInclude Include="..\..\d3d11\renderTargetD3D11.h">
</ClInclude>
- <ClInclude Include="..\..\d3d11\shadowMap.h">
+ <ClInclude Include="..\..\d3d11\shadowMapD3D11.h">
</ClInclude>
<ClCompile Include="..\..\d3d11\appD3D11Ctx.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\diffuseRender.cpp">
+ <ClCompile Include="..\..\d3d11\debugLineRenderD3D11.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\fluidRender.cpp">
+ <ClCompile Include="..\..\d3d11\demoContextD3D11.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\imguiGraph.cpp">
+ <ClCompile Include="..\..\d3d11\diffuseRenderD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\fluidRenderD3D11.cpp">
</ClCompile>
<ClCompile Include="..\..\d3d11\imguiGraphD3D11.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\meshRender.cpp">
+ <ClCompile Include="..\..\d3d11\imguiInteropD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\meshRenderD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\pointRenderD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\renderTargetD3D11.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\shadowMapD3D11.cpp">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\d3d\appGraphCtx.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\demoContext.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\imguiGraph.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\loader.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\loaderMacros.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\renderParamsD3D.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\shaderCommonD3D.h">
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\shadersDemoContext.h">
+ </ClInclude>
+ <ClCompile Include="..\..\d3d\appGraphCtxLoader.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\pointRender.cpp">
+ <ClCompile Include="..\..\d3d\imguiGraph.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\renderTarget.cpp">
+ <ClCompile Include="..\..\d3d\imguiGraphLoader.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\shadersD3D11.cpp">
+ <ClCompile Include="..\..\d3d\loader.cpp">
</ClCompile>
- <ClCompile Include="..\..\d3d11\shadowMap.cpp">
+ <ClCompile Include="..\..\d3d\renderParamsD3D.cpp">
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\shadersDemoContext.cpp">
</ClCompile>
</ItemGroup>
<ItemGroup>
- <FxCompile Include="./../../d3d11/shaders/debugLineVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/debugLineVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">debugLineVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -382,17 +527,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">debugLineVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/debugLinePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/debugLinePS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">debugLinePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -400,17 +545,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">debugLinePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/imguiPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/imguiPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">imguiPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -418,17 +563,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">imguiPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/imguiVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/imguiVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">imguiVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -436,17 +581,35 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">imguiVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
+ </FxCompile>
+ <FxCompile Include="./../../d3d/shaders/meshPS.hlsl">
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
+ <ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
+ <EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
+ <DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
+ <EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">meshPS</EntryPointName>
+ <TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
+ <ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
+ <EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</EnableDebuggingInformation>
+ <DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
+ <EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">meshPS</EntryPointName>
+ <TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshAsyncComputeBenchPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">meshPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -454,17 +617,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">meshPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshShadowPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshShadowPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">meshPS_Shadow</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -472,17 +635,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">meshPS_Shadow</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">meshVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -490,17 +653,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">meshVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">pointVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -508,17 +671,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">pointVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointGS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">pointGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -526,17 +689,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">pointGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">pointPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -544,17 +707,35 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">pointPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
+ </FxCompile>
+ <FxCompile Include="./../../d3d/shaders/pointShadowPS.hlsl">
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
+ <ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
+ <EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
+ <DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
+ <EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">pointShadowPS</EntryPointName>
+ <TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
+ <ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
+ <EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</EnableDebuggingInformation>
+ <DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
+ <EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">pointShadowPS</EntryPointName>
+ <TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffuseVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffuseVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">diffuseVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -562,17 +743,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">diffuseVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffuseGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffuseGS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">diffuseGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -580,17 +761,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">diffuseGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffusePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffusePS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">diffusePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -598,17 +779,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">diffusePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">ellipsoidDepthVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -616,17 +797,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">ellipsoidDepthVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthGS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">ellipsoidDepthGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Geometry</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -634,17 +815,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">ellipsoidDepthGS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">ellipsoidDepthPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -652,17 +833,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">ellipsoidDepthPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/passThroughVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/passThroughVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">passThroughVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -670,17 +851,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">passThroughVS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/blurDepthPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/blurDepthPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">blurDepthPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -688,17 +869,17 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">blurDepthPS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/compositePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/compositePS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='debug|x64'">5.0</ShaderModel>
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</EnableDebuggingInformation>
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='debug|x64'">compositePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='debug|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> </ObjectFileOutput>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='release|x64'">5.0</ShaderModel>
@@ -706,7 +887,7 @@
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</DisableOptimizations>
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='release|x64'">compositePS</EntryPointName>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='release|x64'">false</TreatWarningAsError>
- <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d11/shaders/%(Filename).hlsl.h</HeaderFileOutput>
+ <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'">../../../demo/d3d/shaders/%(Filename).hlsl.h</HeaderFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='release|x64'"> </ObjectFileOutput>
</FxCompile>
</ItemGroup>
diff --git a/demo/compiler/vc14win64/flexDemoD3D.vcxproj.filters b/demo/compiler/vc14win64/flexDemoD3D.vcxproj.filters
index 15615f5..b7f0548 100644
--- a/demo/compiler/vc14win64/flexDemoD3D.vcxproj.filters
+++ b/demo/compiler/vc14win64/flexDemoD3D.vcxproj.filters
@@ -111,9 +111,6 @@
<ClInclude Include="..\..\scenes\plasticbody.h">
<Filter>demo\scenes</Filter>
</ClInclude>
- <ClInclude Include="..\..\scenes\plasticstack.h">
- <Filter>demo\scenes</Filter>
- </ClInclude>
<ClInclude Include="..\..\scenes\player.h">
<Filter>demo\scenes</Filter>
</ClInclude>
@@ -144,6 +141,9 @@
<ClInclude Include="..\..\scenes\sdfcollision.h">
<Filter>demo\scenes</Filter>
</ClInclude>
+ <ClInclude Include="..\..\scenes\shapechannels.h">
+ <Filter>demo\scenes</Filter>
+ </ClInclude>
<ClInclude Include="..\..\scenes\shapecollision.h">
<Filter>demo\scenes</Filter>
</ClInclude>
@@ -328,6 +328,177 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
+ <Filter Include="d3d12">
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\d3d12\appD3D12Ctx.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\bufferD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\demoContextD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\diffusePointRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidCompositeRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidEllipsoidRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\fluidSmoothRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\imguiGraphD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\lineRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRenderer.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRendererD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\meshUtil.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12CircularResourceHeap.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12CounterFence.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12DescriptorHeap.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12Handle.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12HelperUtil.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12RenderTarget.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12Resource.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDx12ResourceScopeManager.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDxDebugUtil.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoDxFormatUtil.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvCoFreeList.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\NvResult.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\pipelineUtilD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\pointRenderPipelineD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d12\renderStateD3D12.h">
+ <Filter>d3d12</Filter>
+ </ClInclude>
+ <ClCompile Include="..\..\d3d12\appD3D12Ctx.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\bufferD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\demoContextD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\diffusePointRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidCompositeRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidEllipsoidRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\fluidSmoothRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\imguiGraphD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\imguiInteropD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\lineRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRenderer.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRendererD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\meshUtil.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12CircularResourceHeap.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12CounterFence.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12DescriptorHeap.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12HelperUtil.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12RenderTarget.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12Resource.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDx12ResourceScopeManager.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDxDebugUtil.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoDxFormatUtil.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\NvCoFreeList.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\pipelineUtilD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\pointRenderPipelineD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d12\renderStateD3D12.cpp">
+ <Filter>d3d12</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
<Filter Include="d3d11">
</Filter>
</ItemGroup>
@@ -335,121 +506,178 @@
<ClInclude Include="..\..\d3d11\appD3D11Ctx.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\debugLineRender.h">
+ <ClInclude Include="..\..\d3d11\debugLineRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\diffuseRender.h">
+ <ClInclude Include="..\..\d3d11\demoContextD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\fluidRender.h">
+ <ClInclude Include="..\..\d3d11\diffuseRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\imguiGraph.h">
+ <ClInclude Include="..\..\d3d11\fluidRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
<ClInclude Include="..\..\d3d11\imguiGraphD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\meshRender.h">
+ <ClInclude Include="..\..\d3d11\meshRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\pointRender.h">
+ <ClInclude Include="..\..\d3d11\pointRenderD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\renderTarget.h">
+ <ClInclude Include="..\..\d3d11\renderTargetD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
- <ClInclude Include="..\..\d3d11\shadowMap.h">
+ <ClInclude Include="..\..\d3d11\shadowMapD3D11.h">
<Filter>d3d11</Filter>
</ClInclude>
<ClCompile Include="..\..\d3d11\appD3D11Ctx.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\diffuseRender.cpp">
+ <ClCompile Include="..\..\d3d11\debugLineRenderD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\fluidRender.cpp">
+ <ClCompile Include="..\..\d3d11\demoContextD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\imguiGraph.cpp">
+ <ClCompile Include="..\..\d3d11\diffuseRenderD3D11.cpp">
+ <Filter>d3d11</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d11\fluidRenderD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
<ClCompile Include="..\..\d3d11\imguiGraphD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\meshRender.cpp">
+ <ClCompile Include="..\..\d3d11\imguiInteropD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\pointRender.cpp">
+ <ClCompile Include="..\..\d3d11\meshRenderD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\renderTarget.cpp">
+ <ClCompile Include="..\..\d3d11\pointRenderD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\shadersD3D11.cpp">
+ <ClCompile Include="..\..\d3d11\renderTargetD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
- <ClCompile Include="..\..\d3d11\shadowMap.cpp">
+ <ClCompile Include="..\..\d3d11\shadowMapD3D11.cpp">
<Filter>d3d11</Filter>
</ClCompile>
</ItemGroup>
+ <ItemGroup>
+ <Filter Include="d3d">
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\d3d\appGraphCtx.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\demoContext.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\imguiGraph.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\loader.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\loaderMacros.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\renderParamsD3D.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\shaderCommonD3D.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\d3d\shadersDemoContext.h">
+ <Filter>d3d</Filter>
+ </ClInclude>
+ <ClCompile Include="..\..\d3d\appGraphCtxLoader.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\imguiGraph.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\imguiGraphLoader.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\loader.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\renderParamsD3D.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\d3d\shadersDemoContext.cpp">
+ <Filter>d3d</Filter>
+ </ClCompile>
+ </ItemGroup>
<ItemGroup><Filter Include="Shader Files"></Filter></ItemGroup>
<ItemGroup>
- <FxCompile Include="./../../d3d11/shaders/debugLineVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/debugLineVS.hlsl">
+ <Filter>Shader Files</Filter>
+ </FxCompile>
+ <FxCompile Include="./../../d3d/shaders/debugLinePS.hlsl">
+ <Filter>Shader Files</Filter>
+ </FxCompile>
+ <FxCompile Include="./../../d3d/shaders/imguiPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/debugLinePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/imguiVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/imguiPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/imguiVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshAsyncComputeBenchPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshShadowPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshShadowPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/meshVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/meshVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointGS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/pointPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/pointShadowPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffuseVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffuseVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffuseGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffuseGS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/diffusePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/diffusePS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthGS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthGS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/ellipsoidDepthPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/ellipsoidDepthPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/passThroughVS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/passThroughVS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/blurDepthPS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/blurDepthPS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
- <FxCompile Include="./../../d3d11/shaders/compositePS.hlsl">
+ <FxCompile Include="./../../d3d/shaders/compositePS.hlsl">
<Filter>Shader Files</Filter>
</FxCompile>
</ItemGroup>
diff --git a/demo/compiler/xpj/flexDemoCUDA.xpj b/demo/compiler/xpj/flexDemoCUDA.xpj
index 1257e14..c4b7ab5 100644
--- a/demo/compiler/xpj/flexDemoCUDA.xpj
+++ b/demo/compiler/xpj/flexDemoCUDA.xpj
@@ -74,6 +74,7 @@
../../../lib/win32/NvFlexDeviceDebug_x86.lib
../../../external/SDL2-2.0.4/lib/x86/SDL2.lib
../../../external/SDL2-2.0.4/lib/x86/SDL2main.lib
+ ../../../external/NvToolsExt/lib/Win32/nvToolsExt32_1.lib
../../../external/glew/lib/win32/glew32.lib
</Libraries>
<Libraries platforms="Win64">
@@ -82,6 +83,7 @@
../../../lib/win64/NvFlexDeviceDebug_x64.lib
../../../external/SDL2-2.0.4/lib/x64/SDL2.lib
../../../external/SDL2-2.0.4/lib/x64/SDL2main.lib
+ ../../../external/NvToolsExt/lib/x64/nvToolsExt64_1.lib
../../../external/glew/lib/x64/glew32.lib
</Libraries>
@@ -111,6 +113,7 @@
../../../lib/win32/NvFlexDeviceRelease_x86.lib
../../../external/SDL2-2.0.4/lib/x86/SDL2.lib
../../../external/SDL2-2.0.4/lib/x86/SDL2main.lib
+ ../../../external/NvToolsExt/lib/Win32/nvToolsExt32_1.lib
../../../external/glew/lib/win32/glew32.lib
</Libraries>
<Libraries platforms="Win64">
@@ -119,87 +122,12 @@
../../../lib/win64/NvFlexDeviceRelease_x64.lib
../../../external/SDL2-2.0.4/lib/x64/SDL2.lib
../../../external/SDL2-2.0.4/lib/x64/SDL2main.lib
+ ../../../external/NvToolsExt/lib/x64/nvToolsExt64_1.lib
../../../external/glew/lib/x64/glew32.lib
</Libraries>
</Config>
-
- <!-- Android -->
-
- <Config name="default" type="app" platforms="android{x}">
-
- <apply-template name="android-common"/>
-
- <OutDir tool="make">${user:ProjectRoot}/demo/compiler/android/flex_project/libs/armeabi-v7a</OutDir>
-
- <Preprocessor type="define">
- android
- ANDROID=1
- ANDROID_PLAT=1
- DISABLE_IMPORTGL
- </Preprocessor>
-
- <SearchPaths type="header" tool="make">
- "${user:ProjectRoot}"
- "${user:ProjectRoot}/external/egl_setup"
- "${user:ProjectRoot}/external/regal_static/include"
- </SearchPaths>
-
- <SearchPaths type="library" tool="make">
- "${user:ProjectRoot}/external/regal_static/lib/armeabi-v7a"
- "${user:ProjectRoot}/lib/android"
- </SearchPaths>
-
- <Libraries>
- android stdc++ c m log dl EGL gomp cudart_static Regal_static
- </Libraries>
-
- <Libraries tool="make">
- stlport_static
- </Libraries>
-
- <ExceptionHandling>True</ExceptionHandling>
- <RuntimeTypeInfo>True</RuntimeTypeInfo>
-
- <CFlags>
- -std=c++11 -fno-exceptions -fno-rtti
- </CFlags>
-
- <CFlags tool="make">
- -fpic -fPIC -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -O2 -g -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300
- </CFlags>
-
- <LFlags tool="make">
- --sysroot=${NDK_ROOT}/${NDK_VERSION}/platforms/android-15/arch-arm -shared -Wl,--no-undefined
- </LFlags>
-
- <AndroidAPILevel>15</AndroidAPILevel>
- <AntBuildDirectory>
- ${user:ProjectRoot}/demo/compiler/android/flex_project
- </AntBuildDirectory>
- <AntJavaSourceDir>
- ${user:ProjectRoot}/demo/compiler/android/src
- </AntJavaSourceDir>
-
- </Config>
-
- <Configuration name="release" platforms="android{x}">
- <OutFile>libflexDemo.so</OutFile>
-
- <Preprocessor type="define">
- NDEBUG
- </Preprocessor>
-
- <AntBuildType>debug</AntBuildType>
-
- <Libraries>
- NvFlexRelease_armv7l
- NvFlexExtRelease_armv7l
- </Libraries>
-
- </Configuration>
-
<!-- Linux -->
<Config name="default" type="console" platforms="linux64">
@@ -220,7 +148,7 @@
</CFlags>
<LFlags>
- -g -L${user:External}/glew/lib/linux -L/usr/lib -L"../../../lib/linux64" -L${user:External}/SDL2-2.0.4/lib/x64/ -L${user:CUDA_PATH}/lib64 -lGL -lglut -lGLU -lGLEW -lcudart_static -ldl
+ -g -L${user:External}/glew/lib/linux -L/usr/lib -L"../../../lib/linux64" -L${user:External}/SDL2-2.0.4/lib/x64/ -L${user:CUDA_PATH}/lib64 -lGL -lglut -lGLU -lGLEW -lcudart_static -ldl -lrt -pthread
</LFlags>
</Config>
diff --git a/demo/compiler/xpj/flexDemoD3D.xpj b/demo/compiler/xpj/flexDemoD3D.xpj
index 0c95377..e957c5b 100644
--- a/demo/compiler/xpj/flexDemoD3D.xpj
+++ b/demo/compiler/xpj/flexDemoD3D.xpj
@@ -19,6 +19,9 @@
<Target name="flexDemoD3D">
+ <!-- Dx12 needs a post 8.1 version of windows SDK -->
+ <WindowsTargetPlatformVersion>10.0.10586.0</WindowsTargetPlatformVersion>
+
<!-- Windows -->
<Config name="default" type="console" platforms="Win32 Win64">
@@ -34,6 +37,7 @@
WIN32
_CRT_SECURE_NO_WARNINGS
FLEX_DX
+ FLEX_DX12
</Preprocessor>
<WarningLevel>3</WarningLevel>
@@ -42,23 +46,29 @@
<CharacterSet>MultiByte</CharacterSet>
<SearchPaths type="header">
- ${user:ProjectRoot}
- ${user:ProjectRoot}\demo
- ${user:ProjectRoot}\demo\d3d11
- ${user:ProjectRoot}\external\SDL2-2.0.4\include
+ ${user:ProjectRoot}
+ ${user:ProjectRoot}\demo
+ ${user:ProjectRoot}\demo\d3d11
+ ${user:ProjectRoot}\demo\d3d12
+ ${user:ProjectRoot}\external\SDL2-2.0.4\include
+ ${user:ProjectRoot}\external\D3D12\include
</SearchPaths>
<Libraries>
- kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
+ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib d3dcompiler.lib
</Libraries>
<Libraries platforms="Win32">
${user:ProjectRoot}/external/SDL2-2.0.4/lib/x86/SDL2.lib
${user:ProjectRoot}/external/SDL2-2.0.4/lib/x86/SDL2main.lib
+ ${user:ProjectRoot}/external/NvToolsExt/lib/Win32/nvToolsExt32_1.lib
+ ${user:ProjectRoot}/external/D3D12/libs/x86/d3d12.lib
</Libraries>
<Libraries platforms="Win64">
${user:ProjectRoot}/external/SDL2-2.0.4/lib/x64/SDL2.lib
${user:ProjectRoot}/external/SDL2-2.0.4/lib/x64/SDL2main.lib
+ ${user:ProjectRoot}/external/NvToolsExt/lib/x64/nvToolsExt64_1.lib
+ ${user:ProjectRoot}/external/D3D12/libs/x64/d3d12.lib
</Libraries>
</Config>
@@ -87,14 +97,14 @@
${user:ProjectRoot}/lib/win32/NvFlexExtDebugD3D_x86.lib
${user:ProjectRoot}/external/SDL2-2.0.4/lib/x86/SDL2.lib
${user:ProjectRoot}/external/SDL2-2.0.4/lib/x86/SDL2main.lib
- ${user:ProjectRoot}/external/glew/lib/win32/glew32.lib
+ ${user:ProjectRoot}/external/NvToolsExt/lib/Win32/nvToolsExt32_1.lib
</Libraries>
<Libraries platforms="Win64">
${user:ProjectRoot}/lib/win64/NvFlexDebugD3D_x64.lib
${user:ProjectRoot}/lib/win64/NvFlexExtDebugD3D_x64.lib
${user:ProjectRoot}/external/SDL2-2.0.4/lib/x64/SDL2.lib
${user:ProjectRoot}/external/SDL2-2.0.4/lib/x64/SDL2main.lib
- ${user:ProjectRoot}/external/glew/lib/x64/glew32.lib
+ ${user:ProjectRoot}/external/NvToolsExt/lib/x64/nvToolsExt64_1.lib
</Libraries>
</Config>
@@ -124,20 +134,67 @@
${user:ProjectRoot}/lib/win32/NvFlexExtReleaseD3D_x86.lib
${user:ProjectRoot}/external/SDL2-2.0.4/lib/x86/SDL2.lib
${user:ProjectRoot}/external/SDL2-2.0.4/lib/x86/SDL2main.lib
- ${user:ProjectRoot}/external/glew/lib/win32/glew32.lib
+ ${user:ProjectRoot}/external/NvToolsExt/lib/Win32/nvToolsExt32_1.lib
</Libraries>
<Libraries platforms="Win64">
${user:ProjectRoot}/lib/win64/NvFlexReleaseD3D_x64.lib
${user:ProjectRoot}/lib/win64/NvFlexExtReleaseD3D_x64.lib
${user:ProjectRoot}/external/SDL2-2.0.4/lib/x64/SDL2.lib
${user:ProjectRoot}/external/SDL2-2.0.4/lib/x64/SDL2main.lib
- ${user:ProjectRoot}/external/glew/lib/x64/glew32.lib
+ ${user:ProjectRoot}/external/NvToolsExt/lib/x64/nvToolsExt64_1.lib
</Libraries>
</Config>
<!-- Common Source -->
-
+
+ <Files name="NvCommon" type="source" root="${user:ProjectRoot}/external/NvCommon/src">
+ Nv/Common/*.cpp
+ Nv/Common/*.h
+ -Nv/Common/NvCoPathFinder.*
+ -Nv/Common/NvCoMemoryMappedFile.*
+ -Nv/Common/NvCoMemoryReadStream.*
+ -Nv/Common/NvCoMemoryWriteStream.*
+ -Nv/Common/NvCoCircularHeap.*
+ -Nv/Common/NvCoFreeListHeap.*
+
+ Nv/Common/Platform/Win/*.cpp
+ Nv/Common/Platform/Win/*.h
+ -Nv/Common/Platform/Win/NvCoWinMemoryMappedFile.*
+ -Nv/Common/Platform/Win/NvCoWinPathUtil.*
+ -Nv/Common/Platform/Win/NvCoWinMinimalInclude.*
+ -Nv/Common/Platform/Win/NvCoWinCriticalSection.*
+
+ Nv/Common/Util/*.cpp
+ Nv/Common/Util/*.h
+ -Nv/Common/Util/NvCoParseUtil.*
+ -Nv/Common/Util/NvCoStringEscapeUtil.*
+ -Nv/Common/Util/NvCoPathUtil.*
+ -Nv/Common/Util/NvCoArgParseUtil.*
+ -Nv/Common/Util/NvCoBitUtil.*
+
+ -Nv/Common/Random/*.cpp
+ -Nv/Common/Random/*.h
+
+ Nv/Common/Container/*.cpp
+ Nv/Common/Container/*.h
+ -Nv/Common/Container/NvCoHandleMap.*
+
+ Nv/Common/Render/Dx/*.cpp
+ Nv/Common/Render/Dx/*.h
+ Nv/Common/Render/Dx12/*.cpp
+ Nv/Common/Render/Dx12/*.h
+ -Nv/Common/Render/Dx/NvCoDxIncludeHandler.*
+ -Nv/Common/Render/Dx/NvCoDxShaderUtil.*
+ -Nv/Common/Render/Dx12/NvCoDx12AsyncManager.*
+ -Nv/Common/Render/Dx12/NvCoDx12DescriptorCache.*
+
+ Nv/Common/Render/Context/*.cpp
+ Nv/Common/Render/Context/*.h
+ Nv/Common/Render/Context/Dx12/*.cpp
+ Nv/Common/Render/Context/Dx12/*.h
+ </Files>
+
<Files name="demo" type="source" root="${user:ProjectRoot}/demo">
*.cpp *.h
scenes/*.h
@@ -154,41 +211,52 @@
<Dependencies>
flexD3D
flexExtD3D
- </Dependencies>
+ </Dependencies>
+
+ <Files name="d3d12" type="source" root="${user:ProjectRoot}/demo/d3d12">
+ *.h
+ *.cpp
+ </Files>
<Files name="d3d11" type="source" root="${user:ProjectRoot}/demo/d3d11">
*.h
*.cpp
</Files>
+ <Files name="d3d" type="source" root="${user:ProjectRoot}/demo/d3d">
+ *.h
+ *.cpp
+ </Files>
- <HLSL Configurations="release" DisableOptim="No" Debug="No" ShaderModel="5.0" Platforms="Win32 Win64" ObjectFileOutput=" " WarningAsErrors="false" OutputHeaderFileName="${user:ProjectRoot}/demo/d3d11/shaders/%(Filename).hlsl.h">
+ <HLSL Configurations="release" DisableOptim="No" Debug="No" ShaderModel="5.0" Platforms="Win32 Win64" ObjectFileOutput=" " WarningAsErrors="false" OutputHeaderFileName="${user:ProjectRoot}/demo/d3d/shaders/%(Filename).hlsl.h">
- <File ShaderType="Vertex" EntryPoint="debugLineVS"> "${user:ProjectRoot}/demo/d3d11/shaders/debugLineVS.hlsl" </File>
- <File ShaderType="Pixel" EntryPoint="debugLinePS"> "${user:ProjectRoot}/demo/d3d11/shaders/debugLinePS.hlsl" </File>
+ <File ShaderType="Vertex" EntryPoint="debugLineVS"> "${user:ProjectRoot}/demo/d3d/shaders/debugLineVS.hlsl" </File>
+ <File ShaderType="Pixel" EntryPoint="debugLinePS"> "${user:ProjectRoot}/demo/d3d/shaders/debugLinePS.hlsl" </File>
- <File ShaderType="Pixel" EntryPoint="imguiPS"> "${user:ProjectRoot}/demo/d3d11/shaders/imguiPS.hlsl" </File>
- <File ShaderType="Vertex" EntryPoint="imguiVS"> "${user:ProjectRoot}/demo/d3d11/shaders/imguiVS.hlsl" </File>
+ <File ShaderType="Pixel" EntryPoint="imguiPS"> "${user:ProjectRoot}/demo/d3d/shaders/imguiPS.hlsl" </File>
+ <File ShaderType="Vertex" EntryPoint="imguiVS"> "${user:ProjectRoot}/demo/d3d/shaders/imguiVS.hlsl" </File>
- <File ShaderType="Pixel" EntryPoint="meshPS"> "${user:ProjectRoot}/demo/d3d11/shaders/meshPS.hlsl" </File>
- <File ShaderType="Pixel" EntryPoint="meshPS_Shadow"> "${user:ProjectRoot}/demo/d3d11/shaders/meshShadowPS.hlsl" </File>
- <File ShaderType="Vertex" EntryPoint="meshVS"> "${user:ProjectRoot}/demo/d3d11/shaders/meshVS.hlsl" </File>
+ <File ShaderType="Pixel" EntryPoint="meshPS"> "${user:ProjectRoot}/demo/d3d/shaders/meshPS.hlsl" </File>
+ <File ShaderType="Pixel" EntryPoint="meshPS"> "${user:ProjectRoot}/demo/d3d/shaders/meshAsyncComputeBenchPS.hlsl" </File>
+ <File ShaderType="Pixel" EntryPoint="meshPS_Shadow"> "${user:ProjectRoot}/demo/d3d/shaders/meshShadowPS.hlsl" </File>
+ <File ShaderType="Vertex" EntryPoint="meshVS"> "${user:ProjectRoot}/demo/d3d/shaders/meshVS.hlsl" </File>
- <File ShaderType="Vertex" EntryPoint="pointVS"> "${user:ProjectRoot}/demo/d3d11/shaders/pointVS.hlsl" </File>
- <File ShaderType="Geometry" EntryPoint="pointGS"> "${user:ProjectRoot}/demo/d3d11/shaders/pointGS.hlsl" </File>
- <File ShaderType="Pixel" EntryPoint="pointPS"> "${user:ProjectRoot}/demo/d3d11/shaders/pointPS.hlsl" </File>
-
- <File ShaderType="Vertex" EntryPoint="diffuseVS"> "${user:ProjectRoot}/demo/d3d11/shaders/diffuseVS.hlsl" </File>
- <File ShaderType="Geometry" EntryPoint="diffuseGS"> "${user:ProjectRoot}/demo/d3d11/shaders/diffuseGS.hlsl" </File>
- <File ShaderType="Pixel" EntryPoint="diffusePS"> "${user:ProjectRoot}/demo/d3d11/shaders/diffusePS.hlsl" </File>
+ <File ShaderType="Vertex" EntryPoint="pointVS"> "${user:ProjectRoot}/demo/d3d/shaders/pointVS.hlsl" </File>
+ <File ShaderType="Geometry" EntryPoint="pointGS"> "${user:ProjectRoot}/demo/d3d/shaders/pointGS.hlsl" </File>
+ <File ShaderType="Pixel" EntryPoint="pointPS"> "${user:ProjectRoot}/demo/d3d/shaders/pointPS.hlsl" </File>
+ <File ShaderType="Pixel" EntryPoint="pointShadowPS"> "${user:ProjectRoot}/demo/d3d/shaders/pointShadowPS.hlsl" </File>
+
+ <File ShaderType="Vertex" EntryPoint="diffuseVS"> "${user:ProjectRoot}/demo/d3d/shaders/diffuseVS.hlsl" </File>
+ <File ShaderType="Geometry" EntryPoint="diffuseGS"> "${user:ProjectRoot}/demo/d3d/shaders/diffuseGS.hlsl" </File>
+ <File ShaderType="Pixel" EntryPoint="diffusePS"> "${user:ProjectRoot}/demo/d3d/shaders/diffusePS.hlsl" </File>
- <File ShaderType="Vertex" EntryPoint="ellipsoidDepthVS"> "${user:ProjectRoot}/demo/d3d11/shaders/ellipsoidDepthVS.hlsl" </File>
- <File ShaderType="Geometry" EntryPoint="ellipsoidDepthGS"> "${user:ProjectRoot}/demo/d3d11/shaders/ellipsoidDepthGS.hlsl" </File>
- <File ShaderType="Pixel" EntryPoint="ellipsoidDepthPS"> "${user:ProjectRoot}/demo/d3d11/shaders/ellipsoidDepthPS.hlsl" </File>
+ <File ShaderType="Vertex" EntryPoint="ellipsoidDepthVS"> "${user:ProjectRoot}/demo/d3d/shaders/ellipsoidDepthVS.hlsl" </File>
+ <File ShaderType="Geometry" EntryPoint="ellipsoidDepthGS"> "${user:ProjectRoot}/demo/d3d/shaders/ellipsoidDepthGS.hlsl" </File>
+ <File ShaderType="Pixel" EntryPoint="ellipsoidDepthPS"> "${user:ProjectRoot}/demo/d3d/shaders/ellipsoidDepthPS.hlsl" </File>
- <File ShaderType="Vertex" EntryPoint="passThroughVS"> "${user:ProjectRoot}/demo/d3d11/shaders/passThroughVS.hlsl" </File>
- <File ShaderType="Pixel" EntryPoint="blurDepthPS"> "${user:ProjectRoot}/demo/d3d11/shaders/blurDepthPS.hlsl" </File>
- <File ShaderType="Pixel" EntryPoint="compositePS"> "${user:ProjectRoot}/demo/d3d11/shaders/compositePS.hlsl" </File>
+ <File ShaderType="Vertex" EntryPoint="passThroughVS"> "${user:ProjectRoot}/demo/d3d/shaders/passThroughVS.hlsl" </File>
+ <File ShaderType="Pixel" EntryPoint="blurDepthPS"> "${user:ProjectRoot}/demo/d3d/shaders/blurDepthPS.hlsl" </File>
+ <File ShaderType="Pixel" EntryPoint="compositePS"> "${user:ProjectRoot}/demo/d3d/shaders/compositePS.hlsl" </File>
</HLSL>
diff --git a/demo/d3d/appGraphCtx.h b/demo/d3d/appGraphCtx.h
new file mode 100644
index 0000000..2c6300d
--- /dev/null
+++ b/demo/d3d/appGraphCtx.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+#pragma once
+
+#define APP_GRAPH_CTX_API extern "C" __declspec(dllexport)
+
+struct SDL_Window;
+
+struct AppGraphCtx;
+
+struct AppGraphColor
+{
+ float r, g, b, a;
+};
+
+APP_GRAPH_CTX_API AppGraphCtx* AppGraphCtxCreate(int deviceID);
+
+APP_GRAPH_CTX_API bool AppGraphCtxUpdateSize(AppGraphCtx* context, SDL_Window* window, bool fullscreen, int numMSAASamples);
+
+APP_GRAPH_CTX_API void AppGraphCtxReleaseRenderTarget(AppGraphCtx* context);
+
+APP_GRAPH_CTX_API void AppGraphCtxRelease(AppGraphCtx* context);
+
+APP_GRAPH_CTX_API void AppGraphCtxFrameStart(AppGraphCtx* context, AppGraphColor clearColor);
+
+APP_GRAPH_CTX_API void AppGraphCtxFramePresent(AppGraphCtx* context, bool fullsync);
+
+APP_GRAPH_CTX_API void AppGraphCtxWaitForFrames(AppGraphCtx* context, unsigned int maxFramesInFlight);
+
+APP_GRAPH_CTX_API void AppGraphCtxProfileEnable(AppGraphCtx* context, bool enabled);
+
+APP_GRAPH_CTX_API void AppGraphCtxProfileBegin(AppGraphCtx* context, const char* label);
+
+APP_GRAPH_CTX_API void AppGraphCtxProfileEnd(AppGraphCtx* context, const char* label);
+
+APP_GRAPH_CTX_API bool AppGraphCtxProfileGet(AppGraphCtx* context, const char** plabel, float* cpuTime, float* gpuTime, int index);
+
+APP_GRAPH_CTX_API size_t AppGraphCtxDedicatedVideoMemory(AppGraphCtx* context);
+
diff --git a/demo/d3d/appGraphCtxLoader.cpp b/demo/d3d/appGraphCtxLoader.cpp
new file mode 100644
index 0000000..07375b8
--- /dev/null
+++ b/demo/d3d/appGraphCtxLoader.cpp
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+#include <SDL.h>
+
+#include "loader.h"
+#include "loaderMacros.h"
+
+#include "appGraphCtx.h"
+
+#include <stdio.h>
+
+#define LOADER_APPC_CTX_FUNCTIONS(op, inst, inst_func) \
+ op(inst, inst_func, AppGraphCtx*, AppGraphCtxCreate, 1, ((int, deviceID)) ) \
+ op(inst, inst_func, bool, AppGraphCtxUpdateSize, 4, ((AppGraphCtx*, context), (SDL_Window*, window), (bool, fullscreen), (int, numMSAASamples)) ) \
+ op(inst, inst_func, void, AppGraphCtxReleaseRenderTarget, 1, ((AppGraphCtx*, context)) ) \
+ op(inst, inst_func, void, AppGraphCtxRelease, 1, ((AppGraphCtx*, context)) ) \
+ op(inst, inst_func, void, AppGraphCtxFrameStart, 2, ((AppGraphCtx*, context), (AppGraphColor, clearColor)) ) \
+ op(inst, inst_func, void, AppGraphCtxFramePresent, 2, ((AppGraphCtx*, context), (bool, fullsync)) ) \
+ op(inst, inst_func, void, AppGraphCtxWaitForFrames, 2, ((AppGraphCtx*, context), (unsigned int, maxFramesInFlight)) ) \
+ op(inst, inst_func, void, AppGraphCtxProfileEnable, 2, ((AppGraphCtx*, context), (bool, enabled)) ) \
+ op(inst, inst_func, void, AppGraphCtxProfileBegin, 2, ((AppGraphCtx*, context), (const char*, label)) ) \
+ op(inst, inst_func, void, AppGraphCtxProfileEnd, 2, ((AppGraphCtx*, context), (const char*, label)) ) \
+ op(inst, inst_func, bool, AppGraphCtxProfileGet, 5, ((AppGraphCtx*, context), (const char**, plabel), (float*, cpuTime), (float*, gpuTime), (int, index)) ) \
+ op(inst, inst_func, size_t, AppGraphCtxDedicatedVideoMemory, 1, ((AppGraphCtx*, context)) )
+
+LOADER_APPC_CTX_FUNCTIONS(LOADER_DECLARE_FUNCTION_PTR, (), ())
+
+struct AppCtxFunctionSet
+{
+ LOADER_APPC_CTX_FUNCTIONS(LOADER_DECLARE_FUNCTION_VAR, (), ())
+};
+
+// Declare D3D11/D3D12 versions
+#define APP_CTX_D3D11_FUNCTION_NAME(x) x##D3D11
+#define APP_CTX_D3D12_FUNCTION_NAME(x) x##D3D12
+
+extern "C" {
+
+LOADER_APPC_CTX_FUNCTIONS(LOADER_DECLARE_FUNCTION_NAME, (), APP_CTX_D3D11_FUNCTION_NAME)
+LOADER_APPC_CTX_FUNCTIONS(LOADER_DECLARE_FUNCTION_NAME, (), APP_CTX_D3D12_FUNCTION_NAME)
+
+} // extern "C"
+
+static AppCtxFunctionSet g_functionSet;
+
+void loadAppGraphCtx(AppGraphCtxType type)
+{
+ if (type == APP_CONTEXT_D3D11)
+ {
+ LOADER_APPC_CTX_FUNCTIONS(LOADER_SET_FUNCTION, g_functionSet, APP_CTX_D3D11_FUNCTION_NAME)
+ }
+ if (type == APP_CONTEXT_D3D12)
+ {
+ LOADER_APPC_CTX_FUNCTIONS(LOADER_SET_FUNCTION, g_functionSet, APP_CTX_D3D12_FUNCTION_NAME)
+ }
+}
+
+void unloadAppGraphCtx()
+{
+ g_functionSet = AppCtxFunctionSet{};
+}
+
+// Generate the patches
+LOADER_APPC_CTX_FUNCTIONS(LOADER_FUNCTION_PTR_CALL, g_functionSet, ())
diff --git a/demo/d3d/demoContext.h b/demo/d3d/demoContext.h
new file mode 100644
index 0000000..bca41f0
--- /dev/null
+++ b/demo/d3d/demoContext.h
@@ -0,0 +1,93 @@
+/*
+* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+#ifndef DEMO_CONTEXT_H
+#define DEMO_CONTEXT_H
+
+#include "shaders.h"
+
+//#include "../d3d/imguiGraph.h"
+
+class DemoContext
+{
+ public:
+ /// Returns false if couldn't start up
+ virtual bool initialize(const RenderInitOptions& options) = 0;
+
+ virtual void startFrame(Vec4 colorIn) = 0;
+ virtual void endFrame() = 0;
+ virtual void presentFrame(bool fullsync) = 0;
+
+ virtual void getViewRay(int x, int y, Vec3& origin, Vec3& dir) = 0;
+ virtual void setView(Matrix44 view, Matrix44 projection) = 0;
+ virtual void renderEllipsoids(FluidRenderer* renderer, FluidRenderBuffers* buffers, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ::ShadowMap* shadowMap, Vec4 color, float blur, float ior, bool debug) = 0;
+
+ virtual void drawMesh(const Mesh* m, Vec3 color) = 0;
+ virtual void drawCloth(const Vec4* positions, const Vec4* normals, const float* uvs, const int* indices, int numTris, int numPositions, int colorIndex, float expand, bool twosided, bool smooth) = 0;
+ virtual void drawRope(Vec4* positions, int* indices, int numIndices, float radius, int color) = 0;
+ virtual void drawPlane(const Vec4& p, bool color) = 0;
+ virtual void drawPlanes(Vec4* planes, int n, float bias) = 0;
+
+ virtual void graphicsTimerBegin() = 0;
+ virtual void graphicsTimerEnd() = 0;
+
+ virtual float rendererGetDeviceTimestamps(unsigned long long* begin, unsigned long long* end, unsigned long long* freq) = 0;
+
+ virtual void bindSolidShader(Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ::ShadowMap* shadowMap, float bias, Vec4 fogColor) = 0;
+ virtual void unbindSolidShader() = 0;
+
+ virtual ShadowMap* shadowCreate() = 0;
+ virtual void shadowDestroy(ShadowMap* map) = 0;
+ virtual void shadowBegin(ShadowMap* map) = 0;
+ virtual void shadowEnd() = 0;
+
+ virtual FluidRenderer* createFluidRenderer(uint32_t width, uint32_t height) = 0;
+ virtual void destroyFluidRenderer(FluidRenderer* renderer) = 0;
+
+ virtual FluidRenderBuffers* createFluidRenderBuffers(int numParticles, bool enableInterop) = 0;
+ virtual void drawPoints(FluidRenderBuffers* buffers, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ::ShadowMap* shadowTex, bool showDensity) = 0;
+ virtual void updateFluidRenderBuffers(FluidRenderBuffers* buffers, NvFlexSolver* flex, bool anisotropy, bool density) = 0;
+ virtual void updateFluidRenderBuffers(FluidRenderBuffers* buffers, Vec4* particles, float* densities, Vec4* anisotropy1, Vec4* anisotropy2, Vec4* anisotropy3, int numParticles, int* indices, int numIndices) = 0;
+ virtual void destroyFluidRenderBuffers(FluidRenderBuffers* buffers) = 0;
+
+ virtual GpuMesh* createGpuMesh(const Mesh* m) = 0;
+ virtual void destroyGpuMesh(GpuMesh* mesh) = 0;
+ virtual void drawGpuMesh(GpuMesh* m, const Matrix44& xform, const Vec3& color) = 0;
+ virtual void drawGpuMeshInstances(GpuMesh* m, const Matrix44* xforms, int n, const Vec3& color) = 0;
+
+ virtual DiffuseRenderBuffers* createDiffuseRenderBuffers(int numDiffuseParticles, bool& enableInterop) = 0;
+ virtual void destroyDiffuseRenderBuffers(DiffuseRenderBuffers* buffers) = 0;
+ virtual void updateDiffuseRenderBuffers(DiffuseRenderBuffers* buffers, Vec4* diffusePositions, Vec4* diffuseVelocities, int numDiffuseParticles) = 0;
+ virtual void updateDiffuseRenderBuffers(DiffuseRenderBuffers* buffers, NvFlexSolver* solver) = 0;
+ virtual int getNumDiffuseRenderParticles(DiffuseRenderBuffers* buffers) = 0;
+
+ virtual void drawDiffuse(FluidRenderer* render, const DiffuseRenderBuffers* buffers, int n, float radius, float screenWidth, float screenAspect, float fov, Vec4 color, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ::ShadowMap* shadowMap, float motionBlur, float inscatter, float outscatter, bool shadowEnabled, bool front) = 0;
+
+ virtual void beginLines() = 0;
+ virtual void drawLine(const Vec3& p, const Vec3& q, const Vec4& color) = 0;
+ virtual void endLines() = 0;
+
+ virtual void onSizeChanged(int width, int height, bool minimized) = 0;
+
+ virtual void startGpuWork() = 0;
+ virtual void endGpuWork() = 0;
+ virtual void flushGraphicsAndWait() = 0;
+
+ virtual void setFillMode(bool wire) = 0;
+ virtual void setCullMode(bool enabled) = 0;
+
+ virtual void drawImguiGraph() = 0;
+ virtual void* getGraphicsCommandQueue() { return nullptr; }
+ virtual void getRenderDevice(void** device, void** context) = 0;
+
+ virtual ~DemoContext() {}
+};
+
+#endif // DEMO_CONTEXT_H \ No newline at end of file
diff --git a/demo/d3d11/imguiGraph.cpp b/demo/d3d/imguiGraph.cpp
index 011e71b..7babb96 100644
--- a/demo/d3d11/imguiGraph.cpp
+++ b/demo/d3d/imguiGraph.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
*
* NVIDIA CORPORATION and its licensors retain all intellectual property
* and proprietary rights in and to this software, related documentation
@@ -16,7 +16,6 @@
#include <stdint.h>
#include "imguiGraph.h"
-#include "imguiGraphD3D11.h"
// Some math headers don't have PI defined.
static const float PI = 3.14159265f;
@@ -224,8 +223,7 @@ static void drawLine(float x0, float y0, float x1, float y1, float r, float fth,
drawPolygon(verts, 4, fth, col);
}
-
-bool imguiGraphInit(const char* fontpath, const ImguiGraphDesc* desc)
+bool imguiGraphInit(const char* fontpath, float defaultFontHeight, const ImguiGraphDesc* desc)
{
imguiGraphContextInit(desc);
@@ -263,7 +261,9 @@ bool imguiGraphInit(const char* fontpath, const ImguiGraphDesc* desc)
return false;
}
- stbtt_BakeFontBitmap(ttfBuffer, 0, 15.0f, bmap, 512, 512, 32, 96, g_cdata);
+ defaultFontHeight = (defaultFontHeight <= 0.0f) ? 15.0f : defaultFontHeight;
+
+ stbtt_BakeFontBitmap(ttfBuffer, 0, defaultFontHeight, bmap, 512, 512, 32, 96, g_cdata);
// can free ttf_buffer at this point
imguiGraphFontTextureInit(bmap);
@@ -469,4 +469,3 @@ void imguiGraphDraw()
imguiGraphRecordEnd();
}
-
diff --git a/demo/d3d/imguiGraph.h b/demo/d3d/imguiGraph.h
new file mode 100644
index 0000000..361fa7b
--- /dev/null
+++ b/demo/d3d/imguiGraph.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+#pragma once
+
+#include <stdint.h>
+
+#define IMGUI_GRAPH_API extern "C" __declspec(dllexport)
+
+struct ImguiGraphDesc;
+
+typedef bool (*imguiGraphInit_t)(const char* fontpath, const ImguiGraphDesc* desc);
+
+typedef void (*imguiGraphUpdate_t)(const ImguiGraphDesc* desc);
+
+bool imguiGraphInit(const char* fontpath, float defaultFontHeight, const ImguiGraphDesc* desc);
+
+void imguiGraphUpdate(const ImguiGraphDesc* desc);
+
+void imguiGraphDestroy();
+
+void imguiGraphDraw();
+
+// Below are the functions that must be implemented per graphics API
+
+IMGUI_GRAPH_API void imguiGraphContextInit(const ImguiGraphDesc* desc);
+
+IMGUI_GRAPH_API void imguiGraphContextUpdate(const ImguiGraphDesc* desc);
+
+IMGUI_GRAPH_API void imguiGraphContextDestroy();
+
+IMGUI_GRAPH_API void imguiGraphRecordBegin();
+
+IMGUI_GRAPH_API void imguiGraphRecordEnd();
+
+IMGUI_GRAPH_API void imguiGraphVertex2f(float x, float y);
+
+IMGUI_GRAPH_API void imguiGraphVertex2fv(const float* v);
+
+IMGUI_GRAPH_API void imguiGraphTexCoord2f(float u, float v);
+
+IMGUI_GRAPH_API void imguiGraphColor4ub(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha);
+
+IMGUI_GRAPH_API void imguiGraphColor4ubv(const uint8_t* v);
+
+IMGUI_GRAPH_API void imguiGraphFontTextureEnable();
+
+IMGUI_GRAPH_API void imguiGraphFontTextureDisable();
+
+IMGUI_GRAPH_API void imguiGraphEnableScissor(int x, int y, int width, int height);
+
+IMGUI_GRAPH_API void imguiGraphDisableScissor();
+
+IMGUI_GRAPH_API void imguiGraphFontTextureInit(unsigned char* data);
+
+IMGUI_GRAPH_API void imguiGraphFontTextureRelease(); \ No newline at end of file
diff --git a/demo/d3d/imguiGraphLoader.cpp b/demo/d3d/imguiGraphLoader.cpp
new file mode 100644
index 0000000..6c5dbce
--- /dev/null
+++ b/demo/d3d/imguiGraphLoader.cpp
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+//#include <SDL.h>
+
+#include "loader.h"
+
+#include "imguiGraph.h"
+#include "loaderMacros.h"
+
+#include <stdio.h>
+
+#include "imguiGraph.h"
+
+struct AppGraphCtx;
+
+#define LOADER_IMGUI_GRAPH_FUNCTIONS(op, inst, inst_func) \
+ op(inst, inst_func, void, imguiGraphContextInit, 1, ((const ImguiGraphDesc*, desc)) ) \
+ op(inst, inst_func, void, imguiGraphContextUpdate, 1, ((const ImguiGraphDesc*, desc)) ) \
+ op(inst, inst_func, void, imguiGraphContextDestroy, 0, (()) ) \
+ op(inst, inst_func, void, imguiGraphRecordBegin, 0, (()) ) \
+ op(inst, inst_func, void, imguiGraphRecordEnd, 0, (()) ) \
+ op(inst, inst_func, void, imguiGraphVertex2f, 2, ((float, x), (float, y)) ) \
+ op(inst, inst_func, void, imguiGraphVertex2fv, 1, ((const float*, v)) ) \
+ op(inst, inst_func, void, imguiGraphTexCoord2f, 2, ((float, u), (float, v)) ) \
+ op(inst, inst_func, void, imguiGraphColor4ub, 4, ((uint8_t, red), (uint8_t, green), (uint8_t, blue), (uint8_t, alpha)) ) \
+ op(inst, inst_func, void, imguiGraphColor4ubv, 1, ((const uint8_t*, v)) ) \
+ op(inst, inst_func, void, imguiGraphFontTextureEnable, 0, (()) ) \
+ op(inst, inst_func, void, imguiGraphFontTextureDisable, 0, (()) ) \
+ op(inst, inst_func, void, imguiGraphEnableScissor, 4, ((int, x), (int, y), (int, width), (int, height)) ) \
+ op(inst, inst_func, void, imguiGraphDisableScissor, 0, (()) ) \
+ op(inst, inst_func, void, imguiGraphFontTextureInit, 1, ((unsigned char*, data)) ) \
+ op(inst, inst_func, void, imguiGraphFontTextureRelease, 0, (()) ) \
+ op(inst, inst_func, bool, imguiInteropGraphInit, 3, ((imguiGraphInit_t, func), (const char*, fontpath), (AppGraphCtx*, appctx)) ) \
+ op(inst, inst_func, void, imguiInteropGraphUpdate, 2, ((imguiGraphUpdate_t, func), (AppGraphCtx*, appctx)) )
+
+LOADER_IMGUI_GRAPH_FUNCTIONS(LOADER_DECLARE_FUNCTION_PTR, (), ())
+
+struct ImguiFunctionSet
+{
+LOADER_IMGUI_GRAPH_FUNCTIONS(LOADER_DECLARE_FUNCTION_VAR, (), ())
+};
+
+// Declare D3D11/D3D12 versions
+#define IMGUI_D3D11_FUNCTION_NAME(x) x##D3D11
+#define IMGUI_D3D12_FUNCTION_NAME(x) x##D3D12
+
+extern "C" {
+
+LOADER_IMGUI_GRAPH_FUNCTIONS(LOADER_DECLARE_FUNCTION_NAME, (), IMGUI_D3D11_FUNCTION_NAME)
+LOADER_IMGUI_GRAPH_FUNCTIONS(LOADER_DECLARE_FUNCTION_NAME, (), IMGUI_D3D12_FUNCTION_NAME)
+
+} // extern "C"
+
+static ImguiFunctionSet g_functionSet;
+
+void loadImgui(AppGraphCtxType type)
+{
+ if (type == APP_CONTEXT_D3D11)
+ {
+ LOADER_IMGUI_GRAPH_FUNCTIONS(LOADER_SET_FUNCTION, g_functionSet, IMGUI_D3D11_FUNCTION_NAME)
+ }
+ if (type == APP_CONTEXT_D3D12)
+ {
+ LOADER_IMGUI_GRAPH_FUNCTIONS(LOADER_SET_FUNCTION, g_functionSet, IMGUI_D3D12_FUNCTION_NAME)
+ }
+}
+
+void unloadImgui()
+{
+ g_functionSet = ImguiFunctionSet{};
+}
+
+// Generate the patches
+LOADER_IMGUI_GRAPH_FUNCTIONS(LOADER_FUNCTION_PTR_CALL, g_functionSet, ())
+
+
diff --git a/demo/d3d/loader.cpp b/demo/d3d/loader.cpp
new file mode 100644
index 0000000..2ade2be
--- /dev/null
+++ b/demo/d3d/loader.cpp
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+#include "loader.h"
+
+//#include <SDL.h>
+
+#include "imgui.h"
+
+void loadModules(AppGraphCtxType type)
+{
+ loadAppGraphCtx(type);
+ loadImgui(type);
+}
+
+void unloadModules()
+{
+ unloadImgui();
+ unloadAppGraphCtx();
+} \ No newline at end of file
diff --git a/demo/d3d/loader.h b/demo/d3d/loader.h
new file mode 100644
index 0000000..1696001
--- /dev/null
+++ b/demo/d3d/loader.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+enum AppGraphCtxType
+{
+ APP_CONTEXT_D3D11 = 1,
+ APP_CONTEXT_D3D12 = 2
+};
+
+void loadModules(AppGraphCtxType type);
+void unloadModules();
+
+extern void loadImgui(AppGraphCtxType type);
+extern void unloadImgui();
+
+extern void loadAppGraphCtx(AppGraphCtxType type);
+extern void unloadAppGraphCtx();
diff --git a/demo/d3d/loaderMacros.h b/demo/d3d/loaderMacros.h
new file mode 100644
index 0000000..24b4999
--- /dev/null
+++ b/demo/d3d/loaderMacros.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+ #pragma once
+
+/// ----------------------------- Module Loader -----------------------------
+
+#define LOADER_ESC_N(...) __VA_ARGS__
+
+#define LOADER_PARAM_DECLARE(a, b) a b
+#define LOADER_PARAM_NAME(a, b) b
+
+#define LOADER_ESC_PARAM0(PARAM, p0)
+#define LOADER_ESC_PARAM1(PARAM, p0) PARAM p0
+#define LOADER_ESC_PARAM2(PARAM, p0, p1) PARAM p0, LOADER_ESC_PARAM1(PARAM, p1)
+#define LOADER_ESC_PARAM3(PARAM, p0, p1, p2) PARAM p0, LOADER_ESC_PARAM2(PARAM, p1, p2)
+#define LOADER_ESC_PARAM4(PARAM, p0, p1, p2, p3) PARAM p0, LOADER_ESC_PARAM3(PARAM, p1, p2, p3)
+#define LOADER_ESC_PARAM5(PARAM, p0, p1, p2, p3, p4) PARAM p0, LOADER_ESC_PARAM4(PARAM, p1, p2, p3, p4)
+#define LOADER_ESC_PARAM6(PARAM, p0, p1, p2, p3, p4, p5) PARAM p0, LOADER_ESC_PARAM5(PARAM, p1, p2, p3, p4, p5)
+#define LOADER_ESC_PARAM7(PARAM, p0, p1, p2, p3, p4, p5, p6) PARAM p0, LOADER_ESC_PARAM6(PARAM, p1, p2, p3, p4, p5, p6)
+
+#define LOADER_ESC_MERGE(a, b) (a, b)
+
+#define LOADER_ESC(mode, numParams, params) \
+ LOADER_ESC_PARAM##numParams LOADER_ESC_MERGE(mode, LOADER_ESC_N params)
+
+#define LOADER_DECLARE_FUNCTION_PTR(inst, inst_func, retType, method, numParams, params) \
+ typedef retType (*method##_ptr_t)( LOADER_ESC (LOADER_PARAM_DECLARE, numParams, params) );
+
+#define LOADER_DECLARE_FUNCTION_VAR(inst, inst_func, retType, method, numParams, params) \
+ method##_ptr_t method##_ptr;
+
+#define LOADER_DECLARE_FUNCTION_NAME(inst, inst_func, retType, method, numParams, params) \
+ extern retType inst_func(method) (LOADER_ESC (LOADER_PARAM_DECLARE, numParams, params) );
+
+#define LOADER_SET_FUNCTION(inst, inst_func, retType, method, numParams, params) \
+ inst.method##_ptr = inst_func(method);
+
+
+#define LOADER_FUNCTION_PTR_CALL(inst, inst_func, retType, method, numParams, params) \
+ retType method( LOADER_ESC (LOADER_PARAM_DECLARE, numParams, params) ) { \
+ return inst.method##_ptr( LOADER_ESC (LOADER_PARAM_NAME, numParams, params) ); \
+ }
+
+#define LOADER_LOAD_FUNCTION_PTR(inst, inst_func, retType, method, numParams, params) \
+ inst->method##_ptr = (retType (*)( LOADER_ESC (LOADER_PARAM_DECLARE, numParams, params) ))(inst_func(inst, #method));
+
+#define LOADER_CLEAR_FUNCTION_PTR(inst, inst_func, retType, method, numParams, params) \
+ inst->method##_ptr = nullptr;
+
+#define LOADER_DECLARE_FUNCTION(inst, inst_func, retType, method, numParams, params) \
+ retType method( LOADER_ESC (LOADER_PARAM_DECLARE, numParams, params) );
+
+#define LOADER_FUNCTION_IMPL(inst, inst_func, retType, method, numParams, params) \
+ retType method( LOADER_ESC (LOADER_PARAM_DECLARE, numParams, params) ) { \
+ return method##Impl( LOADER_ESC (LOADER_PARAM_NAME, numParams, params) ); \
+ }
+
diff --git a/demo/d3d/renderParamsD3D.cpp b/demo/d3d/renderParamsD3D.cpp
new file mode 100644
index 0000000..22962ba
--- /dev/null
+++ b/demo/d3d/renderParamsD3D.cpp
@@ -0,0 +1,178 @@
+/*
+ * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+
+#include "renderParamsD3D.h"
+
+/* static */void RenderParamsUtilD3D::calcShadowParams(Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, float shadowBias, ShadowParamsD3D* paramsOut)
+{
+ paramsOut->lightTransform = (DirectX::XMMATRIX&)(convertGLToD3DProjection(lightTransform));
+ paramsOut->lightPos = (float3&)lightPos;
+ paramsOut->lightDir = (float3&)Normalize(lightTarget - lightPos);
+ paramsOut->bias = shadowBias;
+
+ const Vec4 taps[] =
+ {
+ Vec2(-0.326212f,-0.40581f), Vec2(-0.840144f,-0.07358f),
+ Vec2(-0.695914f,0.457137f), Vec2(-0.203345f,0.620716f),
+ Vec2(0.96234f,-0.194983f), Vec2(0.473434f,-0.480026f),
+ Vec2(0.519456f,0.767022f), Vec2(0.185461f,-0.893124f),
+ Vec2(0.507431f,0.064425f), Vec2(0.89642f,0.412458f),
+ Vec2(-0.32194f,-0.932615f), Vec2(-0.791559f,-0.59771f)
+ };
+ memcpy(paramsOut->shadowTaps, taps, sizeof(taps));
+}
+
+Matrix44 RenderParamsUtilD3D::convertGLToD3DProjection(const Matrix44& proj)
+{
+ Matrix44 scale = Matrix44::kIdentity;
+ scale.columns[2][2] = 0.5f;
+
+ Matrix44 bias = Matrix44::kIdentity;
+ bias.columns[3][2] = 1.0f;
+
+ return scale*bias*proj;
+}
+
+/* static */void RenderParamsUtilD3D::calcMeshConstantBuffer(const MeshDrawParamsD3D& params, Hlsl::MeshShaderConst& constBuf)
+{
+ constBuf.modelViewProjection = (float4x4&)(XMMatrixMultiply(XMMatrixMultiply(params.model, params.view), params.projection));
+
+ constBuf.modelView = (float4x4&)XMMatrixMultiply(params.model, params.view);
+
+ constBuf.objectTransform = (float4x4&)params.objectTransform;
+ constBuf.lightTransform = (float4x4&)params.lightTransform;
+
+ constBuf.clipPlane = params.clipPlane;
+ constBuf.fogColor = params.fogColor;
+ constBuf.color = params.color;
+ constBuf.secondaryColor = params.secondaryColor;
+
+ constBuf.lightPos = params.lightPos;
+ constBuf.lightDir = params.lightDir;
+
+ constBuf.bias = params.bias;
+ constBuf.expand = params.expand;
+ constBuf.spotMin = params.spotMin;
+ constBuf.spotMax = params.spotMax;
+
+ constBuf.grid = params.grid;
+ constBuf.tex = params.tex;
+ constBuf.colorArray = params.colorArray;
+
+ memcpy(constBuf.shadowTaps, params.shadowTaps, sizeof(constBuf.shadowTaps));
+}
+
+/* static */void RenderParamsUtilD3D::calcFluidConstantBuffer(const FluidDrawParamsD3D& params, Hlsl::FluidShaderConst& constBuf)
+{
+ constBuf.modelViewProjection = (Hlsl::float4x4&)(XMMatrixMultiply(XMMatrixMultiply(params.model, params.view), params.projection));
+ constBuf.projection = (Hlsl::float4x4&)params.projection;
+ constBuf.inverseModelView = (Hlsl::float4x4&)XMMatrixInverse(nullptr, XMMatrixMultiply(params.model, params.view));
+ constBuf.inverseProjection = (Hlsl::float4x4&)XMMatrixInverse(nullptr, params.projection);
+
+ //constBuf.invTexScale = invTexScale;
+ //constBuf.invProjection = invProjection;
+ constBuf.invViewport = params.invViewport;
+
+ constBuf.blurRadiusWorld = params.blurRadiusWorld;
+ constBuf.blurScale = params.blurScale;
+ constBuf.blurFalloff = params.blurFalloff;
+ constBuf.debug = params.debug;
+}
+
+/* static */void RenderParamsUtilD3D::calcDiffuseConstantBuffer(const DiffuseDrawParamsD3D& params, Hlsl::DiffuseShaderConst& constBuf)
+{
+ using namespace DirectX;
+
+ XMMATRIX modelViewProj = XMMatrixMultiply(XMMatrixMultiply(params.model, params.view), params.projection);
+ constBuf.modelViewProjection = (Hlsl::float4x4&)modelViewProj;
+ XMMATRIX modelView = XMMatrixMultiply(params.model, params.view);
+ constBuf.modelView = (Hlsl::float4x4&)modelView;
+ constBuf.projection = (Hlsl::float4x4&)params.projection;
+
+ constBuf.motionBlurScale = params.motionScale;
+ constBuf.diffuseRadius = params.diffuseRadius;
+ constBuf.diffuseScale = params.diffuseScale;
+ constBuf.spotMin = params.spotMin;
+ constBuf.spotMax = params.spotMax;
+
+ constBuf.lightTransform = (Hlsl::float4x4&)params.lightTransform;
+ constBuf.lightPos = params.lightPos;
+ constBuf.lightDir = params.lightDir;
+ constBuf.color = params.color;
+
+ memcpy(constBuf.shadowTaps, params.shadowTaps, sizeof(constBuf.shadowTaps));
+}
+
+/* static */void RenderParamsUtilD3D::calcFluidCompositeConstantBuffer(const FluidDrawParamsD3D& params, Hlsl::FluidShaderConst& constBuf)
+{
+ constBuf.modelViewProjection = (Hlsl::float4x4&)(XMMatrixMultiply(XMMatrixMultiply(params.model, params.view), params.projection));
+ constBuf.modelView = (Hlsl::float4x4&)XMMatrixMultiply(params.model, params.view);
+ constBuf.projection = (Hlsl::float4x4&)params.projection;
+ constBuf.inverseModelView = (Hlsl::float4x4&)XMMatrixInverse(nullptr, XMMatrixMultiply(params.model, params.view));
+ constBuf.inverseProjection = (Hlsl::float4x4&)XMMatrixInverse(nullptr, params.projection);
+
+ constBuf.lightTransform = (Hlsl::float4x4&)params.lightTransform;
+
+ constBuf.invTexScale = params.invTexScale;
+
+ //constBuf.invViewport = params.invViewport;
+ //constBuf.invProjection = params.invProjection;
+
+ constBuf.blurRadiusWorld = params.blurRadiusWorld;
+ constBuf.blurScale = params.blurScale;
+ constBuf.blurFalloff = params.blurFalloff;
+ constBuf.debug = params.debug;
+
+ constBuf.clipPosToEye = params.clipPosToEye;
+ constBuf.color = params.color;
+ constBuf.ior = params.ior;
+ constBuf.spotMin = params.spotMin;
+ constBuf.spotMax = params.spotMax;
+
+ constBuf.lightPos = params.lightPos;
+ constBuf.lightDir = params.lightDir;
+
+ typedef DirectX::XMFLOAT2 float2;
+ const float2 taps[] =
+ {
+ float2(-0.326212f,-0.40581f), float2(-0.840144f,-0.07358f),
+ float2(-0.695914f,0.457137f), float2(-0.203345f,0.620716f),
+ float2(0.96234f,-0.194983f), float2(0.473434f,-0.480026f),
+ float2(0.519456f,0.767022f), float2(0.185461f,-0.893124f),
+ float2(0.507431f,0.064425f), float2(0.89642f,0.412458f),
+ float2(-0.32194f,-0.932615f), float2(-0.791559f,-0.59771f)
+ };
+ memcpy(constBuf.shadowTaps, taps, sizeof(taps));
+}
+
+/* static */void RenderParamsUtilD3D::calcPointConstantBuffer(const PointDrawParamsD3D& params, Hlsl::PointShaderConst& constBuf)
+{
+ using namespace DirectX;
+
+ constBuf.modelView = (float4x4&)XMMatrixMultiply(params.model, params.view);
+ constBuf.projection = (float4x4&)params.projection;
+
+ constBuf.pointRadius = params.pointRadius;
+ constBuf.pointScale = params.pointScale;
+ constBuf.spotMin = params.spotMin;
+ constBuf.spotMax = params.spotMax;
+
+ constBuf.lightTransform = (float4x4&)params.lightTransform;
+ constBuf.lightPos = params.lightPos;
+ constBuf.lightDir = params.lightDir;
+
+ for (int i = 0; i < 8; i++)
+ constBuf.colors[i] = params.colors[i];
+
+ memcpy(constBuf.shadowTaps, params.shadowTaps, sizeof(constBuf.shadowTaps));
+
+ constBuf.mode = params.mode;
+} \ No newline at end of file
diff --git a/demo/d3d/renderParamsD3D.h b/demo/d3d/renderParamsD3D.h
new file mode 100644
index 0000000..0c730bc
--- /dev/null
+++ b/demo/d3d/renderParamsD3D.h
@@ -0,0 +1,248 @@
+/*
+ * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+#pragma once
+
+#define NOMINMAX
+
+#include "core/maths.h"
+#include <DirectXMath.h>
+
+#include "shaderCommonD3D.h"
+
+struct ShadowMapD3D;
+
+typedef DirectX::XMFLOAT3 float3;
+typedef DirectX::XMFLOAT4 float4;
+typedef DirectX::XMFLOAT4X4 float4x4;
+
+struct DiffuseDrawParamsD3D
+{
+ DirectX::XMMATRIX projection;
+ DirectX::XMMATRIX view;
+ DirectX::XMMATRIX model;
+
+ float diffuseRadius; // point size in world space
+ float diffuseScale; // scale to calculate size in pixels
+ float spotMin;
+ float spotMax;
+ float motionScale;
+
+ DirectX::XMMATRIX lightTransform;
+ float3 lightPos;
+ float3 lightDir;
+
+ float4 color;
+
+ float4 shadowTaps[12];
+ ShadowMapD3D* shadowMap;
+
+ int mode;
+};
+
+enum FluidRenderMode
+{
+ FLUID_RENDER_WIREFRAME,
+ FLUID_RENDER_SOLID,
+ NUM_FLUID_RENDER_MODES
+};
+
+enum FluidCullMode
+{
+ FLUID_CULL_NONE,
+ FLUID_CULL_FRONT,
+ FLUID_CULL_BACK,
+ NUM_FLUID_CULL_MODES
+};
+
+enum FluidDrawStage
+{
+ FLUID_DRAW_NULL,
+ FLUID_DRAW_SHADOW,
+ FLUID_DRAW_REFLECTION,
+ FLUID_DRAW_LIGHT
+};
+
+struct FluidDrawParamsD3D
+{
+ FluidRenderMode renderMode;
+ FluidCullMode cullMode;
+ FluidDrawStage renderStage;
+
+ int offset;
+ int n;
+
+ DirectX::XMMATRIX projection;
+ DirectX::XMMATRIX view;
+ DirectX::XMMATRIX model;
+
+ float4 invTexScale;
+
+ float3 invViewport;
+ float3 invProjection;
+
+ float blurRadiusWorld;
+ float blurScale;
+ float blurFalloff;
+ int debug;
+
+ float3 lightPos;
+ float3 lightDir;
+ DirectX::XMMATRIX lightTransform;
+
+ float4 color;
+ float4 clipPosToEye;
+
+ float spotMin;
+ float spotMax;
+ float ior;
+
+ ShadowMapD3D* shadowMap;
+
+ // Used on D3D12
+ int m_srvDescriptorBase;
+ int m_sampleDescriptorBase;
+};
+
+enum MeshRenderMode
+{
+ MESH_RENDER_WIREFRAME,
+ MESH_RENDER_SOLID,
+ NUM_MESH_RENDER_MODES
+};
+
+enum MeshCullMode
+{
+ MESH_CULL_NONE,
+ MESH_CULL_FRONT,
+ MESH_CULL_BACK,
+ NUM_MESH_CULL_MODES
+};
+
+enum MeshDrawStage
+{
+ MESH_DRAW_NULL,
+ MESH_DRAW_SHADOW,
+ MESH_DRAW_REFLECTION,
+ MESH_DRAW_LIGHT
+};
+
+struct MeshDrawParamsD3D
+{
+ MeshRenderMode renderMode;
+ MeshCullMode cullMode;
+ MeshDrawStage renderStage;
+
+ DirectX::XMMATRIX projection;
+ DirectX::XMMATRIX view;
+ DirectX::XMMATRIX model;
+
+ float4x4 objectTransform;
+
+ DirectX::XMMATRIX lightTransform;
+ float3 lightPos;
+ float3 lightDir;
+
+ float4 clipPlane;
+ float4 fogColor;
+ float4 color;
+ float4 secondaryColor;
+
+ float bias;
+ float expand;
+ float spotMin;
+ float spotMax;
+
+ int grid;
+ int tex;
+ int colorArray;
+
+ float4 shadowTaps[12];
+ ShadowMapD3D* shadowMap;
+};
+
+enum PointRenderMode
+{
+ POINT_RENDER_WIREFRAME,
+ POINT_RENDER_SOLID,
+ NUM_POINT_RENDER_MODES
+};
+
+enum PointCullMode
+{
+ POINT_CULL_NONE,
+ POINT_CULL_FRONT,
+ POINT_CULL_BACK,
+ NUM_POINT_CULL_MODES
+};
+
+enum PointDrawStage
+{
+ POINT_DRAW_NULL,
+ POINT_DRAW_SHADOW,
+ POINT_DRAW_REFLECTION,
+ POINT_DRAW_LIGHT
+};
+
+struct PointDrawParamsD3D
+{
+ PointRenderMode renderMode;
+ PointCullMode cullMode;
+ PointDrawStage renderStage;
+
+ DirectX::XMMATRIX projection;
+ DirectX::XMMATRIX view;
+ DirectX::XMMATRIX model;
+
+ float pointRadius; // point size in world space
+ float pointScale; // scale to calculate size in pixels
+ float spotMin;
+ float spotMax;
+
+ DirectX::XMMATRIX lightTransform;
+ float3 lightPos;
+ float3 lightDir;
+
+ float4 colors[8];
+
+ float4 shadowTaps[12];
+ ShadowMapD3D* shadowMap;
+
+ int mode;
+};
+
+struct ShadowParamsD3D
+{
+ DirectX::XMMATRIX lightTransform;
+ float3 lightPos;
+ float3 lightDir;
+ float bias;
+ float4 shadowTaps[12];
+};
+
+struct RenderParamsUtilD3D
+{
+ /// Assumes the lightTransform is in OpenGl projection format
+ static void calcShadowParams(Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, float shadowBias, ShadowParamsD3D* paramsOut);
+
+ /// Convert a projection from GL into the same projection as can be used by Direct3D
+ /// D3D has clip z range [0, 1], GL -1 to 1 (as is unit cube)
+ static Matrix44 convertGLToD3DProjection(const Matrix44& proj);
+
+ static void calcMeshConstantBuffer(const MeshDrawParamsD3D& params, Hlsl::MeshShaderConst& constBufOut);
+
+ static void calcFluidConstantBuffer(const FluidDrawParamsD3D& params, Hlsl::FluidShaderConst& constBuf);
+
+ static void calcFluidCompositeConstantBuffer(const FluidDrawParamsD3D& params, Hlsl::FluidShaderConst& constBuf);
+
+ static void calcDiffuseConstantBuffer(const DiffuseDrawParamsD3D& params, Hlsl::DiffuseShaderConst& constBuf);
+
+ static void calcPointConstantBuffer(const PointDrawParamsD3D& params, Hlsl::PointShaderConst& constBuf);
+};
diff --git a/demo/d3d/shaderCommonD3D.h b/demo/d3d/shaderCommonD3D.h
new file mode 100644
index 0000000..e143d18
--- /dev/null
+++ b/demo/d3d/shaderCommonD3D.h
@@ -0,0 +1,19 @@
+#ifndef SHADER_COMMON_D3D_H
+#define SHADER_COMMON_D3D_H
+
+#include <DirectXMath.h>
+
+struct ShadowMap;
+
+namespace Hlsl {
+
+typedef DirectX::XMFLOAT3 float3;
+typedef DirectX::XMFLOAT4 float4;
+typedef DirectX::XMFLOAT4X4 float4x4;
+
+#define EXCLUDE_SHADER_STRUCTS 1
+#include "../d3d/shaders/shaderCommon.h"
+
+} // namespace Shader
+
+#endif // SHADER_COMMON_D3D_H
diff --git a/demo/d3d11/shaders/blurDepthPS.hlsl b/demo/d3d/shaders/blurDepthPS.hlsl
index a2eee0a..c08d7f5 100644
--- a/demo/d3d11/shaders/blurDepthPS.hlsl
+++ b/demo/d3d/shaders/blurDepthPS.hlsl
@@ -9,29 +9,26 @@ Texture2D<float> depthTex : register(t0);
float sqr(float x) { return x*x; }
-float4 blurDepthPS(PassthroughVertexOut input) : SV_TARGET
+float blurDepthPS(PassthroughVertexOut input) : SV_TARGET
{
- float4 gl_FragColor = float4(0.0, 0.0, 0.0, 0.0);
- float4 gl_FragCoord = input.position;
+ float4 inPosition = input.position;
// debug: return the center depth sample
- //float d = depthTex.Load(int3(gl_FragCoord.xy, 0)).x;
- //return d;
-
+ //return depthTex.Load(int3(inPosition.xy, 0)).x;
+
const float blurRadiusWorld = gParams.blurRadiusWorld;
const float blurScale = gParams.blurScale;
const float blurFalloff = gParams.blurFalloff;
// eye-space depth of center sample
- float depth = depthTex.Load(int3(gl_FragCoord.xy, 0)).x;
+ float depth = depthTex.Load(int3(inPosition.xy, 0)).x;
float thickness = 0.0f; //texture2D(thicknessTex, gl_TexCoord[0].xy).x;
/*
// threshold on thickness to create nice smooth silhouettes
if (depth == 0.0)
{
- gl_FragColor.x = 0.0;
- return gl_FragColor;
+ return 0.0f;
}
*/
@@ -54,9 +51,7 @@ float4 blurDepthPS(PassthroughVertexOut input) : SV_TARGET
for (float x = -taps; x <= taps; x += 1.0)
{
float2 offset = float2(x, y);
-
- //float sample = texture2DRect(depthTex, gl_FragCoord.xy + offset).x;
- float sample = depthTex.Load(int3(gl_FragCoord.xy + offset, 0)).x;
+ float sample = depthTex.Load(int3(inPosition.xy + offset, 0)).x;
//if (sample < -10000.0 * 0.5)
//continue;
@@ -85,7 +80,5 @@ float4 blurDepthPS(PassthroughVertexOut input) : SV_TARGET
}
float blend = count / sqr(2.0 * radius + 1.0);
- gl_FragColor.x = lerp(depth, sum, blend);
-
- return gl_FragColor;
+ return lerp(depth, sum, blend);
}
diff --git a/demo/d3d11/shaders/blurDepthPS.hlsl.h b/demo/d3d/shaders/blurDepthPS.hlsl.h
index ff191f8..ce5eec9 100644
--- a/demo/d3d11/shaders/blurDepthPS.hlsl.h
+++ b/demo/d3d/shaders/blurDepthPS.hlsl.h
@@ -11,11 +11,11 @@
// struct FluidShaderConst
// {
//
-// float4x4 modelviewprojection; // Offset: 0
-// float4x4 modelview; // Offset: 64
+// float4x4 modelViewProjection; // Offset: 0
+// float4x4 modelView; // Offset: 64
// float4x4 projection; // Offset: 128
-// float4x4 modelview_inverse; // Offset: 192
-// float4x4 projection_inverse; // Offset: 256
+// float4x4 inverseModelView; // Offset: 192
+// float4x4 inverseProjection; // Offset: 256
// float4 invTexScale; // Offset: 320
// float3 invViewport; // Offset: 336
// float _pad0; // Offset: 348
@@ -62,14 +62,14 @@
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
-// SV_TARGET 0 xyzw 0 TARGET float xyzw
+// SV_TARGET 0 x 0 TARGET float x
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[23], immediateIndexed
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps_siv linear noperspective v0.xy, position
-dcl_output o0.xyzw
+dcl_output o0.x
dcl_temps 5
ftoi r0.xy, v0.xyxx
mov r0.zw, l(0,0,0,0)
@@ -129,28 +129,27 @@ mul r0.y, r0.y, r0.y
div r0.y, r1.w, r0.y
add r0.z, -r0.x, r0.z
mad o0.x, r0.y, r0.z, r0.x
-mov o0.yzw, l(0,0,0,0)
ret
-// Approximately 60 instruction slots used
+// Approximately 59 instruction slots used
#endif
const BYTE g_blurDepthPS[] =
{
- 68, 88, 66, 67, 244, 233,
- 190, 43, 161, 207, 241, 98,
- 173, 248, 128, 15, 40, 190,
- 66, 70, 1, 0, 0, 0,
- 76, 12, 0, 0, 5, 0,
+ 68, 88, 66, 67, 25, 16,
+ 90, 102, 178, 215, 22, 204,
+ 41, 91, 183, 73, 123, 5,
+ 153, 37, 1, 0, 0, 0,
+ 40, 12, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
- 156, 4, 0, 0, 244, 4,
- 0, 0, 40, 5, 0, 0,
- 176, 11, 0, 0, 82, 68,
- 69, 70, 96, 4, 0, 0,
+ 152, 4, 0, 0, 240, 4,
+ 0, 0, 36, 5, 0, 0,
+ 140, 11, 0, 0, 82, 68,
+ 69, 70, 92, 4, 0, 0,
1, 0, 0, 0, 144, 0,
0, 0, 2, 0, 0, 0,
60, 0, 0, 0, 0, 5,
255, 255, 0, 1, 0, 0,
- 44, 4, 0, 0, 82, 68,
+ 40, 4, 0, 0, 82, 68,
49, 49, 60, 0, 0, 0,
24, 0, 0, 0, 32, 0,
0, 0, 40, 0, 0, 0,
@@ -176,7 +175,7 @@ const BYTE g_blurDepthPS[] =
0, 0, 0, 0, 0, 0,
208, 0, 0, 0, 0, 0,
0, 0, 192, 2, 0, 0,
- 2, 0, 0, 0, 8, 4,
+ 2, 0, 0, 0, 4, 4,
0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 255, 255, 255, 255,
@@ -185,8 +184,8 @@ const BYTE g_blurDepthPS[] =
70, 108, 117, 105, 100, 83,
104, 97, 100, 101, 114, 67,
111, 110, 115, 116, 0, 109,
- 111, 100, 101, 108, 118, 105,
- 101, 119, 112, 114, 111, 106,
+ 111, 100, 101, 108, 86, 105,
+ 101, 119, 80, 114, 111, 106,
101, 99, 116, 105, 111, 110,
0, 102, 108, 111, 97, 116,
52, 120, 52, 0, 171, 171,
@@ -196,447 +195,441 @@ const BYTE g_blurDepthPS[] =
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 253, 0, 0, 0,
- 109, 111, 100, 101, 108, 118,
+ 109, 111, 100, 101, 108, 86,
105, 101, 119, 0, 112, 114,
111, 106, 101, 99, 116, 105,
- 111, 110, 0, 109, 111, 100,
- 101, 108, 118, 105, 101, 119,
- 95, 105, 110, 118, 101, 114,
- 115, 101, 0, 112, 114, 111,
+ 111, 110, 0, 105, 110, 118,
+ 101, 114, 115, 101, 77, 111,
+ 100, 101, 108, 86, 105, 101,
+ 119, 0, 105, 110, 118, 101,
+ 114, 115, 101, 80, 114, 111,
106, 101, 99, 116, 105, 111,
- 110, 95, 105, 110, 118, 101,
- 114, 115, 101, 0, 105, 110,
- 118, 84, 101, 120, 83, 99,
- 97, 108, 101, 0, 102, 108,
- 111, 97, 116, 52, 0, 171,
- 171, 171, 1, 0, 3, 0,
- 1, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
+ 110, 0, 105, 110, 118, 84,
+ 101, 120, 83, 99, 97, 108,
+ 101, 0, 102, 108, 111, 97,
+ 116, 52, 0, 171, 1, 0,
+ 3, 0, 1, 0, 4, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 114, 1,
- 0, 0, 105, 110, 118, 86,
- 105, 101, 119, 112, 111, 114,
- 116, 0, 102, 108, 111, 97,
- 116, 51, 0, 171, 1, 0,
- 3, 0, 1, 0, 3, 0,
- 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
+ 112, 1, 0, 0, 105, 110,
+ 118, 86, 105, 101, 119, 112,
+ 111, 114, 116, 0, 102, 108,
+ 111, 97, 116, 51, 0, 171,
+ 1, 0, 3, 0, 1, 0,
+ 3, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 172, 1, 0, 0, 95, 112,
- 97, 100, 48, 0, 102, 108,
- 111, 97, 116, 0, 0, 0,
- 3, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
+ 0, 0, 168, 1, 0, 0,
+ 95, 112, 97, 100, 48, 0,
+ 102, 108, 111, 97, 116, 0,
+ 0, 0, 3, 0, 1, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 218, 1, 0, 0,
+ 98, 108, 117, 114, 82, 97,
+ 100, 105, 117, 115, 87, 111,
+ 114, 108, 100, 0, 98, 108,
+ 117, 114, 83, 99, 97, 108,
+ 101, 0, 98, 108, 117, 114,
+ 70, 97, 108, 108, 111, 102,
+ 102, 0, 100, 101, 98, 117,
+ 103, 0, 105, 110, 116, 0,
+ 0, 0, 2, 0, 1, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 48, 2, 0, 0,
+ 108, 105, 103, 104, 116, 80,
+ 111, 115, 0, 95, 112, 97,
+ 100, 49, 0, 108, 105, 103,
+ 104, 116, 68, 105, 114, 0,
+ 95, 112, 97, 100, 50, 0,
+ 108, 105, 103, 104, 116, 84,
+ 114, 97, 110, 115, 102, 111,
+ 114, 109, 0, 99, 111, 108,
+ 111, 114, 0, 99, 108, 105,
+ 112, 80, 111, 115, 84, 111,
+ 69, 121, 101, 0, 115, 112,
+ 111, 116, 77, 105, 110, 0,
+ 115, 112, 111, 116, 77, 97,
+ 120, 0, 105, 111, 114, 0,
+ 95, 112, 97, 100, 51, 0,
+ 115, 104, 97, 100, 111, 119,
+ 84, 97, 112, 115, 0, 171,
+ 171, 171, 1, 0, 3, 0,
+ 1, 0, 4, 0, 12, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 222, 1, 0, 0, 98, 108,
- 117, 114, 82, 97, 100, 105,
- 117, 115, 87, 111, 114, 108,
- 100, 0, 98, 108, 117, 114,
- 83, 99, 97, 108, 101, 0,
- 98, 108, 117, 114, 70, 97,
- 108, 108, 111, 102, 102, 0,
- 100, 101, 98, 117, 103, 0,
- 105, 110, 116, 0, 0, 0,
- 2, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 112, 1,
+ 0, 0, 233, 0, 0, 0,
+ 8, 1, 0, 0, 0, 0,
+ 0, 0, 44, 1, 0, 0,
+ 8, 1, 0, 0, 64, 0,
+ 0, 0, 54, 1, 0, 0,
+ 8, 1, 0, 0, 128, 0,
+ 0, 0, 65, 1, 0, 0,
+ 8, 1, 0, 0, 192, 0,
+ 0, 0, 82, 1, 0, 0,
+ 8, 1, 0, 0, 0, 1,
+ 0, 0, 100, 1, 0, 0,
+ 120, 1, 0, 0, 64, 1,
+ 0, 0, 156, 1, 0, 0,
+ 176, 1, 0, 0, 80, 1,
+ 0, 0, 212, 1, 0, 0,
+ 224, 1, 0, 0, 92, 1,
+ 0, 0, 4, 2, 0, 0,
+ 224, 1, 0, 0, 96, 1,
+ 0, 0, 20, 2, 0, 0,
+ 224, 1, 0, 0, 100, 1,
+ 0, 0, 30, 2, 0, 0,
+ 224, 1, 0, 0, 104, 1,
+ 0, 0, 42, 2, 0, 0,
+ 52, 2, 0, 0, 108, 1,
+ 0, 0, 88, 2, 0, 0,
+ 176, 1, 0, 0, 112, 1,
+ 0, 0, 97, 2, 0, 0,
+ 224, 1, 0, 0, 124, 1,
+ 0, 0, 103, 2, 0, 0,
+ 176, 1, 0, 0, 128, 1,
+ 0, 0, 112, 2, 0, 0,
+ 224, 1, 0, 0, 140, 1,
+ 0, 0, 118, 2, 0, 0,
+ 8, 1, 0, 0, 144, 1,
+ 0, 0, 133, 2, 0, 0,
+ 120, 1, 0, 0, 208, 1,
+ 0, 0, 139, 2, 0, 0,
+ 120, 1, 0, 0, 224, 1,
+ 0, 0, 152, 2, 0, 0,
+ 224, 1, 0, 0, 240, 1,
+ 0, 0, 160, 2, 0, 0,
+ 224, 1, 0, 0, 244, 1,
+ 0, 0, 168, 2, 0, 0,
+ 224, 1, 0, 0, 248, 1,
+ 0, 0, 172, 2, 0, 0,
+ 224, 1, 0, 0, 252, 1,
+ 0, 0, 178, 2, 0, 0,
+ 192, 2, 0, 0, 0, 2,
+ 0, 0, 5, 0, 0, 0,
+ 1, 0, 176, 0, 0, 0,
+ 24, 0, 228, 2, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 216, 0,
+ 0, 0, 77, 105, 99, 114,
+ 111, 115, 111, 102, 116, 32,
+ 40, 82, 41, 32, 72, 76,
+ 83, 76, 32, 83, 104, 97,
+ 100, 101, 114, 32, 67, 111,
+ 109, 112, 105, 108, 101, 114,
+ 32, 54, 46, 51, 46, 57,
+ 54, 48, 48, 46, 49, 54,
+ 51, 56, 52, 0, 171, 171,
+ 73, 83, 71, 78, 80, 0,
+ 0, 0, 2, 0, 0, 0,
+ 8, 0, 0, 0, 56, 0,
0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
+ 15, 3, 0, 0, 68, 0,
0, 0, 0, 0, 0, 0,
- 52, 2, 0, 0, 108, 105,
- 103, 104, 116, 80, 111, 115,
- 0, 95, 112, 97, 100, 49,
- 0, 108, 105, 103, 104, 116,
- 68, 105, 114, 0, 95, 112,
- 97, 100, 50, 0, 108, 105,
- 103, 104, 116, 84, 114, 97,
- 110, 115, 102, 111, 114, 109,
- 0, 99, 111, 108, 111, 114,
- 0, 99, 108, 105, 112, 80,
- 111, 115, 84, 111, 69, 121,
- 101, 0, 115, 112, 111, 116,
- 77, 105, 110, 0, 115, 112,
- 111, 116, 77, 97, 120, 0,
- 105, 111, 114, 0, 95, 112,
- 97, 100, 51, 0, 115, 104,
- 97, 100, 111, 119, 84, 97,
- 112, 115, 0, 171, 171, 171,
- 1, 0, 3, 0, 1, 0,
- 4, 0, 12, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 114, 1, 0, 0,
- 233, 0, 0, 0, 8, 1,
- 0, 0, 0, 0, 0, 0,
- 44, 1, 0, 0, 8, 1,
- 0, 0, 64, 0, 0, 0,
- 54, 1, 0, 0, 8, 1,
- 0, 0, 128, 0, 0, 0,
- 65, 1, 0, 0, 8, 1,
- 0, 0, 192, 0, 0, 0,
- 83, 1, 0, 0, 8, 1,
- 0, 0, 0, 1, 0, 0,
- 102, 1, 0, 0, 124, 1,
- 0, 0, 64, 1, 0, 0,
- 160, 1, 0, 0, 180, 1,
- 0, 0, 80, 1, 0, 0,
- 216, 1, 0, 0, 228, 1,
- 0, 0, 92, 1, 0, 0,
- 8, 2, 0, 0, 228, 1,
- 0, 0, 96, 1, 0, 0,
- 24, 2, 0, 0, 228, 1,
- 0, 0, 100, 1, 0, 0,
- 34, 2, 0, 0, 228, 1,
- 0, 0, 104, 1, 0, 0,
- 46, 2, 0, 0, 56, 2,
- 0, 0, 108, 1, 0, 0,
- 92, 2, 0, 0, 180, 1,
- 0, 0, 112, 1, 0, 0,
- 101, 2, 0, 0, 228, 1,
- 0, 0, 124, 1, 0, 0,
- 107, 2, 0, 0, 180, 1,
- 0, 0, 128, 1, 0, 0,
- 116, 2, 0, 0, 228, 1,
- 0, 0, 140, 1, 0, 0,
- 122, 2, 0, 0, 8, 1,
- 0, 0, 144, 1, 0, 0,
- 137, 2, 0, 0, 124, 1,
- 0, 0, 208, 1, 0, 0,
- 143, 2, 0, 0, 124, 1,
- 0, 0, 224, 1, 0, 0,
- 156, 2, 0, 0, 228, 1,
- 0, 0, 240, 1, 0, 0,
- 164, 2, 0, 0, 228, 1,
- 0, 0, 244, 1, 0, 0,
- 172, 2, 0, 0, 228, 1,
- 0, 0, 248, 1, 0, 0,
- 176, 2, 0, 0, 228, 1,
- 0, 0, 252, 1, 0, 0,
- 182, 2, 0, 0, 196, 2,
- 0, 0, 0, 2, 0, 0,
- 5, 0, 0, 0, 1, 0,
- 176, 0, 0, 0, 24, 0,
- 232, 2, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 216, 0, 0, 0,
- 77, 105, 99, 114, 111, 115,
- 111, 102, 116, 32, 40, 82,
- 41, 32, 72, 76, 83, 76,
- 32, 83, 104, 97, 100, 101,
- 114, 32, 67, 111, 109, 112,
- 105, 108, 101, 114, 32, 54,
- 46, 51, 46, 57, 54, 48,
- 48, 46, 49, 54, 51, 56,
- 52, 0, 171, 171, 73, 83,
- 71, 78, 80, 0, 0, 0,
- 2, 0, 0, 0, 8, 0,
- 0, 0, 56, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 15, 3,
- 0, 0, 68, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 1, 0, 0, 0,
+ 3, 0, 0, 0, 83, 86,
+ 95, 80, 79, 83, 73, 84,
+ 73, 79, 78, 0, 84, 69,
+ 88, 67, 79, 79, 82, 68,
+ 0, 171, 171, 171, 79, 83,
+ 71, 78, 44, 0, 0, 0,
+ 1, 0, 0, 0, 8, 0,
+ 0, 0, 32, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
- 1, 0, 0, 0, 3, 0,
- 0, 0, 83, 86, 95, 80,
- 79, 83, 73, 84, 73, 79,
- 78, 0, 84, 69, 88, 67,
- 79, 79, 82, 68, 0, 171,
- 171, 171, 79, 83, 71, 78,
- 44, 0, 0, 0, 1, 0,
- 0, 0, 8, 0, 0, 0,
- 32, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0,
- 0, 0, 15, 0, 0, 0,
- 83, 86, 95, 84, 65, 82,
- 71, 69, 84, 0, 171, 171,
- 83, 72, 69, 88, 128, 6,
- 0, 0, 80, 0, 0, 0,
- 160, 1, 0, 0, 106, 8,
- 0, 1, 89, 0, 0, 4,
- 70, 142, 32, 0, 0, 0,
- 0, 0, 23, 0, 0, 0,
- 88, 24, 0, 4, 0, 112,
+ 0, 0, 0, 0, 1, 14,
+ 0, 0, 83, 86, 95, 84,
+ 65, 82, 71, 69, 84, 0,
+ 171, 171, 83, 72, 69, 88,
+ 96, 6, 0, 0, 80, 0,
+ 0, 0, 152, 1, 0, 0,
+ 106, 8, 0, 1, 89, 0,
+ 0, 4, 70, 142, 32, 0,
+ 0, 0, 0, 0, 23, 0,
+ 0, 0, 88, 24, 0, 4,
+ 0, 112, 16, 0, 0, 0,
+ 0, 0, 85, 85, 0, 0,
+ 100, 32, 0, 4, 50, 16,
16, 0, 0, 0, 0, 0,
- 85, 85, 0, 0, 100, 32,
- 0, 4, 50, 16, 16, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 0, 0,
- 0, 0, 104, 0, 0, 2,
- 5, 0, 0, 0, 27, 0,
- 0, 5, 50, 0, 16, 0,
- 0, 0, 0, 0, 70, 16,
- 16, 0, 0, 0, 0, 0,
- 54, 0, 0, 8, 194, 0,
+ 1, 0, 0, 0, 101, 0,
+ 0, 3, 18, 32, 16, 0,
+ 0, 0, 0, 0, 104, 0,
+ 0, 2, 5, 0, 0, 0,
+ 27, 0, 0, 5, 50, 0,
16, 0, 0, 0, 0, 0,
- 2, 64, 0, 0, 0, 0,
+ 70, 16, 16, 0, 0, 0,
+ 0, 0, 54, 0, 0, 8,
+ 194, 0, 16, 0, 0, 0,
+ 0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 45, 0, 0, 137,
- 194, 0, 0, 128, 67, 85,
- 21, 0, 18, 0, 16, 0,
- 0, 0, 0, 0, 70, 14,
+ 0, 0, 0, 0, 45, 0,
+ 0, 137, 194, 0, 0, 128,
+ 67, 85, 21, 0, 18, 0,
16, 0, 0, 0, 0, 0,
- 70, 126, 16, 0, 0, 0,
- 0, 0, 14, 0, 0, 9,
- 34, 0, 16, 0, 0, 0,
- 0, 0, 10, 128, 32, 0,
- 0, 0, 0, 0, 22, 0,
- 0, 0, 10, 0, 16, 128,
- 65, 0, 0, 0, 0, 0,
- 0, 0, 56, 0, 0, 8,
- 34, 0, 16, 0, 0, 0,
- 0, 0, 26, 0, 16, 0,
- 0, 0, 0, 0, 26, 128,
+ 70, 14, 16, 0, 0, 0,
+ 0, 0, 70, 126, 16, 0,
+ 0, 0, 0, 0, 14, 0,
+ 0, 9, 34, 0, 16, 0,
+ 0, 0, 0, 0, 10, 128,
32, 0, 0, 0, 0, 0,
- 22, 0, 0, 0, 51, 0,
- 0, 7, 34, 0, 16, 0,
+ 22, 0, 0, 0, 10, 0,
+ 16, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 56, 0,
+ 0, 8, 34, 0, 16, 0,
0, 0, 0, 0, 26, 0,
16, 0, 0, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 160, 64, 14, 0, 0, 10,
- 66, 0, 16, 0, 0, 0,
- 0, 0, 2, 64, 0, 0,
+ 26, 128, 32, 0, 0, 0,
+ 0, 0, 22, 0, 0, 0,
+ 51, 0, 0, 7, 34, 0,
+ 16, 0, 0, 0, 0, 0,
+ 26, 0, 16, 0, 0, 0,
+ 0, 0, 1, 64, 0, 0,
+ 0, 0, 160, 64, 14, 0,
+ 0, 10, 66, 0, 16, 0,
+ 0, 0, 0, 0, 2, 64,
+ 0, 0, 0, 0, 128, 63,
0, 0, 128, 63, 0, 0,
128, 63, 0, 0, 128, 63,
- 0, 0, 128, 63, 26, 0,
- 16, 0, 0, 0, 0, 0,
- 66, 0, 0, 5, 130, 0,
- 16, 0, 0, 0, 0, 0,
26, 0, 16, 0, 0, 0,
- 0, 0, 0, 0, 0, 8,
- 18, 0, 16, 0, 1, 0,
- 0, 0, 26, 0, 16, 128,
- 65, 0, 0, 0, 0, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 54, 0,
- 0, 8, 194, 0, 16, 0,
- 2, 0, 0, 0, 2, 64,
+ 0, 0, 66, 0, 0, 5,
+ 130, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 0,
0, 0, 0, 0, 0, 0,
+ 0, 8, 18, 0, 16, 0,
+ 1, 0, 0, 0, 26, 0,
+ 16, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 58, 0,
+ 16, 0, 0, 0, 0, 0,
+ 54, 0, 0, 8, 194, 0,
+ 16, 0, 2, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 54, 0, 0, 8, 226, 0,
- 16, 0, 1, 0, 0, 0,
- 2, 64, 0, 0, 0, 0,
+ 0, 0, 54, 0, 0, 8,
+ 226, 0, 16, 0, 1, 0,
+ 0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 54, 0,
+ 0, 6, 34, 0, 16, 0,
+ 3, 0, 0, 0, 58, 0,
+ 16, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 48, 0,
+ 0, 1, 49, 0, 0, 7,
+ 66, 0, 16, 0, 3, 0,
+ 0, 0, 58, 0, 16, 0,
+ 0, 0, 0, 0, 26, 0,
+ 16, 0, 3, 0, 0, 0,
+ 3, 0, 4, 3, 42, 0,
+ 16, 0, 3, 0, 0, 0,
+ 54, 0, 0, 5, 114, 0,
+ 16, 0, 4, 0, 0, 0,
+ 150, 7, 16, 0, 1, 0,
0, 0, 54, 0, 0, 6,
- 34, 0, 16, 0, 3, 0,
+ 130, 0, 16, 0, 4, 0,
0, 0, 58, 0, 16, 128,
65, 0, 0, 0, 0, 0,
0, 0, 48, 0, 0, 1,
49, 0, 0, 7, 66, 0,
16, 0, 3, 0, 0, 0,
58, 0, 16, 0, 0, 0,
- 0, 0, 26, 0, 16, 0,
- 3, 0, 0, 0, 3, 0,
+ 0, 0, 58, 0, 16, 0,
+ 4, 0, 0, 0, 3, 0,
4, 3, 42, 0, 16, 0,
3, 0, 0, 0, 54, 0,
- 0, 5, 114, 0, 16, 0,
- 4, 0, 0, 0, 150, 7,
- 16, 0, 1, 0, 0, 0,
- 54, 0, 0, 6, 130, 0,
- 16, 0, 4, 0, 0, 0,
- 58, 0, 16, 128, 65, 0,
- 0, 0, 0, 0, 0, 0,
- 48, 0, 0, 1, 49, 0,
- 0, 7, 66, 0, 16, 0,
+ 0, 5, 18, 0, 16, 0,
3, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
- 58, 0, 16, 0, 4, 0,
- 0, 0, 3, 0, 4, 3,
- 42, 0, 16, 0, 3, 0,
- 0, 0, 54, 0, 0, 5,
- 18, 0, 16, 0, 3, 0,
- 0, 0, 58, 0, 16, 0,
- 4, 0, 0, 0, 0, 0,
- 0, 7, 194, 0, 16, 0,
- 3, 0, 0, 0, 6, 4,
+ 16, 0, 4, 0, 0, 0,
+ 0, 0, 0, 7, 194, 0,
16, 0, 3, 0, 0, 0,
- 6, 20, 16, 0, 0, 0,
- 0, 0, 27, 0, 0, 5,
- 50, 0, 16, 0, 2, 0,
- 0, 0, 230, 10, 16, 0,
- 3, 0, 0, 0, 45, 0,
- 0, 137, 194, 0, 0, 128,
- 67, 85, 21, 0, 18, 0,
- 16, 0, 2, 0, 0, 0,
- 70, 14, 16, 0, 2, 0,
- 0, 0, 70, 126, 16, 0,
- 0, 0, 0, 0, 15, 0,
- 0, 7, 34, 0, 16, 0,
- 2, 0, 0, 0, 70, 0,
+ 6, 4, 16, 0, 3, 0,
+ 0, 0, 6, 20, 16, 0,
+ 0, 0, 0, 0, 27, 0,
+ 0, 5, 50, 0, 16, 0,
+ 2, 0, 0, 0, 230, 10,
16, 0, 3, 0, 0, 0,
+ 45, 0, 0, 137, 194, 0,
+ 0, 128, 67, 85, 21, 0,
+ 18, 0, 16, 0, 2, 0,
+ 0, 0, 70, 14, 16, 0,
+ 2, 0, 0, 0, 70, 126,
+ 16, 0, 0, 0, 0, 0,
+ 15, 0, 0, 7, 34, 0,
+ 16, 0, 2, 0, 0, 0,
70, 0, 16, 0, 3, 0,
- 0, 0, 75, 0, 0, 5,
- 34, 0, 16, 0, 2, 0,
+ 0, 0, 70, 0, 16, 0,
+ 3, 0, 0, 0, 75, 0,
+ 0, 5, 34, 0, 16, 0,
+ 2, 0, 0, 0, 26, 0,
+ 16, 0, 2, 0, 0, 0,
+ 56, 0, 0, 7, 34, 0,
+ 16, 0, 2, 0, 0, 0,
+ 42, 0, 16, 0, 0, 0,
0, 0, 26, 0, 16, 0,
2, 0, 0, 0, 56, 0,
0, 7, 34, 0, 16, 0,
- 2, 0, 0, 0, 42, 0,
- 16, 0, 0, 0, 0, 0,
+ 2, 0, 0, 0, 26, 0,
+ 16, 0, 2, 0, 0, 0,
26, 0, 16, 0, 2, 0,
0, 0, 56, 0, 0, 7,
34, 0, 16, 0, 2, 0,
0, 0, 26, 0, 16, 0,
- 2, 0, 0, 0, 26, 0,
- 16, 0, 2, 0, 0, 0,
- 56, 0, 0, 7, 34, 0,
+ 2, 0, 0, 0, 1, 64,
+ 0, 0, 59, 170, 184, 191,
+ 25, 0, 0, 5, 34, 0,
16, 0, 2, 0, 0, 0,
26, 0, 16, 0, 2, 0,
- 0, 0, 1, 64, 0, 0,
- 59, 170, 184, 191, 25, 0,
- 0, 5, 34, 0, 16, 0,
- 2, 0, 0, 0, 26, 0,
- 16, 0, 2, 0, 0, 0,
- 0, 0, 0, 8, 18, 0,
+ 0, 0, 0, 0, 0, 8,
+ 18, 0, 16, 0, 3, 0,
+ 0, 0, 10, 0, 16, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 10, 0, 16, 0,
+ 2, 0, 0, 0, 56, 0,
+ 0, 7, 18, 0, 16, 0,
+ 3, 0, 0, 0, 10, 0,
16, 0, 3, 0, 0, 0,
- 10, 0, 16, 128, 65, 0,
- 0, 0, 0, 0, 0, 0,
- 10, 0, 16, 0, 2, 0,
- 0, 0, 56, 0, 0, 7,
+ 1, 64, 0, 0, 0, 0,
+ 176, 64, 56, 0, 0, 7,
18, 0, 16, 0, 3, 0,
0, 0, 10, 0, 16, 0,
- 3, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 176, 64,
+ 3, 0, 0, 0, 10, 0,
+ 16, 0, 3, 0, 0, 0,
56, 0, 0, 7, 18, 0,
16, 0, 3, 0, 0, 0,
10, 0, 16, 0, 3, 0,
- 0, 0, 10, 0, 16, 0,
- 3, 0, 0, 0, 56, 0,
- 0, 7, 18, 0, 16, 0,
+ 0, 0, 1, 64, 0, 0,
+ 59, 170, 184, 191, 25, 0,
+ 0, 5, 18, 0, 16, 0,
3, 0, 0, 0, 10, 0,
16, 0, 3, 0, 0, 0,
- 1, 64, 0, 0, 59, 170,
- 184, 191, 25, 0, 0, 5,
- 18, 0, 16, 0, 3, 0,
- 0, 0, 10, 0, 16, 0,
- 3, 0, 0, 0, 52, 0,
- 0, 9, 66, 0, 16, 0,
- 3, 0, 0, 0, 26, 0,
- 16, 128, 129, 0, 0, 0,
- 3, 0, 0, 0, 58, 0,
- 16, 128, 129, 0, 0, 0,
- 4, 0, 0, 0, 29, 0,
+ 52, 0, 0, 9, 66, 0,
+ 16, 0, 3, 0, 0, 0,
+ 26, 0, 16, 128, 129, 0,
+ 0, 0, 3, 0, 0, 0,
+ 58, 0, 16, 128, 129, 0,
+ 0, 0, 4, 0, 0, 0,
+ 29, 0, 0, 7, 66, 0,
+ 16, 0, 3, 0, 0, 0,
+ 42, 0, 16, 0, 3, 0,
+ 0, 0, 26, 0, 16, 0,
+ 0, 0, 0, 0, 1, 0,
0, 7, 66, 0, 16, 0,
3, 0, 0, 0, 42, 0,
16, 0, 3, 0, 0, 0,
- 26, 0, 16, 0, 0, 0,
- 0, 0, 1, 0, 0, 7,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 50, 0, 0, 10,
66, 0, 16, 0, 3, 0,
- 0, 0, 42, 0, 16, 0,
- 3, 0, 0, 0, 1, 64,
+ 0, 0, 42, 0, 16, 128,
+ 65, 0, 0, 0, 3, 0,
+ 0, 0, 10, 0, 16, 0,
+ 1, 0, 0, 0, 1, 64,
0, 0, 0, 0, 128, 63,
- 50, 0, 0, 10, 66, 0,
- 16, 0, 3, 0, 0, 0,
- 42, 0, 16, 128, 65, 0,
- 0, 0, 3, 0, 0, 0,
- 10, 0, 16, 0, 1, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 128, 63, 56, 0,
- 0, 7, 18, 0, 16, 0,
- 2, 0, 0, 0, 26, 0,
+ 56, 0, 0, 7, 18, 0,
16, 0, 2, 0, 0, 0,
+ 26, 0, 16, 0, 2, 0,
+ 0, 0, 10, 0, 16, 0,
+ 2, 0, 0, 0, 56, 0,
+ 0, 7, 18, 0, 16, 0,
+ 2, 0, 0, 0, 10, 0,
+ 16, 0, 3, 0, 0, 0,
10, 0, 16, 0, 2, 0,
+ 0, 0, 50, 0, 0, 9,
+ 18, 0, 16, 0, 4, 0,
+ 0, 0, 10, 0, 16, 0,
+ 2, 0, 0, 0, 42, 0,
+ 16, 0, 3, 0, 0, 0,
+ 10, 0, 16, 0, 4, 0,
0, 0, 56, 0, 0, 7,
18, 0, 16, 0, 2, 0,
- 0, 0, 10, 0, 16, 0,
- 3, 0, 0, 0, 10, 0,
- 16, 0, 2, 0, 0, 0,
- 50, 0, 0, 9, 18, 0,
+ 0, 0, 26, 0, 16, 0,
+ 2, 0, 0, 0, 10, 0,
+ 16, 0, 3, 0, 0, 0,
+ 50, 0, 0, 9, 34, 0,
16, 0, 4, 0, 0, 0,
10, 0, 16, 0, 2, 0,
0, 0, 42, 0, 16, 0,
- 3, 0, 0, 0, 10, 0,
+ 3, 0, 0, 0, 26, 0,
16, 0, 4, 0, 0, 0,
- 56, 0, 0, 7, 18, 0,
- 16, 0, 2, 0, 0, 0,
- 26, 0, 16, 0, 2, 0,
- 0, 0, 10, 0, 16, 0,
- 3, 0, 0, 0, 50, 0,
- 0, 9, 34, 0, 16, 0,
- 4, 0, 0, 0, 10, 0,
- 16, 0, 2, 0, 0, 0,
- 42, 0, 16, 0, 3, 0,
- 0, 0, 26, 0, 16, 0,
- 4, 0, 0, 0, 50, 0,
- 0, 9, 66, 0, 16, 0,
- 4, 0, 0, 0, 10, 0,
- 16, 0, 3, 0, 0, 0,
- 42, 0, 16, 0, 3, 0,
+ 50, 0, 0, 9, 66, 0,
+ 16, 0, 4, 0, 0, 0,
+ 10, 0, 16, 0, 3, 0,
0, 0, 42, 0, 16, 0,
- 4, 0, 0, 0, 0, 0,
- 0, 7, 130, 0, 16, 0,
- 4, 0, 0, 0, 58, 0,
+ 3, 0, 0, 0, 42, 0,
16, 0, 4, 0, 0, 0,
+ 0, 0, 0, 7, 130, 0,
+ 16, 0, 4, 0, 0, 0,
+ 58, 0, 16, 0, 4, 0,
+ 0, 0, 1, 64, 0, 0,
+ 0, 0, 128, 63, 22, 0,
+ 0, 1, 54, 0, 0, 5,
+ 226, 0, 16, 0, 1, 0,
+ 0, 0, 6, 9, 16, 0,
+ 4, 0, 0, 0, 0, 0,
+ 0, 7, 34, 0, 16, 0,
+ 3, 0, 0, 0, 26, 0,
+ 16, 0, 3, 0, 0, 0,
1, 64, 0, 0, 0, 0,
128, 63, 22, 0, 0, 1,
- 54, 0, 0, 5, 226, 0,
+ 49, 0, 0, 7, 66, 0,
+ 16, 0, 0, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 0, 0, 42, 0, 16, 0,
+ 1, 0, 0, 0, 14, 0,
+ 0, 7, 130, 0, 16, 0,
+ 0, 0, 0, 0, 26, 0,
16, 0, 1, 0, 0, 0,
- 6, 9, 16, 0, 4, 0,
- 0, 0, 0, 0, 0, 7,
- 34, 0, 16, 0, 3, 0,
+ 42, 0, 16, 0, 1, 0,
+ 0, 0, 55, 0, 0, 9,
+ 66, 0, 16, 0, 0, 0,
+ 0, 0, 42, 0, 16, 0,
+ 0, 0, 0, 0, 58, 0,
+ 16, 0, 0, 0, 0, 0,
+ 26, 0, 16, 0, 1, 0,
+ 0, 0, 50, 0, 0, 9,
+ 34, 0, 16, 0, 0, 0,
0, 0, 26, 0, 16, 0,
- 3, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 128, 63,
- 22, 0, 0, 1, 49, 0,
- 0, 7, 66, 0, 16, 0,
0, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 1, 0,
- 0, 0, 14, 0, 0, 7,
- 130, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 0, 64,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 56, 0, 0, 7,
+ 34, 0, 16, 0, 0, 0,
0, 0, 26, 0, 16, 0,
- 1, 0, 0, 0, 42, 0,
- 16, 0, 1, 0, 0, 0,
- 55, 0, 0, 9, 66, 0,
- 16, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 0, 0,
- 0, 0, 58, 0, 16, 0,
0, 0, 0, 0, 26, 0,
- 16, 0, 1, 0, 0, 0,
- 50, 0, 0, 9, 34, 0,
16, 0, 0, 0, 0, 0,
- 26, 0, 16, 0, 0, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 0, 64, 1, 64,
- 0, 0, 0, 0, 128, 63,
- 56, 0, 0, 7, 34, 0,
+ 14, 0, 0, 7, 34, 0,
16, 0, 0, 0, 0, 0,
- 26, 0, 16, 0, 0, 0,
+ 58, 0, 16, 0, 1, 0,
0, 0, 26, 0, 16, 0,
- 0, 0, 0, 0, 14, 0,
- 0, 7, 34, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
- 16, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 8, 66, 0, 16, 0,
+ 0, 0, 0, 0, 10, 0,
+ 16, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 42, 0,
+ 16, 0, 0, 0, 0, 0,
+ 50, 0, 0, 9, 18, 32,
+ 16, 0, 0, 0, 0, 0,
26, 0, 16, 0, 0, 0,
- 0, 0, 0, 0, 0, 8,
- 66, 0, 16, 0, 0, 0,
- 0, 0, 10, 0, 16, 128,
- 65, 0, 0, 0, 0, 0,
0, 0, 42, 0, 16, 0,
- 0, 0, 0, 0, 50, 0,
- 0, 9, 18, 32, 16, 0,
- 0, 0, 0, 0, 26, 0,
+ 0, 0, 0, 0, 10, 0,
16, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 0, 0,
- 0, 0, 10, 0, 16, 0,
- 0, 0, 0, 0, 54, 0,
- 0, 8, 226, 32, 16, 0,
- 0, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
62, 0, 0, 1, 83, 84,
65, 84, 148, 0, 0, 0,
- 60, 0, 0, 0, 5, 0,
+ 59, 0, 0, 0, 5, 0,
0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 38, 0,
0, 0, 0, 0, 0, 0,
@@ -648,7 +641,7 @@ const BYTE g_blurDepthPS[] =
0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 9, 0,
+ 0, 0, 0, 0, 8, 0,
0, 0, 1, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
diff --git a/demo/d3d11/shaders/compositePS.hlsl b/demo/d3d/shaders/compositePS.hlsl
index b082aa6..6e8bb6a 100644
--- a/demo/d3d11/shaders/compositePS.hlsl
+++ b/demo/d3d/shaders/compositePS.hlsl
@@ -44,9 +44,7 @@ float shadowSample(float3 worldPos, out float attenuation)
{
float2 shadowTaps = gParams.shadowTaps[i].xy;
shadowTaps.y = 1.0f - shadowTaps.y;
- s += shadowTex.SampleCmpLevelZero(shadowSampler, uvw.xy + shadowTaps * radius, uvw.z);
-
- //s += shadow2D(shadowTex, vec3(uvw.xy + shadowTaps[i] * radius, uvw.z)).r;
+ s += shadowTex.SampleCmp(shadowSampler, uvw.xy + shadowTaps * radius, uvw.z);
}
s /= 8.0;
@@ -71,16 +69,11 @@ float3 linearToSrgb(float3 c) { const float v = 1.0 / 2.2; return pow(c, float3(
float sqr(float x) { return x*x; }
float cube(float x) { return x*x*x; }
-float4 compositePS(PassthroughVertexOut input
- , out float gl_FragDepth : SV_DEPTH
-) : SV_TARGET
+float4 compositePS(PassthroughVertexOut input, out float depthOut : SV_DEPTH) : SV_TARGET
{
-
- float4 gl_FragColor;
-
- const float4x4 gl_ProjectionMatrix = gParams.projection;
- const float4x4 gl_ModelViewMatrix = gParams.modelview;
- const float4x4 gl_ModelViewMatrixInverse = gParams.modelview_inverse;
+ const float4x4 projectionMatrix = gParams.projection;
+ const float4x4 modelViewMatrix = gParams.modelView;
+ const float4x4 modelViewMatrixInverse = gParams.inverseModelView;
const float2 invTexScale = gParams.invTexScale.xy;
@@ -92,7 +85,7 @@ float4 compositePS(PassthroughVertexOut input
const float4 color = gParams.color;
// flip uv y-coordinate
- float2 uvCoord = float2(input.texCoord[0].x, 1.0f-input.texCoord[0].y);
+ float2 uvCoord = float2(input.texCoord.x, 1.0f-input.texCoord.y);
float eyeZ = depthTex.Sample(texSampler, uvCoord).x;
@@ -102,7 +95,6 @@ float4 compositePS(PassthroughVertexOut input
// reconstruct eye space pos from depth
float3 eyePos = viewportToEyeSpace(uvCoord, eyeZ);
-
// finite difference approx for normals, can't take dFdx because
// the one-sided difference is incorrect at shape boundaries
float3 zl = eyePos - viewportToEyeSpace(uvCoord - float2(invTexScale.x, 0.0), depthTex.Sample(texSampler, uvCoord - float2(invTexScale.x, 0.0)).x);
@@ -118,17 +110,16 @@ float4 compositePS(PassthroughVertexOut input
if (abs(zb.z) < abs(zt.z))
dy = zb;
-
//float3 dx = ddx(eyePos.xyz);
//float3 dy = -ddy(eyePos.xyz);
- float4 worldPos = mul(gl_ModelViewMatrixInverse, float4(eyePos, 1.0));
+ float4 worldPos = mul(modelViewMatrixInverse, float4(eyePos, 1.0));
float attenuation;
float shadow = shadowSample(worldPos.xyz, attenuation);
- float3 l = mul(gl_ModelViewMatrix, float4(lightDir, 0.0)).xyz;
+ float3 l = mul(modelViewMatrix, float4(lightDir, 0.0)).xyz;
float3 v = -normalize(eyePos);
float3 n = -normalize(cross(dx, dy)); // sign difference from texcoord coordinate difference between OpenGL
@@ -144,7 +135,7 @@ float4 compositePS(PassthroughVertexOut input
float ln = dot(l, n)*attenuation;
float3 rEye = reflect(-v, n).xyz;
- float3 rWorld = mul(gl_ModelViewMatrixInverse, float4(rEye, 0.0)).xyz;
+ float3 rWorld = mul(modelViewMatrixInverse, float4(rEye, 0.0)).xyz;
float2 texScale = float2(0.75, 1.0); // to account for backbuffer aspect ratio (todo: pass in)
@@ -175,20 +166,17 @@ float4 compositePS(PassthroughVertexOut input
// lighting
float3 diffuse = color.xyz * lerp(float3(0.29, 0.379, 0.59), float3(1.0, 1.0, 1.0), (ln*0.5 + 0.5)*max(shadow, 0.4))*(1.0 - color.w);
float specular = 1.2*pow(max(dot(h, n), 0.0), 400.0);
-
- gl_FragColor.xyz = diffuse + (lerp(refract, reflect, fresnel) + specular)*color.w;
- gl_FragColor.w = 1.0;
-
- // visualize normals
- //gl_FragColor = float4(n*0.5 + 0.5, 1.0);
- //gl_FragColor.xyz = float3(fresnel, fresnel, fresnel);
- //gl_FragColor.xyz = n;
-
+
// write valid z
- float4 clipPos = mul(gl_ProjectionMatrix, float4(0.0, 0.0, eyeZ, 1.0));
+ float4 clipPos = mul(projectionMatrix, float4(0.0, 0.0, eyeZ, 1.0));
clipPos.z /= clipPos.w;
- gl_FragDepth = clipPos.z;
-
- return gl_FragColor;
+ depthOut = clipPos.z;
+ // visualize normals
+ //return float4(n*0.5 + 0.5, 1.0);
+ //return float4(fresnel, fresnel, fresnel, 0);
+ //return float4(n, 1);
+
+ // Color
+ return float4(diffuse + (lerp(refract, reflect, fresnel) + specular)*color.w, 1.0);
}
diff --git a/demo/d3d11/shaders/compositePS.hlsl.h b/demo/d3d/shaders/compositePS.hlsl.h
index 77d3814..76f4c49 100644
--- a/demo/d3d11/shaders/compositePS.hlsl.h
+++ b/demo/d3d/shaders/compositePS.hlsl.h
@@ -11,11 +11,11 @@
// struct FluidShaderConst
// {
//
-// float4x4 modelviewprojection; // Offset: 0
-// float4x4 modelview; // Offset: 64
+// float4x4 modelViewProjection; // Offset: 0
+// float4x4 modelView; // Offset: 64
// float4x4 projection; // Offset: 128
-// float4x4 modelview_inverse; // Offset: 192
-// float4x4 projection_inverse; // Offset: 256
+// float4x4 inverseModelView; // Offset: 192
+// float4x4 inverseProjection; // Offset: 256
// float4 invTexScale; // Offset: 320
// float3 invViewport; // Offset: 336
// float _pad0; // Offset: 348
@@ -136,59 +136,59 @@ mad r5.xyz, r4.xzwx, l(0.500000, 0.500000, 1.000000, 0.000000), l(0.500000, 0.50
lt r0.z, r5.x, l(0.000000)
lt r0.w, l(1.000000), r5.x
or r0.z, r0.w, r0.z
+add r0.w, -cb0[32].y, l(1.000000)
+mul r6.x, cb0[32].x, l(0.002000)
+mul r6.y, r0.w, l(0.002000)
+add r5.w, -r5.y, l(1.000000)
+add r4.xz, r5.xxwx, r6.xxyx
+sample_c_indexable(texture2d)(float,float,float,float) r0.w, r4.xzxx, t2.xxxx, s1, r5.z
+add r1.w, -cb0[33].y, l(1.000000)
+mul r6.x, cb0[33].x, l(0.002000)
+mul r6.y, r1.w, l(0.002000)
+add r4.xz, r5.xxwx, r6.xxyx
+sample_c_indexable(texture2d)(float,float,float,float) r1.w, r4.xzxx, t2.xxxx, s1, r5.z
+add r2.w, -cb0[34].y, l(1.000000)
+mul r6.x, cb0[34].x, l(0.002000)
+mul r6.y, r2.w, l(0.002000)
+add r4.xz, r5.xxwx, r6.xxyx
+sample_c_indexable(texture2d)(float,float,float,float) r2.w, r4.xzxx, t2.xxxx, s1, r5.z
+add r3.w, -cb0[35].y, l(1.000000)
+mul r6.x, cb0[35].x, l(0.002000)
+mul r6.y, r3.w, l(0.002000)
+add r4.xz, r5.xxwx, r6.xxyx
+sample_c_indexable(texture2d)(float,float,float,float) r3.w, r4.xzxx, t2.xxxx, s1, r5.z
+add r4.x, -cb0[36].y, l(1.000000)
+mul r6.x, cb0[36].x, l(0.002000)
+mul r6.y, r4.x, l(0.002000)
+add r4.xz, r5.xxwx, r6.xxyx
+sample_c_indexable(texture2d)(float,float,float,float) r4.x, r4.xzxx, t2.xxxx, s1, r5.z
+add r4.z, -cb0[37].y, l(1.000000)
+mul r6.x, cb0[37].x, l(0.002000)
+mul r6.y, r4.z, l(0.002000)
+add r4.zw, r5.xxxw, r6.xxxy
+sample_c_indexable(texture2d)(float,float,float,float) r4.z, r4.zwzz, t2.xxxx, s1, r5.z
+add r4.w, -cb0[38].y, l(1.000000)
+mul r6.x, cb0[38].x, l(0.002000)
+mul r6.y, r4.w, l(0.002000)
+add r6.xy, r5.xwxx, r6.xyxx
+sample_c_indexable(texture2d)(float,float,float,float) r4.w, r6.xyxx, t2.xxxx, s1, r5.z
+add r6.x, -cb0[39].y, l(1.000000)
+mul r7.x, cb0[39].x, l(0.002000)
+mul r7.y, r6.x, l(0.002000)
+add r5.xw, r5.xxxw, r7.xxxy
+sample_c_indexable(texture2d)(float,float,float,float) r5.x, r5.xwxx, t2.xxxx, s1, r5.z
if_z r0.z
lt r0.z, r5.y, l(0.000000)
- lt r0.w, l(1.000000), r5.y
- or r0.z, r0.w, r0.z
+ lt r5.y, l(1.000000), r5.y
+ or r0.z, r0.z, r5.y
if_z r0.z
- add r0.z, -cb0[32].y, l(1.000000)
- mul r6.x, cb0[32].x, l(0.002000)
- mul r6.y, r0.z, l(0.002000)
- add r5.w, -r5.y, l(1.000000)
- add r0.zw, r5.xxxw, r6.xxxy
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.z, r0.zwzz, t2.xxxx, s1, r5.z
- add r0.w, -cb0[33].y, l(1.000000)
- mul r6.x, cb0[33].x, l(0.002000)
- mul r6.y, r0.w, l(0.002000)
- add r4.xz, r5.xxwx, r6.xxyx
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r4.xzxx, t2.xxxx, s1, r5.z
- add r0.z, r0.w, r0.z
- add r0.w, -cb0[34].y, l(1.000000)
- mul r6.x, cb0[34].x, l(0.002000)
- mul r6.y, r0.w, l(0.002000)
- add r4.xz, r5.xxwx, r6.xxyx
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r4.xzxx, t2.xxxx, s1, r5.z
- add r0.z, r0.w, r0.z
- add r0.w, -cb0[35].y, l(1.000000)
- mul r6.x, cb0[35].x, l(0.002000)
- mul r6.y, r0.w, l(0.002000)
- add r4.xz, r5.xxwx, r6.xxyx
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r4.xzxx, t2.xxxx, s1, r5.z
- add r0.z, r0.w, r0.z
- add r0.w, -cb0[36].y, l(1.000000)
- mul r6.x, cb0[36].x, l(0.002000)
- mul r6.y, r0.w, l(0.002000)
- add r4.xz, r5.xxwx, r6.xxyx
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r4.xzxx, t2.xxxx, s1, r5.z
- add r0.z, r0.w, r0.z
- add r0.w, -cb0[37].y, l(1.000000)
- mul r6.x, cb0[37].x, l(0.002000)
- mul r6.y, r0.w, l(0.002000)
- add r4.xz, r5.xxwx, r6.xxyx
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r4.xzxx, t2.xxxx, s1, r5.z
- add r0.z, r0.w, r0.z
- add r0.w, -cb0[38].y, l(1.000000)
- mul r6.x, cb0[38].x, l(0.002000)
- mul r6.y, r0.w, l(0.002000)
- add r4.xz, r5.xxwx, r6.xxyx
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r4.xzxx, t2.xxxx, s1, r5.z
- add r0.z, r0.w, r0.z
- add r0.w, -cb0[39].y, l(1.000000)
- mul r6.x, cb0[39].x, l(0.002000)
- mul r6.y, r0.w, l(0.002000)
- add r4.xz, r5.xxwx, r6.xxyx
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r4.xzxx, t2.xxxx, s1, r5.z
- add r0.z, r0.w, r0.z
+ add r0.z, r0.w, r1.w
+ add r0.z, r2.w, r0.z
+ add r0.z, r3.w, r0.z
+ add r0.z, r4.x, r0.z
+ add r0.z, r4.z, r0.z
+ add r0.z, r4.w, r0.z
+ add r0.z, r5.x, r0.z
mul r0.z, r0.z, l(0.125000)
else
mov r0.z, l(1.000000)
@@ -264,13 +264,13 @@ max r1.x, r1.x, l(0.000000)
log r1.x, r1.x
mul r1.x, r1.x, l(400.000000)
exp r1.x, r1.x
-mad r2.xyz, -r4.xyzx, r6.xyzx, r3.xyzx
-mad r2.xyz, r0.wwww, r2.xyzx, r7.xyzx
-mad r1.xyw, r1.xxxx, l(1.200000, 1.200000, 0.000000, 1.200000), r2.xyxz
-mul r1.xyw, r1.xyxw, cb0[29].wwww
-mad o0.xyz, r0.xyzx, r6.wwww, r1.xywx
-mad r0.xy, cb0[10].zwzz, r1.zzzz, cb0[11].zwzz
-div oDepth, r0.x, r0.y
+mad r1.yz, cb0[10].zzwz, r1.zzzz, cb0[11].zzwz
+div oDepth, r1.y, r1.z
+mad r1.yzw, -r4.xxyz, r6.xxyz, r3.xxyz
+mad r1.yzw, r0.wwww, r1.yyzw, r7.xxyz
+mad r1.xyz, r1.xxxx, l(1.200000, 1.200000, 1.200000, 0.000000), r1.yzwy
+mul r1.xyz, r1.xyzx, cb0[29].wwww
+mad o0.xyz, r0.xyzx, r6.wwww, r1.xyzx
mov o0.w, l(1.000000)
ret
// Approximately 192 instruction slots used
@@ -278,21 +278,21 @@ ret
const BYTE g_compositePS[] =
{
- 68, 88, 66, 67, 223, 79,
- 142, 103, 26, 30, 227, 152,
- 95, 75, 188, 26, 149, 14,
- 233, 77, 1, 0, 0, 0,
- 232, 31, 0, 0, 5, 0,
+ 68, 88, 66, 67, 88, 43,
+ 70, 135, 189, 112, 158, 157,
+ 120, 182, 250, 215, 210, 92,
+ 57, 163, 1, 0, 0, 0,
+ 228, 31, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
- 72, 5, 0, 0, 160, 5,
- 0, 0, 244, 5, 0, 0,
- 76, 31, 0, 0, 82, 68,
- 69, 70, 12, 5, 0, 0,
+ 68, 5, 0, 0, 156, 5,
+ 0, 0, 240, 5, 0, 0,
+ 72, 31, 0, 0, 82, 68,
+ 69, 70, 8, 5, 0, 0,
1, 0, 0, 0, 60, 1,
0, 0, 6, 0, 0, 0,
60, 0, 0, 0, 0, 5,
255, 255, 0, 1, 0, 0,
- 216, 4, 0, 0, 82, 68,
+ 212, 4, 0, 0, 82, 68,
49, 49, 60, 0, 0, 0,
24, 0, 0, 0, 32, 0,
0, 0, 40, 0, 0, 0,
@@ -347,7 +347,7 @@ const BYTE g_compositePS[] =
0, 0, 0, 0, 124, 1,
0, 0, 0, 0, 0, 0,
192, 2, 0, 0, 2, 0,
- 0, 0, 180, 4, 0, 0,
+ 0, 0, 176, 4, 0, 0,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
@@ -356,8 +356,8 @@ const BYTE g_compositePS[] =
117, 105, 100, 83, 104, 97,
100, 101, 114, 67, 111, 110,
115, 116, 0, 109, 111, 100,
- 101, 108, 118, 105, 101, 119,
- 112, 114, 111, 106, 101, 99,
+ 101, 108, 86, 105, 101, 119,
+ 80, 114, 111, 106, 101, 99,
116, 105, 111, 110, 0, 102,
108, 111, 97, 116, 52, 120,
52, 0, 171, 171, 3, 0,
@@ -367,256 +367,304 @@ const BYTE g_compositePS[] =
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
169, 1, 0, 0, 109, 111,
- 100, 101, 108, 118, 105, 101,
+ 100, 101, 108, 86, 105, 101,
119, 0, 112, 114, 111, 106,
101, 99, 116, 105, 111, 110,
- 0, 109, 111, 100, 101, 108,
- 118, 105, 101, 119, 95, 105,
- 110, 118, 101, 114, 115, 101,
- 0, 112, 114, 111, 106, 101,
- 99, 116, 105, 111, 110, 95,
+ 0, 105, 110, 118, 101, 114,
+ 115, 101, 77, 111, 100, 101,
+ 108, 86, 105, 101, 119, 0,
105, 110, 118, 101, 114, 115,
- 101, 0, 105, 110, 118, 84,
- 101, 120, 83, 99, 97, 108,
- 101, 0, 102, 108, 111, 97,
- 116, 52, 0, 171, 171, 171,
- 1, 0, 3, 0, 1, 0,
- 4, 0, 0, 0, 0, 0,
+ 101, 80, 114, 111, 106, 101,
+ 99, 116, 105, 111, 110, 0,
+ 105, 110, 118, 84, 101, 120,
+ 83, 99, 97, 108, 101, 0,
+ 102, 108, 111, 97, 116, 52,
+ 0, 171, 1, 0, 3, 0,
+ 1, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 30, 2, 0, 0,
- 105, 110, 118, 86, 105, 101,
- 119, 112, 111, 114, 116, 0,
- 102, 108, 111, 97, 116, 51,
- 0, 171, 1, 0, 3, 0,
- 1, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 88, 2,
- 0, 0, 95, 112, 97, 100,
- 48, 0, 102, 108, 111, 97,
- 116, 0, 0, 0, 3, 0,
- 1, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 138, 2,
- 0, 0, 98, 108, 117, 114,
- 82, 97, 100, 105, 117, 115,
- 87, 111, 114, 108, 100, 0,
- 98, 108, 117, 114, 83, 99,
- 97, 108, 101, 0, 98, 108,
- 117, 114, 70, 97, 108, 108,
- 111, 102, 102, 0, 100, 101,
- 98, 117, 103, 0, 105, 110,
- 116, 0, 0, 0, 2, 0,
- 1, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 224, 2,
- 0, 0, 108, 105, 103, 104,
- 116, 80, 111, 115, 0, 95,
- 112, 97, 100, 49, 0, 108,
- 105, 103, 104, 116, 68, 105,
- 114, 0, 95, 112, 97, 100,
- 50, 0, 108, 105, 103, 104,
- 116, 84, 114, 97, 110, 115,
- 102, 111, 114, 109, 0, 99,
- 111, 108, 111, 114, 0, 99,
- 108, 105, 112, 80, 111, 115,
- 84, 111, 69, 121, 101, 0,
- 115, 112, 111, 116, 77, 105,
- 110, 0, 115, 112, 111, 116,
- 77, 97, 120, 0, 105, 111,
- 114, 0, 95, 112, 97, 100,
- 51, 0, 115, 104, 97, 100,
- 111, 119, 84, 97, 112, 115,
- 0, 171, 171, 171, 1, 0,
- 3, 0, 1, 0, 4, 0,
- 12, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 30, 2, 0, 0, 149, 1,
- 0, 0, 180, 1, 0, 0,
- 0, 0, 0, 0, 216, 1,
- 0, 0, 180, 1, 0, 0,
- 64, 0, 0, 0, 226, 1,
- 0, 0, 180, 1, 0, 0,
- 128, 0, 0, 0, 237, 1,
- 0, 0, 180, 1, 0, 0,
- 192, 0, 0, 0, 255, 1,
- 0, 0, 180, 1, 0, 0,
- 0, 1, 0, 0, 18, 2,
- 0, 0, 40, 2, 0, 0,
- 64, 1, 0, 0, 76, 2,
- 0, 0, 96, 2, 0, 0,
- 80, 1, 0, 0, 132, 2,
- 0, 0, 144, 2, 0, 0,
- 92, 1, 0, 0, 180, 2,
- 0, 0, 144, 2, 0, 0,
- 96, 1, 0, 0, 196, 2,
- 0, 0, 144, 2, 0, 0,
- 100, 1, 0, 0, 206, 2,
- 0, 0, 144, 2, 0, 0,
- 104, 1, 0, 0, 218, 2,
- 0, 0, 228, 2, 0, 0,
- 108, 1, 0, 0, 8, 3,
- 0, 0, 96, 2, 0, 0,
- 112, 1, 0, 0, 17, 3,
- 0, 0, 144, 2, 0, 0,
- 124, 1, 0, 0, 23, 3,
- 0, 0, 96, 2, 0, 0,
- 128, 1, 0, 0, 32, 3,
- 0, 0, 144, 2, 0, 0,
- 140, 1, 0, 0, 38, 3,
- 0, 0, 180, 1, 0, 0,
- 144, 1, 0, 0, 53, 3,
- 0, 0, 40, 2, 0, 0,
- 208, 1, 0, 0, 59, 3,
- 0, 0, 40, 2, 0, 0,
- 224, 1, 0, 0, 72, 3,
- 0, 0, 144, 2, 0, 0,
- 240, 1, 0, 0, 80, 3,
- 0, 0, 144, 2, 0, 0,
- 244, 1, 0, 0, 88, 3,
- 0, 0, 144, 2, 0, 0,
- 248, 1, 0, 0, 92, 3,
- 0, 0, 144, 2, 0, 0,
- 252, 1, 0, 0, 98, 3,
- 0, 0, 112, 3, 0, 0,
- 0, 2, 0, 0, 5, 0,
- 0, 0, 1, 0, 176, 0,
- 0, 0, 24, 0, 148, 3,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 132, 1, 0, 0, 77, 105,
- 99, 114, 111, 115, 111, 102,
- 116, 32, 40, 82, 41, 32,
- 72, 76, 83, 76, 32, 83,
- 104, 97, 100, 101, 114, 32,
- 67, 111, 109, 112, 105, 108,
- 101, 114, 32, 54, 46, 51,
- 46, 57, 54, 48, 48, 46,
- 49, 54, 51, 56, 52, 0,
- 171, 171, 73, 83, 71, 78,
- 80, 0, 0, 0, 2, 0,
+ 0, 0, 0, 0, 28, 2,
+ 0, 0, 105, 110, 118, 86,
+ 105, 101, 119, 112, 111, 114,
+ 116, 0, 102, 108, 111, 97,
+ 116, 51, 0, 171, 1, 0,
+ 3, 0, 1, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 84, 2, 0, 0, 95, 112,
+ 97, 100, 48, 0, 102, 108,
+ 111, 97, 116, 0, 0, 0,
+ 3, 0, 1, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 134, 2, 0, 0, 98, 108,
+ 117, 114, 82, 97, 100, 105,
+ 117, 115, 87, 111, 114, 108,
+ 100, 0, 98, 108, 117, 114,
+ 83, 99, 97, 108, 101, 0,
+ 98, 108, 117, 114, 70, 97,
+ 108, 108, 111, 102, 102, 0,
+ 100, 101, 98, 117, 103, 0,
+ 105, 110, 116, 0, 0, 0,
+ 2, 0, 1, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 220, 2, 0, 0, 108, 105,
+ 103, 104, 116, 80, 111, 115,
+ 0, 95, 112, 97, 100, 49,
+ 0, 108, 105, 103, 104, 116,
+ 68, 105, 114, 0, 95, 112,
+ 97, 100, 50, 0, 108, 105,
+ 103, 104, 116, 84, 114, 97,
+ 110, 115, 102, 111, 114, 109,
+ 0, 99, 111, 108, 111, 114,
+ 0, 99, 108, 105, 112, 80,
+ 111, 115, 84, 111, 69, 121,
+ 101, 0, 115, 112, 111, 116,
+ 77, 105, 110, 0, 115, 112,
+ 111, 116, 77, 97, 120, 0,
+ 105, 111, 114, 0, 95, 112,
+ 97, 100, 51, 0, 115, 104,
+ 97, 100, 111, 119, 84, 97,
+ 112, 115, 0, 171, 171, 171,
+ 1, 0, 3, 0, 1, 0,
+ 4, 0, 12, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 28, 2, 0, 0,
+ 149, 1, 0, 0, 180, 1,
+ 0, 0, 0, 0, 0, 0,
+ 216, 1, 0, 0, 180, 1,
+ 0, 0, 64, 0, 0, 0,
+ 226, 1, 0, 0, 180, 1,
+ 0, 0, 128, 0, 0, 0,
+ 237, 1, 0, 0, 180, 1,
+ 0, 0, 192, 0, 0, 0,
+ 254, 1, 0, 0, 180, 1,
+ 0, 0, 0, 1, 0, 0,
+ 16, 2, 0, 0, 36, 2,
+ 0, 0, 64, 1, 0, 0,
+ 72, 2, 0, 0, 92, 2,
+ 0, 0, 80, 1, 0, 0,
+ 128, 2, 0, 0, 140, 2,
+ 0, 0, 92, 1, 0, 0,
+ 176, 2, 0, 0, 140, 2,
+ 0, 0, 96, 1, 0, 0,
+ 192, 2, 0, 0, 140, 2,
+ 0, 0, 100, 1, 0, 0,
+ 202, 2, 0, 0, 140, 2,
+ 0, 0, 104, 1, 0, 0,
+ 214, 2, 0, 0, 224, 2,
+ 0, 0, 108, 1, 0, 0,
+ 4, 3, 0, 0, 92, 2,
+ 0, 0, 112, 1, 0, 0,
+ 13, 3, 0, 0, 140, 2,
+ 0, 0, 124, 1, 0, 0,
+ 19, 3, 0, 0, 92, 2,
+ 0, 0, 128, 1, 0, 0,
+ 28, 3, 0, 0, 140, 2,
+ 0, 0, 140, 1, 0, 0,
+ 34, 3, 0, 0, 180, 1,
+ 0, 0, 144, 1, 0, 0,
+ 49, 3, 0, 0, 36, 2,
+ 0, 0, 208, 1, 0, 0,
+ 55, 3, 0, 0, 36, 2,
+ 0, 0, 224, 1, 0, 0,
+ 68, 3, 0, 0, 140, 2,
+ 0, 0, 240, 1, 0, 0,
+ 76, 3, 0, 0, 140, 2,
+ 0, 0, 244, 1, 0, 0,
+ 84, 3, 0, 0, 140, 2,
+ 0, 0, 248, 1, 0, 0,
+ 88, 3, 0, 0, 140, 2,
+ 0, 0, 252, 1, 0, 0,
+ 94, 3, 0, 0, 108, 3,
+ 0, 0, 0, 2, 0, 0,
+ 5, 0, 0, 0, 1, 0,
+ 176, 0, 0, 0, 24, 0,
+ 144, 3, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 132, 1, 0, 0,
+ 77, 105, 99, 114, 111, 115,
+ 111, 102, 116, 32, 40, 82,
+ 41, 32, 72, 76, 83, 76,
+ 32, 83, 104, 97, 100, 101,
+ 114, 32, 67, 111, 109, 112,
+ 105, 108, 101, 114, 32, 54,
+ 46, 51, 46, 57, 54, 48,
+ 48, 46, 49, 54, 51, 56,
+ 52, 0, 171, 171, 73, 83,
+ 71, 78, 80, 0, 0, 0,
+ 2, 0, 0, 0, 8, 0,
+ 0, 0, 56, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 15, 0,
+ 0, 0, 68, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 1, 0, 0, 0, 3, 3,
+ 0, 0, 83, 86, 95, 80,
+ 79, 83, 73, 84, 73, 79,
+ 78, 0, 84, 69, 88, 67,
+ 79, 79, 82, 68, 0, 171,
+ 171, 171, 79, 83, 71, 78,
+ 76, 0, 0, 0, 2, 0,
0, 0, 8, 0, 0, 0,
56, 0, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 15, 0, 0, 0,
- 68, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 1, 0,
- 0, 0, 3, 3, 0, 0,
- 83, 86, 95, 80, 79, 83,
- 73, 84, 73, 79, 78, 0,
- 84, 69, 88, 67, 79, 79,
- 82, 68, 0, 171, 171, 171,
- 79, 83, 71, 78, 76, 0,
- 0, 0, 2, 0, 0, 0,
- 8, 0, 0, 0, 56, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 0, 0, 0, 0,
- 15, 0, 0, 0, 66, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 255, 255, 255, 255,
- 1, 14, 0, 0, 83, 86,
- 95, 84, 65, 82, 71, 69,
- 84, 0, 83, 86, 95, 68,
- 69, 80, 84, 72, 0, 171,
- 83, 72, 69, 88, 80, 25,
- 0, 0, 80, 0, 0, 0,
- 84, 6, 0, 0, 106, 8,
- 0, 1, 89, 0, 0, 4,
- 70, 142, 32, 0, 0, 0,
- 0, 0, 40, 0, 0, 0,
- 90, 0, 0, 3, 0, 96,
- 16, 0, 0, 0, 0, 0,
- 90, 8, 0, 3, 0, 96,
- 16, 0, 1, 0, 0, 0,
- 88, 24, 0, 4, 0, 112,
- 16, 0, 0, 0, 0, 0,
- 85, 85, 0, 0, 88, 24,
- 0, 4, 0, 112, 16, 0,
- 1, 0, 0, 0, 85, 85,
+ 66, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 255, 255,
+ 255, 255, 1, 14, 0, 0,
+ 83, 86, 95, 84, 65, 82,
+ 71, 69, 84, 0, 83, 86,
+ 95, 68, 69, 80, 84, 72,
+ 0, 171, 83, 72, 69, 88,
+ 80, 25, 0, 0, 80, 0,
+ 0, 0, 84, 6, 0, 0,
+ 106, 8, 0, 1, 89, 0,
+ 0, 4, 70, 142, 32, 0,
+ 0, 0, 0, 0, 40, 0,
+ 0, 0, 90, 0, 0, 3,
+ 0, 96, 16, 0, 0, 0,
+ 0, 0, 90, 8, 0, 3,
+ 0, 96, 16, 0, 1, 0,
0, 0, 88, 24, 0, 4,
- 0, 112, 16, 0, 2, 0,
+ 0, 112, 16, 0, 0, 0,
0, 0, 85, 85, 0, 0,
- 98, 16, 0, 3, 50, 16,
+ 88, 24, 0, 4, 0, 112,
16, 0, 1, 0, 0, 0,
- 101, 0, 0, 3, 242, 32,
+ 85, 85, 0, 0, 88, 24,
+ 0, 4, 0, 112, 16, 0,
+ 2, 0, 0, 0, 85, 85,
+ 0, 0, 98, 16, 0, 3,
+ 50, 16, 16, 0, 1, 0,
+ 0, 0, 101, 0, 0, 3,
+ 242, 32, 16, 0, 0, 0,
+ 0, 0, 101, 0, 0, 2,
+ 1, 192, 0, 0, 104, 0,
+ 0, 2, 8, 0, 0, 0,
+ 50, 0, 0, 15, 50, 0,
+ 16, 0, 0, 0, 0, 0,
+ 70, 16, 16, 0, 1, 0,
+ 0, 0, 2, 64, 0, 0,
+ 0, 0, 128, 63, 0, 0,
+ 128, 191, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 64,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 128, 63, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 69, 0, 0, 139, 194, 0,
+ 0, 128, 67, 85, 21, 0,
+ 66, 0, 16, 0, 1, 0,
+ 0, 0, 70, 0, 16, 0,
+ 0, 0, 0, 0, 150, 124,
16, 0, 0, 0, 0, 0,
- 101, 0, 0, 2, 1, 192,
- 0, 0, 104, 0, 0, 2,
- 8, 0, 0, 0, 50, 0,
- 0, 15, 50, 0, 16, 0,
- 0, 0, 0, 0, 70, 16,
- 16, 0, 1, 0, 0, 0,
- 2, 64, 0, 0, 0, 0,
- 128, 63, 0, 0, 128, 191,
+ 0, 96, 16, 0, 0, 0,
+ 0, 0, 24, 0, 0, 7,
+ 66, 0, 16, 0, 0, 0,
+ 0, 0, 42, 0, 16, 0,
+ 1, 0, 0, 0, 1, 64,
0, 0, 0, 0, 0, 0,
+ 13, 0, 4, 3, 42, 0,
+ 16, 0, 0, 0, 0, 0,
+ 50, 0, 0, 15, 194, 0,
+ 16, 0, 0, 0, 0, 0,
+ 6, 20, 16, 0, 1, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
- 128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 69, 0,
- 0, 139, 194, 0, 0, 128,
- 67, 85, 21, 0, 66, 0,
- 16, 0, 1, 0, 0, 0,
- 70, 0, 16, 0, 0, 0,
- 0, 0, 150, 124, 16, 0,
- 0, 0, 0, 0, 0, 96,
+ 0, 0, 0, 0, 0, 64,
+ 0, 0, 0, 64, 2, 64,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 128, 191, 0, 0, 128, 191,
+ 56, 0, 0, 8, 194, 0,
16, 0, 0, 0, 0, 0,
- 24, 0, 0, 7, 66, 0,
+ 166, 14, 16, 0, 0, 0,
+ 0, 0, 6, 132, 32, 0,
+ 0, 0, 0, 0, 30, 0,
+ 0, 0, 56, 0, 0, 8,
+ 50, 0, 16, 0, 1, 0,
+ 0, 0, 166, 10, 16, 0,
+ 1, 0, 0, 0, 230, 10,
+ 16, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 54, 0,
+ 0, 6, 34, 0, 16, 0,
+ 2, 0, 0, 0, 10, 128,
+ 32, 0, 0, 0, 0, 0,
+ 20, 0, 0, 0, 54, 0,
+ 0, 5, 66, 0, 16, 0,
+ 2, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 8, 194, 0,
16, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 1, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 0, 0, 13, 0,
- 4, 3, 42, 0, 16, 0,
+ 6, 4, 16, 0, 0, 0,
+ 0, 0, 86, 9, 16, 128,
+ 65, 0, 0, 0, 2, 0,
+ 0, 0, 69, 0, 0, 139,
+ 194, 0, 0, 128, 67, 85,
+ 21, 0, 18, 0, 16, 0,
+ 2, 0, 0, 0, 230, 10,
+ 16, 0, 0, 0, 0, 0,
+ 70, 126, 16, 0, 0, 0,
+ 0, 0, 0, 96, 16, 0,
0, 0, 0, 0, 50, 0,
0, 15, 194, 0, 16, 0,
- 0, 0, 0, 0, 6, 20,
- 16, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 166, 14,
+ 16, 0, 0, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 64, 0, 0,
- 0, 64, 2, 64, 0, 0,
+ 0, 192, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 128, 191,
- 0, 0, 128, 191, 56, 0,
+ 0, 0, 128, 63, 56, 0,
0, 8, 194, 0, 16, 0,
0, 0, 0, 0, 166, 14,
16, 0, 0, 0, 0, 0,
6, 132, 32, 0, 0, 0,
0, 0, 30, 0, 0, 0,
- 56, 0, 0, 8, 50, 0,
- 16, 0, 1, 0, 0, 0,
- 166, 10, 16, 0, 1, 0,
- 0, 0, 230, 10, 16, 128,
+ 56, 0, 0, 8, 98, 0,
+ 16, 0, 2, 0, 0, 0,
+ 6, 0, 16, 0, 2, 0,
+ 0, 0, 166, 11, 16, 128,
65, 0, 0, 0, 0, 0,
- 0, 0, 54, 0, 0, 6,
- 34, 0, 16, 0, 2, 0,
- 0, 0, 10, 128, 32, 0,
- 0, 0, 0, 0, 20, 0,
- 0, 0, 54, 0, 0, 5,
- 66, 0, 16, 0, 2, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 8, 194, 0, 16, 0,
- 0, 0, 0, 0, 6, 4,
+ 0, 0, 0, 0, 0, 8,
+ 114, 0, 16, 0, 2, 0,
+ 0, 0, 38, 9, 16, 0,
+ 1, 0, 0, 0, 70, 2,
+ 16, 128, 65, 0, 0, 0,
+ 2, 0, 0, 0, 54, 0,
+ 0, 6, 34, 0, 16, 0,
+ 3, 0, 0, 0, 10, 128,
+ 32, 0, 0, 0, 0, 0,
+ 20, 0, 0, 0, 54, 0,
+ 0, 5, 66, 0, 16, 0,
+ 3, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 50, 0, 0, 12, 194, 0,
16, 0, 0, 0, 0, 0,
- 86, 9, 16, 128, 65, 0,
- 0, 0, 2, 0, 0, 0,
+ 6, 20, 16, 0, 1, 0,
+ 0, 0, 2, 64, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 128, 63,
+ 0, 0, 128, 191, 86, 9,
+ 16, 0, 3, 0, 0, 0,
69, 0, 0, 139, 194, 0,
0, 128, 67, 85, 21, 0,
- 18, 0, 16, 0, 2, 0,
+ 18, 0, 16, 0, 3, 0,
0, 0, 230, 10, 16, 0,
0, 0, 0, 0, 70, 126,
16, 0, 0, 0, 0, 0,
@@ -638,79 +686,69 @@ const BYTE g_compositePS[] =
32, 0, 0, 0, 0, 0,
30, 0, 0, 0, 56, 0,
0, 8, 98, 0, 16, 0,
- 2, 0, 0, 0, 6, 0,
- 16, 0, 2, 0, 0, 0,
+ 3, 0, 0, 0, 6, 0,
+ 16, 0, 3, 0, 0, 0,
166, 11, 16, 128, 65, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 8, 114, 0,
- 16, 0, 2, 0, 0, 0,
- 38, 9, 16, 0, 1, 0,
- 0, 0, 70, 2, 16, 128,
- 65, 0, 0, 0, 2, 0,
- 0, 0, 54, 0, 0, 6,
- 34, 0, 16, 0, 3, 0,
- 0, 0, 10, 128, 32, 0,
- 0, 0, 0, 0, 20, 0,
+ 16, 0, 3, 0, 0, 0,
+ 38, 9, 16, 128, 65, 0,
+ 0, 0, 1, 0, 0, 0,
+ 70, 2, 16, 0, 3, 0,
0, 0, 54, 0, 0, 5,
- 66, 0, 16, 0, 3, 0,
+ 66, 0, 16, 0, 4, 0,
0, 0, 1, 64, 0, 0,
- 0, 0, 128, 63, 50, 0,
- 0, 12, 194, 0, 16, 0,
- 0, 0, 0, 0, 6, 20,
- 16, 0, 1, 0, 0, 0,
- 2, 64, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 128, 63, 0, 0,
- 128, 191, 86, 9, 16, 0,
- 3, 0, 0, 0, 69, 0,
- 0, 139, 194, 0, 0, 128,
- 67, 85, 21, 0, 18, 0,
- 16, 0, 3, 0, 0, 0,
- 230, 10, 16, 0, 0, 0,
- 0, 0, 70, 126, 16, 0,
- 0, 0, 0, 0, 0, 96,
+ 0, 0, 0, 0, 54, 0,
+ 0, 6, 18, 0, 16, 0,
+ 4, 0, 0, 0, 26, 128,
+ 32, 0, 0, 0, 0, 0,
+ 20, 0, 0, 0, 0, 0,
+ 0, 7, 194, 0, 16, 0,
+ 0, 0, 0, 0, 86, 1,
16, 0, 0, 0, 0, 0,
- 50, 0, 0, 15, 194, 0,
+ 6, 8, 16, 0, 4, 0,
+ 0, 0, 69, 0, 0, 139,
+ 194, 0, 0, 128, 67, 85,
+ 21, 0, 34, 0, 16, 0,
+ 5, 0, 0, 0, 182, 15,
16, 0, 0, 0, 0, 0,
- 166, 14, 16, 0, 0, 0,
- 0, 0, 2, 64, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 64,
- 0, 0, 0, 192, 2, 64,
+ 22, 126, 16, 0, 0, 0,
+ 0, 0, 0, 96, 16, 0,
+ 0, 0, 0, 0, 50, 0,
+ 0, 15, 194, 0, 16, 0,
+ 0, 0, 0, 0, 166, 14,
+ 16, 0, 0, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 192, 0, 0,
+ 0, 64, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
- 128, 191, 0, 0, 128, 63,
- 56, 0, 0, 8, 194, 0,
+ 0, 0, 0, 0, 128, 63,
+ 0, 0, 128, 191, 56, 0,
+ 0, 8, 194, 0, 16, 0,
+ 0, 0, 0, 0, 166, 14,
16, 0, 0, 0, 0, 0,
- 166, 14, 16, 0, 0, 0,
- 0, 0, 6, 132, 32, 0,
- 0, 0, 0, 0, 30, 0,
- 0, 0, 56, 0, 0, 8,
- 98, 0, 16, 0, 3, 0,
- 0, 0, 6, 0, 16, 0,
- 3, 0, 0, 0, 166, 11,
- 16, 128, 65, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 8, 114, 0, 16, 0,
- 3, 0, 0, 0, 38, 9,
- 16, 128, 65, 0, 0, 0,
- 1, 0, 0, 0, 70, 2,
- 16, 0, 3, 0, 0, 0,
- 54, 0, 0, 5, 66, 0,
- 16, 0, 4, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 0, 0, 54, 0, 0, 6,
- 18, 0, 16, 0, 4, 0,
- 0, 0, 26, 128, 32, 0,
- 0, 0, 0, 0, 20, 0,
- 0, 0, 0, 0, 0, 7,
- 194, 0, 16, 0, 0, 0,
- 0, 0, 86, 1, 16, 0,
- 0, 0, 0, 0, 6, 8,
- 16, 0, 4, 0, 0, 0,
+ 86, 129, 32, 0, 0, 0,
+ 0, 0, 30, 0, 0, 0,
+ 56, 0, 0, 8, 82, 0,
+ 16, 0, 5, 0, 0, 0,
+ 86, 5, 16, 0, 5, 0,
+ 0, 0, 166, 11, 16, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 8,
+ 114, 0, 16, 0, 5, 0,
+ 0, 0, 150, 4, 16, 128,
+ 65, 0, 0, 0, 1, 0,
+ 0, 0, 70, 2, 16, 0,
+ 5, 0, 0, 0, 0, 0,
+ 0, 8, 194, 0, 16, 0,
+ 0, 0, 0, 0, 86, 1,
+ 16, 0, 0, 0, 0, 0,
+ 6, 8, 16, 128, 65, 0,
+ 0, 0, 4, 0, 0, 0,
69, 0, 0, 139, 194, 0,
0, 128, 67, 85, 21, 0,
- 34, 0, 16, 0, 5, 0,
+ 34, 0, 16, 0, 4, 0,
0, 0, 182, 15, 16, 0,
0, 0, 0, 0, 22, 126,
16, 0, 0, 0, 0, 0,
@@ -732,237 +770,151 @@ const BYTE g_compositePS[] =
32, 0, 0, 0, 0, 0,
30, 0, 0, 0, 56, 0,
0, 8, 82, 0, 16, 0,
- 5, 0, 0, 0, 86, 5,
- 16, 0, 5, 0, 0, 0,
+ 4, 0, 0, 0, 86, 5,
+ 16, 0, 4, 0, 0, 0,
166, 11, 16, 128, 65, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 8, 114, 0,
- 16, 0, 5, 0, 0, 0,
- 150, 4, 16, 128, 65, 0,
- 0, 0, 1, 0, 0, 0,
- 70, 2, 16, 0, 5, 0,
- 0, 0, 0, 0, 0, 8,
- 194, 0, 16, 0, 0, 0,
- 0, 0, 86, 1, 16, 0,
- 0, 0, 0, 0, 6, 8,
- 16, 128, 65, 0, 0, 0,
- 4, 0, 0, 0, 69, 0,
- 0, 139, 194, 0, 0, 128,
- 67, 85, 21, 0, 34, 0,
16, 0, 4, 0, 0, 0,
- 182, 15, 16, 0, 0, 0,
- 0, 0, 22, 126, 16, 0,
- 0, 0, 0, 0, 0, 96,
- 16, 0, 0, 0, 0, 0,
- 50, 0, 0, 15, 194, 0,
- 16, 0, 0, 0, 0, 0,
- 166, 14, 16, 0, 0, 0,
- 0, 0, 2, 64, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 192,
- 0, 0, 0, 64, 2, 64,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 128, 63, 0, 0, 128, 191,
- 56, 0, 0, 8, 194, 0,
- 16, 0, 0, 0, 0, 0,
- 166, 14, 16, 0, 0, 0,
- 0, 0, 86, 129, 32, 0,
- 0, 0, 0, 0, 30, 0,
+ 150, 4, 16, 0, 1, 0,
+ 0, 0, 70, 2, 16, 128,
+ 65, 0, 0, 0, 4, 0,
+ 0, 0, 49, 0, 0, 9,
+ 66, 0, 16, 0, 0, 0,
+ 0, 0, 10, 0, 16, 128,
+ 129, 0, 0, 0, 3, 0,
+ 0, 0, 10, 0, 16, 128,
+ 129, 0, 0, 0, 2, 0,
+ 0, 0, 55, 0, 0, 9,
+ 114, 0, 16, 0, 2, 0,
+ 0, 0, 166, 10, 16, 0,
+ 0, 0, 0, 0, 70, 2,
+ 16, 0, 3, 0, 0, 0,
+ 70, 2, 16, 0, 2, 0,
+ 0, 0, 49, 0, 0, 9,
+ 66, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 128,
+ 129, 0, 0, 0, 4, 0,
+ 0, 0, 26, 0, 16, 128,
+ 129, 0, 0, 0, 5, 0,
+ 0, 0, 55, 0, 0, 9,
+ 114, 0, 16, 0, 3, 0,
+ 0, 0, 166, 10, 16, 0,
+ 0, 0, 0, 0, 70, 2,
+ 16, 0, 4, 0, 0, 0,
+ 70, 2, 16, 0, 5, 0,
0, 0, 56, 0, 0, 8,
- 82, 0, 16, 0, 4, 0,
+ 114, 0, 16, 0, 4, 0,
0, 0, 86, 5, 16, 0,
- 4, 0, 0, 0, 166, 11,
- 16, 128, 65, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 8, 114, 0, 16, 0,
- 4, 0, 0, 0, 150, 4,
+ 1, 0, 0, 0, 70, 130,
+ 32, 0, 0, 0, 0, 0,
+ 13, 0, 0, 0, 50, 0,
+ 0, 10, 114, 0, 16, 0,
+ 4, 0, 0, 0, 70, 130,
+ 32, 0, 0, 0, 0, 0,
+ 12, 0, 0, 0, 6, 0,
16, 0, 1, 0, 0, 0,
- 70, 2, 16, 128, 65, 0,
- 0, 0, 4, 0, 0, 0,
- 49, 0, 0, 9, 66, 0,
- 16, 0, 0, 0, 0, 0,
- 10, 0, 16, 128, 129, 0,
- 0, 0, 3, 0, 0, 0,
- 10, 0, 16, 128, 129, 0,
- 0, 0, 2, 0, 0, 0,
- 55, 0, 0, 9, 114, 0,
- 16, 0, 2, 0, 0, 0,
- 166, 10, 16, 0, 0, 0,
- 0, 0, 70, 2, 16, 0,
- 3, 0, 0, 0, 70, 2,
- 16, 0, 2, 0, 0, 0,
- 49, 0, 0, 9, 66, 0,
- 16, 0, 0, 0, 0, 0,
- 26, 0, 16, 128, 129, 0,
- 0, 0, 4, 0, 0, 0,
- 26, 0, 16, 128, 129, 0,
- 0, 0, 5, 0, 0, 0,
- 55, 0, 0, 9, 114, 0,
- 16, 0, 3, 0, 0, 0,
- 166, 10, 16, 0, 0, 0,
- 0, 0, 70, 2, 16, 0,
- 4, 0, 0, 0, 70, 2,
- 16, 0, 5, 0, 0, 0,
- 56, 0, 0, 8, 114, 0,
- 16, 0, 4, 0, 0, 0,
- 86, 5, 16, 0, 1, 0,
- 0, 0, 70, 130, 32, 0,
- 0, 0, 0, 0, 13, 0,
+ 70, 2, 16, 0, 4, 0,
0, 0, 50, 0, 0, 10,
114, 0, 16, 0, 4, 0,
0, 0, 70, 130, 32, 0,
- 0, 0, 0, 0, 12, 0,
- 0, 0, 6, 0, 16, 0,
+ 0, 0, 0, 0, 14, 0,
+ 0, 0, 166, 10, 16, 0,
1, 0, 0, 0, 70, 2,
16, 0, 4, 0, 0, 0,
- 50, 0, 0, 10, 114, 0,
- 16, 0, 4, 0, 0, 0,
- 70, 130, 32, 0, 0, 0,
- 0, 0, 14, 0, 0, 0,
- 166, 10, 16, 0, 1, 0,
- 0, 0, 70, 2, 16, 0,
- 4, 0, 0, 0, 0, 0,
- 0, 8, 114, 0, 16, 0,
- 4, 0, 0, 0, 70, 2,
- 16, 0, 4, 0, 0, 0,
- 70, 130, 32, 0, 0, 0,
- 0, 0, 15, 0, 0, 0,
- 50, 0, 0, 13, 210, 0,
+ 0, 0, 0, 8, 114, 0,
16, 0, 4, 0, 0, 0,
- 6, 137, 32, 0, 0, 0,
- 0, 0, 24, 0, 0, 0,
- 2, 64, 0, 0, 154, 153,
- 25, 62, 0, 0, 0, 0,
- 154, 153, 25, 62, 154, 153,
- 25, 62, 6, 9, 16, 0,
- 4, 0, 0, 0, 56, 0,
- 0, 8, 242, 0, 16, 0,
- 5, 0, 0, 0, 166, 10,
+ 70, 2, 16, 0, 4, 0,
+ 0, 0, 70, 130, 32, 0,
+ 0, 0, 0, 0, 15, 0,
+ 0, 0, 50, 0, 0, 13,
+ 210, 0, 16, 0, 4, 0,
+ 0, 0, 6, 137, 32, 0,
+ 0, 0, 0, 0, 24, 0,
+ 0, 0, 2, 64, 0, 0,
+ 154, 153, 25, 62, 0, 0,
+ 0, 0, 154, 153, 25, 62,
+ 154, 153, 25, 62, 6, 9,
16, 0, 4, 0, 0, 0,
- 70, 142, 32, 0, 0, 0,
- 0, 0, 26, 0, 0, 0,
+ 56, 0, 0, 8, 242, 0,
+ 16, 0, 5, 0, 0, 0,
+ 166, 10, 16, 0, 4, 0,
+ 0, 0, 70, 142, 32, 0,
+ 0, 0, 0, 0, 26, 0,
+ 0, 0, 50, 0, 0, 10,
+ 242, 0, 16, 0, 5, 0,
+ 0, 0, 70, 142, 32, 0,
+ 0, 0, 0, 0, 25, 0,
+ 0, 0, 6, 0, 16, 0,
+ 4, 0, 0, 0, 70, 14,
+ 16, 0, 5, 0, 0, 0,
50, 0, 0, 10, 242, 0,
16, 0, 5, 0, 0, 0,
70, 142, 32, 0, 0, 0,
- 0, 0, 25, 0, 0, 0,
- 6, 0, 16, 0, 4, 0,
+ 0, 0, 27, 0, 0, 0,
+ 246, 15, 16, 0, 4, 0,
0, 0, 70, 14, 16, 0,
+ 5, 0, 0, 0, 0, 0,
+ 0, 8, 242, 0, 16, 0,
+ 5, 0, 0, 0, 70, 14,
+ 16, 0, 5, 0, 0, 0,
+ 70, 142, 32, 0, 0, 0,
+ 0, 0, 28, 0, 0, 0,
+ 14, 0, 0, 7, 210, 0,
+ 16, 0, 4, 0, 0, 0,
+ 6, 9, 16, 0, 5, 0,
+ 0, 0, 246, 15, 16, 0,
5, 0, 0, 0, 50, 0,
- 0, 10, 242, 0, 16, 0,
- 5, 0, 0, 0, 70, 142,
- 32, 0, 0, 0, 0, 0,
- 27, 0, 0, 0, 246, 15,
+ 0, 15, 114, 0, 16, 0,
+ 5, 0, 0, 0, 134, 3,
16, 0, 4, 0, 0, 0,
- 70, 14, 16, 0, 5, 0,
- 0, 0, 0, 0, 0, 8,
- 242, 0, 16, 0, 5, 0,
- 0, 0, 70, 14, 16, 0,
- 5, 0, 0, 0, 70, 142,
- 32, 0, 0, 0, 0, 0,
- 28, 0, 0, 0, 14, 0,
- 0, 7, 210, 0, 16, 0,
- 4, 0, 0, 0, 6, 9,
- 16, 0, 5, 0, 0, 0,
- 246, 15, 16, 0, 5, 0,
- 0, 0, 50, 0, 0, 15,
- 114, 0, 16, 0, 5, 0,
- 0, 0, 134, 3, 16, 0,
- 4, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 63,
- 0, 0, 0, 63, 0, 0,
- 128, 63, 0, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 63, 0, 0, 0, 63,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 49, 0, 0, 7,
- 66, 0, 16, 0, 0, 0,
- 0, 0, 10, 0, 16, 0,
- 5, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 0, 0,
- 49, 0, 0, 7, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 128, 63, 10, 0, 16, 0,
- 5, 0, 0, 0, 60, 0,
- 0, 7, 66, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 0, 0,
- 0, 0, 31, 0, 0, 3,
- 42, 0, 16, 0, 0, 0,
- 0, 0, 49, 0, 0, 7,
- 66, 0, 16, 0, 0, 0,
- 0, 0, 26, 0, 16, 0,
- 5, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 0, 0,
- 49, 0, 0, 7, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 128, 63, 26, 0, 16, 0,
- 5, 0, 0, 0, 60, 0,
+ 0, 0, 128, 63, 0, 0,
+ 0, 0, 2, 64, 0, 0,
+ 0, 0, 0, 63, 0, 0,
+ 0, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 49, 0,
0, 7, 66, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 0, 0,
- 0, 0, 31, 0, 0, 3,
- 42, 0, 16, 0, 0, 0,
- 0, 0, 0, 0, 0, 9,
- 66, 0, 16, 0, 0, 0,
- 0, 0, 26, 128, 32, 128,
- 65, 0, 0, 0, 0, 0,
- 0, 0, 32, 0, 0, 0,
+ 0, 0, 0, 0, 10, 0,
+ 16, 0, 5, 0, 0, 0,
1, 64, 0, 0, 0, 0,
- 128, 63, 56, 0, 0, 8,
- 18, 0, 16, 0, 6, 0,
- 0, 0, 10, 128, 32, 0,
- 0, 0, 0, 0, 32, 0,
- 0, 0, 1, 64, 0, 0,
- 111, 18, 3, 59, 56, 0,
- 0, 7, 34, 0, 16, 0,
- 6, 0, 0, 0, 42, 0,
- 16, 0, 0, 0, 0, 0,
- 1, 64, 0, 0, 111, 18,
- 3, 59, 0, 0, 0, 8,
- 130, 0, 16, 0, 5, 0,
- 0, 0, 26, 0, 16, 128,
- 65, 0, 0, 0, 5, 0,
+ 0, 0, 49, 0, 0, 7,
+ 130, 0, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0,
- 0, 0, 128, 63, 0, 0,
- 0, 7, 194, 0, 16, 0,
- 0, 0, 0, 0, 6, 12,
- 16, 0, 5, 0, 0, 0,
- 6, 4, 16, 0, 6, 0,
- 0, 0, 71, 0, 0, 141,
- 194, 0, 0, 128, 67, 85,
- 21, 0, 66, 0, 16, 0,
- 0, 0, 0, 0, 230, 10,
- 16, 0, 0, 0, 0, 0,
- 6, 112, 16, 0, 2, 0,
- 0, 0, 0, 96, 16, 0,
- 1, 0, 0, 0, 42, 0,
+ 0, 0, 128, 63, 10, 0,
16, 0, 5, 0, 0, 0,
- 0, 0, 0, 9, 130, 0,
+ 60, 0, 0, 7, 66, 0,
16, 0, 0, 0, 0, 0,
- 26, 128, 32, 128, 65, 0,
+ 58, 0, 16, 0, 0, 0,
+ 0, 0, 42, 0, 16, 0,
0, 0, 0, 0, 0, 0,
- 33, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 128, 63,
- 56, 0, 0, 8, 18, 0,
- 16, 0, 6, 0, 0, 0,
- 10, 128, 32, 0, 0, 0,
- 0, 0, 33, 0, 0, 0,
- 1, 64, 0, 0, 111, 18,
- 3, 59, 56, 0, 0, 7,
- 34, 0, 16, 0, 6, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 1, 64,
+ 0, 9, 130, 0, 16, 0,
+ 0, 0, 0, 0, 26, 128,
+ 32, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 32, 0,
+ 0, 0, 1, 64, 0, 0,
+ 0, 0, 128, 63, 56, 0,
+ 0, 8, 18, 0, 16, 0,
+ 6, 0, 0, 0, 10, 128,
+ 32, 0, 0, 0, 0, 0,
+ 32, 0, 0, 0, 1, 64,
0, 0, 111, 18, 3, 59,
+ 56, 0, 0, 7, 34, 0,
+ 16, 0, 6, 0, 0, 0,
+ 58, 0, 16, 0, 0, 0,
+ 0, 0, 1, 64, 0, 0,
+ 111, 18, 3, 59, 0, 0,
+ 0, 8, 130, 0, 16, 0,
+ 5, 0, 0, 0, 26, 0,
+ 16, 128, 65, 0, 0, 0,
+ 5, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
0, 0, 0, 7, 82, 0,
16, 0, 4, 0, 0, 0,
6, 3, 16, 0, 5, 0,
0, 0, 6, 1, 16, 0,
- 6, 0, 0, 0, 71, 0,
+ 6, 0, 0, 0, 70, 0,
0, 141, 194, 0, 0, 128,
67, 85, 21, 0, 130, 0,
16, 0, 0, 0, 0, 0,
@@ -971,47 +923,67 @@ const BYTE g_compositePS[] =
2, 0, 0, 0, 0, 96,
16, 0, 1, 0, 0, 0,
42, 0, 16, 0, 5, 0,
- 0, 0, 0, 0, 0, 7,
- 66, 0, 16, 0, 0, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 42, 0,
- 16, 0, 0, 0, 0, 0,
- 0, 0, 0, 9, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 26, 128, 32, 128, 65, 0,
- 0, 0, 0, 0, 0, 0,
- 34, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 128, 63,
- 56, 0, 0, 8, 18, 0,
- 16, 0, 6, 0, 0, 0,
- 10, 128, 32, 0, 0, 0,
- 0, 0, 34, 0, 0, 0,
+ 0, 0, 0, 0, 0, 9,
+ 130, 0, 16, 0, 1, 0,
+ 0, 0, 26, 128, 32, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 33, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 56, 0, 0, 8,
+ 18, 0, 16, 0, 6, 0,
+ 0, 0, 10, 128, 32, 0,
+ 0, 0, 0, 0, 33, 0,
+ 0, 0, 1, 64, 0, 0,
+ 111, 18, 3, 59, 56, 0,
+ 0, 7, 34, 0, 16, 0,
+ 6, 0, 0, 0, 58, 0,
+ 16, 0, 1, 0, 0, 0,
1, 64, 0, 0, 111, 18,
- 3, 59, 56, 0, 0, 7,
- 34, 0, 16, 0, 6, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 1, 64,
+ 3, 59, 0, 0, 0, 7,
+ 82, 0, 16, 0, 4, 0,
+ 0, 0, 6, 3, 16, 0,
+ 5, 0, 0, 0, 6, 1,
+ 16, 0, 6, 0, 0, 0,
+ 70, 0, 0, 141, 194, 0,
+ 0, 128, 67, 85, 21, 0,
+ 130, 0, 16, 0, 1, 0,
+ 0, 0, 134, 0, 16, 0,
+ 4, 0, 0, 0, 6, 112,
+ 16, 0, 2, 0, 0, 0,
+ 0, 96, 16, 0, 1, 0,
+ 0, 0, 42, 0, 16, 0,
+ 5, 0, 0, 0, 0, 0,
+ 0, 9, 130, 0, 16, 0,
+ 2, 0, 0, 0, 26, 128,
+ 32, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 34, 0,
+ 0, 0, 1, 64, 0, 0,
+ 0, 0, 128, 63, 56, 0,
+ 0, 8, 18, 0, 16, 0,
+ 6, 0, 0, 0, 10, 128,
+ 32, 0, 0, 0, 0, 0,
+ 34, 0, 0, 0, 1, 64,
0, 0, 111, 18, 3, 59,
- 0, 0, 0, 7, 82, 0,
+ 56, 0, 0, 7, 34, 0,
+ 16, 0, 6, 0, 0, 0,
+ 58, 0, 16, 0, 2, 0,
+ 0, 0, 1, 64, 0, 0,
+ 111, 18, 3, 59, 0, 0,
+ 0, 7, 82, 0, 16, 0,
+ 4, 0, 0, 0, 6, 3,
+ 16, 0, 5, 0, 0, 0,
+ 6, 1, 16, 0, 6, 0,
+ 0, 0, 70, 0, 0, 141,
+ 194, 0, 0, 128, 67, 85,
+ 21, 0, 130, 0, 16, 0,
+ 2, 0, 0, 0, 134, 0,
16, 0, 4, 0, 0, 0,
- 6, 3, 16, 0, 5, 0,
- 0, 0, 6, 1, 16, 0,
- 6, 0, 0, 0, 71, 0,
- 0, 141, 194, 0, 0, 128,
- 67, 85, 21, 0, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 134, 0, 16, 0, 4, 0,
- 0, 0, 6, 112, 16, 0,
- 2, 0, 0, 0, 0, 96,
- 16, 0, 1, 0, 0, 0,
- 42, 0, 16, 0, 5, 0,
- 0, 0, 0, 0, 0, 7,
- 66, 0, 16, 0, 0, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 42, 0,
- 16, 0, 0, 0, 0, 0,
+ 6, 112, 16, 0, 2, 0,
+ 0, 0, 0, 96, 16, 0,
+ 1, 0, 0, 0, 42, 0,
+ 16, 0, 5, 0, 0, 0,
0, 0, 0, 9, 130, 0,
- 16, 0, 0, 0, 0, 0,
+ 16, 0, 3, 0, 0, 0,
26, 128, 32, 128, 65, 0,
0, 0, 0, 0, 0, 0,
35, 0, 0, 0, 1, 64,
@@ -1024,96 +996,82 @@ const BYTE g_compositePS[] =
3, 59, 56, 0, 0, 7,
34, 0, 16, 0, 6, 0,
0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 1, 64,
+ 3, 0, 0, 0, 1, 64,
0, 0, 111, 18, 3, 59,
0, 0, 0, 7, 82, 0,
16, 0, 4, 0, 0, 0,
6, 3, 16, 0, 5, 0,
0, 0, 6, 1, 16, 0,
- 6, 0, 0, 0, 71, 0,
+ 6, 0, 0, 0, 70, 0,
0, 141, 194, 0, 0, 128,
67, 85, 21, 0, 130, 0,
- 16, 0, 0, 0, 0, 0,
+ 16, 0, 3, 0, 0, 0,
134, 0, 16, 0, 4, 0,
0, 0, 6, 112, 16, 0,
2, 0, 0, 0, 0, 96,
16, 0, 1, 0, 0, 0,
42, 0, 16, 0, 5, 0,
- 0, 0, 0, 0, 0, 7,
- 66, 0, 16, 0, 0, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 42, 0,
- 16, 0, 0, 0, 0, 0,
- 0, 0, 0, 9, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 26, 128, 32, 128, 65, 0,
- 0, 0, 0, 0, 0, 0,
- 36, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 128, 63,
- 56, 0, 0, 8, 18, 0,
- 16, 0, 6, 0, 0, 0,
- 10, 128, 32, 0, 0, 0,
+ 0, 0, 0, 0, 0, 9,
+ 18, 0, 16, 0, 4, 0,
+ 0, 0, 26, 128, 32, 128,
+ 65, 0, 0, 0, 0, 0,
0, 0, 36, 0, 0, 0,
- 1, 64, 0, 0, 111, 18,
- 3, 59, 56, 0, 0, 7,
- 34, 0, 16, 0, 6, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 1, 64,
- 0, 0, 111, 18, 3, 59,
- 0, 0, 0, 7, 82, 0,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 56, 0, 0, 8,
+ 18, 0, 16, 0, 6, 0,
+ 0, 0, 10, 128, 32, 0,
+ 0, 0, 0, 0, 36, 0,
+ 0, 0, 1, 64, 0, 0,
+ 111, 18, 3, 59, 56, 0,
+ 0, 7, 34, 0, 16, 0,
+ 6, 0, 0, 0, 10, 0,
16, 0, 4, 0, 0, 0,
- 6, 3, 16, 0, 5, 0,
- 0, 0, 6, 1, 16, 0,
- 6, 0, 0, 0, 71, 0,
- 0, 141, 194, 0, 0, 128,
- 67, 85, 21, 0, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 134, 0, 16, 0, 4, 0,
- 0, 0, 6, 112, 16, 0,
- 2, 0, 0, 0, 0, 96,
- 16, 0, 1, 0, 0, 0,
- 42, 0, 16, 0, 5, 0,
- 0, 0, 0, 0, 0, 7,
- 66, 0, 16, 0, 0, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 42, 0,
- 16, 0, 0, 0, 0, 0,
- 0, 0, 0, 9, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 26, 128, 32, 128, 65, 0,
- 0, 0, 0, 0, 0, 0,
- 37, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 128, 63,
- 56, 0, 0, 8, 18, 0,
- 16, 0, 6, 0, 0, 0,
- 10, 128, 32, 0, 0, 0,
- 0, 0, 37, 0, 0, 0,
1, 64, 0, 0, 111, 18,
- 3, 59, 56, 0, 0, 7,
- 34, 0, 16, 0, 6, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 1, 64,
+ 3, 59, 0, 0, 0, 7,
+ 82, 0, 16, 0, 4, 0,
+ 0, 0, 6, 3, 16, 0,
+ 5, 0, 0, 0, 6, 1,
+ 16, 0, 6, 0, 0, 0,
+ 70, 0, 0, 141, 194, 0,
+ 0, 128, 67, 85, 21, 0,
+ 18, 0, 16, 0, 4, 0,
+ 0, 0, 134, 0, 16, 0,
+ 4, 0, 0, 0, 6, 112,
+ 16, 0, 2, 0, 0, 0,
+ 0, 96, 16, 0, 1, 0,
+ 0, 0, 42, 0, 16, 0,
+ 5, 0, 0, 0, 0, 0,
+ 0, 9, 66, 0, 16, 0,
+ 4, 0, 0, 0, 26, 128,
+ 32, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 37, 0,
+ 0, 0, 1, 64, 0, 0,
+ 0, 0, 128, 63, 56, 0,
+ 0, 8, 18, 0, 16, 0,
+ 6, 0, 0, 0, 10, 128,
+ 32, 0, 0, 0, 0, 0,
+ 37, 0, 0, 0, 1, 64,
0, 0, 111, 18, 3, 59,
- 0, 0, 0, 7, 82, 0,
+ 56, 0, 0, 7, 34, 0,
+ 16, 0, 6, 0, 0, 0,
+ 42, 0, 16, 0, 4, 0,
+ 0, 0, 1, 64, 0, 0,
+ 111, 18, 3, 59, 0, 0,
+ 0, 7, 194, 0, 16, 0,
+ 4, 0, 0, 0, 6, 12,
+ 16, 0, 5, 0, 0, 0,
+ 6, 4, 16, 0, 6, 0,
+ 0, 0, 70, 0, 0, 141,
+ 194, 0, 0, 128, 67, 85,
+ 21, 0, 66, 0, 16, 0,
+ 4, 0, 0, 0, 230, 10,
16, 0, 4, 0, 0, 0,
- 6, 3, 16, 0, 5, 0,
- 0, 0, 6, 1, 16, 0,
- 6, 0, 0, 0, 71, 0,
- 0, 141, 194, 0, 0, 128,
- 67, 85, 21, 0, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 134, 0, 16, 0, 4, 0,
- 0, 0, 6, 112, 16, 0,
- 2, 0, 0, 0, 0, 96,
- 16, 0, 1, 0, 0, 0,
- 42, 0, 16, 0, 5, 0,
- 0, 0, 0, 0, 0, 7,
- 66, 0, 16, 0, 0, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 42, 0,
- 16, 0, 0, 0, 0, 0,
+ 6, 112, 16, 0, 2, 0,
+ 0, 0, 0, 96, 16, 0,
+ 1, 0, 0, 0, 42, 0,
+ 16, 0, 5, 0, 0, 0,
0, 0, 0, 9, 130, 0,
- 16, 0, 0, 0, 0, 0,
+ 16, 0, 4, 0, 0, 0,
26, 128, 32, 128, 65, 0,
0, 0, 0, 0, 0, 0,
38, 0, 0, 0, 1, 64,
@@ -1126,509 +1084,550 @@ const BYTE g_compositePS[] =
3, 59, 56, 0, 0, 7,
34, 0, 16, 0, 6, 0,
0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 1, 64,
+ 4, 0, 0, 0, 1, 64,
0, 0, 111, 18, 3, 59,
- 0, 0, 0, 7, 82, 0,
- 16, 0, 4, 0, 0, 0,
- 6, 3, 16, 0, 5, 0,
- 0, 0, 6, 1, 16, 0,
- 6, 0, 0, 0, 71, 0,
+ 0, 0, 0, 7, 50, 0,
+ 16, 0, 6, 0, 0, 0,
+ 198, 0, 16, 0, 5, 0,
+ 0, 0, 70, 0, 16, 0,
+ 6, 0, 0, 0, 70, 0,
0, 141, 194, 0, 0, 128,
67, 85, 21, 0, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 134, 0, 16, 0, 4, 0,
+ 16, 0, 4, 0, 0, 0,
+ 70, 0, 16, 0, 6, 0,
0, 0, 6, 112, 16, 0,
2, 0, 0, 0, 0, 96,
16, 0, 1, 0, 0, 0,
42, 0, 16, 0, 5, 0,
+ 0, 0, 0, 0, 0, 9,
+ 18, 0, 16, 0, 6, 0,
+ 0, 0, 26, 128, 32, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 39, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 56, 0, 0, 8,
+ 18, 0, 16, 0, 7, 0,
+ 0, 0, 10, 128, 32, 0,
+ 0, 0, 0, 0, 39, 0,
+ 0, 0, 1, 64, 0, 0,
+ 111, 18, 3, 59, 56, 0,
+ 0, 7, 34, 0, 16, 0,
+ 7, 0, 0, 0, 10, 0,
+ 16, 0, 6, 0, 0, 0,
+ 1, 64, 0, 0, 111, 18,
+ 3, 59, 0, 0, 0, 7,
+ 146, 0, 16, 0, 5, 0,
+ 0, 0, 6, 12, 16, 0,
+ 5, 0, 0, 0, 6, 4,
+ 16, 0, 7, 0, 0, 0,
+ 70, 0, 0, 141, 194, 0,
+ 0, 128, 67, 85, 21, 0,
+ 18, 0, 16, 0, 5, 0,
+ 0, 0, 198, 0, 16, 0,
+ 5, 0, 0, 0, 6, 112,
+ 16, 0, 2, 0, 0, 0,
+ 0, 96, 16, 0, 1, 0,
+ 0, 0, 42, 0, 16, 0,
+ 5, 0, 0, 0, 31, 0,
+ 0, 3, 42, 0, 16, 0,
+ 0, 0, 0, 0, 49, 0,
+ 0, 7, 66, 0, 16, 0,
+ 0, 0, 0, 0, 26, 0,
+ 16, 0, 5, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 0, 0, 49, 0, 0, 7,
+ 34, 0, 16, 0, 5, 0,
+ 0, 0, 1, 64, 0, 0,
+ 0, 0, 128, 63, 26, 0,
+ 16, 0, 5, 0, 0, 0,
+ 60, 0, 0, 7, 66, 0,
+ 16, 0, 0, 0, 0, 0,
+ 42, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 0,
+ 5, 0, 0, 0, 31, 0,
+ 0, 3, 42, 0, 16, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 7, 66, 0, 16, 0,
+ 0, 0, 0, 0, 58, 0,
+ 16, 0, 0, 0, 0, 0,
+ 58, 0, 16, 0, 1, 0,
0, 0, 0, 0, 0, 7,
66, 0, 16, 0, 0, 0,
0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 42, 0,
+ 2, 0, 0, 0, 42, 0,
16, 0, 0, 0, 0, 0,
- 0, 0, 0, 9, 130, 0,
+ 0, 0, 0, 7, 66, 0,
16, 0, 0, 0, 0, 0,
- 26, 128, 32, 128, 65, 0,
+ 58, 0, 16, 0, 3, 0,
+ 0, 0, 42, 0, 16, 0,
0, 0, 0, 0, 0, 0,
- 39, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 128, 63,
- 56, 0, 0, 8, 18, 0,
- 16, 0, 6, 0, 0, 0,
- 10, 128, 32, 0, 0, 0,
- 0, 0, 39, 0, 0, 0,
- 1, 64, 0, 0, 111, 18,
- 3, 59, 56, 0, 0, 7,
- 34, 0, 16, 0, 6, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 1, 64,
- 0, 0, 111, 18, 3, 59,
- 0, 0, 0, 7, 82, 0,
+ 0, 7, 66, 0, 16, 0,
+ 0, 0, 0, 0, 10, 0,
16, 0, 4, 0, 0, 0,
- 6, 3, 16, 0, 5, 0,
- 0, 0, 6, 1, 16, 0,
- 6, 0, 0, 0, 71, 0,
- 0, 141, 194, 0, 0, 128,
- 67, 85, 21, 0, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 134, 0, 16, 0, 4, 0,
- 0, 0, 6, 112, 16, 0,
- 2, 0, 0, 0, 0, 96,
- 16, 0, 1, 0, 0, 0,
- 42, 0, 16, 0, 5, 0,
+ 42, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 7,
66, 0, 16, 0, 0, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 42, 0,
+ 0, 0, 42, 0, 16, 0,
+ 4, 0, 0, 0, 42, 0,
16, 0, 0, 0, 0, 0,
- 56, 0, 0, 7, 66, 0,
+ 0, 0, 0, 7, 66, 0,
16, 0, 0, 0, 0, 0,
+ 58, 0, 16, 0, 4, 0,
+ 0, 0, 42, 0, 16, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 7, 66, 0, 16, 0,
+ 0, 0, 0, 0, 10, 0,
+ 16, 0, 5, 0, 0, 0,
42, 0, 16, 0, 0, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 0, 62, 18, 0,
+ 0, 0, 56, 0, 0, 7,
+ 66, 0, 16, 0, 0, 0,
+ 0, 0, 42, 0, 16, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 0, 62,
+ 18, 0, 0, 1, 54, 0,
+ 0, 5, 66, 0, 16, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 21, 0, 0, 1, 18, 0,
0, 1, 54, 0, 0, 5,
66, 0, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0,
0, 0, 128, 63, 21, 0,
- 0, 1, 18, 0, 0, 1,
- 54, 0, 0, 5, 66, 0,
- 16, 0, 0, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 128, 63, 21, 0, 0, 1,
- 56, 0, 0, 9, 210, 0,
- 16, 0, 4, 0, 0, 0,
- 6, 137, 32, 0, 0, 0,
- 0, 0, 5, 0, 0, 0,
- 86, 133, 32, 0, 0, 0,
- 0, 0, 24, 0, 0, 0,
- 50, 0, 0, 11, 210, 0,
- 16, 0, 4, 0, 0, 0,
- 6, 137, 32, 0, 0, 0,
- 0, 0, 4, 0, 0, 0,
- 6, 128, 32, 0, 0, 0,
- 0, 0, 24, 0, 0, 0,
- 6, 14, 16, 0, 4, 0,
+ 0, 1, 56, 0, 0, 9,
+ 210, 0, 16, 0, 4, 0,
+ 0, 0, 6, 137, 32, 0,
+ 0, 0, 0, 0, 5, 0,
+ 0, 0, 86, 133, 32, 0,
+ 0, 0, 0, 0, 24, 0,
0, 0, 50, 0, 0, 11,
210, 0, 16, 0, 4, 0,
0, 0, 6, 137, 32, 0,
- 0, 0, 0, 0, 6, 0,
- 0, 0, 166, 138, 32, 0,
+ 0, 0, 0, 0, 4, 0,
+ 0, 0, 6, 128, 32, 0,
0, 0, 0, 0, 24, 0,
0, 0, 6, 14, 16, 0,
- 4, 0, 0, 0, 16, 0,
- 0, 7, 130, 0, 16, 0,
- 0, 0, 0, 0, 70, 2,
- 16, 0, 1, 0, 0, 0,
- 70, 2, 16, 0, 1, 0,
- 0, 0, 68, 0, 0, 5,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 56, 0,
- 0, 7, 114, 0, 16, 0,
- 5, 0, 0, 0, 246, 15,
+ 4, 0, 0, 0, 50, 0,
+ 0, 11, 210, 0, 16, 0,
+ 4, 0, 0, 0, 6, 137,
+ 32, 0, 0, 0, 0, 0,
+ 6, 0, 0, 0, 166, 138,
+ 32, 0, 0, 0, 0, 0,
+ 24, 0, 0, 0, 6, 14,
+ 16, 0, 4, 0, 0, 0,
+ 16, 0, 0, 7, 130, 0,
16, 0, 0, 0, 0, 0,
70, 2, 16, 0, 1, 0,
- 0, 0, 56, 0, 0, 7,
- 114, 0, 16, 0, 6, 0,
0, 0, 70, 2, 16, 0,
- 2, 0, 0, 0, 70, 2,
- 16, 0, 3, 0, 0, 0,
- 50, 0, 0, 10, 114, 0,
- 16, 0, 2, 0, 0, 0,
- 38, 9, 16, 0, 2, 0,
- 0, 0, 150, 4, 16, 0,
- 3, 0, 0, 0, 70, 2,
- 16, 128, 65, 0, 0, 0,
- 6, 0, 0, 0, 16, 0,
- 0, 7, 130, 0, 16, 0,
- 1, 0, 0, 0, 70, 2,
- 16, 0, 2, 0, 0, 0,
- 70, 2, 16, 0, 2, 0,
- 0, 0, 68, 0, 0, 5,
- 130, 0, 16, 0, 1, 0,
- 0, 0, 58, 0, 16, 0,
+ 1, 0, 0, 0, 68, 0,
+ 0, 5, 130, 0, 16, 0,
+ 0, 0, 0, 0, 58, 0,
+ 16, 0, 0, 0, 0, 0,
+ 56, 0, 0, 7, 114, 0,
+ 16, 0, 5, 0, 0, 0,
+ 246, 15, 16, 0, 0, 0,
+ 0, 0, 70, 2, 16, 0,
1, 0, 0, 0, 56, 0,
0, 7, 114, 0, 16, 0,
- 2, 0, 0, 0, 246, 15,
- 16, 0, 1, 0, 0, 0,
- 70, 2, 16, 0, 2, 0,
+ 6, 0, 0, 0, 70, 2,
+ 16, 0, 2, 0, 0, 0,
+ 70, 2, 16, 0, 3, 0,
0, 0, 50, 0, 0, 10,
- 178, 0, 16, 0, 1, 0,
- 0, 0, 70, 8, 16, 128,
- 65, 0, 0, 0, 1, 0,
- 0, 0, 246, 15, 16, 0,
- 0, 0, 0, 0, 134, 12,
- 16, 0, 4, 0, 0, 0,
+ 114, 0, 16, 0, 2, 0,
+ 0, 0, 38, 9, 16, 0,
+ 2, 0, 0, 0, 150, 4,
+ 16, 0, 3, 0, 0, 0,
+ 70, 2, 16, 128, 65, 0,
+ 0, 0, 6, 0, 0, 0,
16, 0, 0, 7, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 70, 3, 16, 0, 1, 0,
- 0, 0, 70, 3, 16, 0,
- 1, 0, 0, 0, 68, 0,
+ 16, 0, 1, 0, 0, 0,
+ 70, 2, 16, 0, 2, 0,
+ 0, 0, 70, 2, 16, 0,
+ 2, 0, 0, 0, 68, 0,
0, 5, 130, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
- 56, 0, 0, 7, 178, 0,
+ 1, 0, 0, 0, 58, 0,
16, 0, 1, 0, 0, 0,
- 246, 15, 16, 0, 0, 0,
- 0, 0, 70, 12, 16, 0,
- 1, 0, 0, 0, 16, 0,
- 0, 9, 130, 0, 16, 0,
- 0, 0, 0, 0, 70, 2,
- 16, 128, 65, 0, 0, 0,
- 2, 0, 0, 0, 70, 2,
+ 56, 0, 0, 7, 114, 0,
+ 16, 0, 2, 0, 0, 0,
+ 246, 15, 16, 0, 1, 0,
+ 0, 0, 70, 2, 16, 0,
+ 2, 0, 0, 0, 50, 0,
+ 0, 10, 178, 0, 16, 0,
+ 1, 0, 0, 0, 70, 8,
16, 128, 65, 0, 0, 0,
- 5, 0, 0, 0, 52, 0,
- 0, 7, 130, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
+ 1, 0, 0, 0, 246, 15,
16, 0, 0, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 8,
+ 134, 12, 16, 0, 4, 0,
+ 0, 0, 16, 0, 0, 7,
130, 0, 16, 0, 0, 0,
- 0, 0, 58, 0, 16, 128,
- 65, 0, 0, 0, 0, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 128, 63, 56, 0,
- 0, 7, 130, 0, 16, 0,
- 2, 0, 0, 0, 58, 0,
+ 0, 0, 70, 3, 16, 0,
+ 1, 0, 0, 0, 70, 3,
+ 16, 0, 1, 0, 0, 0,
+ 68, 0, 0, 5, 130, 0,
16, 0, 0, 0, 0, 0,
58, 0, 16, 0, 0, 0,
0, 0, 56, 0, 0, 7,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
- 16, 0, 2, 0, 0, 0,
- 50, 0, 0, 9, 130, 0,
+ 178, 0, 16, 0, 1, 0,
+ 0, 0, 246, 15, 16, 0,
+ 0, 0, 0, 0, 70, 12,
+ 16, 0, 1, 0, 0, 0,
+ 16, 0, 0, 9, 130, 0,
+ 16, 0, 0, 0, 0, 0,
+ 70, 2, 16, 128, 65, 0,
+ 0, 0, 2, 0, 0, 0,
+ 70, 2, 16, 128, 65, 0,
+ 0, 0, 5, 0, 0, 0,
+ 52, 0, 0, 7, 130, 0,
16, 0, 0, 0, 0, 0,
58, 0, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0,
- 102, 102, 102, 63, 1, 64,
- 0, 0, 205, 204, 204, 61,
- 16, 0, 0, 8, 130, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 8, 130, 0, 16, 0,
+ 0, 0, 0, 0, 58, 0,
+ 16, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 56, 0, 0, 7, 130, 0,
16, 0, 2, 0, 0, 0,
- 134, 3, 16, 0, 4, 0,
- 0, 0, 70, 2, 16, 128,
- 65, 0, 0, 0, 2, 0,
- 0, 0, 16, 0, 0, 8,
- 18, 0, 16, 0, 3, 0,
- 0, 0, 70, 2, 16, 0,
- 5, 0, 0, 0, 70, 2,
+ 58, 0, 16, 0, 0, 0,
+ 0, 0, 58, 0, 16, 0,
+ 0, 0, 0, 0, 56, 0,
+ 0, 7, 130, 0, 16, 0,
+ 0, 0, 0, 0, 58, 0,
+ 16, 0, 0, 0, 0, 0,
+ 58, 0, 16, 0, 2, 0,
+ 0, 0, 50, 0, 0, 9,
+ 130, 0, 16, 0, 0, 0,
+ 0, 0, 58, 0, 16, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 102, 102, 102, 63,
+ 1, 64, 0, 0, 205, 204,
+ 204, 61, 16, 0, 0, 8,
+ 130, 0, 16, 0, 2, 0,
+ 0, 0, 134, 3, 16, 0,
+ 4, 0, 0, 0, 70, 2,
16, 128, 65, 0, 0, 0,
- 2, 0, 0, 0, 0, 0,
- 0, 7, 18, 0, 16, 0,
- 3, 0, 0, 0, 10, 0,
+ 2, 0, 0, 0, 16, 0,
+ 0, 8, 18, 0, 16, 0,
+ 3, 0, 0, 0, 70, 2,
+ 16, 0, 5, 0, 0, 0,
+ 70, 2, 16, 128, 65, 0,
+ 0, 0, 2, 0, 0, 0,
+ 0, 0, 0, 7, 18, 0,
16, 0, 3, 0, 0, 0,
10, 0, 16, 0, 3, 0,
- 0, 0, 50, 0, 0, 9,
- 114, 0, 16, 0, 3, 0,
+ 0, 0, 10, 0, 16, 0,
+ 3, 0, 0, 0, 50, 0,
+ 0, 9, 114, 0, 16, 0,
+ 3, 0, 0, 0, 70, 2,
+ 16, 0, 2, 0, 0, 0,
+ 6, 0, 16, 0, 3, 0,
0, 0, 70, 2, 16, 0,
- 2, 0, 0, 0, 6, 0,
+ 5, 0, 0, 0, 56, 0,
+ 0, 8, 130, 0, 16, 0,
+ 3, 0, 0, 0, 26, 0,
16, 0, 3, 0, 0, 0,
- 70, 2, 16, 0, 5, 0,
- 0, 0, 56, 0, 0, 8,
- 130, 0, 16, 0, 3, 0,
- 0, 0, 26, 0, 16, 0,
- 3, 0, 0, 0, 26, 128,
- 32, 0, 0, 0, 0, 0,
- 13, 0, 0, 0, 50, 0,
- 0, 10, 130, 0, 16, 0,
+ 26, 128, 32, 0, 0, 0,
+ 0, 0, 13, 0, 0, 0,
+ 50, 0, 0, 10, 130, 0,
+ 16, 0, 3, 0, 0, 0,
+ 26, 128, 32, 0, 0, 0,
+ 0, 0, 12, 0, 0, 0,
+ 10, 0, 16, 0, 3, 0,
+ 0, 0, 58, 0, 16, 0,
+ 3, 0, 0, 0, 50, 0,
+ 0, 10, 66, 0, 16, 0,
3, 0, 0, 0, 26, 128,
32, 0, 0, 0, 0, 0,
- 12, 0, 0, 0, 10, 0,
+ 14, 0, 0, 0, 42, 0,
16, 0, 3, 0, 0, 0,
58, 0, 16, 0, 3, 0,
- 0, 0, 50, 0, 0, 10,
- 66, 0, 16, 0, 3, 0,
- 0, 0, 26, 128, 32, 0,
- 0, 0, 0, 0, 14, 0,
- 0, 0, 42, 0, 16, 0,
- 3, 0, 0, 0, 58, 0,
- 16, 0, 3, 0, 0, 0,
- 56, 0, 0, 11, 50, 0,
- 16, 0, 5, 0, 0, 0,
- 166, 138, 32, 0, 0, 0,
- 0, 0, 31, 0, 0, 0,
- 2, 64, 0, 0, 205, 204,
- 204, 60, 205, 204, 204, 61,
+ 0, 0, 56, 0, 0, 11,
+ 50, 0, 16, 0, 5, 0,
+ 0, 0, 166, 138, 32, 0,
+ 0, 0, 0, 0, 31, 0,
+ 0, 0, 2, 64, 0, 0,
+ 205, 204, 204, 60, 205, 204,
+ 204, 61, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 7,
+ 0, 7, 130, 0, 16, 0,
+ 3, 0, 0, 0, 26, 0,
+ 16, 0, 4, 0, 0, 0,
+ 1, 64, 0, 0, 205, 204,
+ 204, 189, 56, 32, 0, 7,
130, 0, 16, 0, 3, 0,
- 0, 0, 26, 0, 16, 0,
- 4, 0, 0, 0, 1, 64,
- 0, 0, 205, 204, 204, 189,
- 56, 32, 0, 7, 130, 0,
- 16, 0, 3, 0, 0, 0,
+ 0, 0, 58, 0, 16, 0,
+ 3, 0, 0, 0, 1, 64,
+ 0, 0, 85, 85, 85, 64,
+ 50, 0, 0, 9, 18, 0,
+ 16, 0, 4, 0, 0, 0,
58, 0, 16, 0, 3, 0,
0, 0, 1, 64, 0, 0,
- 85, 85, 85, 64, 50, 0,
- 0, 9, 18, 0, 16, 0,
- 4, 0, 0, 0, 58, 0,
+ 0, 0, 0, 192, 1, 64,
+ 0, 0, 0, 0, 64, 64,
+ 56, 0, 0, 7, 130, 0,
16, 0, 3, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 0, 192, 1, 64, 0, 0,
- 0, 0, 64, 64, 56, 0,
+ 58, 0, 16, 0, 3, 0,
+ 0, 0, 58, 0, 16, 0,
+ 3, 0, 0, 0, 56, 0,
0, 7, 130, 0, 16, 0,
3, 0, 0, 0, 58, 0,
16, 0, 3, 0, 0, 0,
- 58, 0, 16, 0, 3, 0,
+ 10, 0, 16, 0, 4, 0,
0, 0, 56, 0, 0, 7,
130, 0, 16, 0, 3, 0,
0, 0, 58, 0, 16, 0,
3, 0, 0, 0, 10, 0,
+ 16, 0, 5, 0, 0, 0,
+ 56, 0, 0, 8, 50, 0,
16, 0, 4, 0, 0, 0,
- 56, 0, 0, 7, 130, 0,
- 16, 0, 3, 0, 0, 0,
- 58, 0, 16, 0, 3, 0,
- 0, 0, 10, 0, 16, 0,
- 5, 0, 0, 0, 56, 0,
- 0, 8, 50, 0, 16, 0,
- 4, 0, 0, 0, 70, 0,
- 16, 128, 65, 0, 0, 0,
- 2, 0, 0, 0, 246, 15,
- 16, 0, 3, 0, 0, 0,
- 50, 0, 0, 12, 50, 0,
- 16, 0, 4, 0, 0, 0,
- 70, 0, 16, 0, 4, 0,
- 0, 0, 2, 64, 0, 0,
- 0, 0, 64, 63, 0, 0,
- 128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 70, 0,
- 16, 0, 0, 0, 0, 0,
- 0, 0, 0, 12, 242, 0,
- 16, 0, 6, 0, 0, 0,
- 70, 142, 32, 128, 65, 0,
- 0, 0, 0, 0, 0, 0,
- 29, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 128, 63,
+ 70, 0, 16, 128, 65, 0,
+ 0, 0, 2, 0, 0, 0,
+ 246, 15, 16, 0, 3, 0,
+ 0, 0, 50, 0, 0, 12,
+ 50, 0, 16, 0, 4, 0,
+ 0, 0, 70, 0, 16, 0,
+ 4, 0, 0, 0, 2, 64,
+ 0, 0, 0, 0, 64, 63,
0, 0, 128, 63, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 70, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 0, 12,
+ 242, 0, 16, 0, 6, 0,
+ 0, 0, 70, 142, 32, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 29, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
128, 63, 0, 0, 128, 63,
- 50, 0, 0, 16, 114, 0,
- 16, 0, 6, 0, 0, 0,
- 70, 2, 16, 128, 65, 0,
- 0, 0, 6, 0, 0, 0,
- 2, 64, 0, 0, 11, 215,
- 35, 63, 11, 215, 35, 63,
- 11, 215, 35, 63, 0, 0,
+ 0, 0, 128, 63, 0, 0,
+ 128, 63, 50, 0, 0, 16,
+ 114, 0, 16, 0, 6, 0,
+ 0, 0, 70, 2, 16, 128,
+ 65, 0, 0, 0, 6, 0,
0, 0, 2, 64, 0, 0,
+ 11, 215, 35, 63, 11, 215,
+ 35, 63, 11, 215, 35, 63,
+ 0, 0, 0, 0, 2, 64,
+ 0, 0, 0, 0, 128, 63,
0, 0, 128, 63, 0, 0,
- 128, 63, 0, 0, 128, 63,
- 0, 0, 0, 0, 56, 0,
- 0, 8, 114, 0, 16, 0,
- 6, 0, 0, 0, 70, 2,
+ 128, 63, 0, 0, 0, 0,
+ 56, 0, 0, 8, 114, 0,
16, 0, 6, 0, 0, 0,
- 246, 143, 32, 0, 0, 0,
- 0, 0, 29, 0, 0, 0,
- 69, 0, 0, 139, 194, 0,
- 0, 128, 67, 85, 21, 0,
- 114, 0, 16, 0, 4, 0,
- 0, 0, 70, 0, 16, 0,
- 4, 0, 0, 0, 70, 126,
- 16, 0, 1, 0, 0, 0,
- 0, 96, 16, 0, 0, 0,
- 0, 0, 56, 0, 0, 7,
- 114, 0, 16, 0, 7, 0,
- 0, 0, 70, 2, 16, 0,
- 6, 0, 0, 0, 70, 2,
+ 70, 2, 16, 0, 6, 0,
+ 0, 0, 246, 143, 32, 0,
+ 0, 0, 0, 0, 29, 0,
+ 0, 0, 69, 0, 0, 139,
+ 194, 0, 0, 128, 67, 85,
+ 21, 0, 114, 0, 16, 0,
+ 4, 0, 0, 0, 70, 0,
16, 0, 4, 0, 0, 0,
- 54, 0, 0, 8, 82, 0,
- 16, 0, 5, 0, 0, 0,
- 2, 64, 0, 0, 0, 0,
- 64, 63, 0, 0, 0, 0,
- 0, 0, 128, 63, 0, 0,
- 0, 0, 56, 0, 0, 7,
- 50, 0, 16, 0, 3, 0,
- 0, 0, 70, 0, 16, 0,
- 3, 0, 0, 0, 150, 5,
- 16, 0, 5, 0, 0, 0,
- 56, 0, 0, 8, 34, 0,
- 16, 0, 5, 0, 0, 0,
- 42, 128, 32, 0, 0, 0,
- 0, 0, 31, 0, 0, 0,
- 1, 64, 0, 0, 205, 204,
- 204, 61, 56, 0, 0, 7,
- 50, 0, 16, 0, 3, 0,
- 0, 0, 70, 0, 16, 0,
+ 70, 126, 16, 0, 1, 0,
+ 0, 0, 0, 96, 16, 0,
+ 0, 0, 0, 0, 56, 0,
+ 0, 7, 114, 0, 16, 0,
+ 7, 0, 0, 0, 70, 2,
+ 16, 0, 6, 0, 0, 0,
+ 70, 2, 16, 0, 4, 0,
+ 0, 0, 54, 0, 0, 8,
+ 82, 0, 16, 0, 5, 0,
+ 0, 0, 2, 64, 0, 0,
+ 0, 0, 64, 63, 0, 0,
+ 0, 0, 0, 0, 128, 63,
+ 0, 0, 0, 0, 56, 0,
+ 0, 7, 50, 0, 16, 0,
3, 0, 0, 0, 70, 0,
- 16, 0, 5, 0, 0, 0,
- 14, 0, 0, 7, 50, 0,
16, 0, 3, 0, 0, 0,
- 70, 0, 16, 0, 3, 0,
- 0, 0, 166, 10, 16, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 8, 50, 0, 16, 0,
- 0, 0, 0, 0, 70, 0,
- 16, 0, 0, 0, 0, 0,
- 70, 0, 16, 128, 65, 0,
- 0, 0, 3, 0, 0, 0,
- 69, 0, 0, 139, 194, 0,
- 0, 128, 67, 85, 21, 0,
- 178, 0, 16, 0, 3, 0,
+ 150, 5, 16, 0, 5, 0,
+ 0, 0, 56, 0, 0, 8,
+ 34, 0, 16, 0, 5, 0,
+ 0, 0, 42, 128, 32, 0,
+ 0, 0, 0, 0, 31, 0,
+ 0, 0, 1, 64, 0, 0,
+ 205, 204, 204, 61, 56, 0,
+ 0, 7, 50, 0, 16, 0,
+ 3, 0, 0, 0, 70, 0,
+ 16, 0, 3, 0, 0, 0,
+ 70, 0, 16, 0, 5, 0,
+ 0, 0, 14, 0, 0, 7,
+ 50, 0, 16, 0, 3, 0,
0, 0, 70, 0, 16, 0,
- 0, 0, 0, 0, 70, 123,
+ 3, 0, 0, 0, 166, 10,
16, 0, 1, 0, 0, 0,
- 0, 96, 16, 0, 0, 0,
- 0, 0, 0, 0, 0, 7,
- 18, 0, 16, 0, 0, 0,
- 0, 0, 42, 0, 16, 0,
- 3, 0, 0, 0, 1, 64,
- 0, 0, 154, 153, 25, 190,
- 56, 32, 0, 7, 18, 0,
+ 0, 0, 0, 8, 50, 0,
16, 0, 0, 0, 0, 0,
- 10, 0, 16, 0, 0, 0,
- 0, 0, 1, 64, 0, 0,
- 1, 0, 32, 65, 50, 0,
- 0, 9, 34, 0, 16, 0,
- 0, 0, 0, 0, 10, 0,
+ 70, 0, 16, 0, 0, 0,
+ 0, 0, 70, 0, 16, 128,
+ 65, 0, 0, 0, 3, 0,
+ 0, 0, 69, 0, 0, 139,
+ 194, 0, 0, 128, 67, 85,
+ 21, 0, 178, 0, 16, 0,
+ 3, 0, 0, 0, 70, 0,
16, 0, 0, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 0, 192, 1, 64, 0, 0,
- 0, 0, 64, 64, 56, 0,
+ 70, 123, 16, 0, 1, 0,
+ 0, 0, 0, 96, 16, 0,
+ 0, 0, 0, 0, 0, 0,
0, 7, 18, 0, 16, 0,
- 0, 0, 0, 0, 10, 0,
- 16, 0, 0, 0, 0, 0,
- 10, 0, 16, 0, 0, 0,
- 0, 0, 56, 0, 0, 7,
+ 0, 0, 0, 0, 42, 0,
+ 16, 0, 3, 0, 0, 0,
+ 1, 64, 0, 0, 154, 153,
+ 25, 190, 56, 32, 0, 7,
18, 0, 16, 0, 0, 0,
0, 0, 10, 0, 16, 0,
- 0, 0, 0, 0, 26, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 1, 0, 32, 65,
+ 50, 0, 0, 9, 34, 0,
16, 0, 0, 0, 0, 0,
+ 10, 0, 16, 0, 0, 0,
+ 0, 0, 1, 64, 0, 0,
+ 0, 0, 0, 192, 1, 64,
+ 0, 0, 0, 0, 64, 64,
56, 0, 0, 7, 18, 0,
16, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 0, 0,
+ 10, 0, 16, 0, 0, 0,
0, 0, 10, 0, 16, 0,
0, 0, 0, 0, 56, 0,
- 0, 10, 114, 0, 16, 0,
- 5, 0, 0, 0, 6, 0,
+ 0, 7, 18, 0, 16, 0,
+ 0, 0, 0, 0, 10, 0,
16, 0, 0, 0, 0, 0,
- 2, 64, 0, 0, 8, 215,
- 163, 60, 40, 92, 15, 62,
- 40, 92, 143, 62, 0, 0,
- 0, 0, 50, 0, 0, 9,
- 114, 0, 16, 0, 3, 0,
- 0, 0, 70, 3, 16, 0,
- 3, 0, 0, 0, 166, 10,
+ 26, 0, 16, 0, 0, 0,
+ 0, 0, 56, 0, 0, 7,
+ 18, 0, 16, 0, 0, 0,
+ 0, 0, 42, 0, 16, 0,
+ 0, 0, 0, 0, 10, 0,
16, 0, 0, 0, 0, 0,
- 70, 2, 16, 0, 5, 0,
- 0, 0, 0, 0, 0, 10,
- 114, 0, 16, 0, 3, 0,
+ 56, 0, 0, 10, 114, 0,
+ 16, 0, 5, 0, 0, 0,
+ 6, 0, 16, 0, 0, 0,
+ 0, 0, 2, 64, 0, 0,
+ 8, 215, 163, 60, 40, 92,
+ 15, 62, 40, 92, 143, 62,
+ 0, 0, 0, 0, 50, 0,
+ 0, 9, 114, 0, 16, 0,
+ 3, 0, 0, 0, 70, 3,
+ 16, 0, 3, 0, 0, 0,
+ 166, 10, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
- 3, 0, 0, 0, 2, 64,
- 0, 0, 205, 204, 204, 61,
- 205, 204, 204, 61, 205, 204,
- 76, 62, 0, 0, 0, 0,
- 50, 0, 0, 9, 18, 0,
- 16, 0, 0, 0, 0, 0,
- 58, 0, 16, 0, 2, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 0, 63, 1, 64,
+ 5, 0, 0, 0, 0, 0,
+ 0, 10, 114, 0, 16, 0,
+ 3, 0, 0, 0, 70, 2,
+ 16, 0, 3, 0, 0, 0,
+ 2, 64, 0, 0, 205, 204,
+ 204, 61, 205, 204, 204, 61,
+ 205, 204, 76, 62, 0, 0,
+ 0, 0, 50, 0, 0, 9,
+ 18, 0, 16, 0, 0, 0,
+ 0, 0, 58, 0, 16, 0,
+ 2, 0, 0, 0, 1, 64,
0, 0, 0, 0, 0, 63,
- 52, 0, 0, 7, 34, 0,
+ 1, 64, 0, 0, 0, 0,
+ 0, 63, 52, 0, 0, 7,
+ 34, 0, 16, 0, 0, 0,
+ 0, 0, 42, 0, 16, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 205, 204, 204, 62,
+ 56, 0, 0, 7, 18, 0,
16, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 0, 0,
- 0, 0, 1, 64, 0, 0,
- 205, 204, 204, 62, 56, 0,
- 0, 7, 18, 0, 16, 0,
- 0, 0, 0, 0, 26, 0,
+ 26, 0, 16, 0, 0, 0,
+ 0, 0, 10, 0, 16, 0,
+ 0, 0, 0, 0, 50, 0,
+ 0, 15, 114, 0, 16, 0,
+ 0, 0, 0, 0, 6, 0,
16, 0, 0, 0, 0, 0,
- 10, 0, 16, 0, 0, 0,
- 0, 0, 50, 0, 0, 15,
- 114, 0, 16, 0, 0, 0,
- 0, 0, 6, 0, 16, 0,
- 0, 0, 0, 0, 2, 64,
- 0, 0, 144, 194, 53, 63,
- 219, 249, 30, 63, 134, 235,
- 209, 62, 0, 0, 0, 0,
- 2, 64, 0, 0, 225, 122,
- 148, 62, 74, 12, 194, 62,
- 61, 10, 23, 63, 0, 0,
- 0, 0, 56, 0, 0, 8,
- 114, 0, 16, 0, 0, 0,
- 0, 0, 70, 2, 16, 0,
- 0, 0, 0, 0, 70, 130,
- 32, 0, 0, 0, 0, 0,
- 29, 0, 0, 0, 16, 0,
- 0, 8, 18, 0, 16, 0,
- 1, 0, 0, 0, 70, 3,
+ 2, 64, 0, 0, 144, 194,
+ 53, 63, 219, 249, 30, 63,
+ 134, 235, 209, 62, 0, 0,
+ 0, 0, 2, 64, 0, 0,
+ 225, 122, 148, 62, 74, 12,
+ 194, 62, 61, 10, 23, 63,
+ 0, 0, 0, 0, 56, 0,
+ 0, 8, 114, 0, 16, 0,
+ 0, 0, 0, 0, 70, 2,
+ 16, 0, 0, 0, 0, 0,
+ 70, 130, 32, 0, 0, 0,
+ 0, 0, 29, 0, 0, 0,
+ 16, 0, 0, 8, 18, 0,
16, 0, 1, 0, 0, 0,
- 70, 2, 16, 128, 65, 0,
- 0, 0, 2, 0, 0, 0,
- 52, 0, 0, 7, 18, 0,
+ 70, 3, 16, 0, 1, 0,
+ 0, 0, 70, 2, 16, 128,
+ 65, 0, 0, 0, 2, 0,
+ 0, 0, 52, 0, 0, 7,
+ 18, 0, 16, 0, 1, 0,
+ 0, 0, 10, 0, 16, 0,
+ 1, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 0, 0,
+ 47, 0, 0, 5, 18, 0,
16, 0, 1, 0, 0, 0,
10, 0, 16, 0, 1, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 0, 0, 47, 0,
- 0, 5, 18, 0, 16, 0,
- 1, 0, 0, 0, 10, 0,
- 16, 0, 1, 0, 0, 0,
- 56, 0, 0, 7, 18, 0,
+ 0, 0, 56, 0, 0, 7,
+ 18, 0, 16, 0, 1, 0,
+ 0, 0, 10, 0, 16, 0,
+ 1, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 200, 67,
+ 25, 0, 0, 5, 18, 0,
16, 0, 1, 0, 0, 0,
10, 0, 16, 0, 1, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 200, 67, 25, 0,
- 0, 5, 18, 0, 16, 0,
- 1, 0, 0, 0, 10, 0,
+ 0, 0, 50, 0, 0, 11,
+ 98, 0, 16, 0, 1, 0,
+ 0, 0, 166, 139, 32, 0,
+ 0, 0, 0, 0, 10, 0,
+ 0, 0, 166, 10, 16, 0,
+ 1, 0, 0, 0, 166, 139,
+ 32, 0, 0, 0, 0, 0,
+ 11, 0, 0, 0, 14, 0,
+ 0, 6, 1, 192, 0, 0,
+ 26, 0, 16, 0, 1, 0,
+ 0, 0, 42, 0, 16, 0,
+ 1, 0, 0, 0, 50, 0,
+ 0, 10, 226, 0, 16, 0,
+ 1, 0, 0, 0, 6, 9,
+ 16, 128, 65, 0, 0, 0,
+ 4, 0, 0, 0, 6, 9,
+ 16, 0, 6, 0, 0, 0,
+ 6, 9, 16, 0, 3, 0,
+ 0, 0, 50, 0, 0, 9,
+ 226, 0, 16, 0, 1, 0,
+ 0, 0, 246, 15, 16, 0,
+ 0, 0, 0, 0, 86, 14,
16, 0, 1, 0, 0, 0,
- 50, 0, 0, 10, 114, 0,
- 16, 0, 2, 0, 0, 0,
- 70, 2, 16, 128, 65, 0,
- 0, 0, 4, 0, 0, 0,
- 70, 2, 16, 0, 6, 0,
+ 6, 9, 16, 0, 7, 0,
+ 0, 0, 50, 0, 0, 12,
+ 114, 0, 16, 0, 1, 0,
+ 0, 0, 6, 0, 16, 0,
+ 1, 0, 0, 0, 2, 64,
+ 0, 0, 154, 153, 153, 63,
+ 154, 153, 153, 63, 154, 153,
+ 153, 63, 0, 0, 0, 0,
+ 150, 7, 16, 0, 1, 0,
+ 0, 0, 56, 0, 0, 8,
+ 114, 0, 16, 0, 1, 0,
0, 0, 70, 2, 16, 0,
- 3, 0, 0, 0, 50, 0,
- 0, 9, 114, 0, 16, 0,
- 2, 0, 0, 0, 246, 15,
+ 1, 0, 0, 0, 246, 143,
+ 32, 0, 0, 0, 0, 0,
+ 29, 0, 0, 0, 50, 0,
+ 0, 9, 114, 32, 16, 0,
+ 0, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0,
- 70, 2, 16, 0, 2, 0,
+ 246, 15, 16, 0, 6, 0,
0, 0, 70, 2, 16, 0,
- 7, 0, 0, 0, 50, 0,
- 0, 12, 178, 0, 16, 0,
- 1, 0, 0, 0, 6, 0,
- 16, 0, 1, 0, 0, 0,
- 2, 64, 0, 0, 154, 153,
- 153, 63, 154, 153, 153, 63,
- 0, 0, 0, 0, 154, 153,
- 153, 63, 70, 8, 16, 0,
- 2, 0, 0, 0, 56, 0,
- 0, 8, 178, 0, 16, 0,
- 1, 0, 0, 0, 70, 12,
- 16, 0, 1, 0, 0, 0,
- 246, 143, 32, 0, 0, 0,
- 0, 0, 29, 0, 0, 0,
- 50, 0, 0, 9, 114, 32,
- 16, 0, 0, 0, 0, 0,
- 70, 2, 16, 0, 0, 0,
- 0, 0, 246, 15, 16, 0,
- 6, 0, 0, 0, 70, 3,
- 16, 0, 1, 0, 0, 0,
- 50, 0, 0, 11, 50, 0,
- 16, 0, 0, 0, 0, 0,
- 230, 138, 32, 0, 0, 0,
- 0, 0, 10, 0, 0, 0,
- 166, 10, 16, 0, 1, 0,
- 0, 0, 230, 138, 32, 0,
- 0, 0, 0, 0, 11, 0,
- 0, 0, 14, 0, 0, 6,
- 1, 192, 0, 0, 10, 0,
- 16, 0, 0, 0, 0, 0,
- 26, 0, 16, 0, 0, 0,
- 0, 0, 54, 0, 0, 5,
- 130, 32, 16, 0, 0, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 128, 63, 62, 0,
- 0, 1, 83, 84, 65, 84,
- 148, 0, 0, 0, 192, 0,
- 0, 0, 8, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 155, 0, 0, 0,
- 0, 0, 0, 0, 2, 0,
- 0, 0, 3, 0, 0, 0,
- 2, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 54, 0,
+ 0, 5, 130, 32, 16, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 62, 0, 0, 1, 83, 84,
+ 65, 84, 148, 0, 0, 0,
+ 192, 0, 0, 0, 8, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 155, 0,
0, 0, 0, 0, 0, 0,
+ 2, 0, 0, 0, 3, 0,
+ 0, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 7, 0, 0, 0, 0, 0,
- 0, 0, 8, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 10, 0, 0, 0,
- 2, 0, 0, 0, 0, 0,
+ 0, 0, 7, 0, 0, 0,
+ 0, 0, 0, 0, 8, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 10, 0,
+ 0, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
@@ -1639,5 +1638,5 @@ const BYTE g_compositePS[] =
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0
+ 0, 0, 0, 0
};
diff --git a/demo/d3d11/shaders/debugLinePS.hlsl b/demo/d3d/shaders/debugLinePS.hlsl
index d01847b..d01847b 100644
--- a/demo/d3d11/shaders/debugLinePS.hlsl
+++ b/demo/d3d/shaders/debugLinePS.hlsl
diff --git a/demo/d3d11/shaders/debugLinePS.hlsl.h b/demo/d3d/shaders/debugLinePS.hlsl.h
index 6243104..6243104 100644
--- a/demo/d3d11/shaders/debugLinePS.hlsl.h
+++ b/demo/d3d/shaders/debugLinePS.hlsl.h
diff --git a/demo/d3d11/shaders/debugLineVS.hlsl b/demo/d3d/shaders/debugLineVS.hlsl
index 1033b35..1033b35 100644
--- a/demo/d3d11/shaders/debugLineVS.hlsl
+++ b/demo/d3d/shaders/debugLineVS.hlsl
diff --git a/demo/d3d11/shaders/debugLineVS.hlsl.h b/demo/d3d/shaders/debugLineVS.hlsl.h
index cdf7e4b..cdf7e4b 100644
--- a/demo/d3d11/shaders/debugLineVS.hlsl.h
+++ b/demo/d3d/shaders/debugLineVS.hlsl.h
diff --git a/demo/d3d/shaders/diffuseGS.hlsl b/demo/d3d/shaders/diffuseGS.hlsl
new file mode 100644
index 0000000..e7a50d8
--- /dev/null
+++ b/demo/d3d/shaders/diffuseGS.hlsl
@@ -0,0 +1,83 @@
+#include "shaderCommon.h"
+
+cbuffer constBuf : register(b0)
+{
+ DiffuseShaderConst gParams;
+};
+
+static const float2 corners[4] =
+{
+ float2(0.0, 1.0),
+ float2(0.0, 0.0),
+ float2(1.0, 1.0),
+ float2(1.0, 0.0)
+};
+
+[maxvertexcount(4)]
+void diffuseGS(point DiffuseVertexOut input[1], inout TriangleStream<DiffuseGeometryOut> triStream)
+{
+ float4 ndcPos = input[0].ndcPos;
+
+ // frustrum culling
+ const float ndcBound = 1.0;
+ if (ndcPos.x < -ndcBound) return;
+ if (ndcPos.x > ndcBound) return;
+ if (ndcPos.y < -ndcBound) return;
+ if (ndcPos.y > ndcBound) return;
+
+ float pointScale = gParams.diffuseScale;
+ float velocityScale = 1.0;
+
+ float3 v = input[0].viewVel.xyz;
+ float3 p = input[0].viewPos.xyz;
+
+ // billboard in eye space
+ float3 u = float3(0.0, pointScale, 0.0);
+ float3 l = float3(pointScale, 0.0, 0.0);
+
+ // increase size based on life
+ float lifeTime = input[0].worldPos.w;
+
+ float lifeFade = lerp(1.0f + gParams.diffusion, 1.0, min(1.0, lifeTime*0.25f));
+ u *= lifeFade;
+ l *= lifeFade;
+
+ float fade = 1.0/(lifeFade*lifeFade);
+ float vlen = length(v)*gParams.motionBlurScale;
+
+ if (vlen > 0.5)
+ {
+ float len = max(pointScale, vlen*0.016);
+ fade = min(1.0, 2.0/(len/pointScale));
+
+ u = normalize(v)*max(pointScale, vlen*0.016); // assume 60hz
+ l = normalize(cross(u, float3(0.0, 0.0, -1.0)))*pointScale;
+ }
+
+ {
+ DiffuseGeometryOut output;
+
+ output.worldPos = input[0].worldPos; // vertex world pos (life in w)
+ output.viewPos = input[0].viewPos; // vertex eye pos
+ output.viewVel.xyz = input[0].viewVel.xyz; // vertex velocity in view space
+ output.viewVel.w = fade;
+ output.lightDir = mul(gParams.modelView, float4(gParams.lightDir, 0.0));
+ output.color = input[0].color;
+
+ output.uv = float2(0.0, 1.0);
+ output.clipPos = mul(gParams.projection, float4(p + u - l, 1.0));
+ triStream.Append(output);
+
+ output.uv = float2(0.0, 0.0);
+ output.clipPos = mul(gParams.projection, float4(p - u - l, 1.0));
+ triStream.Append(output);
+
+ output.uv = float2(1.0, 1.0);
+ output.clipPos = mul(gParams.projection, float4(p + u + l, 1.0));
+ triStream.Append(output);
+
+ output.uv = float2(1.0, 0.0);
+ output.clipPos = mul(gParams.projection, float4(p - u + l, 1.0));
+ triStream.Append(output);
+ }
+}
diff --git a/demo/d3d11/shaders/diffuseGS.hlsl.h b/demo/d3d/shaders/diffuseGS.hlsl.h
index 1f71735..6e3efd8 100644
--- a/demo/d3d11/shaders/diffuseGS.hlsl.h
+++ b/demo/d3d/shaders/diffuseGS.hlsl.h
@@ -64,7 +64,7 @@
// VIEWVEL 0 xyzw 3 NONE float xyzw
// LIGHTDIR 0 xyzw 4 NONE float xyzw
// COLOR 0 xyzw 5 NONE float xyzw
-// UV 0 xyzw 6 NONE float xyzw
+// UV 0 xy 6 NONE float xy
//
gs_5_0
dcl_globalFlags refactoringAllowed
@@ -84,7 +84,7 @@ dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
-dcl_output o6.xyzw
+dcl_output o6.xy
dcl_maxout 4
lt r0.x, v[0][1].x, l(-1.000000)
if_nz r0.x
@@ -107,8 +107,8 @@ mul r0.y, l(0.250000), v[0][0].w
min r0.y, r0.y, l(1.000000)
add r0.z, -r0.x, l(1.000000)
mad r0.x, r0.y, r0.z, r0.x
-mov r1.x, cb0[31].z
mov r1.yz, l(0,0,0,0)
+mov r1.x, cb0[31].z
mul r1.xyz, r0.xxxx, r1.xyzx
mul r0.x, r0.x, r0.x
div r1.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.x
@@ -148,7 +148,7 @@ mov o3.xyz, v[0][3].xyzx
mov o3.w, r1.w
mov o4.xyzw, r2.xyzw
mov o5.xyzw, v[0][4].xyzw
-mov o6.xyzw, l(0,1.000000,0,0)
+mov o6.xy, l(0,1.000000,0,0)
emit_stream m0
add r0.xyz, -r0.xywx, v[0][2].xyzx
add r4.xyz, -r1.xyzx, r0.xyzx
@@ -163,7 +163,7 @@ mov o3.xyz, v[0][3].xyzx
mov o3.w, r1.w
mov o4.xyzw, r2.xyzw
mov o5.xyzw, v[0][4].xyzw
-mov o6.xyzw, l(0,0,0,0)
+mov o6.xy, l(0,0,0,0)
emit_stream m0
add r3.xyz, r1.xyzx, r3.xyzx
mul r4.xyzw, r3.yyyy, cb0[16].xyzw
@@ -177,7 +177,7 @@ mov o3.xyz, v[0][3].xyzx
mov o3.w, r1.w
mov o4.xyzw, r2.xyzw
mov o5.xyzw, v[0][4].xyzw
-mov o6.xyzw, l(1.000000,1.000000,0,0)
+mov o6.xy, l(1.000000,1.000000,0,0)
emit_stream m0
add r0.xyz, r1.xyzx, r0.xyzx
mul r3.xyzw, r0.yyyy, cb0[16].xyzw
@@ -191,7 +191,7 @@ mov o3.xyz, v[0][3].xyzx
mov o3.w, r1.w
mov o4.xyzw, r2.xyzw
mov o5.xyzw, v[0][4].xyzw
-mov o6.xyzw, l(1.000000,0,0,0)
+mov o6.xy, l(1.000000,0,0,0)
emit_stream m0
ret
// Approximately 108 instruction slots used
@@ -199,10 +199,10 @@ ret
const BYTE g_diffuseGS[] =
{
- 68, 88, 66, 67, 206, 113,
- 108, 237, 96, 228, 115, 111,
- 205, 11, 177, 210, 155, 123,
- 232, 125, 1, 0, 0, 0,
+ 68, 88, 66, 67, 210, 25,
+ 219, 88, 83, 177, 178, 56,
+ 31, 41, 77, 1, 224, 175,
+ 13, 250, 1, 0, 0, 0,
16, 18, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
188, 3, 0, 0, 108, 4,
@@ -422,7 +422,7 @@ const BYTE g_diffuseGS[] =
0, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 6, 0,
- 0, 0, 15, 0, 0, 0,
+ 0, 0, 3, 12, 0, 0,
83, 86, 95, 80, 79, 83,
73, 84, 73, 79, 78, 0,
80, 79, 83, 73, 84, 73,
@@ -469,7 +469,7 @@ const BYTE g_diffuseGS[] =
16, 0, 4, 0, 0, 0,
101, 0, 0, 3, 242, 32,
16, 0, 5, 0, 0, 0,
- 101, 0, 0, 3, 242, 32,
+ 101, 0, 0, 3, 50, 32,
16, 0, 6, 0, 0, 0,
94, 0, 0, 2, 4, 0,
0, 0, 49, 0, 0, 8,
@@ -534,15 +534,15 @@ const BYTE g_diffuseGS[] =
42, 0, 16, 0, 0, 0,
0, 0, 10, 0, 16, 0,
0, 0, 0, 0, 54, 0,
- 0, 6, 18, 0, 16, 0,
- 1, 0, 0, 0, 42, 128,
- 32, 0, 0, 0, 0, 0,
- 31, 0, 0, 0, 54, 0,
0, 8, 98, 0, 16, 0,
1, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
+ 54, 0, 0, 6, 18, 0,
+ 16, 0, 1, 0, 0, 0,
+ 42, 128, 32, 0, 0, 0,
+ 0, 0, 31, 0, 0, 0,
56, 0, 0, 7, 114, 0,
16, 0, 1, 0, 0, 0,
6, 0, 16, 0, 0, 0,
@@ -743,7 +743,7 @@ const BYTE g_diffuseGS[] =
16, 0, 5, 0, 0, 0,
70, 30, 32, 0, 0, 0,
0, 0, 4, 0, 0, 0,
- 54, 0, 0, 8, 242, 32,
+ 54, 0, 0, 8, 50, 32,
16, 0, 6, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 128, 63,
@@ -812,7 +812,7 @@ const BYTE g_diffuseGS[] =
5, 0, 0, 0, 70, 30,
32, 0, 0, 0, 0, 0,
4, 0, 0, 0, 54, 0,
- 0, 8, 242, 32, 16, 0,
+ 0, 8, 50, 32, 16, 0,
6, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
@@ -874,7 +874,7 @@ const BYTE g_diffuseGS[] =
5, 0, 0, 0, 70, 30,
32, 0, 0, 0, 0, 0,
4, 0, 0, 0, 54, 0,
- 0, 8, 242, 32, 16, 0,
+ 0, 8, 50, 32, 16, 0,
6, 0, 0, 0, 2, 64,
0, 0, 0, 0, 128, 63,
0, 0, 128, 63, 0, 0,
@@ -936,7 +936,7 @@ const BYTE g_diffuseGS[] =
5, 0, 0, 0, 70, 30,
32, 0, 0, 0, 0, 0,
4, 0, 0, 0, 54, 0,
- 0, 8, 242, 32, 16, 0,
+ 0, 8, 50, 32, 16, 0,
6, 0, 0, 0, 2, 64,
0, 0, 0, 0, 128, 63,
0, 0, 0, 0, 0, 0,
diff --git a/demo/d3d11/shaders/diffusePS.hlsl b/demo/d3d/shaders/diffusePS.hlsl
index c6e474e..b548b49 100644
--- a/demo/d3d11/shaders/diffusePS.hlsl
+++ b/demo/d3d/shaders/diffusePS.hlsl
@@ -7,21 +7,15 @@ cbuffer constBuf : register(b0)
float sqr(float x) { return x * x; }
-
-float4 diffusePS(DiffuseGeometryOut input
- //, out float gl_FragDepth : SV_DEPTH
-) : SV_TARGET
+float4 diffusePS(DiffuseGeometryOut input) : SV_TARGET
{
- //return float4(1.0f, 0.0f, 0.0f, 1.0f);
-
float attenuation = 1.0f;
float lifeTime = input.worldPos.w;
float lifeFade = min(1.0, lifeTime*0.125);
float velocityFade = input.viewVel.w;
// calculate normal from texture coordinates
- float3 normal;
- normal.xy = input.uv.xy*float2(2.0, 2.0) + float2(-1.0, -1.0);
+ float3 normal = float3(input.uv * 2.0 + float2(-1.0, -1.0), 0.0);
float mag = dot(normal.xy, normal.xy);
// kill pixels outside circle
@@ -31,7 +25,5 @@ float4 diffusePS(DiffuseGeometryOut input
normal.z = 1.0-mag;
float alpha = lifeFade*velocityFade*sqr(normal.z);
-
return float4(alpha, alpha, alpha, alpha);
-
}
diff --git a/demo/d3d11/shaders/diffusePS.hlsl.h b/demo/d3d/shaders/diffusePS.hlsl.h
index b77dc1c..44a31b1 100644
--- a/demo/d3d11/shaders/diffusePS.hlsl.h
+++ b/demo/d3d/shaders/diffusePS.hlsl.h
@@ -14,7 +14,7 @@
// VIEWVEL 0 xyzw 3 NONE float w
// LIGHTDIR 0 xyzw 4 NONE float
// COLOR 0 xyzw 5 NONE float
-// UV 0 xyzw 6 NONE float xy
+// UV 0 xy 6 NONE float xy
//
//
// Output signature:
@@ -46,10 +46,10 @@ ret
const BYTE g_diffusePS[] =
{
- 68, 88, 66, 67, 142, 84,
- 94, 27, 80, 231, 240, 136,
- 237, 253, 148, 77, 42, 64,
- 90, 183, 1, 0, 0, 0,
+ 68, 88, 66, 67, 226, 109,
+ 117, 161, 154, 99, 48, 92,
+ 15, 92, 142, 117, 138, 39,
+ 5, 123, 1, 0, 0, 0,
232, 3, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
172, 0, 0, 0, 156, 1,
@@ -104,7 +104,7 @@ const BYTE g_diffusePS[] =
0, 0, 228, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
- 6, 0, 0, 0, 15, 3,
+ 6, 0, 0, 0, 3, 3,
0, 0, 83, 86, 95, 80,
79, 83, 73, 84, 73, 79,
78, 0, 80, 79, 83, 73,
diff --git a/demo/d3d11/shaders/diffuseVS.hlsl b/demo/d3d/shaders/diffuseVS.hlsl
index afca738..303b896 100644
--- a/demo/d3d11/shaders/diffuseVS.hlsl
+++ b/demo/d3d/shaders/diffuseVS.hlsl
@@ -22,5 +22,4 @@ DiffuseVertexOut diffuseVS(DiffuseVertexIn input)
output.ndcPos = ndcPos / ndcPos.w;
return output;
-
}
diff --git a/demo/d3d11/shaders/diffuseVS.hlsl.h b/demo/d3d/shaders/diffuseVS.hlsl.h
index 7db0a8c..7db0a8c 100644
--- a/demo/d3d11/shaders/diffuseVS.hlsl.h
+++ b/demo/d3d/shaders/diffuseVS.hlsl.h
diff --git a/demo/d3d/shaders/ellipsoidDepthGS.hlsl b/demo/d3d/shaders/ellipsoidDepthGS.hlsl
new file mode 100644
index 0000000..92169d3
--- /dev/null
+++ b/demo/d3d/shaders/ellipsoidDepthGS.hlsl
@@ -0,0 +1,65 @@
+#include "shaderCommon.h"
+
+cbuffer constBuf : register(b0)
+{
+ FluidShaderConst gParams;
+};
+
+static const float2 corners[4] =
+{
+ float2(0.0, 1.0), float2(0.0, 0.0), float2(1.0, 1.0), float2(1.0, 0.0)
+};
+
+[maxvertexcount(4)]
+void ellipsoidDepthGS(point FluidVertexOut input[1], inout TriangleStream<FluidGeoOut> triStream)
+{
+ const float4 ndcPos = input[0].ndcPos;
+ // frustrum culling
+ const float ndcBound = 1.0;
+ if (any(abs(ndcPos.xy) > ndcBound))
+ {
+ return;
+ }
+
+ float4 bounds = input[0].bounds;
+
+ const float4 invQuad0 = input[0].invQ0;
+ const float4 invQuad1 = input[0].invQ1;
+ const float4 invQuad2 = input[0].invQ2;
+ const float4 invQuad3 = input[0].invQ3;
+
+ float xmin = bounds.x;
+ float xmax = bounds.y;
+ float ymin = bounds.z;
+ float ymax = bounds.w;
+
+ FluidGeoOut output;
+
+ output.position = float4(xmin, ymax, 0.5, 1.0);
+ output.invQ0 = invQuad0;
+ output.invQ1 = invQuad1;
+ output.invQ2 = invQuad2;
+ output.invQ3 = invQuad3;
+ triStream.Append(output);
+
+ output.position = float4(xmin, ymin, 0.5, 1.0);
+ output.invQ0 = invQuad0;
+ output.invQ1 = invQuad1;
+ output.invQ2 = invQuad2;
+ output.invQ3 = invQuad3;
+ triStream.Append(output);
+
+ output.position = float4(xmax, ymax, 0.5, 1.0);
+ output.invQ0 = invQuad0;
+ output.invQ1 = invQuad1;
+ output.invQ2 = invQuad2;
+ output.invQ3 = invQuad3;
+ triStream.Append(output);
+
+ output.position = float4(xmax, ymin, 0.5, 1.0);
+ output.invQ0 = invQuad0;
+ output.invQ1 = invQuad1;
+ output.invQ2 = invQuad2;
+ output.invQ3 = invQuad3;
+ triStream.Append(output);
+}
diff --git a/demo/d3d11/shaders/ellipsoidDepthGS.hlsl.h b/demo/d3d/shaders/ellipsoidDepthGS.hlsl.h
index c82cc89..5966899 100644
--- a/demo/d3d11/shaders/ellipsoidDepthGS.hlsl.h
+++ b/demo/d3d/shaders/ellipsoidDepthGS.hlsl.h
@@ -14,7 +14,7 @@
// TEXCOORD 2 xyzw 3 NONE float xyzw
// TEXCOORD 3 xyzw 4 NONE float xyzw
// TEXCOORD 4 xyzw 5 NONE float xyzw
-// TEXCOORD 5 xyzw 6 NONE float xy w
+// TEXCOORD 5 xyzw 6 NONE float xy
//
//
// Output signature:
@@ -46,23 +46,8 @@ dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_maxout 4
-lt r0.x, v[0][6].w, l(0.000000)
-if_nz r0.x
- ret
-endif
-lt r0.x, v[0][6].x, l(-1.000000)
-if_nz r0.x
- ret
-endif
-lt r0.x, l(1.000000), v[0][6].x
-if_nz r0.x
- ret
-endif
-lt r0.x, v[0][6].y, l(-1.000000)
-if_nz r0.x
- ret
-endif
-lt r0.x, l(1.000000), v[0][6].y
+lt r0.xy, l(1.000000, 1.000000, 0.000000, 0.000000), |v[0][6].xyxx|
+or r0.x, r0.y, r0.x
if_nz r0.x
ret
endif
@@ -95,20 +80,20 @@ mov o3.xyzw, v[0][4].xyzw
mov o4.xyzw, v[0][5].xyzw
emit_stream m0
ret
-// Approximately 49 instruction slots used
+// Approximately 34 instruction slots used
#endif
const BYTE g_ellipsoidDepthGS[] =
{
- 68, 88, 66, 67, 121, 233,
- 112, 246, 66, 190, 203, 227,
- 242, 237, 242, 197, 75, 158,
- 125, 123, 1, 0, 0, 0,
- 72, 7, 0, 0, 5, 0,
+ 68, 88, 66, 67, 152, 192,
+ 203, 71, 86, 80, 184, 94,
+ 47, 161, 87, 71, 136, 207,
+ 121, 6, 1, 0, 0, 0,
+ 164, 6, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
172, 0, 0, 0, 120, 1,
0, 0, 44, 2, 0, 0,
- 172, 6, 0, 0, 82, 68,
+ 8, 6, 0, 0, 82, 68,
69, 70, 112, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
@@ -158,7 +143,7 @@ const BYTE g_ellipsoidDepthGS[] =
0, 0, 185, 0, 0, 0,
5, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
- 6, 0, 0, 0, 15, 11,
+ 6, 0, 0, 0, 15, 3,
0, 0, 80, 79, 83, 73,
84, 73, 79, 78, 0, 84,
69, 88, 67, 79, 79, 82,
@@ -193,8 +178,8 @@ const BYTE g_ellipsoidDepthGS[] =
73, 79, 78, 0, 84, 69,
88, 67, 79, 79, 82, 68,
0, 171, 171, 171, 83, 72,
- 69, 88, 120, 4, 0, 0,
- 80, 0, 2, 0, 30, 1,
+ 69, 88, 212, 3, 0, 0,
+ 80, 0, 2, 0, 245, 0,
0, 0, 106, 8, 0, 1,
95, 0, 0, 4, 242, 16,
32, 0, 1, 0, 0, 0,
@@ -231,52 +216,52 @@ const BYTE g_ellipsoidDepthGS[] =
101, 0, 0, 3, 242, 32,
16, 0, 4, 0, 0, 0,
94, 0, 0, 2, 4, 0,
- 0, 0, 49, 0, 0, 8,
- 18, 0, 16, 0, 0, 0,
- 0, 0, 58, 16, 32, 0,
+ 0, 0, 49, 0, 0, 12,
+ 50, 0, 16, 0, 0, 0,
+ 0, 0, 2, 64, 0, 0,
+ 0, 0, 128, 63, 0, 0,
+ 128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 70, 16,
+ 32, 128, 129, 0, 0, 0,
0, 0, 0, 0, 6, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 0, 0, 31, 0,
- 4, 3, 10, 0, 16, 0,
- 0, 0, 0, 0, 62, 0,
- 0, 1, 21, 0, 0, 1,
- 49, 0, 0, 8, 18, 0,
+ 0, 0, 60, 0, 0, 7,
+ 18, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 0,
+ 0, 0, 0, 0, 10, 0,
16, 0, 0, 0, 0, 0,
- 10, 16, 32, 0, 0, 0,
- 0, 0, 6, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 128, 191, 31, 0, 4, 3,
- 10, 0, 16, 0, 0, 0,
- 0, 0, 62, 0, 0, 1,
- 21, 0, 0, 1, 49, 0,
- 0, 8, 18, 0, 16, 0,
- 0, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 128, 63,
- 10, 16, 32, 0, 0, 0,
- 0, 0, 6, 0, 0, 0,
31, 0, 4, 3, 10, 0,
16, 0, 0, 0, 0, 0,
62, 0, 0, 1, 21, 0,
- 0, 1, 49, 0, 0, 8,
- 18, 0, 16, 0, 0, 0,
- 0, 0, 26, 16, 32, 0,
- 0, 0, 0, 0, 6, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 128, 191, 31, 0,
- 4, 3, 10, 0, 16, 0,
- 0, 0, 0, 0, 62, 0,
- 0, 1, 21, 0, 0, 1,
- 49, 0, 0, 8, 18, 0,
- 16, 0, 0, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 128, 63, 26, 16, 32, 0,
- 0, 0, 0, 0, 6, 0,
- 0, 0, 31, 0, 4, 3,
- 10, 0, 16, 0, 0, 0,
- 0, 0, 62, 0, 0, 1,
- 21, 0, 0, 1, 54, 0,
+ 0, 1, 54, 0, 0, 6,
+ 50, 32, 16, 0, 0, 0,
+ 0, 0, 198, 16, 32, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 54, 0, 0, 8,
+ 194, 32, 16, 0, 0, 0,
+ 0, 0, 2, 64, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 63,
+ 0, 0, 128, 63, 54, 0,
+ 0, 6, 242, 32, 16, 0,
+ 1, 0, 0, 0, 70, 30,
+ 32, 0, 0, 0, 0, 0,
+ 2, 0, 0, 0, 54, 0,
+ 0, 6, 242, 32, 16, 0,
+ 2, 0, 0, 0, 70, 30,
+ 32, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 54, 0,
+ 0, 6, 242, 32, 16, 0,
+ 3, 0, 0, 0, 70, 30,
+ 32, 0, 0, 0, 0, 0,
+ 4, 0, 0, 0, 54, 0,
+ 0, 6, 242, 32, 16, 0,
+ 4, 0, 0, 0, 70, 30,
+ 32, 0, 0, 0, 0, 0,
+ 5, 0, 0, 0, 117, 0,
+ 0, 3, 0, 0, 17, 0,
+ 0, 0, 0, 0, 54, 0,
0, 6, 50, 32, 16, 0,
- 0, 0, 0, 0, 198, 16,
+ 0, 0, 0, 0, 134, 16,
32, 0, 0, 0, 0, 0,
1, 0, 0, 0, 54, 0,
0, 8, 194, 32, 16, 0,
@@ -304,7 +289,7 @@ const BYTE g_ellipsoidDepthGS[] =
17, 0, 0, 0, 0, 0,
54, 0, 0, 6, 50, 32,
16, 0, 0, 0, 0, 0,
- 134, 16, 32, 0, 0, 0,
+ 214, 21, 32, 0, 0, 0,
0, 0, 1, 0, 0, 0,
54, 0, 0, 8, 194, 32,
16, 0, 0, 0, 0, 0,
@@ -331,7 +316,7 @@ const BYTE g_ellipsoidDepthGS[] =
0, 0, 17, 0, 0, 0,
0, 0, 54, 0, 0, 6,
50, 32, 16, 0, 0, 0,
- 0, 0, 214, 21, 32, 0,
+ 0, 0, 150, 21, 32, 0,
0, 0, 0, 0, 1, 0,
0, 0, 54, 0, 0, 8,
194, 32, 16, 0, 0, 0,
@@ -356,53 +341,26 @@ const BYTE g_ellipsoidDepthGS[] =
32, 0, 0, 0, 0, 0,
5, 0, 0, 0, 117, 0,
0, 3, 0, 0, 17, 0,
- 0, 0, 0, 0, 54, 0,
- 0, 6, 50, 32, 16, 0,
- 0, 0, 0, 0, 150, 21,
- 32, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 54, 0,
- 0, 8, 194, 32, 16, 0,
- 0, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 63, 0, 0, 128, 63,
- 54, 0, 0, 6, 242, 32,
- 16, 0, 1, 0, 0, 0,
- 70, 30, 32, 0, 0, 0,
+ 0, 0, 0, 0, 62, 0,
+ 0, 1, 83, 84, 65, 84,
+ 148, 0, 0, 0, 34, 0,
+ 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 12, 0,
+ 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0,
0, 0, 2, 0, 0, 0,
- 54, 0, 0, 6, 242, 32,
- 16, 0, 2, 0, 0, 0,
- 70, 30, 32, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 54, 0, 0, 6, 242, 32,
- 16, 0, 3, 0, 0, 0,
- 70, 30, 32, 0, 0, 0,
- 0, 0, 4, 0, 0, 0,
- 54, 0, 0, 6, 242, 32,
- 16, 0, 4, 0, 0, 0,
- 70, 30, 32, 0, 0, 0,
- 0, 0, 5, 0, 0, 0,
- 117, 0, 0, 3, 0, 0,
- 17, 0, 0, 0, 0, 0,
- 62, 0, 0, 1, 83, 84,
- 65, 84, 148, 0, 0, 0,
- 49, 0, 0, 0, 1, 0,
- 0, 0, 0, 0, 0, 0,
- 12, 0, 0, 0, 5, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 6, 0,
- 0, 0, 5, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 4, 0,
+ 0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0,
- 5, 0, 0, 0, 4, 0,
+ 1, 0, 0, 0, 5, 0,
+ 0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
@@ -410,5 +368,5 @@ const BYTE g_ellipsoidDepthGS[] =
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0
+ 0, 0
};
diff --git a/demo/d3d11/shaders/ellipsoidDepthPS.hlsl b/demo/d3d/shaders/ellipsoidDepthPS.hlsl
index b9a8287..ccccc69 100644
--- a/demo/d3d11/shaders/ellipsoidDepthPS.hlsl
+++ b/demo/d3d/shaders/ellipsoidDepthPS.hlsl
@@ -43,35 +43,23 @@ bool solveQuadratic(float a, float b, float c, out float minT, out float maxT)
float sqr(float x) { return x * x; }
-
-float4 ellipsoidDepthPS(FluidGeoOut input
- , out float gl_FragDepth : SV_DEPTH
-) : SV_TARGET
+float ellipsoidDepthPS(FluidGeoOut input , out float depthOut : SV_DEPTH) : SV_TARGET
{
- const float4x4 gl_ProjectionMatrix = gParams.projection;
- const float4x4 gl_ProjectionMatrixInverse = gParams.projection_inverse;
+ const float4x4 projectionMatrix = gParams.projection;
+ const float4x4 projectionMatrixInverse = gParams.inverseProjection;
const float3 invViewport = gParams.invViewport;
-
- float4 gl_FragColor;
- float4 gl_FragCoord;
- float4 gl_TexCoord[6];
-
- gl_FragCoord = input.position;
- [unroll]
- for (int i = 0; i < 4; i++)
- gl_TexCoord[i] = input.texCoord[i];
+ const float4 position = input.position;
// transform from view space to parameter space
//column_major
float4x4 invQuadric;
- invQuadric._m00_m10_m20_m30 = gl_TexCoord[0];
- invQuadric._m01_m11_m21_m31 = gl_TexCoord[1];
- invQuadric._m02_m12_m22_m32 = gl_TexCoord[2];
- invQuadric._m03_m13_m23_m33 = gl_TexCoord[3];
+ invQuadric._m00_m10_m20_m30 = input.invQ0;
+ invQuadric._m01_m11_m21_m31 = input.invQ1;
+ invQuadric._m02_m12_m22_m32 = input.invQ2;
+ invQuadric._m03_m13_m23_m33 = input.invQ3;
- //float4 ndcPos = float4(gl_FragCoord.xy * invViewport.xy * float2(2.0, 2.0) - float2(1.0, 1.0), -1.0, 1.0);
- float4 ndcPos = float4(gl_FragCoord.x*invViewport.x*2.0f-1.0f, (1.0f-gl_FragCoord.y*invViewport.y)*2.0 - 1.0, 0.0f, 1.0);
- float4 viewDir = mul(gl_ProjectionMatrixInverse, ndcPos);
+ float4 ndcPos = float4(position.x*invViewport.x*2.0f-1.0f, (1.0f-position.y*invViewport.y)*2.0 - 1.0, 0.0f, 1.0);
+ float4 viewDir = mul(projectionMatrixInverse, ndcPos);
// ray to parameter space
float4 dir = mul(invQuadric, float4(viewDir.xyz, 0.0));
@@ -85,24 +73,16 @@ float4 ellipsoidDepthPS(FluidGeoOut input
float minT;
float maxT;
- if (solveQuadratic(a, 2.0 * b, c, minT, maxT))
+ if (!solveQuadratic(a, 2.0 * b, c, minT, maxT))
+ {
+ discard;
+ }
{
float3 eyePos = viewDir.xyz*minT;
- float4 ndcPos = mul(gl_ProjectionMatrix, float4(eyePos, 1.0));
+ float4 ndcPos = mul(projectionMatrix, float4(eyePos, 1.0));
ndcPos.z /= ndcPos.w;
- gl_FragColor = float4(eyePos.z, 1.0, 1.0, 1.0);
- gl_FragDepth = ndcPos.z;
-
- return gl_FragColor;
+ depthOut = ndcPos.z;
+ return eyePos.z;
}
-
- // kill pixels outside of ellipsoid
- discard;
-
-
- gl_FragColor = 0.0f;
- gl_FragDepth = 1.0f;
-
- return gl_FragColor;
}
diff --git a/demo/d3d/shaders/ellipsoidDepthPS.hlsl.h b/demo/d3d/shaders/ellipsoidDepthPS.hlsl.h
new file mode 100644
index 0000000..7e007a5
--- /dev/null
+++ b/demo/d3d/shaders/ellipsoidDepthPS.hlsl.h
@@ -0,0 +1,643 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
+//
+//
+// Buffer Definitions:
+//
+// cbuffer constBuf
+// {
+//
+// struct FluidShaderConst
+// {
+//
+// float4x4 modelViewProjection; // Offset: 0
+// float4x4 modelView; // Offset: 64
+// float4x4 projection; // Offset: 128
+// float4x4 inverseModelView; // Offset: 192
+// float4x4 inverseProjection; // Offset: 256
+// float4 invTexScale; // Offset: 320
+// float3 invViewport; // Offset: 336
+// float _pad0; // Offset: 348
+// float blurRadiusWorld; // Offset: 352
+// float blurScale; // Offset: 356
+// float blurFalloff; // Offset: 360
+// int debug; // Offset: 364
+// float3 lightPos; // Offset: 368
+// float _pad1; // Offset: 380
+// float3 lightDir; // Offset: 384
+// float _pad2; // Offset: 396
+// float4x4 lightTransform; // Offset: 400
+// float4 color; // Offset: 464
+// float4 clipPosToEye; // Offset: 480
+// float spotMin; // Offset: 496
+// float spotMax; // Offset: 500
+// float ior; // Offset: 504
+// float _pad3; // Offset: 508
+// float4 shadowTaps[12]; // Offset: 512
+//
+// } gParams; // Offset: 0 Size: 704
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim Slot Elements
+// ------------------------------ ---------- ------- ----------- ---- --------
+// constBuf cbuffer NA NA 0 1
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------- ------
+// SV_POSITION 0 xyzw 0 POS float xy
+// TEXCOORD 0 xyzw 1 NONE float xyzw
+// TEXCOORD 1 xyzw 2 NONE float xyzw
+// TEXCOORD 2 xyzw 3 NONE float xyzw
+// TEXCOORD 3 xyzw 4 NONE float xyzw
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------- ------
+// SV_TARGET 0 x 0 TARGET float x
+// SV_DEPTH 0 N/A oDepth DEPTH float YES
+//
+ps_5_0
+dcl_globalFlags refactoringAllowed
+dcl_constantbuffer cb0[22], immediateIndexed
+dcl_input_ps_siv linear noperspective v0.xy, position
+dcl_input_ps linear v1.xyzw
+dcl_input_ps linear v2.xyzw
+dcl_input_ps linear v3.xyzw
+dcl_input_ps linear v4.xyzw
+dcl_output o0.x
+dcl_output oDepth
+dcl_temps 4
+dp2 r0.x, v0.xxxx, cb0[21].xxxx
+add r0.x, r0.x, l(-1.000000)
+mad r0.y, -v0.y, cb0[21].y, l(1.000000)
+mad r0.y, r0.y, l(2.000000), l(-1.000000)
+mul r0.yzw, r0.yyyy, cb0[17].xxyz
+mad r0.xyz, cb0[16].xyzx, r0.xxxx, r0.yzwy
+add r0.xyz, r0.xyzx, cb0[19].xyzx
+mul r1.xyzw, r0.yyyy, v2.xyzw
+mad r1.xyzw, v1.xyzw, r0.xxxx, r1.xyzw
+mad r1.xyzw, v3.xyzw, r0.zzzz, r1.xyzw
+dp3 r0.w, r1.xyzx, r1.xyzx
+dp3 r1.x, r1.xyzx, v4.xyzx
+mad r1.x, -r1.w, v4.w, r1.x
+dp3 r1.y, v4.xyzx, v4.xyzx
+mad r1.y, -v4.w, v4.w, r1.y
+add r1.z, r1.x, r1.x
+eq r1.w, r0.w, l(0.000000)
+eq r2.x, r1.x, l(0.000000)
+and r1.w, r1.w, r2.x
+mul r2.x, r0.w, r1.y
+mul r2.x, r2.x, l(4.000000)
+mad r2.x, r1.z, r1.z, -r2.x
+lt r2.y, r2.x, l(0.000000)
+not r3.y, r2.y
+lt r1.x, r1.x, l(0.000000)
+movc r1.x, r1.x, l(-1.000000), l(1.000000)
+sqrt r2.x, r2.x
+mad r1.x, r1.x, r2.x, r1.z
+mul r1.x, r1.x, l(-0.500000)
+div r0.w, r1.x, r0.w
+div r1.x, r1.y, r1.x
+lt r1.y, r1.x, r0.w
+movc r3.z, r1.y, r1.x, r0.w
+mov r3.xw, l(0,0,0,-1)
+movc r1.xy, r2.yyyy, r3.xyxx, r3.zwzz
+movc r1.xy, r1.wwww, l(0,-1,0,0), r1.xyxx
+not r0.w, r1.y
+discard_nz r0.w
+mul r0.xyz, r0.xyzx, r1.xxxx
+mul r0.yw, r0.yyyy, cb0[9].zzzw
+mad r0.xy, cb0[8].zwzz, r0.xxxx, r0.ywyy
+mad r0.xy, cb0[10].zwzz, r0.zzzz, r0.xyxx
+add r0.xy, r0.xyxx, cb0[11].zwzz
+div oDepth, r0.x, r0.y
+mov o0.x, r0.z
+ret
+// Approximately 46 instruction slots used
+#endif
+
+const BYTE g_ellipsoidDepthPS[] =
+{
+ 68, 88, 66, 67, 108, 237,
+ 133, 240, 171, 175, 220, 253,
+ 207, 147, 106, 237, 177, 103,
+ 173, 51, 1, 0, 0, 0,
+ 248, 11, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 112, 4, 0, 0, 16, 5,
+ 0, 0, 100, 5, 0, 0,
+ 92, 11, 0, 0, 82, 68,
+ 69, 70, 52, 4, 0, 0,
+ 1, 0, 0, 0, 104, 0,
+ 0, 0, 1, 0, 0, 0,
+ 60, 0, 0, 0, 0, 5,
+ 255, 255, 0, 1, 0, 0,
+ 0, 4, 0, 0, 82, 68,
+ 49, 49, 60, 0, 0, 0,
+ 24, 0, 0, 0, 32, 0,
+ 0, 0, 40, 0, 0, 0,
+ 36, 0, 0, 0, 12, 0,
+ 0, 0, 0, 0, 0, 0,
+ 92, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0,
+ 0, 0, 99, 111, 110, 115,
+ 116, 66, 117, 102, 0, 171,
+ 171, 171, 92, 0, 0, 0,
+ 1, 0, 0, 0, 128, 0,
+ 0, 0, 192, 2, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 168, 0, 0, 0,
+ 0, 0, 0, 0, 192, 2,
+ 0, 0, 2, 0, 0, 0,
+ 220, 3, 0, 0, 0, 0,
+ 0, 0, 255, 255, 255, 255,
+ 0, 0, 0, 0, 255, 255,
+ 255, 255, 0, 0, 0, 0,
+ 103, 80, 97, 114, 97, 109,
+ 115, 0, 70, 108, 117, 105,
+ 100, 83, 104, 97, 100, 101,
+ 114, 67, 111, 110, 115, 116,
+ 0, 109, 111, 100, 101, 108,
+ 86, 105, 101, 119, 80, 114,
+ 111, 106, 101, 99, 116, 105,
+ 111, 110, 0, 102, 108, 111,
+ 97, 116, 52, 120, 52, 0,
+ 171, 171, 3, 0, 3, 0,
+ 4, 0, 4, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 213, 0,
+ 0, 0, 109, 111, 100, 101,
+ 108, 86, 105, 101, 119, 0,
+ 112, 114, 111, 106, 101, 99,
+ 116, 105, 111, 110, 0, 105,
+ 110, 118, 101, 114, 115, 101,
+ 77, 111, 100, 101, 108, 86,
+ 105, 101, 119, 0, 105, 110,
+ 118, 101, 114, 115, 101, 80,
+ 114, 111, 106, 101, 99, 116,
+ 105, 111, 110, 0, 105, 110,
+ 118, 84, 101, 120, 83, 99,
+ 97, 108, 101, 0, 102, 108,
+ 111, 97, 116, 52, 0, 171,
+ 1, 0, 3, 0, 1, 0,
+ 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 72, 1, 0, 0,
+ 105, 110, 118, 86, 105, 101,
+ 119, 112, 111, 114, 116, 0,
+ 102, 108, 111, 97, 116, 51,
+ 0, 171, 1, 0, 3, 0,
+ 1, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 128, 1,
+ 0, 0, 95, 112, 97, 100,
+ 48, 0, 102, 108, 111, 97,
+ 116, 0, 0, 0, 3, 0,
+ 1, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 178, 1,
+ 0, 0, 98, 108, 117, 114,
+ 82, 97, 100, 105, 117, 115,
+ 87, 111, 114, 108, 100, 0,
+ 98, 108, 117, 114, 83, 99,
+ 97, 108, 101, 0, 98, 108,
+ 117, 114, 70, 97, 108, 108,
+ 111, 102, 102, 0, 100, 101,
+ 98, 117, 103, 0, 105, 110,
+ 116, 0, 0, 0, 2, 0,
+ 1, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 8, 2,
+ 0, 0, 108, 105, 103, 104,
+ 116, 80, 111, 115, 0, 95,
+ 112, 97, 100, 49, 0, 108,
+ 105, 103, 104, 116, 68, 105,
+ 114, 0, 95, 112, 97, 100,
+ 50, 0, 108, 105, 103, 104,
+ 116, 84, 114, 97, 110, 115,
+ 102, 111, 114, 109, 0, 99,
+ 111, 108, 111, 114, 0, 99,
+ 108, 105, 112, 80, 111, 115,
+ 84, 111, 69, 121, 101, 0,
+ 115, 112, 111, 116, 77, 105,
+ 110, 0, 115, 112, 111, 116,
+ 77, 97, 120, 0, 105, 111,
+ 114, 0, 95, 112, 97, 100,
+ 51, 0, 115, 104, 97, 100,
+ 111, 119, 84, 97, 112, 115,
+ 0, 171, 171, 171, 1, 0,
+ 3, 0, 1, 0, 4, 0,
+ 12, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 72, 1, 0, 0, 193, 0,
+ 0, 0, 224, 0, 0, 0,
+ 0, 0, 0, 0, 4, 1,
+ 0, 0, 224, 0, 0, 0,
+ 64, 0, 0, 0, 14, 1,
+ 0, 0, 224, 0, 0, 0,
+ 128, 0, 0, 0, 25, 1,
+ 0, 0, 224, 0, 0, 0,
+ 192, 0, 0, 0, 42, 1,
+ 0, 0, 224, 0, 0, 0,
+ 0, 1, 0, 0, 60, 1,
+ 0, 0, 80, 1, 0, 0,
+ 64, 1, 0, 0, 116, 1,
+ 0, 0, 136, 1, 0, 0,
+ 80, 1, 0, 0, 172, 1,
+ 0, 0, 184, 1, 0, 0,
+ 92, 1, 0, 0, 220, 1,
+ 0, 0, 184, 1, 0, 0,
+ 96, 1, 0, 0, 236, 1,
+ 0, 0, 184, 1, 0, 0,
+ 100, 1, 0, 0, 246, 1,
+ 0, 0, 184, 1, 0, 0,
+ 104, 1, 0, 0, 2, 2,
+ 0, 0, 12, 2, 0, 0,
+ 108, 1, 0, 0, 48, 2,
+ 0, 0, 136, 1, 0, 0,
+ 112, 1, 0, 0, 57, 2,
+ 0, 0, 184, 1, 0, 0,
+ 124, 1, 0, 0, 63, 2,
+ 0, 0, 136, 1, 0, 0,
+ 128, 1, 0, 0, 72, 2,
+ 0, 0, 184, 1, 0, 0,
+ 140, 1, 0, 0, 78, 2,
+ 0, 0, 224, 0, 0, 0,
+ 144, 1, 0, 0, 93, 2,
+ 0, 0, 80, 1, 0, 0,
+ 208, 1, 0, 0, 99, 2,
+ 0, 0, 80, 1, 0, 0,
+ 224, 1, 0, 0, 112, 2,
+ 0, 0, 184, 1, 0, 0,
+ 240, 1, 0, 0, 120, 2,
+ 0, 0, 184, 1, 0, 0,
+ 244, 1, 0, 0, 128, 2,
+ 0, 0, 184, 1, 0, 0,
+ 248, 1, 0, 0, 132, 2,
+ 0, 0, 184, 1, 0, 0,
+ 252, 1, 0, 0, 138, 2,
+ 0, 0, 152, 2, 0, 0,
+ 0, 2, 0, 0, 5, 0,
+ 0, 0, 1, 0, 176, 0,
+ 0, 0, 24, 0, 188, 2,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 176, 0, 0, 0, 77, 105,
+ 99, 114, 111, 115, 111, 102,
+ 116, 32, 40, 82, 41, 32,
+ 72, 76, 83, 76, 32, 83,
+ 104, 97, 100, 101, 114, 32,
+ 67, 111, 109, 112, 105, 108,
+ 101, 114, 32, 54, 46, 51,
+ 46, 57, 54, 48, 48, 46,
+ 49, 54, 51, 56, 52, 0,
+ 171, 171, 73, 83, 71, 78,
+ 152, 0, 0, 0, 5, 0,
+ 0, 0, 8, 0, 0, 0,
+ 128, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 3, 0, 0, 0, 0, 0,
+ 0, 0, 15, 3, 0, 0,
+ 140, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 1, 0,
+ 0, 0, 15, 15, 0, 0,
+ 140, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 2, 0,
+ 0, 0, 15, 15, 0, 0,
+ 140, 0, 0, 0, 2, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 3, 0,
+ 0, 0, 15, 15, 0, 0,
+ 140, 0, 0, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 4, 0,
+ 0, 0, 15, 15, 0, 0,
+ 83, 86, 95, 80, 79, 83,
+ 73, 84, 73, 79, 78, 0,
+ 84, 69, 88, 67, 79, 79,
+ 82, 68, 0, 171, 171, 171,
+ 79, 83, 71, 78, 76, 0,
+ 0, 0, 2, 0, 0, 0,
+ 8, 0, 0, 0, 56, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
+ 1, 14, 0, 0, 66, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 255, 255, 255, 255,
+ 1, 14, 0, 0, 83, 86,
+ 95, 84, 65, 82, 71, 69,
+ 84, 0, 83, 86, 95, 68,
+ 69, 80, 84, 72, 0, 171,
+ 83, 72, 69, 88, 240, 5,
+ 0, 0, 80, 0, 0, 0,
+ 124, 1, 0, 0, 106, 8,
+ 0, 1, 89, 0, 0, 4,
+ 70, 142, 32, 0, 0, 0,
+ 0, 0, 22, 0, 0, 0,
+ 100, 32, 0, 4, 50, 16,
+ 16, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 98, 16,
+ 0, 3, 242, 16, 16, 0,
+ 1, 0, 0, 0, 98, 16,
+ 0, 3, 242, 16, 16, 0,
+ 2, 0, 0, 0, 98, 16,
+ 0, 3, 242, 16, 16, 0,
+ 3, 0, 0, 0, 98, 16,
+ 0, 3, 242, 16, 16, 0,
+ 4, 0, 0, 0, 101, 0,
+ 0, 3, 18, 32, 16, 0,
+ 0, 0, 0, 0, 101, 0,
+ 0, 2, 1, 192, 0, 0,
+ 104, 0, 0, 2, 4, 0,
+ 0, 0, 15, 0, 0, 8,
+ 18, 0, 16, 0, 0, 0,
+ 0, 0, 6, 16, 16, 0,
+ 0, 0, 0, 0, 6, 128,
+ 32, 0, 0, 0, 0, 0,
+ 21, 0, 0, 0, 0, 0,
+ 0, 7, 18, 0, 16, 0,
+ 0, 0, 0, 0, 10, 0,
+ 16, 0, 0, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 128, 191, 50, 0, 0, 11,
+ 34, 0, 16, 0, 0, 0,
+ 0, 0, 26, 16, 16, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 26, 128, 32, 0,
+ 0, 0, 0, 0, 21, 0,
+ 0, 0, 1, 64, 0, 0,
+ 0, 0, 128, 63, 50, 0,
+ 0, 9, 34, 0, 16, 0,
+ 0, 0, 0, 0, 26, 0,
+ 16, 0, 0, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 0, 64, 1, 64, 0, 0,
+ 0, 0, 128, 191, 56, 0,
+ 0, 8, 226, 0, 16, 0,
+ 0, 0, 0, 0, 86, 5,
+ 16, 0, 0, 0, 0, 0,
+ 6, 137, 32, 0, 0, 0,
+ 0, 0, 17, 0, 0, 0,
+ 50, 0, 0, 10, 114, 0,
+ 16, 0, 0, 0, 0, 0,
+ 70, 130, 32, 0, 0, 0,
+ 0, 0, 16, 0, 0, 0,
+ 6, 0, 16, 0, 0, 0,
+ 0, 0, 150, 7, 16, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 8, 114, 0, 16, 0,
+ 0, 0, 0, 0, 70, 2,
+ 16, 0, 0, 0, 0, 0,
+ 70, 130, 32, 0, 0, 0,
+ 0, 0, 19, 0, 0, 0,
+ 56, 0, 0, 7, 242, 0,
+ 16, 0, 1, 0, 0, 0,
+ 86, 5, 16, 0, 0, 0,
+ 0, 0, 70, 30, 16, 0,
+ 2, 0, 0, 0, 50, 0,
+ 0, 9, 242, 0, 16, 0,
+ 1, 0, 0, 0, 70, 30,
+ 16, 0, 1, 0, 0, 0,
+ 6, 0, 16, 0, 0, 0,
+ 0, 0, 70, 14, 16, 0,
+ 1, 0, 0, 0, 50, 0,
+ 0, 9, 242, 0, 16, 0,
+ 1, 0, 0, 0, 70, 30,
+ 16, 0, 3, 0, 0, 0,
+ 166, 10, 16, 0, 0, 0,
+ 0, 0, 70, 14, 16, 0,
+ 1, 0, 0, 0, 16, 0,
+ 0, 7, 130, 0, 16, 0,
+ 0, 0, 0, 0, 70, 2,
+ 16, 0, 1, 0, 0, 0,
+ 70, 2, 16, 0, 1, 0,
+ 0, 0, 16, 0, 0, 7,
+ 18, 0, 16, 0, 1, 0,
+ 0, 0, 70, 2, 16, 0,
+ 1, 0, 0, 0, 70, 18,
+ 16, 0, 4, 0, 0, 0,
+ 50, 0, 0, 10, 18, 0,
+ 16, 0, 1, 0, 0, 0,
+ 58, 0, 16, 128, 65, 0,
+ 0, 0, 1, 0, 0, 0,
+ 58, 16, 16, 0, 4, 0,
+ 0, 0, 10, 0, 16, 0,
+ 1, 0, 0, 0, 16, 0,
+ 0, 7, 34, 0, 16, 0,
+ 1, 0, 0, 0, 70, 18,
+ 16, 0, 4, 0, 0, 0,
+ 70, 18, 16, 0, 4, 0,
+ 0, 0, 50, 0, 0, 10,
+ 34, 0, 16, 0, 1, 0,
+ 0, 0, 58, 16, 16, 128,
+ 65, 0, 0, 0, 4, 0,
+ 0, 0, 58, 16, 16, 0,
+ 4, 0, 0, 0, 26, 0,
+ 16, 0, 1, 0, 0, 0,
+ 0, 0, 0, 7, 66, 0,
+ 16, 0, 1, 0, 0, 0,
+ 10, 0, 16, 0, 1, 0,
+ 0, 0, 10, 0, 16, 0,
+ 1, 0, 0, 0, 24, 0,
+ 0, 7, 130, 0, 16, 0,
+ 1, 0, 0, 0, 58, 0,
+ 16, 0, 0, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 0, 0, 24, 0, 0, 7,
+ 18, 0, 16, 0, 2, 0,
+ 0, 0, 10, 0, 16, 0,
+ 1, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 7, 130, 0,
+ 16, 0, 1, 0, 0, 0,
+ 58, 0, 16, 0, 1, 0,
+ 0, 0, 10, 0, 16, 0,
+ 2, 0, 0, 0, 56, 0,
+ 0, 7, 18, 0, 16, 0,
+ 2, 0, 0, 0, 58, 0,
+ 16, 0, 0, 0, 0, 0,
+ 26, 0, 16, 0, 1, 0,
+ 0, 0, 56, 0, 0, 7,
+ 18, 0, 16, 0, 2, 0,
+ 0, 0, 10, 0, 16, 0,
+ 2, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 64,
+ 50, 0, 0, 10, 18, 0,
+ 16, 0, 2, 0, 0, 0,
+ 42, 0, 16, 0, 1, 0,
+ 0, 0, 42, 0, 16, 0,
+ 1, 0, 0, 0, 10, 0,
+ 16, 128, 65, 0, 0, 0,
+ 2, 0, 0, 0, 49, 0,
+ 0, 7, 34, 0, 16, 0,
+ 2, 0, 0, 0, 10, 0,
+ 16, 0, 2, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 0, 0, 59, 0, 0, 5,
+ 34, 0, 16, 0, 3, 0,
+ 0, 0, 26, 0, 16, 0,
+ 2, 0, 0, 0, 49, 0,
+ 0, 7, 18, 0, 16, 0,
+ 1, 0, 0, 0, 10, 0,
+ 16, 0, 1, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 0, 0, 55, 0, 0, 9,
+ 18, 0, 16, 0, 1, 0,
+ 0, 0, 10, 0, 16, 0,
+ 1, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 191,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 75, 0, 0, 5,
+ 18, 0, 16, 0, 2, 0,
+ 0, 0, 10, 0, 16, 0,
+ 2, 0, 0, 0, 50, 0,
+ 0, 9, 18, 0, 16, 0,
+ 1, 0, 0, 0, 10, 0,
+ 16, 0, 1, 0, 0, 0,
+ 10, 0, 16, 0, 2, 0,
+ 0, 0, 42, 0, 16, 0,
+ 1, 0, 0, 0, 56, 0,
+ 0, 7, 18, 0, 16, 0,
+ 1, 0, 0, 0, 10, 0,
+ 16, 0, 1, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 0, 191, 14, 0, 0, 7,
+ 130, 0, 16, 0, 0, 0,
+ 0, 0, 10, 0, 16, 0,
+ 1, 0, 0, 0, 58, 0,
+ 16, 0, 0, 0, 0, 0,
+ 14, 0, 0, 7, 18, 0,
+ 16, 0, 1, 0, 0, 0,
+ 26, 0, 16, 0, 1, 0,
+ 0, 0, 10, 0, 16, 0,
+ 1, 0, 0, 0, 49, 0,
+ 0, 7, 34, 0, 16, 0,
+ 1, 0, 0, 0, 10, 0,
+ 16, 0, 1, 0, 0, 0,
+ 58, 0, 16, 0, 0, 0,
+ 0, 0, 55, 0, 0, 9,
+ 66, 0, 16, 0, 3, 0,
+ 0, 0, 26, 0, 16, 0,
+ 1, 0, 0, 0, 10, 0,
+ 16, 0, 1, 0, 0, 0,
+ 58, 0, 16, 0, 0, 0,
+ 0, 0, 54, 0, 0, 8,
+ 146, 0, 16, 0, 3, 0,
+ 0, 0, 2, 64, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 255, 255, 255, 255, 55, 0,
+ 0, 9, 50, 0, 16, 0,
+ 1, 0, 0, 0, 86, 5,
+ 16, 0, 2, 0, 0, 0,
+ 70, 0, 16, 0, 3, 0,
+ 0, 0, 230, 10, 16, 0,
+ 3, 0, 0, 0, 55, 0,
+ 0, 12, 50, 0, 16, 0,
+ 1, 0, 0, 0, 246, 15,
+ 16, 0, 1, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 0, 255, 255, 255, 255,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 70, 0, 16, 0,
+ 1, 0, 0, 0, 59, 0,
+ 0, 5, 130, 0, 16, 0,
+ 0, 0, 0, 0, 26, 0,
+ 16, 0, 1, 0, 0, 0,
+ 13, 0, 4, 3, 58, 0,
+ 16, 0, 0, 0, 0, 0,
+ 56, 0, 0, 7, 114, 0,
+ 16, 0, 0, 0, 0, 0,
+ 70, 2, 16, 0, 0, 0,
+ 0, 0, 6, 0, 16, 0,
+ 1, 0, 0, 0, 56, 0,
+ 0, 8, 162, 0, 16, 0,
+ 0, 0, 0, 0, 86, 5,
+ 16, 0, 0, 0, 0, 0,
+ 166, 142, 32, 0, 0, 0,
+ 0, 0, 9, 0, 0, 0,
+ 50, 0, 0, 10, 50, 0,
+ 16, 0, 0, 0, 0, 0,
+ 230, 138, 32, 0, 0, 0,
+ 0, 0, 8, 0, 0, 0,
+ 6, 0, 16, 0, 0, 0,
+ 0, 0, 214, 5, 16, 0,
+ 0, 0, 0, 0, 50, 0,
+ 0, 10, 50, 0, 16, 0,
+ 0, 0, 0, 0, 230, 138,
+ 32, 0, 0, 0, 0, 0,
+ 10, 0, 0, 0, 166, 10,
+ 16, 0, 0, 0, 0, 0,
+ 70, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 0, 8,
+ 50, 0, 16, 0, 0, 0,
+ 0, 0, 70, 0, 16, 0,
+ 0, 0, 0, 0, 230, 138,
+ 32, 0, 0, 0, 0, 0,
+ 11, 0, 0, 0, 14, 0,
+ 0, 6, 1, 192, 0, 0,
+ 10, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 0,
+ 0, 0, 0, 0, 54, 0,
+ 0, 5, 18, 32, 16, 0,
+ 0, 0, 0, 0, 42, 0,
+ 16, 0, 0, 0, 0, 0,
+ 62, 0, 0, 1, 83, 84,
+ 65, 84, 148, 0, 0, 0,
+ 46, 0, 0, 0, 4, 0,
+ 0, 0, 0, 0, 0, 0,
+ 7, 0, 0, 0, 35, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0,
+ 0, 0, 4, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0
+};
diff --git a/demo/d3d/shaders/ellipsoidDepthVS.hlsl b/demo/d3d/shaders/ellipsoidDepthVS.hlsl
new file mode 100644
index 0000000..f26317e
--- /dev/null
+++ b/demo/d3d/shaders/ellipsoidDepthVS.hlsl
@@ -0,0 +1,118 @@
+#include "shaderCommon.h"
+
+cbuffer constBuf : register(b0)
+{
+ FluidShaderConst gParams;
+};
+
+// returns 1.0 for x==0.0 (unlike glsl)
+float Sign(float x) { return x < 0.0 ? -1.0 : 1.0; }
+
+bool solveQuadratic(float a, float b, float c, out float minT, out float maxT)
+{
+#if 0
+ // for debugging
+ minT = -0.5;
+ maxT = 0.5;
+ return true;
+#else
+ //minT = 0.0f;
+ //maxT = 0.0f;
+#endif
+
+ if (a == 0.0 && b == 0.0)
+ {
+ minT = maxT = 0.0;
+ return false;
+ }
+
+ float discriminant = b*b - 4.0*a*c;
+
+ if (discriminant < 0.0)
+ {
+ return false;
+ }
+
+ float t = -0.5*(b + Sign(b)*sqrt(discriminant));
+ minT = t / a;
+ maxT = c / t;
+
+ if (minT > maxT)
+ {
+ float tmp = minT;
+ minT = maxT;
+ maxT = tmp;
+ }
+
+ return true;
+}
+
+float DotInvW(float4 a, float4 b) { return a.x*b.x + a.y*b.y + a.z*b.z - a.w*b.w; }
+
+FluidVertexOut ellipsoidDepthVS(FluidVertexIn input, uint instance : SV_VertexID)
+{
+ const float4 q1 = input.q1;
+ const float4 q2 = input.q2;
+ const float4 q3 = input.q3;
+
+ const float4x4 modelViewProjectionMatrix = gParams.modelViewProjection;
+ const float4x4 modelViewMatrixInverse = gParams.inverseModelView;
+
+ float3 worldPos = input.position.xyz;
+
+ // construct quadric matrix
+ float4x4 q;
+ q._m00_m10_m20_m30 = float4(q1.xyz*q1.w, 0.0);
+ q._m01_m11_m21_m31 = float4(q2.xyz*q2.w, 0.0);
+ q._m02_m12_m22_m32 = float4(q3.xyz*q3.w, 0.0);
+ q._m03_m13_m23_m33 = float4(worldPos, 1.0);
+
+ // transforms a normal to parameter space (inverse transpose of (q*modelview)^-T)
+ float4x4 invClip = mul(modelViewProjectionMatrix, q);
+
+ // solve for the right hand bounds in homogenous clip space
+ float a1 = DotInvW(invClip[3], invClip[3]);
+ float b1 = -2.0f*DotInvW(invClip[0], invClip[3]);
+ float c1 = DotInvW(invClip[0], invClip[0]);
+
+ float xmin;
+ float xmax;
+ solveQuadratic(a1, b1, c1, xmin, xmax);
+
+ // solve for the right hand bounds in homogenous clip space
+ float a2 = DotInvW(invClip[3], invClip[3]);
+ float b2 = -2.0f*DotInvW(invClip[1], invClip[3]);
+ float c2 = DotInvW(invClip[1], invClip[1]);
+
+ float ymin;
+ float ymax;
+ solveQuadratic(a2, b2, c2, ymin, ymax);
+
+ FluidVertexOut output;
+ output.position = float4(worldPos.xyz, 1.0);
+ output.bounds = float4(xmin, xmax, ymin, ymax);
+
+ // construct inverse quadric matrix (used for ray-casting in parameter space)
+ float4x4 invq;
+ invq._m00_m10_m20_m30 = float4(q1.xyz / q1.w, 0.0);
+ invq._m01_m11_m21_m31 = float4(q2.xyz / q2.w, 0.0);
+ invq._m02_m12_m22_m32 = float4(q3.xyz / q3.w, 0.0);
+ invq._m03_m13_m23_m33 = float4(0.0, 0.0, 0.0, 1.0);
+
+ invq = transpose(invq);
+ invq._m03_m13_m23_m33 = -(mul(invq, output.position));
+
+ // transform a point from view space to parameter space
+ invq = mul(invq, modelViewMatrixInverse);
+
+ // pass down
+ output.invQ0 = invq._m00_m10_m20_m30;
+ output.invQ1 = invq._m01_m11_m21_m31;
+ output.invQ2 = invq._m02_m12_m22_m32;
+ output.invQ3 = invq._m03_m13_m23_m33;
+
+ // compute ndc pos for frustrum culling in GS
+ float4 projPos = mul(modelViewProjectionMatrix, float4(worldPos.xyz, 1.0));
+ output.ndcPos = projPos / projPos.w;
+ return output;
+}
diff --git a/demo/d3d11/shaders/ellipsoidDepthVS.hlsl.h b/demo/d3d/shaders/ellipsoidDepthVS.hlsl.h
index d1dd741..719d17d 100644
--- a/demo/d3d11/shaders/ellipsoidDepthVS.hlsl.h
+++ b/demo/d3d/shaders/ellipsoidDepthVS.hlsl.h
@@ -11,11 +11,11 @@
// struct FluidShaderConst
// {
//
-// float4x4 modelviewprojection; // Offset: 0
-// float4x4 modelview; // Offset: 64
+// float4x4 modelViewProjection; // Offset: 0
+// float4x4 modelView; // Offset: 64
// float4x4 projection; // Offset: 128
-// float4x4 modelview_inverse; // Offset: 192
-// float4x4 projection_inverse; // Offset: 256
+// float4x4 inverseModelView; // Offset: 192
+// float4x4 inverseProjection; // Offset: 256
// float4 invTexScale; // Offset: 320
// float3 invViewport; // Offset: 336
// float _pad0; // Offset: 348
@@ -169,29 +169,28 @@ mul r0.xyzw, v0.yyyy, cb0[1].xyzw
mad r0.xyzw, cb0[0].xyzw, v0.xxxx, r0.xyzw
mad r0.xyzw, cb0[2].xyzw, v0.zzzz, r0.xyzw
add r0.xyzw, r0.xyzw, cb0[3].xyzw
-div o6.xyz, r0.xyzx, r0.wwww
-mov o6.w, r0.w
+div o6.xyzw, r0.xyzw, r0.wwww
ret
-// Approximately 85 instruction slots used
+// Approximately 84 instruction slots used
#endif
const BYTE g_ellipsoidDepthVS[] =
{
- 68, 88, 66, 67, 1, 86,
- 214, 204, 57, 184, 18, 6,
- 20, 42, 129, 16, 226, 241,
- 71, 198, 1, 0, 0, 0,
- 208, 17, 0, 0, 5, 0,
+ 68, 88, 66, 67, 251, 213,
+ 215, 144, 39, 19, 119, 132,
+ 9, 110, 41, 184, 9, 243,
+ 116, 11, 1, 0, 0, 0,
+ 184, 17, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
- 116, 4, 0, 0, 24, 5,
- 0, 0, 228, 5, 0, 0,
- 52, 17, 0, 0, 82, 68,
- 69, 70, 56, 4, 0, 0,
+ 112, 4, 0, 0, 20, 5,
+ 0, 0, 224, 5, 0, 0,
+ 28, 17, 0, 0, 82, 68,
+ 69, 70, 52, 4, 0, 0,
1, 0, 0, 0, 104, 0,
0, 0, 1, 0, 0, 0,
60, 0, 0, 0, 0, 5,
254, 255, 0, 1, 0, 0,
- 4, 4, 0, 0, 82, 68,
+ 0, 4, 0, 0, 82, 68,
49, 49, 60, 0, 0, 0,
24, 0, 0, 0, 32, 0,
0, 0, 40, 0, 0, 0,
@@ -211,7 +210,7 @@ const BYTE g_ellipsoidDepthVS[] =
0, 0, 168, 0, 0, 0,
0, 0, 0, 0, 192, 2,
0, 0, 2, 0, 0, 0,
- 224, 3, 0, 0, 0, 0,
+ 220, 3, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
@@ -220,7 +219,7 @@ const BYTE g_ellipsoidDepthVS[] =
100, 83, 104, 97, 100, 101,
114, 67, 111, 110, 115, 116,
0, 109, 111, 100, 101, 108,
- 118, 105, 101, 119, 112, 114,
+ 86, 105, 101, 119, 80, 114,
111, 106, 101, 99, 116, 105,
111, 110, 0, 102, 108, 111,
97, 116, 52, 120, 52, 0,
@@ -231,312 +230,276 @@ const BYTE g_ellipsoidDepthVS[] =
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 213, 0,
0, 0, 109, 111, 100, 101,
- 108, 118, 105, 101, 119, 0,
+ 108, 86, 105, 101, 119, 0,
112, 114, 111, 106, 101, 99,
- 116, 105, 111, 110, 0, 109,
- 111, 100, 101, 108, 118, 105,
- 101, 119, 95, 105, 110, 118,
- 101, 114, 115, 101, 0, 112,
+ 116, 105, 111, 110, 0, 105,
+ 110, 118, 101, 114, 115, 101,
+ 77, 111, 100, 101, 108, 86,
+ 105, 101, 119, 0, 105, 110,
+ 118, 101, 114, 115, 101, 80,
114, 111, 106, 101, 99, 116,
- 105, 111, 110, 95, 105, 110,
- 118, 101, 114, 115, 101, 0,
- 105, 110, 118, 84, 101, 120,
- 83, 99, 97, 108, 101, 0,
- 102, 108, 111, 97, 116, 52,
- 0, 171, 171, 171, 1, 0,
- 3, 0, 1, 0, 4, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 74, 1, 0, 0, 105, 110,
- 118, 86, 105, 101, 119, 112,
- 111, 114, 116, 0, 102, 108,
- 111, 97, 116, 51, 0, 171,
+ 105, 111, 110, 0, 105, 110,
+ 118, 84, 101, 120, 83, 99,
+ 97, 108, 101, 0, 102, 108,
+ 111, 97, 116, 52, 0, 171,
1, 0, 3, 0, 1, 0,
- 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 132, 1, 0, 0,
- 95, 112, 97, 100, 48, 0,
- 102, 108, 111, 97, 116, 0,
- 0, 0, 3, 0, 1, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 182, 1, 0, 0,
- 98, 108, 117, 114, 82, 97,
- 100, 105, 117, 115, 87, 111,
- 114, 108, 100, 0, 98, 108,
- 117, 114, 83, 99, 97, 108,
- 101, 0, 98, 108, 117, 114,
- 70, 97, 108, 108, 111, 102,
- 102, 0, 100, 101, 98, 117,
- 103, 0, 105, 110, 116, 0,
- 0, 0, 2, 0, 1, 0,
- 1, 0, 0, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
+ 0, 0, 72, 1, 0, 0,
+ 105, 110, 118, 86, 105, 101,
+ 119, 112, 111, 114, 116, 0,
+ 102, 108, 111, 97, 116, 51,
+ 0, 171, 1, 0, 3, 0,
+ 1, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 128, 1,
+ 0, 0, 95, 112, 97, 100,
+ 48, 0, 102, 108, 111, 97,
+ 116, 0, 0, 0, 3, 0,
+ 1, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 178, 1,
+ 0, 0, 98, 108, 117, 114,
+ 82, 97, 100, 105, 117, 115,
+ 87, 111, 114, 108, 100, 0,
+ 98, 108, 117, 114, 83, 99,
+ 97, 108, 101, 0, 98, 108,
+ 117, 114, 70, 97, 108, 108,
+ 111, 102, 102, 0, 100, 101,
+ 98, 117, 103, 0, 105, 110,
+ 116, 0, 0, 0, 2, 0,
+ 1, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 8, 2,
+ 0, 0, 108, 105, 103, 104,
+ 116, 80, 111, 115, 0, 95,
+ 112, 97, 100, 49, 0, 108,
+ 105, 103, 104, 116, 68, 105,
+ 114, 0, 95, 112, 97, 100,
+ 50, 0, 108, 105, 103, 104,
+ 116, 84, 114, 97, 110, 115,
+ 102, 111, 114, 109, 0, 99,
+ 111, 108, 111, 114, 0, 99,
+ 108, 105, 112, 80, 111, 115,
+ 84, 111, 69, 121, 101, 0,
+ 115, 112, 111, 116, 77, 105,
+ 110, 0, 115, 112, 111, 116,
+ 77, 97, 120, 0, 105, 111,
+ 114, 0, 95, 112, 97, 100,
+ 51, 0, 115, 104, 97, 100,
+ 111, 119, 84, 97, 112, 115,
+ 0, 171, 171, 171, 1, 0,
+ 3, 0, 1, 0, 4, 0,
+ 12, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 72, 1, 0, 0, 193, 0,
+ 0, 0, 224, 0, 0, 0,
+ 0, 0, 0, 0, 4, 1,
+ 0, 0, 224, 0, 0, 0,
+ 64, 0, 0, 0, 14, 1,
+ 0, 0, 224, 0, 0, 0,
+ 128, 0, 0, 0, 25, 1,
+ 0, 0, 224, 0, 0, 0,
+ 192, 0, 0, 0, 42, 1,
+ 0, 0, 224, 0, 0, 0,
+ 0, 1, 0, 0, 60, 1,
+ 0, 0, 80, 1, 0, 0,
+ 64, 1, 0, 0, 116, 1,
+ 0, 0, 136, 1, 0, 0,
+ 80, 1, 0, 0, 172, 1,
+ 0, 0, 184, 1, 0, 0,
+ 92, 1, 0, 0, 220, 1,
+ 0, 0, 184, 1, 0, 0,
+ 96, 1, 0, 0, 236, 1,
+ 0, 0, 184, 1, 0, 0,
+ 100, 1, 0, 0, 246, 1,
+ 0, 0, 184, 1, 0, 0,
+ 104, 1, 0, 0, 2, 2,
0, 0, 12, 2, 0, 0,
- 108, 105, 103, 104, 116, 80,
- 111, 115, 0, 95, 112, 97,
- 100, 49, 0, 108, 105, 103,
- 104, 116, 68, 105, 114, 0,
- 95, 112, 97, 100, 50, 0,
- 108, 105, 103, 104, 116, 84,
- 114, 97, 110, 115, 102, 111,
- 114, 109, 0, 99, 111, 108,
- 111, 114, 0, 99, 108, 105,
- 112, 80, 111, 115, 84, 111,
- 69, 121, 101, 0, 115, 112,
- 111, 116, 77, 105, 110, 0,
- 115, 112, 111, 116, 77, 97,
- 120, 0, 105, 111, 114, 0,
- 95, 112, 97, 100, 51, 0,
- 115, 104, 97, 100, 111, 119,
- 84, 97, 112, 115, 0, 171,
- 171, 171, 1, 0, 3, 0,
- 1, 0, 4, 0, 12, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 74, 1,
- 0, 0, 193, 0, 0, 0,
- 224, 0, 0, 0, 0, 0,
- 0, 0, 4, 1, 0, 0,
- 224, 0, 0, 0, 64, 0,
- 0, 0, 14, 1, 0, 0,
- 224, 0, 0, 0, 128, 0,
- 0, 0, 25, 1, 0, 0,
- 224, 0, 0, 0, 192, 0,
- 0, 0, 43, 1, 0, 0,
- 224, 0, 0, 0, 0, 1,
- 0, 0, 62, 1, 0, 0,
- 84, 1, 0, 0, 64, 1,
- 0, 0, 120, 1, 0, 0,
- 140, 1, 0, 0, 80, 1,
- 0, 0, 176, 1, 0, 0,
- 188, 1, 0, 0, 92, 1,
- 0, 0, 224, 1, 0, 0,
- 188, 1, 0, 0, 96, 1,
- 0, 0, 240, 1, 0, 0,
- 188, 1, 0, 0, 100, 1,
- 0, 0, 250, 1, 0, 0,
- 188, 1, 0, 0, 104, 1,
- 0, 0, 6, 2, 0, 0,
- 16, 2, 0, 0, 108, 1,
- 0, 0, 52, 2, 0, 0,
- 140, 1, 0, 0, 112, 1,
- 0, 0, 61, 2, 0, 0,
- 188, 1, 0, 0, 124, 1,
- 0, 0, 67, 2, 0, 0,
- 140, 1, 0, 0, 128, 1,
- 0, 0, 76, 2, 0, 0,
- 188, 1, 0, 0, 140, 1,
- 0, 0, 82, 2, 0, 0,
- 224, 0, 0, 0, 144, 1,
- 0, 0, 97, 2, 0, 0,
- 84, 1, 0, 0, 208, 1,
- 0, 0, 103, 2, 0, 0,
- 84, 1, 0, 0, 224, 1,
- 0, 0, 116, 2, 0, 0,
- 188, 1, 0, 0, 240, 1,
- 0, 0, 124, 2, 0, 0,
- 188, 1, 0, 0, 244, 1,
- 0, 0, 132, 2, 0, 0,
- 188, 1, 0, 0, 248, 1,
- 0, 0, 136, 2, 0, 0,
- 188, 1, 0, 0, 252, 1,
- 0, 0, 142, 2, 0, 0,
- 156, 2, 0, 0, 0, 2,
- 0, 0, 5, 0, 0, 0,
- 1, 0, 176, 0, 0, 0,
- 24, 0, 192, 2, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 176, 0,
- 0, 0, 77, 105, 99, 114,
- 111, 115, 111, 102, 116, 32,
- 40, 82, 41, 32, 72, 76,
- 83, 76, 32, 83, 104, 97,
- 100, 101, 114, 32, 67, 111,
- 109, 112, 105, 108, 101, 114,
- 32, 54, 46, 51, 46, 57,
- 54, 48, 48, 46, 49, 54,
- 51, 56, 52, 0, 171, 171,
- 73, 83, 71, 78, 156, 0,
- 0, 0, 5, 0, 0, 0,
- 8, 0, 0, 0, 128, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 0, 0, 0, 0,
- 15, 7, 0, 0, 137, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 1, 0, 0, 0,
- 15, 15, 0, 0, 139, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 2, 0, 0, 0,
- 15, 15, 0, 0, 141, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 3, 0, 0, 0,
- 15, 15, 0, 0, 143, 0,
- 0, 0, 0, 0, 0, 0,
- 6, 0, 0, 0, 1, 0,
- 0, 0, 4, 0, 0, 0,
- 1, 0, 0, 0, 80, 79,
- 83, 73, 84, 73, 79, 78,
- 0, 85, 0, 86, 0, 87,
- 0, 83, 86, 95, 86, 101,
- 114, 116, 101, 120, 73, 68,
- 0, 171, 79, 83, 71, 78,
- 196, 0, 0, 0, 7, 0,
+ 108, 1, 0, 0, 48, 2,
+ 0, 0, 136, 1, 0, 0,
+ 112, 1, 0, 0, 57, 2,
+ 0, 0, 184, 1, 0, 0,
+ 124, 1, 0, 0, 63, 2,
+ 0, 0, 136, 1, 0, 0,
+ 128, 1, 0, 0, 72, 2,
+ 0, 0, 184, 1, 0, 0,
+ 140, 1, 0, 0, 78, 2,
+ 0, 0, 224, 0, 0, 0,
+ 144, 1, 0, 0, 93, 2,
+ 0, 0, 80, 1, 0, 0,
+ 208, 1, 0, 0, 99, 2,
+ 0, 0, 80, 1, 0, 0,
+ 224, 1, 0, 0, 112, 2,
+ 0, 0, 184, 1, 0, 0,
+ 240, 1, 0, 0, 120, 2,
+ 0, 0, 184, 1, 0, 0,
+ 244, 1, 0, 0, 128, 2,
+ 0, 0, 184, 1, 0, 0,
+ 248, 1, 0, 0, 132, 2,
+ 0, 0, 184, 1, 0, 0,
+ 252, 1, 0, 0, 138, 2,
+ 0, 0, 152, 2, 0, 0,
+ 0, 2, 0, 0, 5, 0,
+ 0, 0, 1, 0, 176, 0,
+ 0, 0, 24, 0, 188, 2,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 176, 0, 0, 0, 77, 105,
+ 99, 114, 111, 115, 111, 102,
+ 116, 32, 40, 82, 41, 32,
+ 72, 76, 83, 76, 32, 83,
+ 104, 97, 100, 101, 114, 32,
+ 67, 111, 109, 112, 105, 108,
+ 101, 114, 32, 54, 46, 51,
+ 46, 57, 54, 48, 48, 46,
+ 49, 54, 51, 56, 52, 0,
+ 171, 171, 73, 83, 71, 78,
+ 156, 0, 0, 0, 5, 0,
0, 0, 8, 0, 0, 0,
- 176, 0, 0, 0, 0, 0,
+ 128, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 0, 0,
- 0, 0, 15, 0, 0, 0,
- 185, 0, 0, 0, 0, 0,
+ 0, 0, 15, 7, 0, 0,
+ 137, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 1, 0,
- 0, 0, 15, 0, 0, 0,
- 185, 0, 0, 0, 1, 0,
+ 0, 0, 15, 15, 0, 0,
+ 139, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 2, 0,
- 0, 0, 15, 0, 0, 0,
- 185, 0, 0, 0, 2, 0,
+ 0, 0, 15, 15, 0, 0,
+ 141, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 3, 0,
- 0, 0, 15, 0, 0, 0,
- 185, 0, 0, 0, 3, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 4, 0,
- 0, 0, 15, 0, 0, 0,
- 185, 0, 0, 0, 4, 0,
+ 0, 0, 15, 15, 0, 0,
+ 143, 0, 0, 0, 0, 0,
+ 0, 0, 6, 0, 0, 0,
+ 1, 0, 0, 0, 4, 0,
+ 0, 0, 1, 0, 0, 0,
+ 80, 79, 83, 73, 84, 73,
+ 79, 78, 0, 85, 0, 86,
+ 0, 87, 0, 83, 86, 95,
+ 86, 101, 114, 116, 101, 120,
+ 73, 68, 0, 171, 79, 83,
+ 71, 78, 196, 0, 0, 0,
+ 7, 0, 0, 0, 8, 0,
+ 0, 0, 176, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 5, 0,
- 0, 0, 15, 0, 0, 0,
- 185, 0, 0, 0, 5, 0,
+ 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 15, 0,
+ 0, 0, 185, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 6, 0,
- 0, 0, 15, 0, 0, 0,
- 80, 79, 83, 73, 84, 73,
- 79, 78, 0, 84, 69, 88,
- 67, 79, 79, 82, 68, 0,
- 171, 171, 83, 72, 69, 88,
- 72, 11, 0, 0, 80, 0,
- 1, 0, 210, 2, 0, 0,
- 106, 8, 0, 1, 89, 0,
- 0, 4, 70, 142, 32, 0,
- 0, 0, 0, 0, 16, 0,
- 0, 0, 95, 0, 0, 3,
- 114, 16, 16, 0, 0, 0,
- 0, 0, 95, 0, 0, 3,
- 242, 16, 16, 0, 1, 0,
- 0, 0, 95, 0, 0, 3,
- 242, 16, 16, 0, 2, 0,
- 0, 0, 95, 0, 0, 3,
- 242, 16, 16, 0, 3, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 0, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 1, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 2, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 3, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 4, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 5, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 6, 0,
- 0, 0, 104, 0, 0, 2,
- 4, 0, 0, 0, 54, 0,
- 0, 5, 114, 32, 16, 0,
- 0, 0, 0, 0, 70, 18,
- 16, 0, 0, 0, 0, 0,
- 54, 0, 0, 5, 130, 32,
+ 0, 0, 3, 0, 0, 0,
+ 1, 0, 0, 0, 15, 0,
+ 0, 0, 185, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 2, 0, 0, 0, 15, 0,
+ 0, 0, 185, 0, 0, 0,
+ 2, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 3, 0, 0, 0, 15, 0,
+ 0, 0, 185, 0, 0, 0,
+ 3, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 4, 0, 0, 0, 15, 0,
+ 0, 0, 185, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 5, 0, 0, 0, 15, 0,
+ 0, 0, 185, 0, 0, 0,
+ 5, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 6, 0, 0, 0, 15, 0,
+ 0, 0, 80, 79, 83, 73,
+ 84, 73, 79, 78, 0, 84,
+ 69, 88, 67, 79, 79, 82,
+ 68, 0, 171, 171, 83, 72,
+ 69, 88, 52, 11, 0, 0,
+ 80, 0, 1, 0, 205, 2,
+ 0, 0, 106, 8, 0, 1,
+ 89, 0, 0, 4, 70, 142,
+ 32, 0, 0, 0, 0, 0,
+ 16, 0, 0, 0, 95, 0,
+ 0, 3, 114, 16, 16, 0,
+ 0, 0, 0, 0, 95, 0,
+ 0, 3, 242, 16, 16, 0,
+ 1, 0, 0, 0, 95, 0,
+ 0, 3, 242, 16, 16, 0,
+ 2, 0, 0, 0, 95, 0,
+ 0, 3, 242, 16, 16, 0,
+ 3, 0, 0, 0, 101, 0,
+ 0, 3, 242, 32, 16, 0,
+ 0, 0, 0, 0, 101, 0,
+ 0, 3, 242, 32, 16, 0,
+ 1, 0, 0, 0, 101, 0,
+ 0, 3, 242, 32, 16, 0,
+ 2, 0, 0, 0, 101, 0,
+ 0, 3, 242, 32, 16, 0,
+ 3, 0, 0, 0, 101, 0,
+ 0, 3, 242, 32, 16, 0,
+ 4, 0, 0, 0, 101, 0,
+ 0, 3, 242, 32, 16, 0,
+ 5, 0, 0, 0, 101, 0,
+ 0, 3, 242, 32, 16, 0,
+ 6, 0, 0, 0, 104, 0,
+ 0, 2, 4, 0, 0, 0,
+ 54, 0, 0, 5, 114, 32,
16, 0, 0, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 128, 63, 56, 0, 0, 7,
- 114, 0, 16, 0, 0, 0,
- 0, 0, 246, 31, 16, 0,
- 2, 0, 0, 0, 70, 18,
+ 70, 18, 16, 0, 0, 0,
+ 0, 0, 54, 0, 0, 5,
+ 130, 32, 16, 0, 0, 0,
+ 0, 0, 1, 64, 0, 0,
+ 0, 0, 128, 63, 56, 0,
+ 0, 7, 114, 0, 16, 0,
+ 0, 0, 0, 0, 246, 31,
16, 0, 2, 0, 0, 0,
- 56, 0, 0, 8, 242, 0,
- 16, 0, 1, 0, 0, 0,
- 86, 5, 16, 0, 0, 0,
- 0, 0, 54, 132, 32, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 50, 0, 0, 10,
+ 70, 18, 16, 0, 2, 0,
+ 0, 0, 56, 0, 0, 8,
242, 0, 16, 0, 1, 0,
- 0, 0, 54, 132, 32, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 6, 0, 16, 0,
- 0, 0, 0, 0, 70, 14,
- 16, 0, 1, 0, 0, 0,
- 50, 0, 0, 10, 242, 0,
- 16, 0, 0, 0, 0, 0,
- 54, 132, 32, 0, 0, 0,
- 0, 0, 2, 0, 0, 0,
- 166, 10, 16, 0, 0, 0,
- 0, 0, 70, 14, 16, 0,
- 1, 0, 0, 0, 56, 0,
- 0, 7, 18, 0, 16, 0,
- 1, 0, 0, 0, 58, 0,
+ 0, 0, 86, 5, 16, 0,
+ 0, 0, 0, 0, 54, 132,
+ 32, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 50, 0,
+ 0, 10, 242, 0, 16, 0,
+ 1, 0, 0, 0, 54, 132,
+ 32, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6, 0,
16, 0, 0, 0, 0, 0,
- 58, 0, 16, 0, 0, 0,
- 0, 0, 56, 0, 0, 7,
+ 70, 14, 16, 0, 1, 0,
+ 0, 0, 50, 0, 0, 10,
242, 0, 16, 0, 0, 0,
- 0, 0, 6, 2, 16, 0,
+ 0, 0, 54, 132, 32, 0,
+ 0, 0, 0, 0, 2, 0,
+ 0, 0, 166, 10, 16, 0,
0, 0, 0, 0, 70, 14,
- 16, 0, 0, 0, 0, 0,
- 56, 0, 0, 7, 226, 0,
16, 0, 1, 0, 0, 0,
- 246, 31, 16, 0, 1, 0,
- 0, 0, 6, 25, 16, 0,
- 1, 0, 0, 0, 56, 0,
- 0, 8, 242, 0, 16, 0,
- 2, 0, 0, 0, 166, 10,
+ 56, 0, 0, 7, 18, 0,
16, 0, 1, 0, 0, 0,
- 54, 132, 32, 0, 0, 0,
- 0, 0, 1, 0, 0, 0,
- 50, 0, 0, 10, 242, 0,
- 16, 0, 2, 0, 0, 0,
- 54, 132, 32, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 86, 5, 16, 0, 1, 0,
- 0, 0, 70, 14, 16, 0,
- 2, 0, 0, 0, 50, 0,
- 0, 10, 242, 0, 16, 0,
- 2, 0, 0, 0, 54, 132,
- 32, 0, 0, 0, 0, 0,
- 2, 0, 0, 0, 246, 15,
- 16, 0, 1, 0, 0, 0,
- 70, 14, 16, 0, 2, 0,
- 0, 0, 50, 0, 0, 9,
- 18, 0, 16, 0, 1, 0,
+ 58, 0, 16, 0, 0, 0,
0, 0, 58, 0, 16, 0,
- 2, 0, 0, 0, 58, 0,
- 16, 0, 2, 0, 0, 0,
- 10, 0, 16, 0, 1, 0,
- 0, 0, 50, 0, 0, 9,
- 242, 0, 16, 0, 0, 0,
- 0, 0, 70, 14, 16, 0,
- 2, 0, 0, 0, 6, 2,
- 16, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 56, 0,
+ 0, 7, 242, 0, 16, 0,
+ 0, 0, 0, 0, 6, 2,
+ 16, 0, 0, 0, 0, 0,
70, 14, 16, 0, 0, 0,
0, 0, 56, 0, 0, 7,
226, 0, 16, 0, 1, 0,
0, 0, 246, 31, 16, 0,
- 3, 0, 0, 0, 6, 25,
- 16, 0, 3, 0, 0, 0,
+ 1, 0, 0, 0, 6, 25,
+ 16, 0, 1, 0, 0, 0,
56, 0, 0, 8, 242, 0,
16, 0, 2, 0, 0, 0,
166, 10, 16, 0, 1, 0,
@@ -568,351 +531,383 @@ const BYTE g_ellipsoidDepthVS[] =
6, 2, 16, 0, 2, 0,
0, 0, 70, 14, 16, 0,
0, 0, 0, 0, 56, 0,
- 0, 8, 242, 0, 16, 0,
- 2, 0, 0, 0, 86, 21,
- 16, 0, 0, 0, 0, 0,
- 54, 132, 32, 0, 0, 0,
- 0, 0, 1, 0, 0, 0,
- 50, 0, 0, 10, 242, 0,
- 16, 0, 2, 0, 0, 0,
- 54, 132, 32, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 6, 16, 16, 0, 0, 0,
- 0, 0, 70, 14, 16, 0,
- 2, 0, 0, 0, 50, 0,
+ 0, 7, 226, 0, 16, 0,
+ 1, 0, 0, 0, 246, 31,
+ 16, 0, 3, 0, 0, 0,
+ 6, 25, 16, 0, 3, 0,
+ 0, 0, 56, 0, 0, 8,
+ 242, 0, 16, 0, 2, 0,
+ 0, 0, 166, 10, 16, 0,
+ 1, 0, 0, 0, 54, 132,
+ 32, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 50, 0,
0, 10, 242, 0, 16, 0,
2, 0, 0, 0, 54, 132,
32, 0, 0, 0, 0, 0,
- 2, 0, 0, 0, 166, 26,
- 16, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 86, 5,
+ 16, 0, 1, 0, 0, 0,
70, 14, 16, 0, 2, 0,
- 0, 0, 0, 0, 0, 8,
+ 0, 0, 50, 0, 0, 10,
242, 0, 16, 0, 2, 0,
- 0, 0, 70, 14, 16, 0,
- 2, 0, 0, 0, 54, 132,
- 32, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 50, 0,
- 0, 10, 18, 0, 16, 0,
- 1, 0, 0, 0, 58, 0,
- 16, 128, 65, 0, 0, 0,
- 2, 0, 0, 0, 58, 0,
+ 0, 0, 54, 132, 32, 0,
+ 0, 0, 0, 0, 2, 0,
+ 0, 0, 246, 15, 16, 0,
+ 1, 0, 0, 0, 70, 14,
16, 0, 2, 0, 0, 0,
- 10, 0, 16, 0, 1, 0,
- 0, 0, 50, 0, 0, 10,
- 242, 0, 16, 0, 0, 0,
- 0, 0, 70, 14, 16, 128,
- 65, 0, 0, 0, 2, 0,
+ 50, 0, 0, 9, 18, 0,
+ 16, 0, 1, 0, 0, 0,
+ 58, 0, 16, 0, 2, 0,
+ 0, 0, 58, 0, 16, 0,
+ 2, 0, 0, 0, 10, 0,
+ 16, 0, 1, 0, 0, 0,
+ 50, 0, 0, 9, 242, 0,
+ 16, 0, 0, 0, 0, 0,
+ 70, 14, 16, 0, 2, 0,
0, 0, 6, 2, 16, 0,
2, 0, 0, 0, 70, 14,
16, 0, 0, 0, 0, 0,
- 56, 0, 0, 10, 226, 0,
- 16, 0, 1, 0, 0, 0,
- 86, 12, 16, 0, 0, 0,
- 0, 0, 2, 64, 0, 0,
+ 56, 0, 0, 8, 242, 0,
+ 16, 0, 2, 0, 0, 0,
+ 86, 21, 16, 0, 0, 0,
+ 0, 0, 54, 132, 32, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 50, 0, 0, 10,
+ 242, 0, 16, 0, 2, 0,
+ 0, 0, 54, 132, 32, 0,
0, 0, 0, 0, 0, 0,
- 0, 192, 0, 0, 128, 64,
- 0, 0, 0, 192, 56, 0,
- 0, 7, 50, 0, 16, 0,
- 2, 0, 0, 0, 214, 5,
+ 0, 0, 6, 16, 16, 0,
+ 0, 0, 0, 0, 70, 14,
+ 16, 0, 2, 0, 0, 0,
+ 50, 0, 0, 10, 242, 0,
+ 16, 0, 2, 0, 0, 0,
+ 54, 132, 32, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0,
+ 166, 26, 16, 0, 0, 0,
+ 0, 0, 70, 14, 16, 0,
+ 2, 0, 0, 0, 0, 0,
+ 0, 8, 242, 0, 16, 0,
+ 2, 0, 0, 0, 70, 14,
+ 16, 0, 2, 0, 0, 0,
+ 54, 132, 32, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 50, 0, 0, 10, 18, 0,
16, 0, 1, 0, 0, 0,
+ 58, 0, 16, 128, 65, 0,
+ 0, 0, 2, 0, 0, 0,
+ 58, 0, 16, 0, 2, 0,
+ 0, 0, 10, 0, 16, 0,
+ 1, 0, 0, 0, 50, 0,
+ 0, 10, 242, 0, 16, 0,
+ 0, 0, 0, 0, 70, 14,
+ 16, 128, 65, 0, 0, 0,
+ 2, 0, 0, 0, 6, 2,
+ 16, 0, 2, 0, 0, 0,
+ 70, 14, 16, 0, 0, 0,
+ 0, 0, 56, 0, 0, 10,
+ 226, 0, 16, 0, 1, 0,
+ 0, 0, 86, 12, 16, 0,
+ 0, 0, 0, 0, 2, 64,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 192, 0, 0,
+ 128, 64, 0, 0, 0, 192,
+ 56, 0, 0, 7, 50, 0,
+ 16, 0, 2, 0, 0, 0,
214, 5, 16, 0, 1, 0,
+ 0, 0, 214, 5, 16, 0,
+ 1, 0, 0, 0, 50, 0,
+ 0, 10, 34, 0, 16, 0,
+ 2, 0, 0, 0, 42, 0,
+ 16, 128, 65, 0, 0, 0,
+ 1, 0, 0, 0, 10, 0,
+ 16, 0, 1, 0, 0, 0,
+ 26, 0, 16, 0, 2, 0,
0, 0, 50, 0, 0, 10,
- 34, 0, 16, 0, 2, 0,
+ 66, 0, 16, 0, 1, 0,
0, 0, 42, 0, 16, 128,
65, 0, 0, 0, 1, 0,
- 0, 0, 10, 0, 16, 0,
- 1, 0, 0, 0, 26, 0,
- 16, 0, 2, 0, 0, 0,
- 50, 0, 0, 10, 66, 0,
- 16, 0, 1, 0, 0, 0,
- 42, 0, 16, 128, 65, 0,
- 0, 0, 1, 0, 0, 0,
- 42, 0, 16, 0, 0, 0,
- 0, 0, 10, 0, 16, 0,
- 2, 0, 0, 0, 75, 0,
- 0, 5, 18, 0, 16, 0,
- 2, 0, 0, 0, 26, 0,
+ 0, 0, 42, 0, 16, 0,
+ 0, 0, 0, 0, 10, 0,
16, 0, 2, 0, 0, 0,
- 29, 0, 0, 7, 34, 0,
+ 75, 0, 0, 5, 18, 0,
16, 0, 2, 0, 0, 0,
26, 0, 16, 0, 2, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 0, 0, 49, 0,
- 0, 10, 194, 0, 16, 0,
- 2, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 128, 0, 0, 0, 128,
- 86, 13, 16, 0, 0, 0,
- 0, 0, 55, 0, 0, 15,
- 194, 0, 16, 0, 2, 0,
- 0, 0, 166, 14, 16, 0,
- 2, 0, 0, 0, 2, 64,
+ 0, 0, 29, 0, 0, 7,
+ 34, 0, 16, 0, 2, 0,
+ 0, 0, 26, 0, 16, 0,
+ 2, 0, 0, 0, 1, 64,
0, 0, 0, 0, 0, 0,
+ 49, 0, 0, 10, 194, 0,
+ 16, 0, 2, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 128, 191, 0, 0, 128, 191,
+ 0, 0, 0, 128, 0, 0,
+ 0, 128, 86, 13, 16, 0,
+ 0, 0, 0, 0, 55, 0,
+ 0, 15, 194, 0, 16, 0,
+ 2, 0, 0, 0, 166, 14,
+ 16, 0, 2, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 128, 63, 0, 0,
- 128, 63, 50, 0, 0, 9,
- 130, 0, 16, 0, 1, 0,
- 0, 0, 58, 0, 16, 0,
- 2, 0, 0, 0, 10, 0,
+ 0, 0, 128, 191, 0, 0,
+ 128, 191, 2, 64, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 128, 63,
+ 0, 0, 128, 63, 50, 0,
+ 0, 9, 130, 0, 16, 0,
+ 1, 0, 0, 0, 58, 0,
16, 0, 2, 0, 0, 0,
- 58, 0, 16, 0, 1, 0,
- 0, 0, 56, 0, 0, 7,
- 130, 0, 16, 0, 1, 0,
+ 10, 0, 16, 0, 2, 0,
0, 0, 58, 0, 16, 0,
- 1, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 0, 191,
- 14, 0, 0, 7, 130, 0,
- 16, 0, 3, 0, 0, 0,
- 58, 0, 16, 0, 1, 0,
- 0, 0, 10, 0, 16, 0,
- 0, 0, 0, 0, 14, 0,
- 0, 7, 66, 0, 16, 0,
- 3, 0, 0, 0, 10, 0,
+ 1, 0, 0, 0, 56, 0,
+ 0, 7, 130, 0, 16, 0,
+ 1, 0, 0, 0, 58, 0,
16, 0, 1, 0, 0, 0,
- 58, 0, 16, 0, 1, 0,
- 0, 0, 49, 0, 0, 7,
- 18, 0, 16, 0, 1, 0,
- 0, 0, 42, 0, 16, 0,
- 3, 0, 0, 0, 58, 0,
+ 1, 64, 0, 0, 0, 0,
+ 0, 191, 14, 0, 0, 7,
+ 130, 0, 16, 0, 3, 0,
+ 0, 0, 58, 0, 16, 0,
+ 1, 0, 0, 0, 10, 0,
+ 16, 0, 0, 0, 0, 0,
+ 14, 0, 0, 7, 66, 0,
16, 0, 3, 0, 0, 0,
- 55, 0, 0, 9, 146, 0,
- 16, 0, 1, 0, 0, 0,
- 6, 0, 16, 0, 1, 0,
- 0, 0, 166, 14, 16, 0,
- 3, 0, 0, 0, 246, 11,
+ 10, 0, 16, 0, 1, 0,
+ 0, 0, 58, 0, 16, 0,
+ 1, 0, 0, 0, 49, 0,
+ 0, 7, 18, 0, 16, 0,
+ 1, 0, 0, 0, 42, 0,
16, 0, 3, 0, 0, 0,
- 1, 0, 0, 7, 146, 0,
- 16, 0, 1, 0, 0, 0,
- 6, 12, 16, 0, 1, 0,
- 0, 0, 86, 5, 16, 0,
- 2, 0, 0, 0, 24, 0,
- 0, 10, 178, 0, 16, 0,
- 2, 0, 0, 0, 70, 12,
- 16, 0, 0, 0, 0, 0,
- 2, 64, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 128,
- 0, 0, 0, 0, 0, 0,
- 0, 128, 1, 0, 0, 7,
- 162, 0, 16, 0, 0, 0,
- 0, 0, 86, 13, 16, 0,
- 2, 0, 0, 0, 6, 0,
+ 58, 0, 16, 0, 3, 0,
+ 0, 0, 55, 0, 0, 9,
+ 146, 0, 16, 0, 1, 0,
+ 0, 0, 6, 0, 16, 0,
+ 1, 0, 0, 0, 166, 14,
+ 16, 0, 3, 0, 0, 0,
+ 246, 11, 16, 0, 3, 0,
+ 0, 0, 1, 0, 0, 7,
+ 146, 0, 16, 0, 1, 0,
+ 0, 0, 6, 12, 16, 0,
+ 1, 0, 0, 0, 86, 5,
16, 0, 2, 0, 0, 0,
- 55, 0, 0, 12, 194, 32,
- 16, 0, 1, 0, 0, 0,
- 246, 15, 16, 0, 0, 0,
+ 24, 0, 0, 10, 178, 0,
+ 16, 0, 2, 0, 0, 0,
+ 70, 12, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
+ 0, 128, 0, 0, 0, 0,
+ 0, 0, 0, 128, 1, 0,
+ 0, 7, 162, 0, 16, 0,
+ 0, 0, 0, 0, 86, 13,
+ 16, 0, 2, 0, 0, 0,
+ 6, 0, 16, 0, 2, 0,
+ 0, 0, 55, 0, 0, 12,
+ 194, 32, 16, 0, 1, 0,
+ 0, 0, 246, 15, 16, 0,
+ 0, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 6, 12,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 6, 12, 16, 0, 1, 0,
+ 0, 0, 75, 0, 0, 5,
+ 130, 0, 16, 0, 0, 0,
+ 0, 0, 42, 0, 16, 0,
+ 1, 0, 0, 0, 29, 0,
+ 0, 7, 18, 0, 16, 0,
+ 1, 0, 0, 0, 42, 0,
16, 0, 1, 0, 0, 0,
- 75, 0, 0, 5, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 1, 0,
- 0, 0, 29, 0, 0, 7,
- 18, 0, 16, 0, 1, 0,
+ 1, 64, 0, 0, 0, 0,
+ 0, 0, 50, 0, 0, 9,
+ 130, 0, 16, 0, 0, 0,
0, 0, 42, 0, 16, 0,
- 1, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 0, 0,
- 50, 0, 0, 9, 130, 0,
+ 2, 0, 0, 0, 58, 0,
16, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 2, 0,
+ 26, 0, 16, 0, 1, 0,
+ 0, 0, 56, 0, 0, 7,
+ 130, 0, 16, 0, 0, 0,
0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 26, 0,
- 16, 0, 1, 0, 0, 0,
- 56, 0, 0, 7, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 58, 0, 16, 0, 0, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 0, 191, 14, 0,
- 0, 7, 50, 0, 16, 0,
- 2, 0, 0, 0, 230, 10,
- 16, 0, 0, 0, 0, 0,
- 54, 15, 16, 0, 0, 0,
- 0, 0, 49, 0, 0, 7,
- 18, 0, 16, 0, 0, 0,
- 0, 0, 10, 0, 16, 0,
- 2, 0, 0, 0, 26, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 0, 191,
+ 14, 0, 0, 7, 50, 0,
16, 0, 2, 0, 0, 0,
- 55, 0, 0, 9, 82, 0,
- 16, 0, 0, 0, 0, 0,
- 6, 0, 16, 0, 0, 0,
- 0, 0, 6, 1, 16, 0,
- 2, 0, 0, 0, 86, 4,
+ 230, 10, 16, 0, 0, 0,
+ 0, 0, 54, 15, 16, 0,
+ 0, 0, 0, 0, 49, 0,
+ 0, 7, 18, 0, 16, 0,
+ 0, 0, 0, 0, 10, 0,
16, 0, 2, 0, 0, 0,
- 1, 0, 0, 7, 82, 0,
- 16, 0, 0, 0, 0, 0,
- 6, 2, 16, 0, 0, 0,
+ 26, 0, 16, 0, 2, 0,
+ 0, 0, 55, 0, 0, 9,
+ 82, 0, 16, 0, 0, 0,
0, 0, 6, 0, 16, 0,
- 1, 0, 0, 0, 55, 0,
- 0, 12, 50, 32, 16, 0,
- 1, 0, 0, 0, 86, 5,
+ 0, 0, 0, 0, 6, 1,
+ 16, 0, 2, 0, 0, 0,
+ 86, 4, 16, 0, 2, 0,
+ 0, 0, 1, 0, 0, 7,
+ 82, 0, 16, 0, 0, 0,
+ 0, 0, 6, 2, 16, 0,
+ 0, 0, 0, 0, 6, 0,
+ 16, 0, 1, 0, 0, 0,
+ 55, 0, 0, 12, 50, 32,
+ 16, 0, 1, 0, 0, 0,
+ 86, 5, 16, 0, 0, 0,
+ 0, 0, 2, 64, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 134, 0,
16, 0, 0, 0, 0, 0,
- 2, 64, 0, 0, 0, 0,
+ 54, 0, 0, 7, 130, 32,
+ 16, 0, 2, 0, 0, 0,
+ 58, 128, 32, 128, 65, 0,
0, 0, 0, 0, 0, 0,
+ 12, 0, 0, 0, 14, 0,
+ 0, 7, 114, 0, 16, 0,
+ 0, 0, 0, 0, 70, 18,
+ 16, 0, 1, 0, 0, 0,
+ 246, 31, 16, 0, 1, 0,
+ 0, 0, 16, 0, 0, 7,
+ 130, 0, 16, 0, 0, 0,
+ 0, 0, 70, 2, 16, 0,
+ 0, 0, 0, 0, 70, 18,
+ 16, 0, 0, 0, 0, 0,
+ 54, 0, 0, 6, 130, 0,
+ 16, 0, 0, 0, 0, 0,
+ 58, 0, 16, 128, 65, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 134, 0, 16, 0,
- 0, 0, 0, 0, 54, 0,
- 0, 7, 130, 32, 16, 0,
- 2, 0, 0, 0, 58, 128,
- 32, 128, 65, 0, 0, 0,
+ 17, 0, 0, 8, 18, 32,
+ 16, 0, 2, 0, 0, 0,
+ 70, 14, 16, 0, 0, 0,
+ 0, 0, 70, 142, 32, 0,
0, 0, 0, 0, 12, 0,
0, 0, 14, 0, 0, 7,
- 114, 0, 16, 0, 0, 0,
+ 114, 0, 16, 0, 1, 0,
0, 0, 70, 18, 16, 0,
- 1, 0, 0, 0, 246, 31,
- 16, 0, 1, 0, 0, 0,
+ 2, 0, 0, 0, 246, 31,
+ 16, 0, 2, 0, 0, 0,
16, 0, 0, 7, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 70, 2, 16, 0, 0, 0,
+ 16, 0, 1, 0, 0, 0,
+ 70, 2, 16, 0, 1, 0,
0, 0, 70, 18, 16, 0,
0, 0, 0, 0, 54, 0,
0, 6, 130, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
+ 1, 0, 0, 0, 58, 0,
16, 128, 65, 0, 0, 0,
- 0, 0, 0, 0, 17, 0,
- 0, 8, 18, 32, 16, 0,
+ 1, 0, 0, 0, 17, 0,
+ 0, 8, 34, 32, 16, 0,
2, 0, 0, 0, 70, 14,
- 16, 0, 0, 0, 0, 0,
+ 16, 0, 1, 0, 0, 0,
70, 142, 32, 0, 0, 0,
0, 0, 12, 0, 0, 0,
14, 0, 0, 7, 114, 0,
- 16, 0, 1, 0, 0, 0,
- 70, 18, 16, 0, 2, 0,
+ 16, 0, 2, 0, 0, 0,
+ 70, 18, 16, 0, 3, 0,
0, 0, 246, 31, 16, 0,
- 2, 0, 0, 0, 16, 0,
+ 3, 0, 0, 0, 16, 0,
0, 7, 130, 0, 16, 0,
- 1, 0, 0, 0, 70, 2,
- 16, 0, 1, 0, 0, 0,
+ 2, 0, 0, 0, 70, 2,
+ 16, 0, 2, 0, 0, 0,
70, 18, 16, 0, 0, 0,
0, 0, 54, 0, 0, 6,
- 130, 0, 16, 0, 1, 0,
+ 130, 0, 16, 0, 2, 0,
0, 0, 58, 0, 16, 128,
- 65, 0, 0, 0, 1, 0,
+ 65, 0, 0, 0, 2, 0,
0, 0, 17, 0, 0, 8,
- 34, 32, 16, 0, 2, 0,
+ 66, 32, 16, 0, 2, 0,
0, 0, 70, 14, 16, 0,
- 1, 0, 0, 0, 70, 142,
+ 2, 0, 0, 0, 70, 142,
32, 0, 0, 0, 0, 0,
- 12, 0, 0, 0, 14, 0,
- 0, 7, 114, 0, 16, 0,
- 2, 0, 0, 0, 70, 18,
- 16, 0, 3, 0, 0, 0,
- 246, 31, 16, 0, 3, 0,
- 0, 0, 16, 0, 0, 7,
- 130, 0, 16, 0, 2, 0,
- 0, 0, 70, 2, 16, 0,
- 2, 0, 0, 0, 70, 18,
- 16, 0, 0, 0, 0, 0,
- 54, 0, 0, 6, 130, 0,
- 16, 0, 2, 0, 0, 0,
- 58, 0, 16, 128, 65, 0,
- 0, 0, 2, 0, 0, 0,
- 17, 0, 0, 8, 66, 32,
- 16, 0, 2, 0, 0, 0,
- 70, 14, 16, 0, 2, 0,
- 0, 0, 70, 142, 32, 0,
- 0, 0, 0, 0, 12, 0,
- 0, 0, 54, 0, 0, 7,
- 130, 32, 16, 0, 3, 0,
- 0, 0, 58, 128, 32, 128,
- 65, 0, 0, 0, 0, 0,
- 0, 0, 13, 0, 0, 0,
- 17, 0, 0, 8, 18, 32,
- 16, 0, 3, 0, 0, 0,
- 70, 14, 16, 0, 0, 0,
- 0, 0, 70, 142, 32, 0,
+ 12, 0, 0, 0, 54, 0,
+ 0, 7, 130, 32, 16, 0,
+ 3, 0, 0, 0, 58, 128,
+ 32, 128, 65, 0, 0, 0,
0, 0, 0, 0, 13, 0,
0, 0, 17, 0, 0, 8,
- 34, 32, 16, 0, 3, 0,
+ 18, 32, 16, 0, 3, 0,
0, 0, 70, 14, 16, 0,
- 1, 0, 0, 0, 70, 142,
+ 0, 0, 0, 0, 70, 142,
32, 0, 0, 0, 0, 0,
13, 0, 0, 0, 17, 0,
- 0, 8, 66, 32, 16, 0,
+ 0, 8, 34, 32, 16, 0,
3, 0, 0, 0, 70, 14,
- 16, 0, 2, 0, 0, 0,
+ 16, 0, 1, 0, 0, 0,
70, 142, 32, 0, 0, 0,
0, 0, 13, 0, 0, 0,
- 17, 0, 0, 8, 18, 32,
- 16, 0, 4, 0, 0, 0,
- 70, 14, 16, 0, 0, 0,
+ 17, 0, 0, 8, 66, 32,
+ 16, 0, 3, 0, 0, 0,
+ 70, 14, 16, 0, 2, 0,
0, 0, 70, 142, 32, 0,
- 0, 0, 0, 0, 14, 0,
+ 0, 0, 0, 0, 13, 0,
0, 0, 17, 0, 0, 8,
- 18, 32, 16, 0, 5, 0,
+ 18, 32, 16, 0, 4, 0,
0, 0, 70, 14, 16, 0,
0, 0, 0, 0, 70, 142,
32, 0, 0, 0, 0, 0,
- 15, 0, 0, 0, 17, 0,
- 0, 8, 34, 32, 16, 0,
- 4, 0, 0, 0, 70, 14,
- 16, 0, 1, 0, 0, 0,
+ 14, 0, 0, 0, 17, 0,
+ 0, 8, 18, 32, 16, 0,
+ 5, 0, 0, 0, 70, 14,
+ 16, 0, 0, 0, 0, 0,
70, 142, 32, 0, 0, 0,
- 0, 0, 14, 0, 0, 0,
+ 0, 0, 15, 0, 0, 0,
17, 0, 0, 8, 34, 32,
- 16, 0, 5, 0, 0, 0,
+ 16, 0, 4, 0, 0, 0,
70, 14, 16, 0, 1, 0,
0, 0, 70, 142, 32, 0,
- 0, 0, 0, 0, 15, 0,
+ 0, 0, 0, 0, 14, 0,
0, 0, 17, 0, 0, 8,
- 66, 32, 16, 0, 4, 0,
+ 34, 32, 16, 0, 5, 0,
0, 0, 70, 14, 16, 0,
- 2, 0, 0, 0, 70, 142,
+ 1, 0, 0, 0, 70, 142,
32, 0, 0, 0, 0, 0,
- 14, 0, 0, 0, 17, 0,
+ 15, 0, 0, 0, 17, 0,
0, 8, 66, 32, 16, 0,
- 5, 0, 0, 0, 70, 14,
+ 4, 0, 0, 0, 70, 14,
16, 0, 2, 0, 0, 0,
70, 142, 32, 0, 0, 0,
- 0, 0, 15, 0, 0, 0,
+ 0, 0, 14, 0, 0, 0,
+ 17, 0, 0, 8, 66, 32,
+ 16, 0, 5, 0, 0, 0,
+ 70, 14, 16, 0, 2, 0,
+ 0, 0, 70, 142, 32, 0,
+ 0, 0, 0, 0, 15, 0,
+ 0, 0, 54, 0, 0, 7,
+ 130, 32, 16, 0, 4, 0,
+ 0, 0, 58, 128, 32, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 14, 0, 0, 0,
54, 0, 0, 7, 130, 32,
- 16, 0, 4, 0, 0, 0,
+ 16, 0, 5, 0, 0, 0,
58, 128, 32, 128, 65, 0,
0, 0, 0, 0, 0, 0,
- 14, 0, 0, 0, 54, 0,
- 0, 7, 130, 32, 16, 0,
- 5, 0, 0, 0, 58, 128,
- 32, 128, 65, 0, 0, 0,
- 0, 0, 0, 0, 15, 0,
- 0, 0, 56, 0, 0, 8,
- 242, 0, 16, 0, 0, 0,
- 0, 0, 86, 21, 16, 0,
- 0, 0, 0, 0, 70, 142,
- 32, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 50, 0,
+ 15, 0, 0, 0, 56, 0,
+ 0, 8, 242, 0, 16, 0,
+ 0, 0, 0, 0, 86, 21,
+ 16, 0, 0, 0, 0, 0,
+ 70, 142, 32, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 50, 0, 0, 10, 242, 0,
+ 16, 0, 0, 0, 0, 0,
+ 70, 142, 32, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 6, 16, 16, 0, 0, 0,
+ 0, 0, 70, 14, 16, 0,
+ 0, 0, 0, 0, 50, 0,
0, 10, 242, 0, 16, 0,
0, 0, 0, 0, 70, 142,
32, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 6, 16,
+ 2, 0, 0, 0, 166, 26,
16, 0, 0, 0, 0, 0,
70, 14, 16, 0, 0, 0,
- 0, 0, 50, 0, 0, 10,
+ 0, 0, 0, 0, 0, 8,
242, 0, 16, 0, 0, 0,
- 0, 0, 70, 142, 32, 0,
- 0, 0, 0, 0, 2, 0,
- 0, 0, 166, 26, 16, 0,
- 0, 0, 0, 0, 70, 14,
- 16, 0, 0, 0, 0, 0,
- 0, 0, 0, 8, 242, 0,
- 16, 0, 0, 0, 0, 0,
- 70, 14, 16, 0, 0, 0,
- 0, 0, 70, 142, 32, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 14, 0, 0, 7,
- 114, 32, 16, 0, 6, 0,
- 0, 0, 70, 2, 16, 0,
- 0, 0, 0, 0, 246, 15,
+ 0, 0, 70, 14, 16, 0,
+ 0, 0, 0, 0, 70, 142,
+ 32, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 14, 0,
+ 0, 7, 242, 32, 16, 0,
+ 6, 0, 0, 0, 70, 14,
16, 0, 0, 0, 0, 0,
- 54, 0, 0, 5, 130, 32,
- 16, 0, 6, 0, 0, 0,
- 58, 0, 16, 0, 0, 0,
+ 246, 15, 16, 0, 0, 0,
0, 0, 62, 0, 0, 1,
83, 84, 65, 84, 148, 0,
- 0, 0, 85, 0, 0, 0,
+ 0, 0, 84, 0, 0, 0,
4, 0, 0, 0, 0, 0,
0, 0, 11, 0, 0, 0,
70, 0, 0, 0, 0, 0,
@@ -925,7 +920,7 @@ const BYTE g_ellipsoidDepthVS[] =
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 6, 0, 0, 0, 5, 0,
+ 5, 0, 0, 0, 5, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
diff --git a/demo/d3d11/shaders/imguiPS.hlsl b/demo/d3d/shaders/imguiPS.hlsl
index f51a21b..f51a21b 100644
--- a/demo/d3d11/shaders/imguiPS.hlsl
+++ b/demo/d3d/shaders/imguiPS.hlsl
diff --git a/demo/d3d11/shaders/imguiPS.hlsl.h b/demo/d3d/shaders/imguiPS.hlsl.h
index 92aa84a..92aa84a 100644
--- a/demo/d3d11/shaders/imguiPS.hlsl.h
+++ b/demo/d3d/shaders/imguiPS.hlsl.h
diff --git a/demo/d3d11/shaders/imguiVS.hlsl b/demo/d3d/shaders/imguiVS.hlsl
index 6116ee1..6116ee1 100644
--- a/demo/d3d11/shaders/imguiVS.hlsl
+++ b/demo/d3d/shaders/imguiVS.hlsl
diff --git a/demo/d3d11/shaders/imguiVS.hlsl.h b/demo/d3d/shaders/imguiVS.hlsl.h
index 7249cec..7249cec 100644
--- a/demo/d3d11/shaders/imguiVS.hlsl.h
+++ b/demo/d3d/shaders/imguiVS.hlsl.h
diff --git a/demo/d3d/shaders/meshAsyncComputeBenchPS.hlsl b/demo/d3d/shaders/meshAsyncComputeBenchPS.hlsl
new file mode 100644
index 0000000..1d8b9d5
--- /dev/null
+++ b/demo/d3d/shaders/meshAsyncComputeBenchPS.hlsl
@@ -0,0 +1,3 @@
+#define FLX_ASYNC_COMPUTE_BENCHMARK_ENABLE 1
+
+#include "meshPS.hlsl"
diff --git a/demo/d3d/shaders/meshAsyncComputeBenchPS.hlsl.h b/demo/d3d/shaders/meshAsyncComputeBenchPS.hlsl.h
new file mode 100644
index 0000000..8223a67
--- /dev/null
+++ b/demo/d3d/shaders/meshAsyncComputeBenchPS.hlsl.h
@@ -0,0 +1,1558 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
+//
+//
+// Buffer Definitions:
+//
+// cbuffer constBuf
+// {
+//
+// struct MeshShaderConst
+// {
+//
+// float4x4 modelViewProjection; // Offset: 0
+// float4x4 modelView; // Offset: 64
+// float4x4 objectTransform; // Offset: 128
+// float4x4 lightTransform; // Offset: 192
+// float4 clipPlane; // Offset: 256
+// float4 fogColor; // Offset: 272
+// float4 color; // Offset: 288
+// float4 secondaryColor; // Offset: 304
+// float4 shadowTaps[12]; // Offset: 320
+// float3 lightPos; // Offset: 512
+// float _pad0; // Offset: 524
+// float3 lightDir; // Offset: 528
+// float _pad1; // Offset: 540
+// float bias; // Offset: 544
+// float expand; // Offset: 548
+// float spotMin; // Offset: 552
+// float spotMax; // Offset: 556
+// int grid; // Offset: 560
+// int tex; // Offset: 564
+// int colorArray; // Offset: 568
+// int increaseGfxLoadForAsyncComputeTesting;// Offset: 572
+//
+// } gParams; // Offset: 0 Size: 576
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim Slot Elements
+// ------------------------------ ---------- ------- ----------- ---- --------
+// shadowSampler sampler_c NA NA 0 1
+// shadowTexture texture float 2d 0 1
+// constBuf cbuffer NA NA 0 1
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------- ------
+// SV_POSITION 0 xyzw 0 POS float
+// TEXCOORD 0 xyz 1 NONE float xyz
+// TEXCOORD 1 xyzw 2 NONE float xyzw
+// TEXCOORD 2 xyz 3 NONE float
+// TEXCOORD 3 xyz 4 NONE float xyz
+// TEXCOORD 4 xyzw 5 NONE float xyz
+// TEXCOORD 5 xy 6 NONE float
+// TEXCOORD 6 xyzw 7 NONE float xyz
+// TEXCOORD 7 xyzw 8 NONE float z
+// SV_IsFrontFace 0 x 9 FFACE uint x
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------- ------
+// SV_TARGET 0 xyzw 0 TARGET float xyzw
+//
+ps_5_0
+dcl_globalFlags refactoringAllowed
+dcl_constantbuffer cb0[36], immediateIndexed
+dcl_sampler s0, mode_comparison
+dcl_resource_texture2d (float,float,float,float) t0
+dcl_input_ps linear v1.xyz
+dcl_input_ps linear v2.xyzw
+dcl_input_ps linear v4.xyz
+dcl_input_ps linear v5.xyz
+dcl_input_ps linear v7.xyz
+dcl_input_ps linear v8.z
+dcl_input_ps_sgv v9.x, is_front_face
+dcl_output o0.xyzw
+dcl_temps 6
+div r0.xyz, v2.xyzx, v2.wwww
+mad r1.xyz, r0.xyzx, l(0.500000, 0.500000, 1.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
+lt r0.z, r1.x, l(0.000000)
+lt r0.w, l(1.000000), r1.x
+or r0.z, r0.w, r0.z
+add r0.w, -cb0[20].y, l(1.000000)
+mul r2.x, cb0[20].x, l(0.002000)
+mul r2.y, r0.w, l(0.002000)
+add r1.w, -r1.y, l(1.000000)
+add r2.xy, r1.xwxx, r2.xyxx
+sample_c_indexable(texture2d)(float,float,float,float) r0.w, r2.xyxx, t0.xxxx, s0, r1.z
+add r2.x, -cb0[21].y, l(1.000000)
+mul r3.x, cb0[21].x, l(0.002000)
+mul r3.y, r2.x, l(0.002000)
+add r2.xy, r1.xwxx, r3.xyxx
+sample_c_indexable(texture2d)(float,float,float,float) r2.x, r2.xyxx, t0.xxxx, s0, r1.z
+add r2.y, -cb0[22].y, l(1.000000)
+mul r3.x, cb0[22].x, l(0.002000)
+mul r3.y, r2.y, l(0.002000)
+add r2.yz, r1.xxwx, r3.xxyx
+sample_c_indexable(texture2d)(float,float,float,float) r2.y, r2.yzyy, t0.xxxx, s0, r1.z
+add r2.z, -cb0[23].y, l(1.000000)
+mul r3.x, cb0[23].x, l(0.002000)
+mul r3.y, r2.z, l(0.002000)
+add r2.zw, r1.xxxw, r3.xxxy
+sample_c_indexable(texture2d)(float,float,float,float) r2.z, r2.zwzz, t0.xxxx, s0, r1.z
+add r2.w, -cb0[24].y, l(1.000000)
+mul r3.x, cb0[24].x, l(0.002000)
+mul r3.y, r2.w, l(0.002000)
+add r3.xy, r1.xwxx, r3.xyxx
+sample_c_indexable(texture2d)(float,float,float,float) r2.w, r3.xyxx, t0.xxxx, s0, r1.z
+add r3.x, -cb0[25].y, l(1.000000)
+mul r4.x, cb0[25].x, l(0.002000)
+mul r4.y, r3.x, l(0.002000)
+add r3.xy, r1.xwxx, r4.xyxx
+sample_c_indexable(texture2d)(float,float,float,float) r3.x, r3.xyxx, t0.xxxx, s0, r1.z
+add r3.y, -cb0[26].y, l(1.000000)
+mul r4.x, cb0[26].x, l(0.002000)
+mul r4.y, r3.y, l(0.002000)
+add r3.yz, r1.xxwx, r4.xxyx
+sample_c_indexable(texture2d)(float,float,float,float) r3.y, r3.yzyy, t0.xxxx, s0, r1.z
+add r3.z, -cb0[27].y, l(1.000000)
+mul r4.x, cb0[27].x, l(0.002000)
+mul r4.y, r3.z, l(0.002000)
+add r3.zw, r1.xxxw, r4.xxxy
+sample_c_indexable(texture2d)(float,float,float,float) r3.z, r3.zwzz, t0.xxxx, s0, r1.z
+add r3.w, -cb0[28].y, l(1.000000)
+mul r4.x, cb0[28].x, l(0.002000)
+mul r4.y, r3.w, l(0.002000)
+add r4.xy, r1.xwxx, r4.xyxx
+sample_c_indexable(texture2d)(float,float,float,float) r3.w, r4.xyxx, t0.xxxx, s0, r1.z
+add r4.x, -cb0[29].y, l(1.000000)
+mul r5.x, cb0[29].x, l(0.002000)
+mul r5.y, r4.x, l(0.002000)
+add r4.xy, r1.xwxx, r5.xyxx
+sample_c_indexable(texture2d)(float,float,float,float) r4.x, r4.xyxx, t0.xxxx, s0, r1.z
+add r4.y, -cb0[30].y, l(1.000000)
+mul r5.x, cb0[30].x, l(0.002000)
+mul r5.y, r4.y, l(0.002000)
+add r4.yz, r1.xxwx, r5.xxyx
+sample_c_indexable(texture2d)(float,float,float,float) r4.y, r4.yzyy, t0.xxxx, s0, r1.z
+add r4.z, -cb0[31].y, l(1.000000)
+mul r5.x, cb0[31].x, l(0.002000)
+mul r5.y, r4.z, l(0.002000)
+add r1.xw, r1.xxxw, r5.xxxy
+sample_c_indexable(texture2d)(float,float,float,float) r1.x, r1.xwxx, t0.xxxx, s0, r1.z
+if_z r0.z
+ lt r0.z, r1.y, l(0.000000)
+ lt r1.y, l(1.000000), r1.y
+ or r0.z, r0.z, r1.y
+ if_z r0.z
+ add r0.z, r0.w, r2.x
+ add r0.z, r2.y, r0.z
+ add r0.z, r2.z, r0.z
+ add r0.z, r2.w, r0.z
+ add r0.z, r3.x, r0.z
+ add r0.z, r3.y, r0.z
+ add r0.z, r3.z, r0.z
+ add r0.z, r3.w, r0.z
+ add r0.z, r4.x, r0.z
+ add r0.z, r4.y, r0.z
+ add r0.z, r1.x, r0.z
+ mul r0.z, r0.z, l(0.083333)
+ else
+ mov r0.z, l(1.000000)
+ endif
+else
+ mov r0.z, l(1.000000)
+endif
+dp2 r0.x, r0.xyxx, r0.xyxx
+add r0.y, -cb0[34].w, cb0[34].z
+add r0.x, r0.x, -cb0[34].w
+div r0.y, l(1.000000, 1.000000, 1.000000, 1.000000), r0.y
+mul_sat r0.x, r0.y, r0.x
+mad r0.y, r0.x, l(-2.000000), l(3.000000)
+mul r0.x, r0.x, r0.x
+mul r0.x, r0.x, r0.y
+max r0.xz, r0.xxzx, l(0.050000, 0.000000, 0.500000, 0.000000)
+movc r1.xyz, v9.xxxx, v1.xyzx, -v1.xyzx
+movc r2.xyz, v9.xxxx, v5.xyzx, v7.xyzx
+ine r0.y, cb0[35].x, l(0)
+lt r0.w, l(0.995000), r1.y
+and r0.w, r0.w, r0.y
+if_nz r0.w
+ deriv_rtx_coarse r3.xy, v4.xzxx
+ deriv_rty_coarse r3.zw, v4.xxxz
+ max r3.xy, |r3.zwzz|, |r3.xyxx|
+ max r0.w, r3.y, r3.x
+ mad r3.xy, -r0.wwww, l(0.500000, 0.500000, 0.000000, 0.000000), v4.xzxx
+ mad r3.zw, r0.wwww, l(0.000000, 0.000000, 0.500000, 0.500000), v4.xxxz
+ mul r4.xy, r3.zwzz, l(0.500000, 0.500000, 0.000000, 0.000000)
+ round_ni r4.xy, r4.xyxx
+ mad r3.zw, r3.zzzw, l(0.000000, 0.000000, 0.500000, 0.500000), -r4.xxxy
+ add r3.zw, r3.zzzw, l(0.000000, 0.000000, -0.500000, -0.500000)
+ max r3.zw, r3.zzzw, l(0.000000, 0.000000, 0.000000, 0.000000)
+ mad r3.zw, r3.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), r4.xxxy
+ mul r4.xy, r3.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
+ round_ni r4.xy, r4.xyxx
+ mad r3.xy, r3.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000), -r4.xyxx
+ add r3.xy, r3.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
+ max r3.xy, r3.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
+ mad r3.xy, r3.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), r4.xyxx
+ add r3.xy, -r3.xyxx, r3.zwzz
+ div r3.xy, r3.xyxx, r0.wwww
+ add r3.zw, -r3.xxxy, l(0.000000, 0.000000, 1.000000, 1.000000)
+ mul r0.w, r3.w, r3.z
+ mad r0.w, r3.x, r3.y, r0.w
+ mad r0.w, -r0.w, l(0.250000), l(1.000000)
+ mul r3.xyz, r0.wwww, r2.xyzx
+else
+ lt r0.w, l(0.995000), |r1.z|
+ and r0.y, r0.w, r0.y
+ deriv_rtx_coarse r4.xy, v4.yxyy
+ deriv_rty_coarse r4.zw, v4.yyyx
+ max r4.xy, |r4.zwzz|, |r4.xyxx|
+ max r0.w, r4.y, r4.x
+ mad r4.xy, -r0.wwww, l(0.500000, 0.500000, 0.000000, 0.000000), v4.yxyy
+ mad r4.zw, r0.wwww, l(0.000000, 0.000000, 0.500000, 0.500000), v4.yyyx
+ mul r5.xy, r4.zwzz, l(0.500000, 0.500000, 0.000000, 0.000000)
+ round_ni r5.xy, r5.xyxx
+ mad r4.zw, r4.zzzw, l(0.000000, 0.000000, 0.500000, 0.500000), -r5.xxxy
+ add r4.zw, r4.zzzw, l(0.000000, 0.000000, -0.500000, -0.500000)
+ max r4.zw, r4.zzzw, l(0.000000, 0.000000, 0.000000, 0.000000)
+ mad r4.zw, r4.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), r5.xxxy
+ mul r5.xy, r4.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
+ round_ni r5.xy, r5.xyxx
+ mad r4.xy, r4.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000), -r5.xyxx
+ add r4.xy, r4.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
+ max r4.xy, r4.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
+ mad r4.xy, r4.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), r5.xyxx
+ add r4.xy, -r4.xyxx, r4.zwzz
+ div r4.xy, r4.xyxx, r0.wwww
+ add r4.zw, -r4.xxxy, l(0.000000, 0.000000, 1.000000, 1.000000)
+ mul r0.w, r4.w, r4.z
+ mad r0.w, r4.x, r4.y, r0.w
+ mad r0.w, -r0.w, l(0.250000), l(1.000000)
+ mul r4.xyz, r0.wwww, r2.xyzx
+ movc r3.xyz, r0.yyyy, r4.xyzx, r2.xyzx
+endif
+dp3 r0.y, cb0[33].xyzx, r1.xyzx
+mul r0.z, r0.z, -r0.y
+max r0.z, r0.z, l(0.000000)
+mul r1.xyz, r0.zzzz, r3.xyzx
+mul r2.xyz, r3.xyzx, l(4.000000, 4.000000, 4.000000, 0.000000)
+mad r0.yzw, r0.yyyy, l(0.000000, -0.500000, -0.500000, -1.000000), l(0.000000, 0.500000, 0.500000, 0.000000)
+mad r0.yzw, r0.yyzw, l(0.000000, 0.020000, 0.012500, 0.007500), l(0.000000, 0.025000, 0.025000, 0.030000)
+mul r0.yzw, r0.yyzw, r2.xxyz
+mul r0.yzw, r0.xxxx, r0.yyzw
+mad r0.xyz, r1.xyzx, r0.xxxx, r0.yzwy
+mul r0.w, v8.z, cb0[17].w
+mul r0.w, r0.w, l(1.442695)
+exp r0.w, r0.w
+add r0.xyz, r0.xyzx, -cb0[17].xyzx
+mad r0.xyz, r0.wwww, r0.xyzx, cb0[17].xyzx
+log r0.xyz, |r0.xyzx|
+mul r0.xyz, r0.xyzx, l(0.454545, 0.454545, 0.454545, 0.000000)
+exp o0.xyz, r0.xyzx
+mov o0.w, l(1.000000)
+ret
+// Approximately 179 instruction slots used
+#endif
+
+const BYTE g_meshPS[] =
+{
+ 68, 88, 66, 67, 72, 67,
+ 173, 99, 108, 111, 205, 171,
+ 203, 27, 188, 233, 104, 15,
+ 95, 167, 1, 0, 0, 0,
+ 40, 30, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 148, 4, 0, 0, 184, 5,
+ 0, 0, 236, 5, 0, 0,
+ 140, 29, 0, 0, 82, 68,
+ 69, 70, 88, 4, 0, 0,
+ 1, 0, 0, 0, 196, 0,
+ 0, 0, 3, 0, 0, 0,
+ 60, 0, 0, 0, 0, 5,
+ 255, 255, 0, 1, 0, 0,
+ 36, 4, 0, 0, 82, 68,
+ 49, 49, 60, 0, 0, 0,
+ 24, 0, 0, 0, 32, 0,
+ 0, 0, 40, 0, 0, 0,
+ 36, 0, 0, 0, 12, 0,
+ 0, 0, 0, 0, 0, 0,
+ 156, 0, 0, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 3, 0,
+ 0, 0, 170, 0, 0, 0,
+ 2, 0, 0, 0, 5, 0,
+ 0, 0, 4, 0, 0, 0,
+ 255, 255, 255, 255, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 1, 0, 0, 0, 184, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 1, 0, 0, 0,
+ 115, 104, 97, 100, 111, 119,
+ 83, 97, 109, 112, 108, 101,
+ 114, 0, 115, 104, 97, 100,
+ 111, 119, 84, 101, 120, 116,
+ 117, 114, 101, 0, 99, 111,
+ 110, 115, 116, 66, 117, 102,
+ 0, 171, 171, 171, 184, 0,
+ 0, 0, 1, 0, 0, 0,
+ 220, 0, 0, 0, 64, 2,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 4, 1,
+ 0, 0, 0, 0, 0, 0,
+ 64, 2, 0, 0, 2, 0,
+ 0, 0, 0, 4, 0, 0,
+ 0, 0, 0, 0, 255, 255,
+ 255, 255, 0, 0, 0, 0,
+ 255, 255, 255, 255, 0, 0,
+ 0, 0, 103, 80, 97, 114,
+ 97, 109, 115, 0, 77, 101,
+ 115, 104, 83, 104, 97, 100,
+ 101, 114, 67, 111, 110, 115,
+ 116, 0, 109, 111, 100, 101,
+ 108, 86, 105, 101, 119, 80,
+ 114, 111, 106, 101, 99, 116,
+ 105, 111, 110, 0, 102, 108,
+ 111, 97, 116, 52, 120, 52,
+ 0, 171, 171, 171, 3, 0,
+ 3, 0, 4, 0, 4, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 48, 1, 0, 0, 109, 111,
+ 100, 101, 108, 86, 105, 101,
+ 119, 0, 111, 98, 106, 101,
+ 99, 116, 84, 114, 97, 110,
+ 115, 102, 111, 114, 109, 0,
+ 108, 105, 103, 104, 116, 84,
+ 114, 97, 110, 115, 102, 111,
+ 114, 109, 0, 99, 108, 105,
+ 112, 80, 108, 97, 110, 101,
+ 0, 102, 108, 111, 97, 116,
+ 52, 0, 171, 171, 1, 0,
+ 3, 0, 1, 0, 4, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 147, 1, 0, 0, 102, 111,
+ 103, 67, 111, 108, 111, 114,
+ 0, 99, 111, 108, 111, 114,
+ 0, 115, 101, 99, 111, 110,
+ 100, 97, 114, 121, 67, 111,
+ 108, 111, 114, 0, 115, 104,
+ 97, 100, 111, 119, 84, 97,
+ 112, 115, 0, 171, 171, 171,
+ 1, 0, 3, 0, 1, 0,
+ 4, 0, 12, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 147, 1, 0, 0,
+ 108, 105, 103, 104, 116, 80,
+ 111, 115, 0, 102, 108, 111,
+ 97, 116, 51, 0, 1, 0,
+ 3, 0, 1, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 25, 2, 0, 0, 95, 112,
+ 97, 100, 48, 0, 102, 108,
+ 111, 97, 116, 0, 0, 0,
+ 3, 0, 1, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 74, 2, 0, 0, 108, 105,
+ 103, 104, 116, 68, 105, 114,
+ 0, 95, 112, 97, 100, 49,
+ 0, 98, 105, 97, 115, 0,
+ 101, 120, 112, 97, 110, 100,
+ 0, 115, 112, 111, 116, 77,
+ 105, 110, 0, 115, 112, 111,
+ 116, 77, 97, 120, 0, 103,
+ 114, 105, 100, 0, 105, 110,
+ 116, 0, 0, 0, 2, 0,
+ 1, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 164, 2,
+ 0, 0, 116, 101, 120, 0,
+ 99, 111, 108, 111, 114, 65,
+ 114, 114, 97, 121, 0, 105,
+ 110, 99, 114, 101, 97, 115,
+ 101, 71, 102, 120, 76, 111,
+ 97, 100, 70, 111, 114, 65,
+ 115, 121, 110, 99, 67, 111,
+ 109, 112, 117, 116, 101, 84,
+ 101, 115, 116, 105, 110, 103,
+ 0, 171, 171, 171, 28, 1,
+ 0, 0, 60, 1, 0, 0,
+ 0, 0, 0, 0, 96, 1,
+ 0, 0, 60, 1, 0, 0,
+ 64, 0, 0, 0, 106, 1,
+ 0, 0, 60, 1, 0, 0,
+ 128, 0, 0, 0, 122, 1,
+ 0, 0, 60, 1, 0, 0,
+ 192, 0, 0, 0, 137, 1,
+ 0, 0, 156, 1, 0, 0,
+ 0, 1, 0, 0, 192, 1,
+ 0, 0, 156, 1, 0, 0,
+ 16, 1, 0, 0, 201, 1,
+ 0, 0, 156, 1, 0, 0,
+ 32, 1, 0, 0, 207, 1,
+ 0, 0, 156, 1, 0, 0,
+ 48, 1, 0, 0, 222, 1,
+ 0, 0, 236, 1, 0, 0,
+ 64, 1, 0, 0, 16, 2,
+ 0, 0, 32, 2, 0, 0,
+ 0, 2, 0, 0, 68, 2,
+ 0, 0, 80, 2, 0, 0,
+ 12, 2, 0, 0, 116, 2,
+ 0, 0, 32, 2, 0, 0,
+ 16, 2, 0, 0, 125, 2,
+ 0, 0, 80, 2, 0, 0,
+ 28, 2, 0, 0, 131, 2,
+ 0, 0, 80, 2, 0, 0,
+ 32, 2, 0, 0, 136, 2,
+ 0, 0, 80, 2, 0, 0,
+ 36, 2, 0, 0, 143, 2,
+ 0, 0, 80, 2, 0, 0,
+ 40, 2, 0, 0, 151, 2,
+ 0, 0, 80, 2, 0, 0,
+ 44, 2, 0, 0, 159, 2,
+ 0, 0, 168, 2, 0, 0,
+ 48, 2, 0, 0, 204, 2,
+ 0, 0, 168, 2, 0, 0,
+ 52, 2, 0, 0, 208, 2,
+ 0, 0, 168, 2, 0, 0,
+ 56, 2, 0, 0, 219, 2,
+ 0, 0, 168, 2, 0, 0,
+ 60, 2, 0, 0, 5, 0,
+ 0, 0, 1, 0, 144, 0,
+ 0, 0, 21, 0, 4, 3,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 12, 1, 0, 0, 77, 105,
+ 99, 114, 111, 115, 111, 102,
+ 116, 32, 40, 82, 41, 32,
+ 72, 76, 83, 76, 32, 83,
+ 104, 97, 100, 101, 114, 32,
+ 67, 111, 109, 112, 105, 108,
+ 101, 114, 32, 54, 46, 51,
+ 46, 57, 54, 48, 48, 46,
+ 49, 54, 51, 56, 52, 0,
+ 171, 171, 73, 83, 71, 78,
+ 28, 1, 0, 0, 10, 0,
+ 0, 0, 8, 0, 0, 0,
+ 248, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 3, 0, 0, 0, 0, 0,
+ 0, 0, 15, 0, 0, 0,
+ 4, 1, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 1, 0,
+ 0, 0, 7, 7, 0, 0,
+ 4, 1, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 2, 0,
+ 0, 0, 15, 15, 0, 0,
+ 4, 1, 0, 0, 2, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 3, 0,
+ 0, 0, 7, 0, 0, 0,
+ 4, 1, 0, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 4, 0,
+ 0, 0, 7, 7, 0, 0,
+ 4, 1, 0, 0, 4, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 5, 0,
+ 0, 0, 15, 7, 0, 0,
+ 4, 1, 0, 0, 5, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 6, 0,
+ 0, 0, 3, 0, 0, 0,
+ 4, 1, 0, 0, 6, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 7, 0,
+ 0, 0, 15, 7, 0, 0,
+ 4, 1, 0, 0, 7, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 8, 0,
+ 0, 0, 15, 4, 0, 0,
+ 13, 1, 0, 0, 0, 0,
+ 0, 0, 9, 0, 0, 0,
+ 1, 0, 0, 0, 9, 0,
+ 0, 0, 1, 1, 0, 0,
+ 83, 86, 95, 80, 79, 83,
+ 73, 84, 73, 79, 78, 0,
+ 84, 69, 88, 67, 79, 79,
+ 82, 68, 0, 83, 86, 95,
+ 73, 115, 70, 114, 111, 110,
+ 116, 70, 97, 99, 101, 0,
+ 79, 83, 71, 78, 44, 0,
+ 0, 0, 1, 0, 0, 0,
+ 8, 0, 0, 0, 32, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
+ 15, 0, 0, 0, 83, 86,
+ 95, 84, 65, 82, 71, 69,
+ 84, 0, 171, 171, 83, 72,
+ 69, 88, 152, 23, 0, 0,
+ 80, 0, 0, 0, 230, 5,
+ 0, 0, 106, 8, 0, 1,
+ 89, 0, 0, 4, 70, 142,
+ 32, 0, 0, 0, 0, 0,
+ 36, 0, 0, 0, 90, 8,
+ 0, 3, 0, 96, 16, 0,
+ 0, 0, 0, 0, 88, 24,
+ 0, 4, 0, 112, 16, 0,
+ 0, 0, 0, 0, 85, 85,
+ 0, 0, 98, 16, 0, 3,
+ 114, 16, 16, 0, 1, 0,
+ 0, 0, 98, 16, 0, 3,
+ 242, 16, 16, 0, 2, 0,
+ 0, 0, 98, 16, 0, 3,
+ 114, 16, 16, 0, 4, 0,
+ 0, 0, 98, 16, 0, 3,
+ 114, 16, 16, 0, 5, 0,
+ 0, 0, 98, 16, 0, 3,
+ 114, 16, 16, 0, 7, 0,
+ 0, 0, 98, 16, 0, 3,
+ 66, 16, 16, 0, 8, 0,
+ 0, 0, 99, 8, 0, 4,
+ 18, 16, 16, 0, 9, 0,
+ 0, 0, 9, 0, 0, 0,
+ 101, 0, 0, 3, 242, 32,
+ 16, 0, 0, 0, 0, 0,
+ 104, 0, 0, 2, 6, 0,
+ 0, 0, 14, 0, 0, 7,
+ 114, 0, 16, 0, 0, 0,
+ 0, 0, 70, 18, 16, 0,
+ 2, 0, 0, 0, 246, 31,
+ 16, 0, 2, 0, 0, 0,
+ 50, 0, 0, 15, 114, 0,
+ 16, 0, 1, 0, 0, 0,
+ 70, 2, 16, 0, 0, 0,
+ 0, 0, 2, 64, 0, 0,
+ 0, 0, 0, 63, 0, 0,
+ 0, 63, 0, 0, 128, 63,
+ 0, 0, 0, 0, 2, 64,
+ 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 49, 0, 0, 7, 66, 0,
+ 16, 0, 0, 0, 0, 0,
+ 10, 0, 16, 0, 1, 0,
+ 0, 0, 1, 64, 0, 0,
+ 0, 0, 0, 0, 49, 0,
+ 0, 7, 130, 0, 16, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 10, 0, 16, 0, 1, 0,
+ 0, 0, 60, 0, 0, 7,
+ 66, 0, 16, 0, 0, 0,
+ 0, 0, 58, 0, 16, 0,
+ 0, 0, 0, 0, 42, 0,
+ 16, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 130, 0,
+ 16, 0, 0, 0, 0, 0,
+ 26, 128, 32, 128, 65, 0,
+ 0, 0, 0, 0, 0, 0,
+ 20, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 56, 0, 0, 8, 18, 0,
+ 16, 0, 2, 0, 0, 0,
+ 10, 128, 32, 0, 0, 0,
+ 0, 0, 20, 0, 0, 0,
+ 1, 64, 0, 0, 111, 18,
+ 3, 59, 56, 0, 0, 7,
+ 34, 0, 16, 0, 2, 0,
+ 0, 0, 58, 0, 16, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 111, 18, 3, 59,
+ 0, 0, 0, 8, 130, 0,
+ 16, 0, 1, 0, 0, 0,
+ 26, 0, 16, 128, 65, 0,
+ 0, 0, 1, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 0, 0, 0, 7,
+ 50, 0, 16, 0, 2, 0,
+ 0, 0, 198, 0, 16, 0,
+ 1, 0, 0, 0, 70, 0,
+ 16, 0, 2, 0, 0, 0,
+ 70, 0, 0, 141, 194, 0,
+ 0, 128, 67, 85, 21, 0,
+ 130, 0, 16, 0, 0, 0,
+ 0, 0, 70, 0, 16, 0,
+ 2, 0, 0, 0, 6, 112,
+ 16, 0, 0, 0, 0, 0,
+ 0, 96, 16, 0, 0, 0,
+ 0, 0, 42, 0, 16, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 9, 18, 0, 16, 0,
+ 2, 0, 0, 0, 26, 128,
+ 32, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 21, 0,
+ 0, 0, 1, 64, 0, 0,
+ 0, 0, 128, 63, 56, 0,
+ 0, 8, 18, 0, 16, 0,
+ 3, 0, 0, 0, 10, 128,
+ 32, 0, 0, 0, 0, 0,
+ 21, 0, 0, 0, 1, 64,
+ 0, 0, 111, 18, 3, 59,
+ 56, 0, 0, 7, 34, 0,
+ 16, 0, 3, 0, 0, 0,
+ 10, 0, 16, 0, 2, 0,
+ 0, 0, 1, 64, 0, 0,
+ 111, 18, 3, 59, 0, 0,
+ 0, 7, 50, 0, 16, 0,
+ 2, 0, 0, 0, 198, 0,
+ 16, 0, 1, 0, 0, 0,
+ 70, 0, 16, 0, 3, 0,
+ 0, 0, 70, 0, 0, 141,
+ 194, 0, 0, 128, 67, 85,
+ 21, 0, 18, 0, 16, 0,
+ 2, 0, 0, 0, 70, 0,
+ 16, 0, 2, 0, 0, 0,
+ 6, 112, 16, 0, 0, 0,
+ 0, 0, 0, 96, 16, 0,
+ 0, 0, 0, 0, 42, 0,
+ 16, 0, 1, 0, 0, 0,
+ 0, 0, 0, 9, 34, 0,
+ 16, 0, 2, 0, 0, 0,
+ 26, 128, 32, 128, 65, 0,
+ 0, 0, 0, 0, 0, 0,
+ 22, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 56, 0, 0, 8, 18, 0,
+ 16, 0, 3, 0, 0, 0,
+ 10, 128, 32, 0, 0, 0,
+ 0, 0, 22, 0, 0, 0,
+ 1, 64, 0, 0, 111, 18,
+ 3, 59, 56, 0, 0, 7,
+ 34, 0, 16, 0, 3, 0,
+ 0, 0, 26, 0, 16, 0,
+ 2, 0, 0, 0, 1, 64,
+ 0, 0, 111, 18, 3, 59,
+ 0, 0, 0, 7, 98, 0,
+ 16, 0, 2, 0, 0, 0,
+ 6, 3, 16, 0, 1, 0,
+ 0, 0, 6, 1, 16, 0,
+ 3, 0, 0, 0, 70, 0,
+ 0, 141, 194, 0, 0, 128,
+ 67, 85, 21, 0, 34, 0,
+ 16, 0, 2, 0, 0, 0,
+ 150, 5, 16, 0, 2, 0,
+ 0, 0, 6, 112, 16, 0,
+ 0, 0, 0, 0, 0, 96,
+ 16, 0, 0, 0, 0, 0,
+ 42, 0, 16, 0, 1, 0,
+ 0, 0, 0, 0, 0, 9,
+ 66, 0, 16, 0, 2, 0,
+ 0, 0, 26, 128, 32, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 23, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 56, 0, 0, 8,
+ 18, 0, 16, 0, 3, 0,
+ 0, 0, 10, 128, 32, 0,
+ 0, 0, 0, 0, 23, 0,
+ 0, 0, 1, 64, 0, 0,
+ 111, 18, 3, 59, 56, 0,
+ 0, 7, 34, 0, 16, 0,
+ 3, 0, 0, 0, 42, 0,
+ 16, 0, 2, 0, 0, 0,
+ 1, 64, 0, 0, 111, 18,
+ 3, 59, 0, 0, 0, 7,
+ 194, 0, 16, 0, 2, 0,
+ 0, 0, 6, 12, 16, 0,
+ 1, 0, 0, 0, 6, 4,
+ 16, 0, 3, 0, 0, 0,
+ 70, 0, 0, 141, 194, 0,
+ 0, 128, 67, 85, 21, 0,
+ 66, 0, 16, 0, 2, 0,
+ 0, 0, 230, 10, 16, 0,
+ 2, 0, 0, 0, 6, 112,
+ 16, 0, 0, 0, 0, 0,
+ 0, 96, 16, 0, 0, 0,
+ 0, 0, 42, 0, 16, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 9, 130, 0, 16, 0,
+ 2, 0, 0, 0, 26, 128,
+ 32, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 24, 0,
+ 0, 0, 1, 64, 0, 0,
+ 0, 0, 128, 63, 56, 0,
+ 0, 8, 18, 0, 16, 0,
+ 3, 0, 0, 0, 10, 128,
+ 32, 0, 0, 0, 0, 0,
+ 24, 0, 0, 0, 1, 64,
+ 0, 0, 111, 18, 3, 59,
+ 56, 0, 0, 7, 34, 0,
+ 16, 0, 3, 0, 0, 0,
+ 58, 0, 16, 0, 2, 0,
+ 0, 0, 1, 64, 0, 0,
+ 111, 18, 3, 59, 0, 0,
+ 0, 7, 50, 0, 16, 0,
+ 3, 0, 0, 0, 198, 0,
+ 16, 0, 1, 0, 0, 0,
+ 70, 0, 16, 0, 3, 0,
+ 0, 0, 70, 0, 0, 141,
+ 194, 0, 0, 128, 67, 85,
+ 21, 0, 130, 0, 16, 0,
+ 2, 0, 0, 0, 70, 0,
+ 16, 0, 3, 0, 0, 0,
+ 6, 112, 16, 0, 0, 0,
+ 0, 0, 0, 96, 16, 0,
+ 0, 0, 0, 0, 42, 0,
+ 16, 0, 1, 0, 0, 0,
+ 0, 0, 0, 9, 18, 0,
+ 16, 0, 3, 0, 0, 0,
+ 26, 128, 32, 128, 65, 0,
+ 0, 0, 0, 0, 0, 0,
+ 25, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 56, 0, 0, 8, 18, 0,
+ 16, 0, 4, 0, 0, 0,
+ 10, 128, 32, 0, 0, 0,
+ 0, 0, 25, 0, 0, 0,
+ 1, 64, 0, 0, 111, 18,
+ 3, 59, 56, 0, 0, 7,
+ 34, 0, 16, 0, 4, 0,
+ 0, 0, 10, 0, 16, 0,
+ 3, 0, 0, 0, 1, 64,
+ 0, 0, 111, 18, 3, 59,
+ 0, 0, 0, 7, 50, 0,
+ 16, 0, 3, 0, 0, 0,
+ 198, 0, 16, 0, 1, 0,
+ 0, 0, 70, 0, 16, 0,
+ 4, 0, 0, 0, 70, 0,
+ 0, 141, 194, 0, 0, 128,
+ 67, 85, 21, 0, 18, 0,
+ 16, 0, 3, 0, 0, 0,
+ 70, 0, 16, 0, 3, 0,
+ 0, 0, 6, 112, 16, 0,
+ 0, 0, 0, 0, 0, 96,
+ 16, 0, 0, 0, 0, 0,
+ 42, 0, 16, 0, 1, 0,
+ 0, 0, 0, 0, 0, 9,
+ 34, 0, 16, 0, 3, 0,
+ 0, 0, 26, 128, 32, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 26, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 56, 0, 0, 8,
+ 18, 0, 16, 0, 4, 0,
+ 0, 0, 10, 128, 32, 0,
+ 0, 0, 0, 0, 26, 0,
+ 0, 0, 1, 64, 0, 0,
+ 111, 18, 3, 59, 56, 0,
+ 0, 7, 34, 0, 16, 0,
+ 4, 0, 0, 0, 26, 0,
+ 16, 0, 3, 0, 0, 0,
+ 1, 64, 0, 0, 111, 18,
+ 3, 59, 0, 0, 0, 7,
+ 98, 0, 16, 0, 3, 0,
+ 0, 0, 6, 3, 16, 0,
+ 1, 0, 0, 0, 6, 1,
+ 16, 0, 4, 0, 0, 0,
+ 70, 0, 0, 141, 194, 0,
+ 0, 128, 67, 85, 21, 0,
+ 34, 0, 16, 0, 3, 0,
+ 0, 0, 150, 5, 16, 0,
+ 3, 0, 0, 0, 6, 112,
+ 16, 0, 0, 0, 0, 0,
+ 0, 96, 16, 0, 0, 0,
+ 0, 0, 42, 0, 16, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 9, 66, 0, 16, 0,
+ 3, 0, 0, 0, 26, 128,
+ 32, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 27, 0,
+ 0, 0, 1, 64, 0, 0,
+ 0, 0, 128, 63, 56, 0,
+ 0, 8, 18, 0, 16, 0,
+ 4, 0, 0, 0, 10, 128,
+ 32, 0, 0, 0, 0, 0,
+ 27, 0, 0, 0, 1, 64,
+ 0, 0, 111, 18, 3, 59,
+ 56, 0, 0, 7, 34, 0,
+ 16, 0, 4, 0, 0, 0,
+ 42, 0, 16, 0, 3, 0,
+ 0, 0, 1, 64, 0, 0,
+ 111, 18, 3, 59, 0, 0,
+ 0, 7, 194, 0, 16, 0,
+ 3, 0, 0, 0, 6, 12,
+ 16, 0, 1, 0, 0, 0,
+ 6, 4, 16, 0, 4, 0,
+ 0, 0, 70, 0, 0, 141,
+ 194, 0, 0, 128, 67, 85,
+ 21, 0, 66, 0, 16, 0,
+ 3, 0, 0, 0, 230, 10,
+ 16, 0, 3, 0, 0, 0,
+ 6, 112, 16, 0, 0, 0,
+ 0, 0, 0, 96, 16, 0,
+ 0, 0, 0, 0, 42, 0,
+ 16, 0, 1, 0, 0, 0,
+ 0, 0, 0, 9, 130, 0,
+ 16, 0, 3, 0, 0, 0,
+ 26, 128, 32, 128, 65, 0,
+ 0, 0, 0, 0, 0, 0,
+ 28, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 56, 0, 0, 8, 18, 0,
+ 16, 0, 4, 0, 0, 0,
+ 10, 128, 32, 0, 0, 0,
+ 0, 0, 28, 0, 0, 0,
+ 1, 64, 0, 0, 111, 18,
+ 3, 59, 56, 0, 0, 7,
+ 34, 0, 16, 0, 4, 0,
+ 0, 0, 58, 0, 16, 0,
+ 3, 0, 0, 0, 1, 64,
+ 0, 0, 111, 18, 3, 59,
+ 0, 0, 0, 7, 50, 0,
+ 16, 0, 4, 0, 0, 0,
+ 198, 0, 16, 0, 1, 0,
+ 0, 0, 70, 0, 16, 0,
+ 4, 0, 0, 0, 70, 0,
+ 0, 141, 194, 0, 0, 128,
+ 67, 85, 21, 0, 130, 0,
+ 16, 0, 3, 0, 0, 0,
+ 70, 0, 16, 0, 4, 0,
+ 0, 0, 6, 112, 16, 0,
+ 0, 0, 0, 0, 0, 96,
+ 16, 0, 0, 0, 0, 0,
+ 42, 0, 16, 0, 1, 0,
+ 0, 0, 0, 0, 0, 9,
+ 18, 0, 16, 0, 4, 0,
+ 0, 0, 26, 128, 32, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 29, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 56, 0, 0, 8,
+ 18, 0, 16, 0, 5, 0,
+ 0, 0, 10, 128, 32, 0,
+ 0, 0, 0, 0, 29, 0,
+ 0, 0, 1, 64, 0, 0,
+ 111, 18, 3, 59, 56, 0,
+ 0, 7, 34, 0, 16, 0,
+ 5, 0, 0, 0, 10, 0,
+ 16, 0, 4, 0, 0, 0,
+ 1, 64, 0, 0, 111, 18,
+ 3, 59, 0, 0, 0, 7,
+ 50, 0, 16, 0, 4, 0,
+ 0, 0, 198, 0, 16, 0,
+ 1, 0, 0, 0, 70, 0,
+ 16, 0, 5, 0, 0, 0,
+ 70, 0, 0, 141, 194, 0,
+ 0, 128, 67, 85, 21, 0,
+ 18, 0, 16, 0, 4, 0,
+ 0, 0, 70, 0, 16, 0,
+ 4, 0, 0, 0, 6, 112,
+ 16, 0, 0, 0, 0, 0,
+ 0, 96, 16, 0, 0, 0,
+ 0, 0, 42, 0, 16, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 9, 34, 0, 16, 0,
+ 4, 0, 0, 0, 26, 128,
+ 32, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 30, 0,
+ 0, 0, 1, 64, 0, 0,
+ 0, 0, 128, 63, 56, 0,
+ 0, 8, 18, 0, 16, 0,
+ 5, 0, 0, 0, 10, 128,
+ 32, 0, 0, 0, 0, 0,
+ 30, 0, 0, 0, 1, 64,
+ 0, 0, 111, 18, 3, 59,
+ 56, 0, 0, 7, 34, 0,
+ 16, 0, 5, 0, 0, 0,
+ 26, 0, 16, 0, 4, 0,
+ 0, 0, 1, 64, 0, 0,
+ 111, 18, 3, 59, 0, 0,
+ 0, 7, 98, 0, 16, 0,
+ 4, 0, 0, 0, 6, 3,
+ 16, 0, 1, 0, 0, 0,
+ 6, 1, 16, 0, 5, 0,
+ 0, 0, 70, 0, 0, 141,
+ 194, 0, 0, 128, 67, 85,
+ 21, 0, 34, 0, 16, 0,
+ 4, 0, 0, 0, 150, 5,
+ 16, 0, 4, 0, 0, 0,
+ 6, 112, 16, 0, 0, 0,
+ 0, 0, 0, 96, 16, 0,
+ 0, 0, 0, 0, 42, 0,
+ 16, 0, 1, 0, 0, 0,
+ 0, 0, 0, 9, 66, 0,
+ 16, 0, 4, 0, 0, 0,
+ 26, 128, 32, 128, 65, 0,
+ 0, 0, 0, 0, 0, 0,
+ 31, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 56, 0, 0, 8, 18, 0,
+ 16, 0, 5, 0, 0, 0,
+ 10, 128, 32, 0, 0, 0,
+ 0, 0, 31, 0, 0, 0,
+ 1, 64, 0, 0, 111, 18,
+ 3, 59, 56, 0, 0, 7,
+ 34, 0, 16, 0, 5, 0,
+ 0, 0, 42, 0, 16, 0,
+ 4, 0, 0, 0, 1, 64,
+ 0, 0, 111, 18, 3, 59,
+ 0, 0, 0, 7, 146, 0,
+ 16, 0, 1, 0, 0, 0,
+ 6, 12, 16, 0, 1, 0,
+ 0, 0, 6, 4, 16, 0,
+ 5, 0, 0, 0, 70, 0,
+ 0, 141, 194, 0, 0, 128,
+ 67, 85, 21, 0, 18, 0,
+ 16, 0, 1, 0, 0, 0,
+ 198, 0, 16, 0, 1, 0,
+ 0, 0, 6, 112, 16, 0,
+ 0, 0, 0, 0, 0, 96,
+ 16, 0, 0, 0, 0, 0,
+ 42, 0, 16, 0, 1, 0,
+ 0, 0, 31, 0, 0, 3,
+ 42, 0, 16, 0, 0, 0,
+ 0, 0, 49, 0, 0, 7,
+ 66, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 0,
+ 1, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 0, 0,
+ 49, 0, 0, 7, 34, 0,
+ 16, 0, 1, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 26, 0, 16, 0,
+ 1, 0, 0, 0, 60, 0,
+ 0, 7, 66, 0, 16, 0,
+ 0, 0, 0, 0, 42, 0,
+ 16, 0, 0, 0, 0, 0,
+ 26, 0, 16, 0, 1, 0,
+ 0, 0, 31, 0, 0, 3,
+ 42, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 0, 7,
+ 66, 0, 16, 0, 0, 0,
+ 0, 0, 58, 0, 16, 0,
+ 0, 0, 0, 0, 10, 0,
+ 16, 0, 2, 0, 0, 0,
+ 0, 0, 0, 7, 66, 0,
+ 16, 0, 0, 0, 0, 0,
+ 26, 0, 16, 0, 2, 0,
+ 0, 0, 42, 0, 16, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 7, 66, 0, 16, 0,
+ 0, 0, 0, 0, 42, 0,
+ 16, 0, 2, 0, 0, 0,
+ 42, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 0, 7,
+ 66, 0, 16, 0, 0, 0,
+ 0, 0, 58, 0, 16, 0,
+ 2, 0, 0, 0, 42, 0,
+ 16, 0, 0, 0, 0, 0,
+ 0, 0, 0, 7, 66, 0,
+ 16, 0, 0, 0, 0, 0,
+ 10, 0, 16, 0, 3, 0,
+ 0, 0, 42, 0, 16, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 7, 66, 0, 16, 0,
+ 0, 0, 0, 0, 26, 0,
+ 16, 0, 3, 0, 0, 0,
+ 42, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 0, 7,
+ 66, 0, 16, 0, 0, 0,
+ 0, 0, 42, 0, 16, 0,
+ 3, 0, 0, 0, 42, 0,
+ 16, 0, 0, 0, 0, 0,
+ 0, 0, 0, 7, 66, 0,
+ 16, 0, 0, 0, 0, 0,
+ 58, 0, 16, 0, 3, 0,
+ 0, 0, 42, 0, 16, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 7, 66, 0, 16, 0,
+ 0, 0, 0, 0, 10, 0,
+ 16, 0, 4, 0, 0, 0,
+ 42, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 0, 7,
+ 66, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 0,
+ 4, 0, 0, 0, 42, 0,
+ 16, 0, 0, 0, 0, 0,
+ 0, 0, 0, 7, 66, 0,
+ 16, 0, 0, 0, 0, 0,
+ 10, 0, 16, 0, 1, 0,
+ 0, 0, 42, 0, 16, 0,
+ 0, 0, 0, 0, 56, 0,
+ 0, 7, 66, 0, 16, 0,
+ 0, 0, 0, 0, 42, 0,
+ 16, 0, 0, 0, 0, 0,
+ 1, 64, 0, 0, 171, 170,
+ 170, 61, 18, 0, 0, 1,
+ 54, 0, 0, 5, 66, 0,
+ 16, 0, 0, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 21, 0, 0, 1,
+ 18, 0, 0, 1, 54, 0,
+ 0, 5, 66, 0, 16, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 21, 0, 0, 1, 15, 0,
+ 0, 7, 18, 0, 16, 0,
+ 0, 0, 0, 0, 70, 0,
+ 16, 0, 0, 0, 0, 0,
+ 70, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 0, 10,
+ 34, 0, 16, 0, 0, 0,
+ 0, 0, 58, 128, 32, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 34, 0, 0, 0,
+ 42, 128, 32, 0, 0, 0,
+ 0, 0, 34, 0, 0, 0,
+ 0, 0, 0, 9, 18, 0,
+ 16, 0, 0, 0, 0, 0,
+ 10, 0, 16, 0, 0, 0,
+ 0, 0, 58, 128, 32, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 34, 0, 0, 0,
+ 14, 0, 0, 10, 34, 0,
+ 16, 0, 0, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 128, 63, 0, 0, 128, 63,
+ 0, 0, 128, 63, 0, 0,
+ 128, 63, 26, 0, 16, 0,
+ 0, 0, 0, 0, 56, 32,
+ 0, 7, 18, 0, 16, 0,
+ 0, 0, 0, 0, 26, 0,
+ 16, 0, 0, 0, 0, 0,
+ 10, 0, 16, 0, 0, 0,
+ 0, 0, 50, 0, 0, 9,
+ 34, 0, 16, 0, 0, 0,
+ 0, 0, 10, 0, 16, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 0, 192,
+ 1, 64, 0, 0, 0, 0,
+ 64, 64, 56, 0, 0, 7,
+ 18, 0, 16, 0, 0, 0,
+ 0, 0, 10, 0, 16, 0,
+ 0, 0, 0, 0, 10, 0,
+ 16, 0, 0, 0, 0, 0,
+ 56, 0, 0, 7, 18, 0,
+ 16, 0, 0, 0, 0, 0,
+ 10, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 0,
+ 0, 0, 0, 0, 52, 0,
+ 0, 10, 82, 0, 16, 0,
+ 0, 0, 0, 0, 6, 2,
+ 16, 0, 0, 0, 0, 0,
+ 2, 64, 0, 0, 205, 204,
+ 76, 61, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0,
+ 0, 0, 55, 0, 0, 10,
+ 114, 0, 16, 0, 1, 0,
+ 0, 0, 6, 16, 16, 0,
+ 9, 0, 0, 0, 70, 18,
+ 16, 0, 1, 0, 0, 0,
+ 70, 18, 16, 128, 65, 0,
+ 0, 0, 1, 0, 0, 0,
+ 55, 0, 0, 9, 114, 0,
+ 16, 0, 2, 0, 0, 0,
+ 6, 16, 16, 0, 9, 0,
+ 0, 0, 70, 18, 16, 0,
+ 5, 0, 0, 0, 70, 18,
+ 16, 0, 7, 0, 0, 0,
+ 39, 0, 0, 8, 34, 0,
+ 16, 0, 0, 0, 0, 0,
+ 10, 128, 32, 0, 0, 0,
+ 0, 0, 35, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 0, 0, 49, 0, 0, 7,
+ 130, 0, 16, 0, 0, 0,
+ 0, 0, 1, 64, 0, 0,
+ 82, 184, 126, 63, 26, 0,
+ 16, 0, 1, 0, 0, 0,
+ 1, 0, 0, 7, 130, 0,
+ 16, 0, 0, 0, 0, 0,
+ 58, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 0,
+ 0, 0, 0, 0, 31, 0,
+ 4, 3, 58, 0, 16, 0,
+ 0, 0, 0, 0, 122, 0,
+ 0, 5, 50, 0, 16, 0,
+ 3, 0, 0, 0, 134, 16,
+ 16, 0, 4, 0, 0, 0,
+ 124, 0, 0, 5, 194, 0,
+ 16, 0, 3, 0, 0, 0,
+ 6, 24, 16, 0, 4, 0,
+ 0, 0, 52, 0, 0, 9,
+ 50, 0, 16, 0, 3, 0,
+ 0, 0, 230, 10, 16, 128,
+ 129, 0, 0, 0, 3, 0,
+ 0, 0, 70, 0, 16, 128,
+ 129, 0, 0, 0, 3, 0,
+ 0, 0, 52, 0, 0, 7,
+ 130, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 0,
+ 3, 0, 0, 0, 10, 0,
+ 16, 0, 3, 0, 0, 0,
+ 50, 0, 0, 13, 50, 0,
+ 16, 0, 3, 0, 0, 0,
+ 246, 15, 16, 128, 65, 0,
+ 0, 0, 0, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 63, 0, 0, 0, 63,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 134, 16, 16, 0,
+ 4, 0, 0, 0, 50, 0,
+ 0, 12, 194, 0, 16, 0,
+ 3, 0, 0, 0, 246, 15,
+ 16, 0, 0, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0,
+ 0, 63, 6, 24, 16, 0,
+ 4, 0, 0, 0, 56, 0,
+ 0, 10, 50, 0, 16, 0,
+ 4, 0, 0, 0, 230, 10,
+ 16, 0, 3, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 63, 0, 0, 0, 63,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 65, 0, 0, 5,
+ 50, 0, 16, 0, 4, 0,
+ 0, 0, 70, 0, 16, 0,
+ 4, 0, 0, 0, 50, 0,
+ 0, 13, 194, 0, 16, 0,
+ 3, 0, 0, 0, 166, 14,
+ 16, 0, 3, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0,
+ 0, 63, 6, 4, 16, 128,
+ 65, 0, 0, 0, 4, 0,
+ 0, 0, 0, 0, 0, 10,
+ 194, 0, 16, 0, 3, 0,
+ 0, 0, 166, 14, 16, 0,
+ 3, 0, 0, 0, 2, 64,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 191, 0, 0, 0, 191,
+ 52, 0, 0, 10, 194, 0,
+ 16, 0, 3, 0, 0, 0,
+ 166, 14, 16, 0, 3, 0,
+ 0, 0, 2, 64, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 50, 0,
+ 0, 12, 194, 0, 16, 0,
+ 3, 0, 0, 0, 166, 14,
+ 16, 0, 3, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 64, 0, 0,
+ 0, 64, 6, 4, 16, 0,
+ 4, 0, 0, 0, 56, 0,
+ 0, 10, 50, 0, 16, 0,
+ 4, 0, 0, 0, 70, 0,
+ 16, 0, 3, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 63, 0, 0, 0, 63,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 65, 0, 0, 5,
+ 50, 0, 16, 0, 4, 0,
+ 0, 0, 70, 0, 16, 0,
+ 4, 0, 0, 0, 50, 0,
+ 0, 13, 50, 0, 16, 0,
+ 3, 0, 0, 0, 70, 0,
+ 16, 0, 3, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 63, 0, 0, 0, 63,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 70, 0, 16, 128,
+ 65, 0, 0, 0, 4, 0,
+ 0, 0, 0, 0, 0, 10,
+ 50, 0, 16, 0, 3, 0,
+ 0, 0, 70, 0, 16, 0,
+ 3, 0, 0, 0, 2, 64,
+ 0, 0, 0, 0, 0, 191,
+ 0, 0, 0, 191, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 52, 0, 0, 10, 50, 0,
+ 16, 0, 3, 0, 0, 0,
+ 70, 0, 16, 0, 3, 0,
+ 0, 0, 2, 64, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 50, 0,
+ 0, 12, 50, 0, 16, 0,
+ 3, 0, 0, 0, 70, 0,
+ 16, 0, 3, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 64, 0, 0, 0, 64,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 70, 0, 16, 0,
+ 4, 0, 0, 0, 0, 0,
+ 0, 8, 50, 0, 16, 0,
+ 3, 0, 0, 0, 70, 0,
+ 16, 128, 65, 0, 0, 0,
+ 3, 0, 0, 0, 230, 10,
+ 16, 0, 3, 0, 0, 0,
+ 14, 0, 0, 7, 50, 0,
+ 16, 0, 3, 0, 0, 0,
+ 70, 0, 16, 0, 3, 0,
+ 0, 0, 246, 15, 16, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 11, 194, 0, 16, 0,
+ 3, 0, 0, 0, 6, 4,
+ 16, 128, 65, 0, 0, 0,
+ 3, 0, 0, 0, 2, 64,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 128, 63, 0, 0, 128, 63,
+ 56, 0, 0, 7, 130, 0,
+ 16, 0, 0, 0, 0, 0,
+ 58, 0, 16, 0, 3, 0,
+ 0, 0, 42, 0, 16, 0,
+ 3, 0, 0, 0, 50, 0,
+ 0, 9, 130, 0, 16, 0,
+ 0, 0, 0, 0, 10, 0,
+ 16, 0, 3, 0, 0, 0,
+ 26, 0, 16, 0, 3, 0,
+ 0, 0, 58, 0, 16, 0,
+ 0, 0, 0, 0, 50, 0,
+ 0, 10, 130, 0, 16, 0,
+ 0, 0, 0, 0, 58, 0,
+ 16, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 62,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 56, 0, 0, 7,
+ 114, 0, 16, 0, 3, 0,
+ 0, 0, 246, 15, 16, 0,
+ 0, 0, 0, 0, 70, 2,
+ 16, 0, 2, 0, 0, 0,
+ 18, 0, 0, 1, 49, 0,
+ 0, 8, 130, 0, 16, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 82, 184, 126, 63,
+ 42, 0, 16, 128, 129, 0,
+ 0, 0, 1, 0, 0, 0,
+ 1, 0, 0, 7, 34, 0,
+ 16, 0, 0, 0, 0, 0,
+ 58, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 0,
+ 0, 0, 0, 0, 122, 0,
+ 0, 5, 50, 0, 16, 0,
+ 4, 0, 0, 0, 22, 21,
+ 16, 0, 4, 0, 0, 0,
+ 124, 0, 0, 5, 194, 0,
+ 16, 0, 4, 0, 0, 0,
+ 86, 17, 16, 0, 4, 0,
+ 0, 0, 52, 0, 0, 9,
+ 50, 0, 16, 0, 4, 0,
+ 0, 0, 230, 10, 16, 128,
+ 129, 0, 0, 0, 4, 0,
+ 0, 0, 70, 0, 16, 128,
+ 129, 0, 0, 0, 4, 0,
+ 0, 0, 52, 0, 0, 7,
+ 130, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 0,
+ 4, 0, 0, 0, 10, 0,
+ 16, 0, 4, 0, 0, 0,
+ 50, 0, 0, 13, 50, 0,
+ 16, 0, 4, 0, 0, 0,
+ 246, 15, 16, 128, 65, 0,
+ 0, 0, 0, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 63, 0, 0, 0, 63,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 22, 21, 16, 0,
+ 4, 0, 0, 0, 50, 0,
+ 0, 12, 194, 0, 16, 0,
+ 4, 0, 0, 0, 246, 15,
+ 16, 0, 0, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0,
+ 0, 63, 86, 17, 16, 0,
+ 4, 0, 0, 0, 56, 0,
+ 0, 10, 50, 0, 16, 0,
+ 5, 0, 0, 0, 230, 10,
+ 16, 0, 4, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 63, 0, 0, 0, 63,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 65, 0, 0, 5,
+ 50, 0, 16, 0, 5, 0,
+ 0, 0, 70, 0, 16, 0,
+ 5, 0, 0, 0, 50, 0,
+ 0, 13, 194, 0, 16, 0,
+ 4, 0, 0, 0, 166, 14,
+ 16, 0, 4, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0,
+ 0, 63, 6, 4, 16, 128,
+ 65, 0, 0, 0, 5, 0,
+ 0, 0, 0, 0, 0, 10,
+ 194, 0, 16, 0, 4, 0,
+ 0, 0, 166, 14, 16, 0,
+ 4, 0, 0, 0, 2, 64,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 191, 0, 0, 0, 191,
+ 52, 0, 0, 10, 194, 0,
+ 16, 0, 4, 0, 0, 0,
+ 166, 14, 16, 0, 4, 0,
+ 0, 0, 2, 64, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 50, 0,
+ 0, 12, 194, 0, 16, 0,
+ 4, 0, 0, 0, 166, 14,
+ 16, 0, 4, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 64, 0, 0,
+ 0, 64, 6, 4, 16, 0,
+ 5, 0, 0, 0, 56, 0,
+ 0, 10, 50, 0, 16, 0,
+ 5, 0, 0, 0, 70, 0,
+ 16, 0, 4, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 63, 0, 0, 0, 63,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 65, 0, 0, 5,
+ 50, 0, 16, 0, 5, 0,
+ 0, 0, 70, 0, 16, 0,
+ 5, 0, 0, 0, 50, 0,
+ 0, 13, 50, 0, 16, 0,
+ 4, 0, 0, 0, 70, 0,
+ 16, 0, 4, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 63, 0, 0, 0, 63,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 70, 0, 16, 128,
+ 65, 0, 0, 0, 5, 0,
+ 0, 0, 0, 0, 0, 10,
+ 50, 0, 16, 0, 4, 0,
+ 0, 0, 70, 0, 16, 0,
+ 4, 0, 0, 0, 2, 64,
+ 0, 0, 0, 0, 0, 191,
+ 0, 0, 0, 191, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 52, 0, 0, 10, 50, 0,
+ 16, 0, 4, 0, 0, 0,
+ 70, 0, 16, 0, 4, 0,
+ 0, 0, 2, 64, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 50, 0,
+ 0, 12, 50, 0, 16, 0,
+ 4, 0, 0, 0, 70, 0,
+ 16, 0, 4, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 64, 0, 0, 0, 64,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 70, 0, 16, 0,
+ 5, 0, 0, 0, 0, 0,
+ 0, 8, 50, 0, 16, 0,
+ 4, 0, 0, 0, 70, 0,
+ 16, 128, 65, 0, 0, 0,
+ 4, 0, 0, 0, 230, 10,
+ 16, 0, 4, 0, 0, 0,
+ 14, 0, 0, 7, 50, 0,
+ 16, 0, 4, 0, 0, 0,
+ 70, 0, 16, 0, 4, 0,
+ 0, 0, 246, 15, 16, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 11, 194, 0, 16, 0,
+ 4, 0, 0, 0, 6, 4,
+ 16, 128, 65, 0, 0, 0,
+ 4, 0, 0, 0, 2, 64,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 128, 63, 0, 0, 128, 63,
+ 56, 0, 0, 7, 130, 0,
+ 16, 0, 0, 0, 0, 0,
+ 58, 0, 16, 0, 4, 0,
+ 0, 0, 42, 0, 16, 0,
+ 4, 0, 0, 0, 50, 0,
+ 0, 9, 130, 0, 16, 0,
+ 0, 0, 0, 0, 10, 0,
+ 16, 0, 4, 0, 0, 0,
+ 26, 0, 16, 0, 4, 0,
+ 0, 0, 58, 0, 16, 0,
+ 0, 0, 0, 0, 50, 0,
+ 0, 10, 130, 0, 16, 0,
+ 0, 0, 0, 0, 58, 0,
+ 16, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 62,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 56, 0, 0, 7,
+ 114, 0, 16, 0, 4, 0,
+ 0, 0, 246, 15, 16, 0,
+ 0, 0, 0, 0, 70, 2,
+ 16, 0, 2, 0, 0, 0,
+ 55, 0, 0, 9, 114, 0,
+ 16, 0, 3, 0, 0, 0,
+ 86, 5, 16, 0, 0, 0,
+ 0, 0, 70, 2, 16, 0,
+ 4, 0, 0, 0, 70, 2,
+ 16, 0, 2, 0, 0, 0,
+ 21, 0, 0, 1, 16, 0,
+ 0, 8, 34, 0, 16, 0,
+ 0, 0, 0, 0, 70, 130,
+ 32, 0, 0, 0, 0, 0,
+ 33, 0, 0, 0, 70, 2,
+ 16, 0, 1, 0, 0, 0,
+ 56, 0, 0, 8, 66, 0,
+ 16, 0, 0, 0, 0, 0,
+ 42, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 52, 0, 0, 7,
+ 66, 0, 16, 0, 0, 0,
+ 0, 0, 42, 0, 16, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 0, 0,
+ 56, 0, 0, 7, 114, 0,
+ 16, 0, 1, 0, 0, 0,
+ 166, 10, 16, 0, 0, 0,
+ 0, 0, 70, 2, 16, 0,
+ 3, 0, 0, 0, 56, 0,
+ 0, 10, 114, 0, 16, 0,
+ 2, 0, 0, 0, 70, 2,
+ 16, 0, 3, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 128, 64, 0, 0, 128, 64,
+ 0, 0, 128, 64, 0, 0,
+ 0, 0, 50, 0, 0, 15,
+ 226, 0, 16, 0, 0, 0,
+ 0, 0, 86, 5, 16, 0,
+ 0, 0, 0, 0, 2, 64,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 191, 0, 0,
+ 0, 191, 0, 0, 128, 191,
+ 2, 64, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0,
+ 0, 0, 50, 0, 0, 15,
+ 226, 0, 16, 0, 0, 0,
+ 0, 0, 86, 14, 16, 0,
+ 0, 0, 0, 0, 2, 64,
+ 0, 0, 0, 0, 0, 0,
+ 11, 215, 163, 60, 206, 204,
+ 76, 60, 148, 194, 245, 59,
+ 2, 64, 0, 0, 0, 0,
+ 0, 0, 205, 204, 204, 60,
+ 205, 204, 204, 60, 143, 194,
+ 245, 60, 56, 0, 0, 7,
+ 226, 0, 16, 0, 0, 0,
+ 0, 0, 86, 14, 16, 0,
+ 0, 0, 0, 0, 6, 9,
+ 16, 0, 2, 0, 0, 0,
+ 56, 0, 0, 7, 226, 0,
+ 16, 0, 0, 0, 0, 0,
+ 6, 0, 16, 0, 0, 0,
+ 0, 0, 86, 14, 16, 0,
+ 0, 0, 0, 0, 50, 0,
+ 0, 9, 114, 0, 16, 0,
+ 0, 0, 0, 0, 70, 2,
+ 16, 0, 1, 0, 0, 0,
+ 6, 0, 16, 0, 0, 0,
+ 0, 0, 150, 7, 16, 0,
+ 0, 0, 0, 0, 56, 0,
+ 0, 8, 130, 0, 16, 0,
+ 0, 0, 0, 0, 42, 16,
+ 16, 0, 8, 0, 0, 0,
+ 58, 128, 32, 0, 0, 0,
+ 0, 0, 17, 0, 0, 0,
+ 56, 0, 0, 7, 130, 0,
+ 16, 0, 0, 0, 0, 0,
+ 58, 0, 16, 0, 0, 0,
+ 0, 0, 1, 64, 0, 0,
+ 59, 170, 184, 63, 25, 0,
+ 0, 5, 130, 0, 16, 0,
+ 0, 0, 0, 0, 58, 0,
+ 16, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 114, 0,
+ 16, 0, 0, 0, 0, 0,
+ 70, 2, 16, 0, 0, 0,
+ 0, 0, 70, 130, 32, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 17, 0, 0, 0,
+ 50, 0, 0, 10, 114, 0,
+ 16, 0, 0, 0, 0, 0,
+ 246, 15, 16, 0, 0, 0,
+ 0, 0, 70, 2, 16, 0,
+ 0, 0, 0, 0, 70, 130,
+ 32, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 47, 0,
+ 0, 6, 114, 0, 16, 0,
+ 0, 0, 0, 0, 70, 2,
+ 16, 128, 129, 0, 0, 0,
+ 0, 0, 0, 0, 56, 0,
+ 0, 10, 114, 0, 16, 0,
+ 0, 0, 0, 0, 70, 2,
+ 16, 0, 0, 0, 0, 0,
+ 2, 64, 0, 0, 47, 186,
+ 232, 62, 47, 186, 232, 62,
+ 47, 186, 232, 62, 0, 0,
+ 0, 0, 25, 0, 0, 5,
+ 114, 32, 16, 0, 0, 0,
+ 0, 0, 70, 2, 16, 0,
+ 0, 0, 0, 0, 54, 0,
+ 0, 5, 130, 32, 16, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 62, 0, 0, 1, 83, 84,
+ 65, 84, 148, 0, 0, 0,
+ 179, 0, 0, 0, 6, 0,
+ 0, 0, 0, 0, 0, 0,
+ 8, 0, 0, 0, 146, 0,
+ 0, 0, 1, 0, 0, 0,
+ 4, 0, 0, 0, 4, 0,
+ 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 12, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 3, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0
+};
diff --git a/demo/d3d11/shaders/meshPS.hlsl b/demo/d3d/shaders/meshPS.hlsl
index db28d60..a78d249 100644
--- a/demo/d3d11/shaders/meshPS.hlsl
+++ b/demo/d3d/shaders/meshPS.hlsl
@@ -6,13 +6,12 @@ cbuffer constBuf : register(b0)
};
Texture2D<float> shadowTexture : register(t0); // shadow map
-
SamplerComparisonState shadowSampler : register(s0); // texture sample used to sample depth from shadow texture in this sample
// sample shadow map
-float shadowSample(float4 gl_TexCoord[8])
+float shadowSample(float4 lightOffsetPosition)
{
- float3 pos = float3(gl_TexCoord[1].xyz / gl_TexCoord[1].w);
+ float3 pos = float3(lightOffsetPosition.xyz / lightOffsetPosition.w);
float3 uvw = (pos.xyz * float3(0.5, 0.5, 1.0)) + float3(0.5, 0.5, 0.0);
// user clip
@@ -34,7 +33,7 @@ float shadowSample(float4 gl_TexCoord[8])
{
float2 shadowTaps = gParams.shadowTaps[i].xy;
shadowTaps.y = 1.0f - shadowTaps.y;
- s += shadowTexture.SampleCmpLevelZero(shadowSampler, uvw.xy + shadowTaps * radius, uvw.z);
+ s += shadowTexture.SampleCmp(shadowSampler, uvw.xy + shadowTaps * radius, uvw.z);
}
s /= numTaps;
@@ -64,13 +63,6 @@ float checker(float2 uv)
float4 meshPS(MeshVertexOut input, bool isFrontFace : SV_IsFrontFace) : SV_TARGET
{
- float4 gl_FragColor;
- float4 gl_TexCoord[8];
-
- [unroll]
- for (int i = 0; i < 8; i++)
- gl_TexCoord[i] = input.texCoord[i];
-
const float4 fogColor = gParams.fogColor;
const float3 lightDir = gParams.lightDir;
const float3 lightPos = gParams.lightPos;
@@ -80,28 +72,29 @@ float4 meshPS(MeshVertexOut input, bool isFrontFace : SV_IsFrontFace) : SV_TARGE
const int tex = gParams.tex;
// calculate lighting
- float shadow = max(shadowSample(gl_TexCoord), 0.5);
-
- float3 lVec = normalize(gl_TexCoord[3].xyz - (lightPos));
- float3 lPos = float3(gl_TexCoord[1].xyz / gl_TexCoord[1].w);
+ float shadow = max(shadowSample(input.lightOffsetPosition), 0.5);
+ //float shadow = 0.5f;
+
+ float3 lVec = normalize(input.worldPosition - lightPos);
+ float3 lPos = float3(input.lightOffsetPosition.xyz / input.lightOffsetPosition.w);
float attenuation = max(smoothstep(spotMax, spotMin, dot(lPos.xy, lPos.xy)), 0.05);
- float3 n = gl_TexCoord[0].xyz;
- float3 color = gl_TexCoord[4].xyz;
+ float3 n = input.worldNormal;
+ float3 color = input.color.xyz;
if (!isFrontFace)
{
- color = gl_TexCoord[6].xyz;
+ color = input.secondaryColor.xyz;
n *= -1.0f;
}
if (grid && (n.y > 0.995))
{
- color *= 1.0 - 0.25 * checker(float2(gl_TexCoord[3].x, gl_TexCoord[3].z));
+ color *= 1.0 - 0.25 * checker(float2(input.worldPosition.x, input.worldPosition.z));
}
else if (grid && abs(n.z) > 0.995)
{
- color *= 1.0 - 0.25 * checker(float2(gl_TexCoord[3].y, gl_TexCoord[3].x));
+ color *= 1.0 - 0.25 * checker(float2(input.worldPosition.y, input.worldPosition.x));
}
if (tex)
@@ -119,12 +112,12 @@ float4 meshPS(MeshVertexOut input, bool isFrontFace : SV_IsFrontFace) : SV_TARGE
//float3 ambient = 4.0 * color * lerp(dark, light, -dot(lightDir, n) * 0.5 + 0.5) * attenuation;
float3 ambient = 4.0 * color * lerp(dark, light, -dot(lightDir, n) * float3(0.5, 0.5, 1.0) + float3(0.5, 0.5, 0.0)) * attenuation;
- float3 fog = lerp(fogColor.xyz, diffuse + ambient, exp(gl_TexCoord[7].z * fogColor.w));
+ float3 fog = lerp(fogColor.xyz, diffuse + ambient, exp(input.viewPosition.z * fogColor.w));
- //gl_FragColor = float4(pow(fog, float3(1.0 / 2.2)), 1.0);
+ //outColor = float4(pow(fog, float3(1.0 / 2.2)), 1.0);
const float tmp = 1.0 / 2.2;
- gl_FragColor = float4(pow(abs(fog), float3(tmp, tmp, tmp)), 1.0);
-
- return gl_FragColor;
+ float4 outColor = float4(pow(abs(fog), float3(tmp, tmp, tmp)), 1.0);
+
+ return outColor;
}
diff --git a/demo/d3d11/shaders/meshPS.hlsl.h b/demo/d3d/shaders/meshPS.hlsl.h
index 9bbb118..8223a67 100644
--- a/demo/d3d11/shaders/meshPS.hlsl.h
+++ b/demo/d3d/shaders/meshPS.hlsl.h
@@ -11,8 +11,8 @@
// struct MeshShaderConst
// {
//
-// float4x4 modelviewprojection; // Offset: 0
-// float4x4 modelview; // Offset: 64
+// float4x4 modelViewProjection; // Offset: 0
+// float4x4 modelView; // Offset: 64
// float4x4 objectTransform; // Offset: 128
// float4x4 lightTransform; // Offset: 192
// float4 clipPlane; // Offset: 256
@@ -31,7 +31,7 @@
// int grid; // Offset: 560
// int tex; // Offset: 564
// int colorArray; // Offset: 568
-// int _pad2; // Offset: 572
+// int increaseGfxLoadForAsyncComputeTesting;// Offset: 572
//
// } gParams; // Offset: 0 Size: 576
//
@@ -53,12 +53,12 @@
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
-// TEXCOORD 0 xyzw 1 NONE float xyz
+// TEXCOORD 0 xyz 1 NONE float xyz
// TEXCOORD 1 xyzw 2 NONE float xyzw
-// TEXCOORD 2 xyzw 3 NONE float
-// TEXCOORD 3 xyzw 4 NONE float xyz
+// TEXCOORD 2 xyz 3 NONE float
+// TEXCOORD 3 xyz 4 NONE float xyz
// TEXCOORD 4 xyzw 5 NONE float xyz
-// TEXCOORD 5 xyzw 6 NONE float
+// TEXCOORD 5 xy 6 NONE float
// TEXCOORD 6 xyzw 7 NONE float xyz
// TEXCOORD 7 xyzw 8 NONE float z
// SV_IsFrontFace 0 x 9 FFACE uint x
@@ -89,83 +89,83 @@ mad r1.xyz, r0.xyzx, l(0.500000, 0.500000, 1.000000, 0.000000), l(0.500000, 0.50
lt r0.z, r1.x, l(0.000000)
lt r0.w, l(1.000000), r1.x
or r0.z, r0.w, r0.z
+add r0.w, -cb0[20].y, l(1.000000)
+mul r2.x, cb0[20].x, l(0.002000)
+mul r2.y, r0.w, l(0.002000)
+add r1.w, -r1.y, l(1.000000)
+add r2.xy, r1.xwxx, r2.xyxx
+sample_c_indexable(texture2d)(float,float,float,float) r0.w, r2.xyxx, t0.xxxx, s0, r1.z
+add r2.x, -cb0[21].y, l(1.000000)
+mul r3.x, cb0[21].x, l(0.002000)
+mul r3.y, r2.x, l(0.002000)
+add r2.xy, r1.xwxx, r3.xyxx
+sample_c_indexable(texture2d)(float,float,float,float) r2.x, r2.xyxx, t0.xxxx, s0, r1.z
+add r2.y, -cb0[22].y, l(1.000000)
+mul r3.x, cb0[22].x, l(0.002000)
+mul r3.y, r2.y, l(0.002000)
+add r2.yz, r1.xxwx, r3.xxyx
+sample_c_indexable(texture2d)(float,float,float,float) r2.y, r2.yzyy, t0.xxxx, s0, r1.z
+add r2.z, -cb0[23].y, l(1.000000)
+mul r3.x, cb0[23].x, l(0.002000)
+mul r3.y, r2.z, l(0.002000)
+add r2.zw, r1.xxxw, r3.xxxy
+sample_c_indexable(texture2d)(float,float,float,float) r2.z, r2.zwzz, t0.xxxx, s0, r1.z
+add r2.w, -cb0[24].y, l(1.000000)
+mul r3.x, cb0[24].x, l(0.002000)
+mul r3.y, r2.w, l(0.002000)
+add r3.xy, r1.xwxx, r3.xyxx
+sample_c_indexable(texture2d)(float,float,float,float) r2.w, r3.xyxx, t0.xxxx, s0, r1.z
+add r3.x, -cb0[25].y, l(1.000000)
+mul r4.x, cb0[25].x, l(0.002000)
+mul r4.y, r3.x, l(0.002000)
+add r3.xy, r1.xwxx, r4.xyxx
+sample_c_indexable(texture2d)(float,float,float,float) r3.x, r3.xyxx, t0.xxxx, s0, r1.z
+add r3.y, -cb0[26].y, l(1.000000)
+mul r4.x, cb0[26].x, l(0.002000)
+mul r4.y, r3.y, l(0.002000)
+add r3.yz, r1.xxwx, r4.xxyx
+sample_c_indexable(texture2d)(float,float,float,float) r3.y, r3.yzyy, t0.xxxx, s0, r1.z
+add r3.z, -cb0[27].y, l(1.000000)
+mul r4.x, cb0[27].x, l(0.002000)
+mul r4.y, r3.z, l(0.002000)
+add r3.zw, r1.xxxw, r4.xxxy
+sample_c_indexable(texture2d)(float,float,float,float) r3.z, r3.zwzz, t0.xxxx, s0, r1.z
+add r3.w, -cb0[28].y, l(1.000000)
+mul r4.x, cb0[28].x, l(0.002000)
+mul r4.y, r3.w, l(0.002000)
+add r4.xy, r1.xwxx, r4.xyxx
+sample_c_indexable(texture2d)(float,float,float,float) r3.w, r4.xyxx, t0.xxxx, s0, r1.z
+add r4.x, -cb0[29].y, l(1.000000)
+mul r5.x, cb0[29].x, l(0.002000)
+mul r5.y, r4.x, l(0.002000)
+add r4.xy, r1.xwxx, r5.xyxx
+sample_c_indexable(texture2d)(float,float,float,float) r4.x, r4.xyxx, t0.xxxx, s0, r1.z
+add r4.y, -cb0[30].y, l(1.000000)
+mul r5.x, cb0[30].x, l(0.002000)
+mul r5.y, r4.y, l(0.002000)
+add r4.yz, r1.xxwx, r5.xxyx
+sample_c_indexable(texture2d)(float,float,float,float) r4.y, r4.yzyy, t0.xxxx, s0, r1.z
+add r4.z, -cb0[31].y, l(1.000000)
+mul r5.x, cb0[31].x, l(0.002000)
+mul r5.y, r4.z, l(0.002000)
+add r1.xw, r1.xxxw, r5.xxxy
+sample_c_indexable(texture2d)(float,float,float,float) r1.x, r1.xwxx, t0.xxxx, s0, r1.z
if_z r0.z
lt r0.z, r1.y, l(0.000000)
- lt r0.w, l(1.000000), r1.y
- or r0.z, r0.w, r0.z
+ lt r1.y, l(1.000000), r1.y
+ or r0.z, r0.z, r1.y
if_z r0.z
- add r0.z, -cb0[20].y, l(1.000000)
- mul r2.x, cb0[20].x, l(0.002000)
- mul r2.y, r0.z, l(0.002000)
- add r1.w, -r1.y, l(1.000000)
- add r0.zw, r1.xxxw, r2.xxxy
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.z, r0.zwzz, t0.xxxx, s0, r1.z
- add r0.w, -cb0[21].y, l(1.000000)
- mul r2.x, cb0[21].x, l(0.002000)
- mul r2.y, r0.w, l(0.002000)
- add r2.xy, r1.xwxx, r2.xyxx
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r2.xyxx, t0.xxxx, s0, r1.z
- add r0.z, r0.w, r0.z
- add r0.w, -cb0[22].y, l(1.000000)
- mul r2.x, cb0[22].x, l(0.002000)
- mul r2.y, r0.w, l(0.002000)
- add r2.xy, r1.xwxx, r2.xyxx
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r2.xyxx, t0.xxxx, s0, r1.z
- add r0.z, r0.w, r0.z
- add r0.w, -cb0[23].y, l(1.000000)
- mul r2.x, cb0[23].x, l(0.002000)
- mul r2.y, r0.w, l(0.002000)
- add r2.xy, r1.xwxx, r2.xyxx
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r2.xyxx, t0.xxxx, s0, r1.z
- add r0.z, r0.w, r0.z
- add r0.w, -cb0[24].y, l(1.000000)
- mul r2.x, cb0[24].x, l(0.002000)
- mul r2.y, r0.w, l(0.002000)
- add r2.xy, r1.xwxx, r2.xyxx
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r2.xyxx, t0.xxxx, s0, r1.z
- add r0.z, r0.w, r0.z
- add r0.w, -cb0[25].y, l(1.000000)
- mul r2.x, cb0[25].x, l(0.002000)
- mul r2.y, r0.w, l(0.002000)
- add r2.xy, r1.xwxx, r2.xyxx
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r2.xyxx, t0.xxxx, s0, r1.z
- add r0.z, r0.w, r0.z
- add r0.w, -cb0[26].y, l(1.000000)
- mul r2.x, cb0[26].x, l(0.002000)
- mul r2.y, r0.w, l(0.002000)
- add r2.xy, r1.xwxx, r2.xyxx
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r2.xyxx, t0.xxxx, s0, r1.z
- add r0.z, r0.w, r0.z
- add r0.w, -cb0[27].y, l(1.000000)
- mul r2.x, cb0[27].x, l(0.002000)
- mul r2.y, r0.w, l(0.002000)
- add r2.xy, r1.xwxx, r2.xyxx
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r2.xyxx, t0.xxxx, s0, r1.z
- add r0.z, r0.w, r0.z
- add r0.w, -cb0[28].y, l(1.000000)
- mul r2.x, cb0[28].x, l(0.002000)
- mul r2.y, r0.w, l(0.002000)
- add r2.xy, r1.xwxx, r2.xyxx
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r2.xyxx, t0.xxxx, s0, r1.z
- add r0.z, r0.w, r0.z
- add r0.w, -cb0[29].y, l(1.000000)
- mul r2.x, cb0[29].x, l(0.002000)
- mul r2.y, r0.w, l(0.002000)
- add r2.xy, r1.xwxx, r2.xyxx
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r2.xyxx, t0.xxxx, s0, r1.z
- add r0.z, r0.w, r0.z
- add r0.w, -cb0[30].y, l(1.000000)
- mul r2.x, cb0[30].x, l(0.002000)
- mul r2.y, r0.w, l(0.002000)
- add r2.xy, r1.xwxx, r2.xyxx
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r2.xyxx, t0.xxxx, s0, r1.z
- add r0.z, r0.w, r0.z
- add r0.w, -cb0[31].y, l(1.000000)
- mul r2.x, cb0[31].x, l(0.002000)
- mul r2.y, r0.w, l(0.002000)
- add r1.xy, r1.xwxx, r2.xyxx
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r1.xyxx, t0.xxxx, s0, r1.z
- add r0.z, r0.w, r0.z
+ add r0.z, r0.w, r2.x
+ add r0.z, r2.y, r0.z
+ add r0.z, r2.z, r0.z
+ add r0.z, r2.w, r0.z
+ add r0.z, r3.x, r0.z
+ add r0.z, r3.y, r0.z
+ add r0.z, r3.z, r0.z
+ add r0.z, r3.w, r0.z
+ add r0.z, r4.x, r0.z
+ add r0.z, r4.y, r0.z
+ add r0.z, r1.x, r0.z
mul r0.z, r0.z, l(0.083333)
else
mov r0.z, l(1.000000)
@@ -268,21 +268,21 @@ ret
const BYTE g_meshPS[] =
{
- 68, 88, 66, 67, 162, 143,
- 63, 83, 112, 221, 166, 253,
- 12, 109, 97, 84, 15, 129,
- 226, 222, 1, 0, 0, 0,
- 8, 30, 0, 0, 5, 0,
+ 68, 88, 66, 67, 72, 67,
+ 173, 99, 108, 111, 205, 171,
+ 203, 27, 188, 233, 104, 15,
+ 95, 167, 1, 0, 0, 0,
+ 40, 30, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
- 116, 4, 0, 0, 152, 5,
- 0, 0, 204, 5, 0, 0,
- 108, 29, 0, 0, 82, 68,
- 69, 70, 56, 4, 0, 0,
+ 148, 4, 0, 0, 184, 5,
+ 0, 0, 236, 5, 0, 0,
+ 140, 29, 0, 0, 82, 68,
+ 69, 70, 88, 4, 0, 0,
1, 0, 0, 0, 196, 0,
0, 0, 3, 0, 0, 0,
60, 0, 0, 0, 0, 5,
255, 255, 0, 1, 0, 0,
- 4, 4, 0, 0, 82, 68,
+ 36, 4, 0, 0, 82, 68,
49, 49, 60, 0, 0, 0,
24, 0, 0, 0, 32, 0,
0, 0, 40, 0, 0, 0,
@@ -317,7 +317,7 @@ const BYTE g_meshPS[] =
0, 0, 0, 0, 4, 1,
0, 0, 0, 0, 0, 0,
64, 2, 0, 0, 2, 0,
- 0, 0, 224, 3, 0, 0,
+ 0, 0, 0, 4, 0, 0,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
@@ -326,7 +326,7 @@ const BYTE g_meshPS[] =
115, 104, 83, 104, 97, 100,
101, 114, 67, 111, 110, 115,
116, 0, 109, 111, 100, 101,
- 108, 118, 105, 101, 119, 112,
+ 108, 86, 105, 101, 119, 80,
114, 111, 106, 101, 99, 116,
105, 111, 110, 0, 102, 108,
111, 97, 116, 52, 120, 52,
@@ -337,7 +337,7 @@ const BYTE g_meshPS[] =
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
48, 1, 0, 0, 109, 111,
- 100, 101, 108, 118, 105, 101,
+ 100, 101, 108, 86, 105, 101,
119, 0, 111, 98, 106, 101,
99, 116, 84, 114, 97, 110,
115, 102, 111, 114, 109, 0,
@@ -399,254 +399,212 @@ const BYTE g_meshPS[] =
0, 0, 0, 0, 164, 2,
0, 0, 116, 101, 120, 0,
99, 111, 108, 111, 114, 65,
- 114, 114, 97, 121, 0, 95,
- 112, 97, 100, 50, 0, 171,
- 171, 171, 28, 1, 0, 0,
- 60, 1, 0, 0, 0, 0,
- 0, 0, 96, 1, 0, 0,
- 60, 1, 0, 0, 64, 0,
- 0, 0, 106, 1, 0, 0,
- 60, 1, 0, 0, 128, 0,
- 0, 0, 122, 1, 0, 0,
- 60, 1, 0, 0, 192, 0,
- 0, 0, 137, 1, 0, 0,
- 156, 1, 0, 0, 0, 1,
- 0, 0, 192, 1, 0, 0,
- 156, 1, 0, 0, 16, 1,
- 0, 0, 201, 1, 0, 0,
- 156, 1, 0, 0, 32, 1,
- 0, 0, 207, 1, 0, 0,
- 156, 1, 0, 0, 48, 1,
- 0, 0, 222, 1, 0, 0,
- 236, 1, 0, 0, 64, 1,
- 0, 0, 16, 2, 0, 0,
- 32, 2, 0, 0, 0, 2,
- 0, 0, 68, 2, 0, 0,
- 80, 2, 0, 0, 12, 2,
- 0, 0, 116, 2, 0, 0,
- 32, 2, 0, 0, 16, 2,
- 0, 0, 125, 2, 0, 0,
- 80, 2, 0, 0, 28, 2,
- 0, 0, 131, 2, 0, 0,
- 80, 2, 0, 0, 32, 2,
- 0, 0, 136, 2, 0, 0,
- 80, 2, 0, 0, 36, 2,
- 0, 0, 143, 2, 0, 0,
- 80, 2, 0, 0, 40, 2,
- 0, 0, 151, 2, 0, 0,
- 80, 2, 0, 0, 44, 2,
- 0, 0, 159, 2, 0, 0,
- 168, 2, 0, 0, 48, 2,
- 0, 0, 204, 2, 0, 0,
- 168, 2, 0, 0, 52, 2,
- 0, 0, 208, 2, 0, 0,
- 168, 2, 0, 0, 56, 2,
- 0, 0, 219, 2, 0, 0,
- 168, 2, 0, 0, 60, 2,
- 0, 0, 5, 0, 0, 0,
- 1, 0, 144, 0, 0, 0,
- 21, 0, 228, 2, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 12, 1,
- 0, 0, 77, 105, 99, 114,
- 111, 115, 111, 102, 116, 32,
- 40, 82, 41, 32, 72, 76,
- 83, 76, 32, 83, 104, 97,
- 100, 101, 114, 32, 67, 111,
- 109, 112, 105, 108, 101, 114,
- 32, 54, 46, 51, 46, 57,
- 54, 48, 48, 46, 49, 54,
- 51, 56, 52, 0, 171, 171,
- 73, 83, 71, 78, 28, 1,
- 0, 0, 10, 0, 0, 0,
- 8, 0, 0, 0, 248, 0,
+ 114, 114, 97, 121, 0, 105,
+ 110, 99, 114, 101, 97, 115,
+ 101, 71, 102, 120, 76, 111,
+ 97, 100, 70, 111, 114, 65,
+ 115, 121, 110, 99, 67, 111,
+ 109, 112, 117, 116, 101, 84,
+ 101, 115, 116, 105, 110, 103,
+ 0, 171, 171, 171, 28, 1,
+ 0, 0, 60, 1, 0, 0,
+ 0, 0, 0, 0, 96, 1,
+ 0, 0, 60, 1, 0, 0,
+ 64, 0, 0, 0, 106, 1,
+ 0, 0, 60, 1, 0, 0,
+ 128, 0, 0, 0, 122, 1,
+ 0, 0, 60, 1, 0, 0,
+ 192, 0, 0, 0, 137, 1,
+ 0, 0, 156, 1, 0, 0,
+ 0, 1, 0, 0, 192, 1,
+ 0, 0, 156, 1, 0, 0,
+ 16, 1, 0, 0, 201, 1,
+ 0, 0, 156, 1, 0, 0,
+ 32, 1, 0, 0, 207, 1,
+ 0, 0, 156, 1, 0, 0,
+ 48, 1, 0, 0, 222, 1,
+ 0, 0, 236, 1, 0, 0,
+ 64, 1, 0, 0, 16, 2,
+ 0, 0, 32, 2, 0, 0,
+ 0, 2, 0, 0, 68, 2,
+ 0, 0, 80, 2, 0, 0,
+ 12, 2, 0, 0, 116, 2,
+ 0, 0, 32, 2, 0, 0,
+ 16, 2, 0, 0, 125, 2,
+ 0, 0, 80, 2, 0, 0,
+ 28, 2, 0, 0, 131, 2,
+ 0, 0, 80, 2, 0, 0,
+ 32, 2, 0, 0, 136, 2,
+ 0, 0, 80, 2, 0, 0,
+ 36, 2, 0, 0, 143, 2,
+ 0, 0, 80, 2, 0, 0,
+ 40, 2, 0, 0, 151, 2,
+ 0, 0, 80, 2, 0, 0,
+ 44, 2, 0, 0, 159, 2,
+ 0, 0, 168, 2, 0, 0,
+ 48, 2, 0, 0, 204, 2,
+ 0, 0, 168, 2, 0, 0,
+ 52, 2, 0, 0, 208, 2,
+ 0, 0, 168, 2, 0, 0,
+ 56, 2, 0, 0, 219, 2,
+ 0, 0, 168, 2, 0, 0,
+ 60, 2, 0, 0, 5, 0,
+ 0, 0, 1, 0, 144, 0,
+ 0, 0, 21, 0, 4, 3,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 12, 1, 0, 0, 77, 105,
+ 99, 114, 111, 115, 111, 102,
+ 116, 32, 40, 82, 41, 32,
+ 72, 76, 83, 76, 32, 83,
+ 104, 97, 100, 101, 114, 32,
+ 67, 111, 109, 112, 105, 108,
+ 101, 114, 32, 54, 46, 51,
+ 46, 57, 54, 48, 48, 46,
+ 49, 54, 51, 56, 52, 0,
+ 171, 171, 73, 83, 71, 78,
+ 28, 1, 0, 0, 10, 0,
+ 0, 0, 8, 0, 0, 0,
+ 248, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 3, 0, 0, 0, 0, 0,
+ 0, 0, 15, 0, 0, 0,
+ 4, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 3, 0,
+ 3, 0, 0, 0, 1, 0,
+ 0, 0, 7, 7, 0, 0,
+ 4, 1, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
- 15, 0, 0, 0, 4, 1,
+ 3, 0, 0, 0, 2, 0,
+ 0, 0, 15, 15, 0, 0,
+ 4, 1, 0, 0, 2, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 1, 0, 0, 0,
- 15, 7, 0, 0, 4, 1,
- 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 2, 0, 0, 0,
- 15, 15, 0, 0, 4, 1,
- 0, 0, 2, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 3, 0, 0, 0,
- 15, 0, 0, 0, 4, 1,
- 0, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 4, 0, 0, 0,
- 15, 7, 0, 0, 4, 1,
- 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 5, 0, 0, 0,
- 15, 7, 0, 0, 4, 1,
- 0, 0, 5, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 6, 0, 0, 0,
- 15, 0, 0, 0, 4, 1,
- 0, 0, 6, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
+ 3, 0, 0, 0, 3, 0,
0, 0, 7, 0, 0, 0,
- 15, 7, 0, 0, 4, 1,
- 0, 0, 7, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 8, 0, 0, 0,
- 15, 4, 0, 0, 13, 1,
+ 4, 1, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
- 9, 0, 0, 0, 1, 0,
- 0, 0, 9, 0, 0, 0,
- 1, 1, 0, 0, 83, 86,
- 95, 80, 79, 83, 73, 84,
- 73, 79, 78, 0, 84, 69,
- 88, 67, 79, 79, 82, 68,
- 0, 83, 86, 95, 73, 115,
- 70, 114, 111, 110, 116, 70,
- 97, 99, 101, 0, 79, 83,
- 71, 78, 44, 0, 0, 0,
- 1, 0, 0, 0, 8, 0,
- 0, 0, 32, 0, 0, 0,
+ 3, 0, 0, 0, 4, 0,
+ 0, 0, 7, 7, 0, 0,
+ 4, 1, 0, 0, 4, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 5, 0,
+ 0, 0, 15, 7, 0, 0,
+ 4, 1, 0, 0, 5, 0,
0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 6, 0,
0, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 15, 0,
- 0, 0, 83, 86, 95, 84,
- 65, 82, 71, 69, 84, 0,
- 171, 171, 83, 72, 69, 88,
- 152, 23, 0, 0, 80, 0,
- 0, 0, 230, 5, 0, 0,
- 106, 8, 0, 1, 89, 0,
- 0, 4, 70, 142, 32, 0,
- 0, 0, 0, 0, 36, 0,
- 0, 0, 90, 8, 0, 3,
- 0, 96, 16, 0, 0, 0,
- 0, 0, 88, 24, 0, 4,
- 0, 112, 16, 0, 0, 0,
- 0, 0, 85, 85, 0, 0,
- 98, 16, 0, 3, 114, 16,
- 16, 0, 1, 0, 0, 0,
- 98, 16, 0, 3, 242, 16,
- 16, 0, 2, 0, 0, 0,
- 98, 16, 0, 3, 114, 16,
- 16, 0, 4, 0, 0, 0,
- 98, 16, 0, 3, 114, 16,
- 16, 0, 5, 0, 0, 0,
- 98, 16, 0, 3, 114, 16,
- 16, 0, 7, 0, 0, 0,
- 98, 16, 0, 3, 66, 16,
- 16, 0, 8, 0, 0, 0,
- 99, 8, 0, 4, 18, 16,
- 16, 0, 9, 0, 0, 0,
- 9, 0, 0, 0, 101, 0,
- 0, 3, 242, 32, 16, 0,
- 0, 0, 0, 0, 104, 0,
- 0, 2, 6, 0, 0, 0,
- 14, 0, 0, 7, 114, 0,
- 16, 0, 0, 0, 0, 0,
- 70, 18, 16, 0, 2, 0,
- 0, 0, 246, 31, 16, 0,
- 2, 0, 0, 0, 50, 0,
- 0, 15, 114, 0, 16, 0,
- 1, 0, 0, 0, 70, 2,
+ 4, 1, 0, 0, 6, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 7, 0,
+ 0, 0, 15, 7, 0, 0,
+ 4, 1, 0, 0, 7, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 8, 0,
+ 0, 0, 15, 4, 0, 0,
+ 13, 1, 0, 0, 0, 0,
+ 0, 0, 9, 0, 0, 0,
+ 1, 0, 0, 0, 9, 0,
+ 0, 0, 1, 1, 0, 0,
+ 83, 86, 95, 80, 79, 83,
+ 73, 84, 73, 79, 78, 0,
+ 84, 69, 88, 67, 79, 79,
+ 82, 68, 0, 83, 86, 95,
+ 73, 115, 70, 114, 111, 110,
+ 116, 70, 97, 99, 101, 0,
+ 79, 83, 71, 78, 44, 0,
+ 0, 0, 1, 0, 0, 0,
+ 8, 0, 0, 0, 32, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
+ 15, 0, 0, 0, 83, 86,
+ 95, 84, 65, 82, 71, 69,
+ 84, 0, 171, 171, 83, 72,
+ 69, 88, 152, 23, 0, 0,
+ 80, 0, 0, 0, 230, 5,
+ 0, 0, 106, 8, 0, 1,
+ 89, 0, 0, 4, 70, 142,
+ 32, 0, 0, 0, 0, 0,
+ 36, 0, 0, 0, 90, 8,
+ 0, 3, 0, 96, 16, 0,
+ 0, 0, 0, 0, 88, 24,
+ 0, 4, 0, 112, 16, 0,
+ 0, 0, 0, 0, 85, 85,
+ 0, 0, 98, 16, 0, 3,
+ 114, 16, 16, 0, 1, 0,
+ 0, 0, 98, 16, 0, 3,
+ 242, 16, 16, 0, 2, 0,
+ 0, 0, 98, 16, 0, 3,
+ 114, 16, 16, 0, 4, 0,
+ 0, 0, 98, 16, 0, 3,
+ 114, 16, 16, 0, 5, 0,
+ 0, 0, 98, 16, 0, 3,
+ 114, 16, 16, 0, 7, 0,
+ 0, 0, 98, 16, 0, 3,
+ 66, 16, 16, 0, 8, 0,
+ 0, 0, 99, 8, 0, 4,
+ 18, 16, 16, 0, 9, 0,
+ 0, 0, 9, 0, 0, 0,
+ 101, 0, 0, 3, 242, 32,
16, 0, 0, 0, 0, 0,
- 2, 64, 0, 0, 0, 0,
- 0, 63, 0, 0, 0, 63,
- 0, 0, 128, 63, 0, 0,
+ 104, 0, 0, 2, 6, 0,
+ 0, 0, 14, 0, 0, 7,
+ 114, 0, 16, 0, 0, 0,
+ 0, 0, 70, 18, 16, 0,
+ 2, 0, 0, 0, 246, 31,
+ 16, 0, 2, 0, 0, 0,
+ 50, 0, 0, 15, 114, 0,
+ 16, 0, 1, 0, 0, 0,
+ 70, 2, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 63, 0, 0,
- 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 49, 0,
- 0, 7, 66, 0, 16, 0,
- 0, 0, 0, 0, 10, 0,
- 16, 0, 1, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 0, 0, 49, 0, 0, 7,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 128, 63, 10, 0,
- 16, 0, 1, 0, 0, 0,
- 60, 0, 0, 7, 66, 0,
+ 0, 63, 0, 0, 128, 63,
+ 0, 0, 0, 0, 2, 64,
+ 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 49, 0, 0, 7, 66, 0,
16, 0, 0, 0, 0, 0,
- 58, 0, 16, 0, 0, 0,
- 0, 0, 42, 0, 16, 0,
- 0, 0, 0, 0, 31, 0,
- 0, 3, 42, 0, 16, 0,
- 0, 0, 0, 0, 49, 0,
- 0, 7, 66, 0, 16, 0,
- 0, 0, 0, 0, 26, 0,
- 16, 0, 1, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 0, 0, 49, 0, 0, 7,
- 130, 0, 16, 0, 0, 0,
+ 10, 0, 16, 0, 1, 0,
0, 0, 1, 64, 0, 0,
- 0, 0, 128, 63, 26, 0,
- 16, 0, 1, 0, 0, 0,
- 60, 0, 0, 7, 66, 0,
+ 0, 0, 0, 0, 49, 0,
+ 0, 7, 130, 0, 16, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 10, 0, 16, 0, 1, 0,
+ 0, 0, 60, 0, 0, 7,
+ 66, 0, 16, 0, 0, 0,
+ 0, 0, 58, 0, 16, 0,
+ 0, 0, 0, 0, 42, 0,
16, 0, 0, 0, 0, 0,
- 58, 0, 16, 0, 0, 0,
- 0, 0, 42, 0, 16, 0,
- 0, 0, 0, 0, 31, 0,
- 0, 3, 42, 0, 16, 0,
+ 0, 0, 0, 9, 130, 0,
+ 16, 0, 0, 0, 0, 0,
+ 26, 128, 32, 128, 65, 0,
0, 0, 0, 0, 0, 0,
- 0, 9, 66, 0, 16, 0,
- 0, 0, 0, 0, 26, 128,
- 32, 128, 65, 0, 0, 0,
- 0, 0, 0, 0, 20, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 128, 63, 56, 0,
- 0, 8, 18, 0, 16, 0,
- 2, 0, 0, 0, 10, 128,
- 32, 0, 0, 0, 0, 0,
20, 0, 0, 0, 1, 64,
- 0, 0, 111, 18, 3, 59,
- 56, 0, 0, 7, 34, 0,
- 16, 0, 2, 0, 0, 0,
- 42, 0, 16, 0, 0, 0,
- 0, 0, 1, 64, 0, 0,
- 111, 18, 3, 59, 0, 0,
- 0, 8, 130, 0, 16, 0,
- 1, 0, 0, 0, 26, 0,
- 16, 128, 65, 0, 0, 0,
- 1, 0, 0, 0, 1, 64,
0, 0, 0, 0, 128, 63,
- 0, 0, 0, 7, 194, 0,
- 16, 0, 0, 0, 0, 0,
- 6, 12, 16, 0, 1, 0,
- 0, 0, 6, 4, 16, 0,
- 2, 0, 0, 0, 71, 0,
- 0, 141, 194, 0, 0, 128,
- 67, 85, 21, 0, 66, 0,
- 16, 0, 0, 0, 0, 0,
- 230, 10, 16, 0, 0, 0,
- 0, 0, 6, 112, 16, 0,
- 0, 0, 0, 0, 0, 96,
- 16, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 1, 0,
- 0, 0, 0, 0, 0, 9,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 26, 128, 32, 128,
- 65, 0, 0, 0, 0, 0,
- 0, 0, 21, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 128, 63, 56, 0, 0, 8,
- 18, 0, 16, 0, 2, 0,
- 0, 0, 10, 128, 32, 0,
- 0, 0, 0, 0, 21, 0,
- 0, 0, 1, 64, 0, 0,
- 111, 18, 3, 59, 56, 0,
- 0, 7, 34, 0, 16, 0,
- 2, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
+ 56, 0, 0, 8, 18, 0,
+ 16, 0, 2, 0, 0, 0,
+ 10, 128, 32, 0, 0, 0,
+ 0, 0, 20, 0, 0, 0,
1, 64, 0, 0, 111, 18,
- 3, 59, 0, 0, 0, 7,
+ 3, 59, 56, 0, 0, 7,
+ 34, 0, 16, 0, 2, 0,
+ 0, 0, 58, 0, 16, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 111, 18, 3, 59,
+ 0, 0, 0, 8, 130, 0,
+ 16, 0, 1, 0, 0, 0,
+ 26, 0, 16, 128, 65, 0,
+ 0, 0, 1, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 0, 0, 0, 7,
50, 0, 16, 0, 2, 0,
0, 0, 198, 0, 16, 0,
1, 0, 0, 0, 70, 0,
16, 0, 2, 0, 0, 0,
- 71, 0, 0, 141, 194, 0,
+ 70, 0, 0, 141, 194, 0,
0, 128, 67, 85, 21, 0,
130, 0, 16, 0, 0, 0,
0, 0, 70, 0, 16, 0,
@@ -655,891 +613,938 @@ const BYTE g_meshPS[] =
0, 96, 16, 0, 0, 0,
0, 0, 42, 0, 16, 0,
1, 0, 0, 0, 0, 0,
- 0, 7, 66, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 0, 0,
- 0, 0, 0, 0, 0, 9,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 26, 128, 32, 128,
- 65, 0, 0, 0, 0, 0,
- 0, 0, 22, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 128, 63, 56, 0, 0, 8,
- 18, 0, 16, 0, 2, 0,
- 0, 0, 10, 128, 32, 0,
- 0, 0, 0, 0, 22, 0,
+ 0, 9, 18, 0, 16, 0,
+ 2, 0, 0, 0, 26, 128,
+ 32, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 21, 0,
0, 0, 1, 64, 0, 0,
- 111, 18, 3, 59, 56, 0,
- 0, 7, 34, 0, 16, 0,
- 2, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
+ 0, 0, 128, 63, 56, 0,
+ 0, 8, 18, 0, 16, 0,
+ 3, 0, 0, 0, 10, 128,
+ 32, 0, 0, 0, 0, 0,
+ 21, 0, 0, 0, 1, 64,
+ 0, 0, 111, 18, 3, 59,
+ 56, 0, 0, 7, 34, 0,
+ 16, 0, 3, 0, 0, 0,
+ 10, 0, 16, 0, 2, 0,
+ 0, 0, 1, 64, 0, 0,
+ 111, 18, 3, 59, 0, 0,
+ 0, 7, 50, 0, 16, 0,
+ 2, 0, 0, 0, 198, 0,
+ 16, 0, 1, 0, 0, 0,
+ 70, 0, 16, 0, 3, 0,
+ 0, 0, 70, 0, 0, 141,
+ 194, 0, 0, 128, 67, 85,
+ 21, 0, 18, 0, 16, 0,
+ 2, 0, 0, 0, 70, 0,
+ 16, 0, 2, 0, 0, 0,
+ 6, 112, 16, 0, 0, 0,
+ 0, 0, 0, 96, 16, 0,
+ 0, 0, 0, 0, 42, 0,
+ 16, 0, 1, 0, 0, 0,
+ 0, 0, 0, 9, 34, 0,
+ 16, 0, 2, 0, 0, 0,
+ 26, 128, 32, 128, 65, 0,
+ 0, 0, 0, 0, 0, 0,
+ 22, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 56, 0, 0, 8, 18, 0,
+ 16, 0, 3, 0, 0, 0,
+ 10, 128, 32, 0, 0, 0,
+ 0, 0, 22, 0, 0, 0,
1, 64, 0, 0, 111, 18,
- 3, 59, 0, 0, 0, 7,
- 50, 0, 16, 0, 2, 0,
- 0, 0, 198, 0, 16, 0,
- 1, 0, 0, 0, 70, 0,
+ 3, 59, 56, 0, 0, 7,
+ 34, 0, 16, 0, 3, 0,
+ 0, 0, 26, 0, 16, 0,
+ 2, 0, 0, 0, 1, 64,
+ 0, 0, 111, 18, 3, 59,
+ 0, 0, 0, 7, 98, 0,
16, 0, 2, 0, 0, 0,
- 71, 0, 0, 141, 194, 0,
- 0, 128, 67, 85, 21, 0,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 70, 0, 16, 0,
- 2, 0, 0, 0, 6, 112,
- 16, 0, 0, 0, 0, 0,
- 0, 96, 16, 0, 0, 0,
- 0, 0, 42, 0, 16, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 7, 66, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
+ 6, 3, 16, 0, 1, 0,
+ 0, 0, 6, 1, 16, 0,
+ 3, 0, 0, 0, 70, 0,
+ 0, 141, 194, 0, 0, 128,
+ 67, 85, 21, 0, 34, 0,
+ 16, 0, 2, 0, 0, 0,
+ 150, 5, 16, 0, 2, 0,
+ 0, 0, 6, 112, 16, 0,
+ 0, 0, 0, 0, 0, 96,
16, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 0, 0,
+ 42, 0, 16, 0, 1, 0,
0, 0, 0, 0, 0, 9,
- 130, 0, 16, 0, 0, 0,
+ 66, 0, 16, 0, 2, 0,
0, 0, 26, 128, 32, 128,
65, 0, 0, 0, 0, 0,
0, 0, 23, 0, 0, 0,
1, 64, 0, 0, 0, 0,
128, 63, 56, 0, 0, 8,
- 18, 0, 16, 0, 2, 0,
+ 18, 0, 16, 0, 3, 0,
0, 0, 10, 128, 32, 0,
0, 0, 0, 0, 23, 0,
0, 0, 1, 64, 0, 0,
111, 18, 3, 59, 56, 0,
0, 7, 34, 0, 16, 0,
- 2, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 42, 0,
+ 16, 0, 2, 0, 0, 0,
1, 64, 0, 0, 111, 18,
3, 59, 0, 0, 0, 7,
- 50, 0, 16, 0, 2, 0,
- 0, 0, 198, 0, 16, 0,
- 1, 0, 0, 0, 70, 0,
- 16, 0, 2, 0, 0, 0,
- 71, 0, 0, 141, 194, 0,
+ 194, 0, 16, 0, 2, 0,
+ 0, 0, 6, 12, 16, 0,
+ 1, 0, 0, 0, 6, 4,
+ 16, 0, 3, 0, 0, 0,
+ 70, 0, 0, 141, 194, 0,
0, 128, 67, 85, 21, 0,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 70, 0, 16, 0,
+ 66, 0, 16, 0, 2, 0,
+ 0, 0, 230, 10, 16, 0,
2, 0, 0, 0, 6, 112,
16, 0, 0, 0, 0, 0,
0, 96, 16, 0, 0, 0,
0, 0, 42, 0, 16, 0,
1, 0, 0, 0, 0, 0,
- 0, 7, 66, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 0, 0,
- 0, 0, 0, 0, 0, 9,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 26, 128, 32, 128,
- 65, 0, 0, 0, 0, 0,
- 0, 0, 24, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 128, 63, 56, 0, 0, 8,
- 18, 0, 16, 0, 2, 0,
- 0, 0, 10, 128, 32, 0,
+ 0, 9, 130, 0, 16, 0,
+ 2, 0, 0, 0, 26, 128,
+ 32, 128, 65, 0, 0, 0,
0, 0, 0, 0, 24, 0,
0, 0, 1, 64, 0, 0,
- 111, 18, 3, 59, 56, 0,
- 0, 7, 34, 0, 16, 0,
- 2, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
- 1, 64, 0, 0, 111, 18,
- 3, 59, 0, 0, 0, 7,
- 50, 0, 16, 0, 2, 0,
- 0, 0, 198, 0, 16, 0,
- 1, 0, 0, 0, 70, 0,
- 16, 0, 2, 0, 0, 0,
- 71, 0, 0, 141, 194, 0,
- 0, 128, 67, 85, 21, 0,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 70, 0, 16, 0,
- 2, 0, 0, 0, 6, 112,
- 16, 0, 0, 0, 0, 0,
- 0, 96, 16, 0, 0, 0,
- 0, 0, 42, 0, 16, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 7, 66, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 0, 0,
- 0, 0, 0, 0, 0, 9,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 26, 128, 32, 128,
- 65, 0, 0, 0, 0, 0,
- 0, 0, 25, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 128, 63, 56, 0, 0, 8,
- 18, 0, 16, 0, 2, 0,
- 0, 0, 10, 128, 32, 0,
- 0, 0, 0, 0, 25, 0,
+ 0, 0, 128, 63, 56, 0,
+ 0, 8, 18, 0, 16, 0,
+ 3, 0, 0, 0, 10, 128,
+ 32, 0, 0, 0, 0, 0,
+ 24, 0, 0, 0, 1, 64,
+ 0, 0, 111, 18, 3, 59,
+ 56, 0, 0, 7, 34, 0,
+ 16, 0, 3, 0, 0, 0,
+ 58, 0, 16, 0, 2, 0,
0, 0, 1, 64, 0, 0,
- 111, 18, 3, 59, 56, 0,
- 0, 7, 34, 0, 16, 0,
- 2, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
+ 111, 18, 3, 59, 0, 0,
+ 0, 7, 50, 0, 16, 0,
+ 3, 0, 0, 0, 198, 0,
+ 16, 0, 1, 0, 0, 0,
+ 70, 0, 16, 0, 3, 0,
+ 0, 0, 70, 0, 0, 141,
+ 194, 0, 0, 128, 67, 85,
+ 21, 0, 130, 0, 16, 0,
+ 2, 0, 0, 0, 70, 0,
+ 16, 0, 3, 0, 0, 0,
+ 6, 112, 16, 0, 0, 0,
+ 0, 0, 0, 96, 16, 0,
+ 0, 0, 0, 0, 42, 0,
+ 16, 0, 1, 0, 0, 0,
+ 0, 0, 0, 9, 18, 0,
+ 16, 0, 3, 0, 0, 0,
+ 26, 128, 32, 128, 65, 0,
+ 0, 0, 0, 0, 0, 0,
+ 25, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 56, 0, 0, 8, 18, 0,
+ 16, 0, 4, 0, 0, 0,
+ 10, 128, 32, 0, 0, 0,
+ 0, 0, 25, 0, 0, 0,
1, 64, 0, 0, 111, 18,
- 3, 59, 0, 0, 0, 7,
- 50, 0, 16, 0, 2, 0,
- 0, 0, 198, 0, 16, 0,
- 1, 0, 0, 0, 70, 0,
- 16, 0, 2, 0, 0, 0,
- 71, 0, 0, 141, 194, 0,
- 0, 128, 67, 85, 21, 0,
- 130, 0, 16, 0, 0, 0,
+ 3, 59, 56, 0, 0, 7,
+ 34, 0, 16, 0, 4, 0,
+ 0, 0, 10, 0, 16, 0,
+ 3, 0, 0, 0, 1, 64,
+ 0, 0, 111, 18, 3, 59,
+ 0, 0, 0, 7, 50, 0,
+ 16, 0, 3, 0, 0, 0,
+ 198, 0, 16, 0, 1, 0,
0, 0, 70, 0, 16, 0,
- 2, 0, 0, 0, 6, 112,
- 16, 0, 0, 0, 0, 0,
- 0, 96, 16, 0, 0, 0,
- 0, 0, 42, 0, 16, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 7, 66, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
+ 4, 0, 0, 0, 70, 0,
+ 0, 141, 194, 0, 0, 128,
+ 67, 85, 21, 0, 18, 0,
+ 16, 0, 3, 0, 0, 0,
+ 70, 0, 16, 0, 3, 0,
+ 0, 0, 6, 112, 16, 0,
+ 0, 0, 0, 0, 0, 96,
16, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 0, 0,
+ 42, 0, 16, 0, 1, 0,
0, 0, 0, 0, 0, 9,
- 130, 0, 16, 0, 0, 0,
+ 34, 0, 16, 0, 3, 0,
0, 0, 26, 128, 32, 128,
65, 0, 0, 0, 0, 0,
0, 0, 26, 0, 0, 0,
1, 64, 0, 0, 0, 0,
128, 63, 56, 0, 0, 8,
- 18, 0, 16, 0, 2, 0,
+ 18, 0, 16, 0, 4, 0,
0, 0, 10, 128, 32, 0,
0, 0, 0, 0, 26, 0,
0, 0, 1, 64, 0, 0,
111, 18, 3, 59, 56, 0,
0, 7, 34, 0, 16, 0,
- 2, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
+ 4, 0, 0, 0, 26, 0,
+ 16, 0, 3, 0, 0, 0,
1, 64, 0, 0, 111, 18,
3, 59, 0, 0, 0, 7,
- 50, 0, 16, 0, 2, 0,
- 0, 0, 198, 0, 16, 0,
- 1, 0, 0, 0, 70, 0,
- 16, 0, 2, 0, 0, 0,
- 71, 0, 0, 141, 194, 0,
+ 98, 0, 16, 0, 3, 0,
+ 0, 0, 6, 3, 16, 0,
+ 1, 0, 0, 0, 6, 1,
+ 16, 0, 4, 0, 0, 0,
+ 70, 0, 0, 141, 194, 0,
0, 128, 67, 85, 21, 0,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 70, 0, 16, 0,
- 2, 0, 0, 0, 6, 112,
+ 34, 0, 16, 0, 3, 0,
+ 0, 0, 150, 5, 16, 0,
+ 3, 0, 0, 0, 6, 112,
16, 0, 0, 0, 0, 0,
0, 96, 16, 0, 0, 0,
0, 0, 42, 0, 16, 0,
1, 0, 0, 0, 0, 0,
- 0, 7, 66, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 0, 0,
- 0, 0, 0, 0, 0, 9,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 26, 128, 32, 128,
- 65, 0, 0, 0, 0, 0,
- 0, 0, 27, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 128, 63, 56, 0, 0, 8,
- 18, 0, 16, 0, 2, 0,
- 0, 0, 10, 128, 32, 0,
+ 0, 9, 66, 0, 16, 0,
+ 3, 0, 0, 0, 26, 128,
+ 32, 128, 65, 0, 0, 0,
0, 0, 0, 0, 27, 0,
0, 0, 1, 64, 0, 0,
- 111, 18, 3, 59, 56, 0,
- 0, 7, 34, 0, 16, 0,
- 2, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
+ 0, 0, 128, 63, 56, 0,
+ 0, 8, 18, 0, 16, 0,
+ 4, 0, 0, 0, 10, 128,
+ 32, 0, 0, 0, 0, 0,
+ 27, 0, 0, 0, 1, 64,
+ 0, 0, 111, 18, 3, 59,
+ 56, 0, 0, 7, 34, 0,
+ 16, 0, 4, 0, 0, 0,
+ 42, 0, 16, 0, 3, 0,
+ 0, 0, 1, 64, 0, 0,
+ 111, 18, 3, 59, 0, 0,
+ 0, 7, 194, 0, 16, 0,
+ 3, 0, 0, 0, 6, 12,
+ 16, 0, 1, 0, 0, 0,
+ 6, 4, 16, 0, 4, 0,
+ 0, 0, 70, 0, 0, 141,
+ 194, 0, 0, 128, 67, 85,
+ 21, 0, 66, 0, 16, 0,
+ 3, 0, 0, 0, 230, 10,
+ 16, 0, 3, 0, 0, 0,
+ 6, 112, 16, 0, 0, 0,
+ 0, 0, 0, 96, 16, 0,
+ 0, 0, 0, 0, 42, 0,
+ 16, 0, 1, 0, 0, 0,
+ 0, 0, 0, 9, 130, 0,
+ 16, 0, 3, 0, 0, 0,
+ 26, 128, 32, 128, 65, 0,
+ 0, 0, 0, 0, 0, 0,
+ 28, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 56, 0, 0, 8, 18, 0,
+ 16, 0, 4, 0, 0, 0,
+ 10, 128, 32, 0, 0, 0,
+ 0, 0, 28, 0, 0, 0,
1, 64, 0, 0, 111, 18,
- 3, 59, 0, 0, 0, 7,
- 50, 0, 16, 0, 2, 0,
- 0, 0, 198, 0, 16, 0,
- 1, 0, 0, 0, 70, 0,
- 16, 0, 2, 0, 0, 0,
- 71, 0, 0, 141, 194, 0,
- 0, 128, 67, 85, 21, 0,
- 130, 0, 16, 0, 0, 0,
+ 3, 59, 56, 0, 0, 7,
+ 34, 0, 16, 0, 4, 0,
+ 0, 0, 58, 0, 16, 0,
+ 3, 0, 0, 0, 1, 64,
+ 0, 0, 111, 18, 3, 59,
+ 0, 0, 0, 7, 50, 0,
+ 16, 0, 4, 0, 0, 0,
+ 198, 0, 16, 0, 1, 0,
0, 0, 70, 0, 16, 0,
- 2, 0, 0, 0, 6, 112,
- 16, 0, 0, 0, 0, 0,
- 0, 96, 16, 0, 0, 0,
- 0, 0, 42, 0, 16, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 7, 66, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
+ 4, 0, 0, 0, 70, 0,
+ 0, 141, 194, 0, 0, 128,
+ 67, 85, 21, 0, 130, 0,
+ 16, 0, 3, 0, 0, 0,
+ 70, 0, 16, 0, 4, 0,
+ 0, 0, 6, 112, 16, 0,
+ 0, 0, 0, 0, 0, 96,
16, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 0, 0,
+ 42, 0, 16, 0, 1, 0,
0, 0, 0, 0, 0, 9,
- 130, 0, 16, 0, 0, 0,
+ 18, 0, 16, 0, 4, 0,
0, 0, 26, 128, 32, 128,
65, 0, 0, 0, 0, 0,
- 0, 0, 28, 0, 0, 0,
+ 0, 0, 29, 0, 0, 0,
1, 64, 0, 0, 0, 0,
128, 63, 56, 0, 0, 8,
- 18, 0, 16, 0, 2, 0,
+ 18, 0, 16, 0, 5, 0,
0, 0, 10, 128, 32, 0,
- 0, 0, 0, 0, 28, 0,
+ 0, 0, 0, 0, 29, 0,
0, 0, 1, 64, 0, 0,
111, 18, 3, 59, 56, 0,
0, 7, 34, 0, 16, 0,
- 2, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
+ 5, 0, 0, 0, 10, 0,
+ 16, 0, 4, 0, 0, 0,
1, 64, 0, 0, 111, 18,
3, 59, 0, 0, 0, 7,
- 50, 0, 16, 0, 2, 0,
+ 50, 0, 16, 0, 4, 0,
0, 0, 198, 0, 16, 0,
1, 0, 0, 0, 70, 0,
- 16, 0, 2, 0, 0, 0,
- 71, 0, 0, 141, 194, 0,
+ 16, 0, 5, 0, 0, 0,
+ 70, 0, 0, 141, 194, 0,
0, 128, 67, 85, 21, 0,
- 130, 0, 16, 0, 0, 0,
+ 18, 0, 16, 0, 4, 0,
0, 0, 70, 0, 16, 0,
- 2, 0, 0, 0, 6, 112,
+ 4, 0, 0, 0, 6, 112,
16, 0, 0, 0, 0, 0,
0, 96, 16, 0, 0, 0,
0, 0, 42, 0, 16, 0,
1, 0, 0, 0, 0, 0,
- 0, 7, 66, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
+ 0, 9, 34, 0, 16, 0,
+ 4, 0, 0, 0, 26, 128,
+ 32, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 30, 0,
+ 0, 0, 1, 64, 0, 0,
+ 0, 0, 128, 63, 56, 0,
+ 0, 8, 18, 0, 16, 0,
+ 5, 0, 0, 0, 10, 128,
+ 32, 0, 0, 0, 0, 0,
+ 30, 0, 0, 0, 1, 64,
+ 0, 0, 111, 18, 3, 59,
+ 56, 0, 0, 7, 34, 0,
+ 16, 0, 5, 0, 0, 0,
+ 26, 0, 16, 0, 4, 0,
+ 0, 0, 1, 64, 0, 0,
+ 111, 18, 3, 59, 0, 0,
+ 0, 7, 98, 0, 16, 0,
+ 4, 0, 0, 0, 6, 3,
+ 16, 0, 1, 0, 0, 0,
+ 6, 1, 16, 0, 5, 0,
+ 0, 0, 70, 0, 0, 141,
+ 194, 0, 0, 128, 67, 85,
+ 21, 0, 34, 0, 16, 0,
+ 4, 0, 0, 0, 150, 5,
+ 16, 0, 4, 0, 0, 0,
+ 6, 112, 16, 0, 0, 0,
+ 0, 0, 0, 96, 16, 0,
+ 0, 0, 0, 0, 42, 0,
+ 16, 0, 1, 0, 0, 0,
+ 0, 0, 0, 9, 66, 0,
+ 16, 0, 4, 0, 0, 0,
+ 26, 128, 32, 128, 65, 0,
+ 0, 0, 0, 0, 0, 0,
+ 31, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 56, 0, 0, 8, 18, 0,
+ 16, 0, 5, 0, 0, 0,
+ 10, 128, 32, 0, 0, 0,
+ 0, 0, 31, 0, 0, 0,
+ 1, 64, 0, 0, 111, 18,
+ 3, 59, 56, 0, 0, 7,
+ 34, 0, 16, 0, 5, 0,
+ 0, 0, 42, 0, 16, 0,
+ 4, 0, 0, 0, 1, 64,
+ 0, 0, 111, 18, 3, 59,
+ 0, 0, 0, 7, 146, 0,
+ 16, 0, 1, 0, 0, 0,
+ 6, 12, 16, 0, 1, 0,
+ 0, 0, 6, 4, 16, 0,
+ 5, 0, 0, 0, 70, 0,
+ 0, 141, 194, 0, 0, 128,
+ 67, 85, 21, 0, 18, 0,
+ 16, 0, 1, 0, 0, 0,
+ 198, 0, 16, 0, 1, 0,
+ 0, 0, 6, 112, 16, 0,
+ 0, 0, 0, 0, 0, 96,
16, 0, 0, 0, 0, 0,
+ 42, 0, 16, 0, 1, 0,
+ 0, 0, 31, 0, 0, 3,
42, 0, 16, 0, 0, 0,
- 0, 0, 0, 0, 0, 9,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 26, 128, 32, 128,
- 65, 0, 0, 0, 0, 0,
- 0, 0, 29, 0, 0, 0,
+ 0, 0, 49, 0, 0, 7,
+ 66, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 0,
+ 1, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 0, 0,
+ 49, 0, 0, 7, 34, 0,
+ 16, 0, 1, 0, 0, 0,
1, 64, 0, 0, 0, 0,
- 128, 63, 56, 0, 0, 8,
- 18, 0, 16, 0, 2, 0,
- 0, 0, 10, 128, 32, 0,
- 0, 0, 0, 0, 29, 0,
- 0, 0, 1, 64, 0, 0,
- 111, 18, 3, 59, 56, 0,
- 0, 7, 34, 0, 16, 0,
- 2, 0, 0, 0, 58, 0,
+ 128, 63, 26, 0, 16, 0,
+ 1, 0, 0, 0, 60, 0,
+ 0, 7, 66, 0, 16, 0,
+ 0, 0, 0, 0, 42, 0,
16, 0, 0, 0, 0, 0,
- 1, 64, 0, 0, 111, 18,
- 3, 59, 0, 0, 0, 7,
- 50, 0, 16, 0, 2, 0,
- 0, 0, 198, 0, 16, 0,
- 1, 0, 0, 0, 70, 0,
+ 26, 0, 16, 0, 1, 0,
+ 0, 0, 31, 0, 0, 3,
+ 42, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 0, 7,
+ 66, 0, 16, 0, 0, 0,
+ 0, 0, 58, 0, 16, 0,
+ 0, 0, 0, 0, 10, 0,
16, 0, 2, 0, 0, 0,
- 71, 0, 0, 141, 194, 0,
- 0, 128, 67, 85, 21, 0,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 70, 0, 16, 0,
- 2, 0, 0, 0, 6, 112,
+ 0, 0, 0, 7, 66, 0,
16, 0, 0, 0, 0, 0,
- 0, 96, 16, 0, 0, 0,
+ 26, 0, 16, 0, 2, 0,
0, 0, 42, 0, 16, 0,
- 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
0, 7, 66, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 42, 0,
+ 16, 0, 2, 0, 0, 0,
42, 0, 16, 0, 0, 0,
- 0, 0, 0, 0, 0, 9,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 26, 128, 32, 128,
- 65, 0, 0, 0, 0, 0,
- 0, 0, 30, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 128, 63, 56, 0, 0, 8,
- 18, 0, 16, 0, 2, 0,
- 0, 0, 10, 128, 32, 0,
- 0, 0, 0, 0, 30, 0,
- 0, 0, 1, 64, 0, 0,
- 111, 18, 3, 59, 56, 0,
- 0, 7, 34, 0, 16, 0,
- 2, 0, 0, 0, 58, 0,
+ 0, 0, 0, 0, 0, 7,
+ 66, 0, 16, 0, 0, 0,
+ 0, 0, 58, 0, 16, 0,
+ 2, 0, 0, 0, 42, 0,
16, 0, 0, 0, 0, 0,
- 1, 64, 0, 0, 111, 18,
- 3, 59, 0, 0, 0, 7,
- 50, 0, 16, 0, 2, 0,
- 0, 0, 198, 0, 16, 0,
- 1, 0, 0, 0, 70, 0,
- 16, 0, 2, 0, 0, 0,
- 71, 0, 0, 141, 194, 0,
- 0, 128, 67, 85, 21, 0,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 70, 0, 16, 0,
- 2, 0, 0, 0, 6, 112,
+ 0, 0, 0, 7, 66, 0,
16, 0, 0, 0, 0, 0,
- 0, 96, 16, 0, 0, 0,
+ 10, 0, 16, 0, 3, 0,
0, 0, 42, 0, 16, 0,
- 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
0, 7, 66, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 26, 0,
+ 16, 0, 3, 0, 0, 0,
42, 0, 16, 0, 0, 0,
- 0, 0, 0, 0, 0, 9,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 26, 128, 32, 128,
- 65, 0, 0, 0, 0, 0,
- 0, 0, 31, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 128, 63, 56, 0, 0, 8,
- 18, 0, 16, 0, 2, 0,
- 0, 0, 10, 128, 32, 0,
- 0, 0, 0, 0, 31, 0,
- 0, 0, 1, 64, 0, 0,
- 111, 18, 3, 59, 56, 0,
- 0, 7, 34, 0, 16, 0,
- 2, 0, 0, 0, 58, 0,
+ 0, 0, 0, 0, 0, 7,
+ 66, 0, 16, 0, 0, 0,
+ 0, 0, 42, 0, 16, 0,
+ 3, 0, 0, 0, 42, 0,
16, 0, 0, 0, 0, 0,
- 1, 64, 0, 0, 111, 18,
- 3, 59, 0, 0, 0, 7,
- 50, 0, 16, 0, 1, 0,
- 0, 0, 198, 0, 16, 0,
- 1, 0, 0, 0, 70, 0,
- 16, 0, 2, 0, 0, 0,
- 71, 0, 0, 141, 194, 0,
- 0, 128, 67, 85, 21, 0,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 70, 0, 16, 0,
- 1, 0, 0, 0, 6, 112,
+ 0, 0, 0, 7, 66, 0,
16, 0, 0, 0, 0, 0,
- 0, 96, 16, 0, 0, 0,
+ 58, 0, 16, 0, 3, 0,
0, 0, 42, 0, 16, 0,
- 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
0, 7, 66, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 10, 0,
+ 16, 0, 4, 0, 0, 0,
42, 0, 16, 0, 0, 0,
- 0, 0, 56, 0, 0, 7,
+ 0, 0, 0, 0, 0, 7,
66, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 0,
+ 4, 0, 0, 0, 42, 0,
+ 16, 0, 0, 0, 0, 0,
+ 0, 0, 0, 7, 66, 0,
+ 16, 0, 0, 0, 0, 0,
+ 10, 0, 16, 0, 1, 0,
0, 0, 42, 0, 16, 0,
- 0, 0, 0, 0, 1, 64,
- 0, 0, 171, 170, 170, 61,
+ 0, 0, 0, 0, 56, 0,
+ 0, 7, 66, 0, 16, 0,
+ 0, 0, 0, 0, 42, 0,
+ 16, 0, 0, 0, 0, 0,
+ 1, 64, 0, 0, 171, 170,
+ 170, 61, 18, 0, 0, 1,
+ 54, 0, 0, 5, 66, 0,
+ 16, 0, 0, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 21, 0, 0, 1,
18, 0, 0, 1, 54, 0,
0, 5, 66, 0, 16, 0,
0, 0, 0, 0, 1, 64,
0, 0, 0, 0, 128, 63,
- 21, 0, 0, 1, 18, 0,
- 0, 1, 54, 0, 0, 5,
- 66, 0, 16, 0, 0, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 128, 63, 21, 0,
- 0, 1, 15, 0, 0, 7,
- 18, 0, 16, 0, 0, 0,
- 0, 0, 70, 0, 16, 0,
+ 21, 0, 0, 1, 15, 0,
+ 0, 7, 18, 0, 16, 0,
0, 0, 0, 0, 70, 0,
16, 0, 0, 0, 0, 0,
- 0, 0, 0, 10, 34, 0,
+ 70, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 0, 10,
+ 34, 0, 16, 0, 0, 0,
+ 0, 0, 58, 128, 32, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 34, 0, 0, 0,
+ 42, 128, 32, 0, 0, 0,
+ 0, 0, 34, 0, 0, 0,
+ 0, 0, 0, 9, 18, 0,
16, 0, 0, 0, 0, 0,
- 58, 128, 32, 128, 65, 0,
- 0, 0, 0, 0, 0, 0,
- 34, 0, 0, 0, 42, 128,
- 32, 0, 0, 0, 0, 0,
- 34, 0, 0, 0, 0, 0,
- 0, 9, 18, 0, 16, 0,
- 0, 0, 0, 0, 10, 0,
+ 10, 0, 16, 0, 0, 0,
+ 0, 0, 58, 128, 32, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 34, 0, 0, 0,
+ 14, 0, 0, 10, 34, 0,
16, 0, 0, 0, 0, 0,
- 58, 128, 32, 128, 65, 0,
- 0, 0, 0, 0, 0, 0,
- 34, 0, 0, 0, 14, 0,
- 0, 10, 34, 0, 16, 0,
- 0, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 128, 63,
- 0, 0, 128, 63, 0, 0,
+ 2, 64, 0, 0, 0, 0,
128, 63, 0, 0, 128, 63,
- 26, 0, 16, 0, 0, 0,
- 0, 0, 56, 32, 0, 7,
+ 0, 0, 128, 63, 0, 0,
+ 128, 63, 26, 0, 16, 0,
+ 0, 0, 0, 0, 56, 32,
+ 0, 7, 18, 0, 16, 0,
+ 0, 0, 0, 0, 26, 0,
+ 16, 0, 0, 0, 0, 0,
+ 10, 0, 16, 0, 0, 0,
+ 0, 0, 50, 0, 0, 9,
+ 34, 0, 16, 0, 0, 0,
+ 0, 0, 10, 0, 16, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 0, 192,
+ 1, 64, 0, 0, 0, 0,
+ 64, 64, 56, 0, 0, 7,
18, 0, 16, 0, 0, 0,
- 0, 0, 26, 0, 16, 0,
+ 0, 0, 10, 0, 16, 0,
0, 0, 0, 0, 10, 0,
16, 0, 0, 0, 0, 0,
- 50, 0, 0, 9, 34, 0,
- 16, 0, 0, 0, 0, 0,
- 10, 0, 16, 0, 0, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 0, 192, 1, 64,
- 0, 0, 0, 0, 64, 64,
56, 0, 0, 7, 18, 0,
16, 0, 0, 0, 0, 0,
10, 0, 16, 0, 0, 0,
- 0, 0, 10, 0, 16, 0,
- 0, 0, 0, 0, 56, 0,
- 0, 7, 18, 0, 16, 0,
- 0, 0, 0, 0, 10, 0,
+ 0, 0, 26, 0, 16, 0,
+ 0, 0, 0, 0, 52, 0,
+ 0, 10, 82, 0, 16, 0,
+ 0, 0, 0, 0, 6, 2,
16, 0, 0, 0, 0, 0,
- 26, 0, 16, 0, 0, 0,
- 0, 0, 52, 0, 0, 10,
- 82, 0, 16, 0, 0, 0,
- 0, 0, 6, 2, 16, 0,
- 0, 0, 0, 0, 2, 64,
- 0, 0, 205, 204, 76, 61,
- 0, 0, 0, 0, 0, 0,
- 0, 63, 0, 0, 0, 0,
- 55, 0, 0, 10, 114, 0,
+ 2, 64, 0, 0, 205, 204,
+ 76, 61, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0,
+ 0, 0, 55, 0, 0, 10,
+ 114, 0, 16, 0, 1, 0,
+ 0, 0, 6, 16, 16, 0,
+ 9, 0, 0, 0, 70, 18,
16, 0, 1, 0, 0, 0,
+ 70, 18, 16, 128, 65, 0,
+ 0, 0, 1, 0, 0, 0,
+ 55, 0, 0, 9, 114, 0,
+ 16, 0, 2, 0, 0, 0,
6, 16, 16, 0, 9, 0,
0, 0, 70, 18, 16, 0,
- 1, 0, 0, 0, 70, 18,
- 16, 128, 65, 0, 0, 0,
- 1, 0, 0, 0, 55, 0,
- 0, 9, 114, 0, 16, 0,
- 2, 0, 0, 0, 6, 16,
- 16, 0, 9, 0, 0, 0,
- 70, 18, 16, 0, 5, 0,
- 0, 0, 70, 18, 16, 0,
- 7, 0, 0, 0, 39, 0,
- 0, 8, 34, 0, 16, 0,
- 0, 0, 0, 0, 10, 128,
- 32, 0, 0, 0, 0, 0,
- 35, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 0, 0,
- 49, 0, 0, 7, 130, 0,
+ 5, 0, 0, 0, 70, 18,
+ 16, 0, 7, 0, 0, 0,
+ 39, 0, 0, 8, 34, 0,
16, 0, 0, 0, 0, 0,
- 1, 64, 0, 0, 82, 184,
- 126, 63, 26, 0, 16, 0,
- 1, 0, 0, 0, 1, 0,
- 0, 7, 130, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
+ 10, 128, 32, 0, 0, 0,
+ 0, 0, 35, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 0, 0, 49, 0, 0, 7,
+ 130, 0, 16, 0, 0, 0,
+ 0, 0, 1, 64, 0, 0,
+ 82, 184, 126, 63, 26, 0,
+ 16, 0, 1, 0, 0, 0,
+ 1, 0, 0, 7, 130, 0,
16, 0, 0, 0, 0, 0,
- 26, 0, 16, 0, 0, 0,
- 0, 0, 31, 0, 4, 3,
58, 0, 16, 0, 0, 0,
- 0, 0, 122, 0, 0, 5,
- 50, 0, 16, 0, 3, 0,
- 0, 0, 134, 16, 16, 0,
- 4, 0, 0, 0, 124, 0,
- 0, 5, 194, 0, 16, 0,
- 3, 0, 0, 0, 6, 24,
+ 0, 0, 26, 0, 16, 0,
+ 0, 0, 0, 0, 31, 0,
+ 4, 3, 58, 0, 16, 0,
+ 0, 0, 0, 0, 122, 0,
+ 0, 5, 50, 0, 16, 0,
+ 3, 0, 0, 0, 134, 16,
16, 0, 4, 0, 0, 0,
- 52, 0, 0, 9, 50, 0,
+ 124, 0, 0, 5, 194, 0,
16, 0, 3, 0, 0, 0,
- 230, 10, 16, 128, 129, 0,
- 0, 0, 3, 0, 0, 0,
- 70, 0, 16, 128, 129, 0,
- 0, 0, 3, 0, 0, 0,
- 52, 0, 0, 7, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 26, 0, 16, 0, 3, 0,
- 0, 0, 10, 0, 16, 0,
- 3, 0, 0, 0, 50, 0,
- 0, 13, 50, 0, 16, 0,
- 3, 0, 0, 0, 246, 15,
- 16, 128, 65, 0, 0, 0,
- 0, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 63,
- 0, 0, 0, 63, 0, 0,
+ 6, 24, 16, 0, 4, 0,
+ 0, 0, 52, 0, 0, 9,
+ 50, 0, 16, 0, 3, 0,
+ 0, 0, 230, 10, 16, 128,
+ 129, 0, 0, 0, 3, 0,
+ 0, 0, 70, 0, 16, 128,
+ 129, 0, 0, 0, 3, 0,
+ 0, 0, 52, 0, 0, 7,
+ 130, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 0,
+ 3, 0, 0, 0, 10, 0,
+ 16, 0, 3, 0, 0, 0,
+ 50, 0, 0, 13, 50, 0,
+ 16, 0, 3, 0, 0, 0,
+ 246, 15, 16, 128, 65, 0,
0, 0, 0, 0, 0, 0,
- 134, 16, 16, 0, 4, 0,
- 0, 0, 50, 0, 0, 12,
- 194, 0, 16, 0, 3, 0,
- 0, 0, 246, 15, 16, 0,
- 0, 0, 0, 0, 2, 64,
+ 2, 64, 0, 0, 0, 0,
+ 0, 63, 0, 0, 0, 63,
0, 0, 0, 0, 0, 0,
+ 0, 0, 134, 16, 16, 0,
+ 4, 0, 0, 0, 50, 0,
+ 0, 12, 194, 0, 16, 0,
+ 3, 0, 0, 0, 246, 15,
+ 16, 0, 0, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0,
+ 0, 63, 6, 24, 16, 0,
+ 4, 0, 0, 0, 56, 0,
+ 0, 10, 50, 0, 16, 0,
+ 4, 0, 0, 0, 230, 10,
+ 16, 0, 3, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
0, 63, 0, 0, 0, 63,
- 6, 24, 16, 0, 4, 0,
- 0, 0, 56, 0, 0, 10,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 65, 0, 0, 5,
50, 0, 16, 0, 4, 0,
- 0, 0, 230, 10, 16, 0,
- 3, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 63,
- 0, 0, 0, 63, 0, 0,
+ 0, 0, 70, 0, 16, 0,
+ 4, 0, 0, 0, 50, 0,
+ 0, 13, 194, 0, 16, 0,
+ 3, 0, 0, 0, 166, 14,
+ 16, 0, 3, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 65, 0, 0, 5, 50, 0,
- 16, 0, 4, 0, 0, 0,
- 70, 0, 16, 0, 4, 0,
- 0, 0, 50, 0, 0, 13,
+ 0, 0, 0, 63, 0, 0,
+ 0, 63, 6, 4, 16, 128,
+ 65, 0, 0, 0, 4, 0,
+ 0, 0, 0, 0, 0, 10,
194, 0, 16, 0, 3, 0,
0, 0, 166, 14, 16, 0,
3, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 63, 0, 0, 0, 63,
- 6, 4, 16, 128, 65, 0,
- 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 10, 194, 0,
+ 0, 191, 0, 0, 0, 191,
+ 52, 0, 0, 10, 194, 0,
16, 0, 3, 0, 0, 0,
166, 14, 16, 0, 3, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 191,
- 0, 0, 0, 191, 52, 0,
- 0, 10, 194, 0, 16, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 50, 0,
+ 0, 12, 194, 0, 16, 0,
3, 0, 0, 0, 166, 14,
16, 0, 3, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 64, 0, 0,
+ 0, 64, 6, 4, 16, 0,
+ 4, 0, 0, 0, 56, 0,
+ 0, 10, 50, 0, 16, 0,
+ 4, 0, 0, 0, 70, 0,
+ 16, 0, 3, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 63, 0, 0, 0, 63,
0, 0, 0, 0, 0, 0,
- 0, 0, 50, 0, 0, 12,
- 194, 0, 16, 0, 3, 0,
- 0, 0, 166, 14, 16, 0,
- 3, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 64, 0, 0, 0, 64,
- 6, 4, 16, 0, 4, 0,
- 0, 0, 56, 0, 0, 10,
+ 0, 0, 65, 0, 0, 5,
50, 0, 16, 0, 4, 0,
0, 0, 70, 0, 16, 0,
- 3, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 63,
- 0, 0, 0, 63, 0, 0,
+ 4, 0, 0, 0, 50, 0,
+ 0, 13, 50, 0, 16, 0,
+ 3, 0, 0, 0, 70, 0,
+ 16, 0, 3, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 63, 0, 0, 0, 63,
0, 0, 0, 0, 0, 0,
- 65, 0, 0, 5, 50, 0,
- 16, 0, 4, 0, 0, 0,
- 70, 0, 16, 0, 4, 0,
- 0, 0, 50, 0, 0, 13,
+ 0, 0, 70, 0, 16, 128,
+ 65, 0, 0, 0, 4, 0,
+ 0, 0, 0, 0, 0, 10,
50, 0, 16, 0, 3, 0,
0, 0, 70, 0, 16, 0,
3, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 63,
- 0, 0, 0, 63, 0, 0,
+ 0, 0, 0, 0, 0, 191,
+ 0, 0, 0, 191, 0, 0,
0, 0, 0, 0, 0, 0,
- 70, 0, 16, 128, 65, 0,
- 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 10, 50, 0,
+ 52, 0, 0, 10, 50, 0,
16, 0, 3, 0, 0, 0,
70, 0, 16, 0, 3, 0,
0, 0, 2, 64, 0, 0,
- 0, 0, 0, 191, 0, 0,
- 0, 191, 0, 0, 0, 0,
- 0, 0, 0, 0, 52, 0,
- 0, 10, 50, 0, 16, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 50, 0,
+ 0, 12, 50, 0, 16, 0,
3, 0, 0, 0, 70, 0,
16, 0, 3, 0, 0, 0,
2, 64, 0, 0, 0, 0,
+ 0, 64, 0, 0, 0, 64,
0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 50, 0, 0, 12,
- 50, 0, 16, 0, 3, 0,
0, 0, 70, 0, 16, 0,
- 3, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 64,
- 0, 0, 0, 64, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 70, 0, 16, 0, 4, 0,
- 0, 0, 0, 0, 0, 8,
- 50, 0, 16, 0, 3, 0,
- 0, 0, 70, 0, 16, 128,
- 65, 0, 0, 0, 3, 0,
- 0, 0, 230, 10, 16, 0,
- 3, 0, 0, 0, 14, 0,
- 0, 7, 50, 0, 16, 0,
+ 4, 0, 0, 0, 0, 0,
+ 0, 8, 50, 0, 16, 0,
3, 0, 0, 0, 70, 0,
+ 16, 128, 65, 0, 0, 0,
+ 3, 0, 0, 0, 230, 10,
16, 0, 3, 0, 0, 0,
- 246, 15, 16, 0, 0, 0,
- 0, 0, 0, 0, 0, 11,
- 194, 0, 16, 0, 3, 0,
- 0, 0, 6, 4, 16, 128,
- 65, 0, 0, 0, 3, 0,
- 0, 0, 2, 64, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 128, 63,
- 0, 0, 128, 63, 56, 0,
- 0, 7, 130, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
- 16, 0, 3, 0, 0, 0,
- 42, 0, 16, 0, 3, 0,
- 0, 0, 50, 0, 0, 9,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 10, 0, 16, 0,
- 3, 0, 0, 0, 26, 0,
+ 14, 0, 0, 7, 50, 0,
16, 0, 3, 0, 0, 0,
- 58, 0, 16, 0, 0, 0,
- 0, 0, 50, 0, 0, 10,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 58, 0, 16, 128,
- 65, 0, 0, 0, 0, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 128, 62, 1, 64,
- 0, 0, 0, 0, 128, 63,
- 56, 0, 0, 7, 114, 0,
+ 70, 0, 16, 0, 3, 0,
+ 0, 0, 246, 15, 16, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 11, 194, 0, 16, 0,
+ 3, 0, 0, 0, 6, 4,
+ 16, 128, 65, 0, 0, 0,
+ 3, 0, 0, 0, 2, 64,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 128, 63, 0, 0, 128, 63,
+ 56, 0, 0, 7, 130, 0,
+ 16, 0, 0, 0, 0, 0,
+ 58, 0, 16, 0, 3, 0,
+ 0, 0, 42, 0, 16, 0,
+ 3, 0, 0, 0, 50, 0,
+ 0, 9, 130, 0, 16, 0,
+ 0, 0, 0, 0, 10, 0,
16, 0, 3, 0, 0, 0,
- 246, 15, 16, 0, 0, 0,
- 0, 0, 70, 2, 16, 0,
- 2, 0, 0, 0, 18, 0,
- 0, 1, 49, 0, 0, 8,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 1, 64, 0, 0,
- 82, 184, 126, 63, 42, 0,
- 16, 128, 129, 0, 0, 0,
- 1, 0, 0, 0, 1, 0,
- 0, 7, 34, 0, 16, 0,
+ 26, 0, 16, 0, 3, 0,
+ 0, 0, 58, 0, 16, 0,
+ 0, 0, 0, 0, 50, 0,
+ 0, 10, 130, 0, 16, 0,
0, 0, 0, 0, 58, 0,
+ 16, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 62,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 56, 0, 0, 7,
+ 114, 0, 16, 0, 3, 0,
+ 0, 0, 246, 15, 16, 0,
+ 0, 0, 0, 0, 70, 2,
+ 16, 0, 2, 0, 0, 0,
+ 18, 0, 0, 1, 49, 0,
+ 0, 8, 130, 0, 16, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 82, 184, 126, 63,
+ 42, 0, 16, 128, 129, 0,
+ 0, 0, 1, 0, 0, 0,
+ 1, 0, 0, 7, 34, 0,
16, 0, 0, 0, 0, 0,
- 26, 0, 16, 0, 0, 0,
- 0, 0, 122, 0, 0, 5,
+ 58, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 0,
+ 0, 0, 0, 0, 122, 0,
+ 0, 5, 50, 0, 16, 0,
+ 4, 0, 0, 0, 22, 21,
+ 16, 0, 4, 0, 0, 0,
+ 124, 0, 0, 5, 194, 0,
+ 16, 0, 4, 0, 0, 0,
+ 86, 17, 16, 0, 4, 0,
+ 0, 0, 52, 0, 0, 9,
50, 0, 16, 0, 4, 0,
- 0, 0, 22, 21, 16, 0,
- 4, 0, 0, 0, 124, 0,
- 0, 5, 194, 0, 16, 0,
- 4, 0, 0, 0, 86, 17,
+ 0, 0, 230, 10, 16, 128,
+ 129, 0, 0, 0, 4, 0,
+ 0, 0, 70, 0, 16, 128,
+ 129, 0, 0, 0, 4, 0,
+ 0, 0, 52, 0, 0, 7,
+ 130, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 0,
+ 4, 0, 0, 0, 10, 0,
16, 0, 4, 0, 0, 0,
- 52, 0, 0, 9, 50, 0,
+ 50, 0, 0, 13, 50, 0,
16, 0, 4, 0, 0, 0,
- 230, 10, 16, 128, 129, 0,
- 0, 0, 4, 0, 0, 0,
- 70, 0, 16, 128, 129, 0,
- 0, 0, 4, 0, 0, 0,
- 52, 0, 0, 7, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 26, 0, 16, 0, 4, 0,
- 0, 0, 10, 0, 16, 0,
- 4, 0, 0, 0, 50, 0,
- 0, 13, 50, 0, 16, 0,
- 4, 0, 0, 0, 246, 15,
- 16, 128, 65, 0, 0, 0,
- 0, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 63,
- 0, 0, 0, 63, 0, 0,
+ 246, 15, 16, 128, 65, 0,
0, 0, 0, 0, 0, 0,
- 22, 21, 16, 0, 4, 0,
- 0, 0, 50, 0, 0, 12,
- 194, 0, 16, 0, 4, 0,
- 0, 0, 246, 15, 16, 0,
- 0, 0, 0, 0, 2, 64,
+ 2, 64, 0, 0, 0, 0,
+ 0, 63, 0, 0, 0, 63,
0, 0, 0, 0, 0, 0,
+ 0, 0, 22, 21, 16, 0,
+ 4, 0, 0, 0, 50, 0,
+ 0, 12, 194, 0, 16, 0,
+ 4, 0, 0, 0, 246, 15,
+ 16, 0, 0, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0,
+ 0, 63, 86, 17, 16, 0,
+ 4, 0, 0, 0, 56, 0,
+ 0, 10, 50, 0, 16, 0,
+ 5, 0, 0, 0, 230, 10,
+ 16, 0, 4, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
0, 63, 0, 0, 0, 63,
- 86, 17, 16, 0, 4, 0,
- 0, 0, 56, 0, 0, 10,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 65, 0, 0, 5,
50, 0, 16, 0, 5, 0,
- 0, 0, 230, 10, 16, 0,
- 4, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 63,
- 0, 0, 0, 63, 0, 0,
+ 0, 0, 70, 0, 16, 0,
+ 5, 0, 0, 0, 50, 0,
+ 0, 13, 194, 0, 16, 0,
+ 4, 0, 0, 0, 166, 14,
+ 16, 0, 4, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 65, 0, 0, 5, 50, 0,
- 16, 0, 5, 0, 0, 0,
- 70, 0, 16, 0, 5, 0,
- 0, 0, 50, 0, 0, 13,
+ 0, 0, 0, 63, 0, 0,
+ 0, 63, 6, 4, 16, 128,
+ 65, 0, 0, 0, 5, 0,
+ 0, 0, 0, 0, 0, 10,
194, 0, 16, 0, 4, 0,
0, 0, 166, 14, 16, 0,
4, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 63, 0, 0, 0, 63,
- 6, 4, 16, 128, 65, 0,
- 0, 0, 5, 0, 0, 0,
- 0, 0, 0, 10, 194, 0,
+ 0, 191, 0, 0, 0, 191,
+ 52, 0, 0, 10, 194, 0,
16, 0, 4, 0, 0, 0,
166, 14, 16, 0, 4, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 191,
- 0, 0, 0, 191, 52, 0,
- 0, 10, 194, 0, 16, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 50, 0,
+ 0, 12, 194, 0, 16, 0,
4, 0, 0, 0, 166, 14,
16, 0, 4, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 64, 0, 0,
+ 0, 64, 6, 4, 16, 0,
+ 5, 0, 0, 0, 56, 0,
+ 0, 10, 50, 0, 16, 0,
+ 5, 0, 0, 0, 70, 0,
+ 16, 0, 4, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 63, 0, 0, 0, 63,
0, 0, 0, 0, 0, 0,
- 0, 0, 50, 0, 0, 12,
- 194, 0, 16, 0, 4, 0,
- 0, 0, 166, 14, 16, 0,
- 4, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 64, 0, 0, 0, 64,
- 6, 4, 16, 0, 5, 0,
- 0, 0, 56, 0, 0, 10,
+ 0, 0, 65, 0, 0, 5,
50, 0, 16, 0, 5, 0,
0, 0, 70, 0, 16, 0,
- 4, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 63,
- 0, 0, 0, 63, 0, 0,
+ 5, 0, 0, 0, 50, 0,
+ 0, 13, 50, 0, 16, 0,
+ 4, 0, 0, 0, 70, 0,
+ 16, 0, 4, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 63, 0, 0, 0, 63,
0, 0, 0, 0, 0, 0,
- 65, 0, 0, 5, 50, 0,
- 16, 0, 5, 0, 0, 0,
- 70, 0, 16, 0, 5, 0,
- 0, 0, 50, 0, 0, 13,
+ 0, 0, 70, 0, 16, 128,
+ 65, 0, 0, 0, 5, 0,
+ 0, 0, 0, 0, 0, 10,
50, 0, 16, 0, 4, 0,
0, 0, 70, 0, 16, 0,
4, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 63,
- 0, 0, 0, 63, 0, 0,
+ 0, 0, 0, 0, 0, 191,
+ 0, 0, 0, 191, 0, 0,
0, 0, 0, 0, 0, 0,
- 70, 0, 16, 128, 65, 0,
- 0, 0, 5, 0, 0, 0,
- 0, 0, 0, 10, 50, 0,
+ 52, 0, 0, 10, 50, 0,
16, 0, 4, 0, 0, 0,
70, 0, 16, 0, 4, 0,
0, 0, 2, 64, 0, 0,
- 0, 0, 0, 191, 0, 0,
- 0, 191, 0, 0, 0, 0,
- 0, 0, 0, 0, 52, 0,
- 0, 10, 50, 0, 16, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 50, 0,
+ 0, 12, 50, 0, 16, 0,
4, 0, 0, 0, 70, 0,
16, 0, 4, 0, 0, 0,
2, 64, 0, 0, 0, 0,
+ 0, 64, 0, 0, 0, 64,
0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 50, 0, 0, 12,
- 50, 0, 16, 0, 4, 0,
0, 0, 70, 0, 16, 0,
- 4, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 64,
- 0, 0, 0, 64, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 70, 0, 16, 0, 5, 0,
- 0, 0, 0, 0, 0, 8,
- 50, 0, 16, 0, 4, 0,
- 0, 0, 70, 0, 16, 128,
- 65, 0, 0, 0, 4, 0,
- 0, 0, 230, 10, 16, 0,
- 4, 0, 0, 0, 14, 0,
- 0, 7, 50, 0, 16, 0,
+ 5, 0, 0, 0, 0, 0,
+ 0, 8, 50, 0, 16, 0,
4, 0, 0, 0, 70, 0,
+ 16, 128, 65, 0, 0, 0,
+ 4, 0, 0, 0, 230, 10,
16, 0, 4, 0, 0, 0,
- 246, 15, 16, 0, 0, 0,
- 0, 0, 0, 0, 0, 11,
- 194, 0, 16, 0, 4, 0,
- 0, 0, 6, 4, 16, 128,
- 65, 0, 0, 0, 4, 0,
- 0, 0, 2, 64, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 128, 63,
- 0, 0, 128, 63, 56, 0,
- 0, 7, 130, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
- 16, 0, 4, 0, 0, 0,
- 42, 0, 16, 0, 4, 0,
- 0, 0, 50, 0, 0, 9,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 10, 0, 16, 0,
- 4, 0, 0, 0, 26, 0,
+ 14, 0, 0, 7, 50, 0,
16, 0, 4, 0, 0, 0,
- 58, 0, 16, 0, 0, 0,
- 0, 0, 50, 0, 0, 10,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 58, 0, 16, 128,
- 65, 0, 0, 0, 0, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 128, 62, 1, 64,
- 0, 0, 0, 0, 128, 63,
- 56, 0, 0, 7, 114, 0,
- 16, 0, 4, 0, 0, 0,
- 246, 15, 16, 0, 0, 0,
- 0, 0, 70, 2, 16, 0,
- 2, 0, 0, 0, 55, 0,
- 0, 9, 114, 0, 16, 0,
- 3, 0, 0, 0, 86, 5,
+ 70, 0, 16, 0, 4, 0,
+ 0, 0, 246, 15, 16, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 11, 194, 0, 16, 0,
+ 4, 0, 0, 0, 6, 4,
+ 16, 128, 65, 0, 0, 0,
+ 4, 0, 0, 0, 2, 64,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 128, 63, 0, 0, 128, 63,
+ 56, 0, 0, 7, 130, 0,
16, 0, 0, 0, 0, 0,
- 70, 2, 16, 0, 4, 0,
- 0, 0, 70, 2, 16, 0,
- 2, 0, 0, 0, 21, 0,
- 0, 1, 16, 0, 0, 8,
- 34, 0, 16, 0, 0, 0,
- 0, 0, 70, 130, 32, 0,
- 0, 0, 0, 0, 33, 0,
+ 58, 0, 16, 0, 4, 0,
+ 0, 0, 42, 0, 16, 0,
+ 4, 0, 0, 0, 50, 0,
+ 0, 9, 130, 0, 16, 0,
+ 0, 0, 0, 0, 10, 0,
+ 16, 0, 4, 0, 0, 0,
+ 26, 0, 16, 0, 4, 0,
+ 0, 0, 58, 0, 16, 0,
+ 0, 0, 0, 0, 50, 0,
+ 0, 10, 130, 0, 16, 0,
+ 0, 0, 0, 0, 58, 0,
+ 16, 128, 65, 0, 0, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 62,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 56, 0, 0, 7,
+ 114, 0, 16, 0, 4, 0,
+ 0, 0, 246, 15, 16, 0,
+ 0, 0, 0, 0, 70, 2,
+ 16, 0, 2, 0, 0, 0,
+ 55, 0, 0, 9, 114, 0,
+ 16, 0, 3, 0, 0, 0,
+ 86, 5, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
- 1, 0, 0, 0, 56, 0,
- 0, 8, 66, 0, 16, 0,
- 0, 0, 0, 0, 42, 0,
- 16, 0, 0, 0, 0, 0,
- 26, 0, 16, 128, 65, 0,
- 0, 0, 0, 0, 0, 0,
- 52, 0, 0, 7, 66, 0,
+ 4, 0, 0, 0, 70, 2,
+ 16, 0, 2, 0, 0, 0,
+ 21, 0, 0, 1, 16, 0,
+ 0, 8, 34, 0, 16, 0,
+ 0, 0, 0, 0, 70, 130,
+ 32, 0, 0, 0, 0, 0,
+ 33, 0, 0, 0, 70, 2,
+ 16, 0, 1, 0, 0, 0,
+ 56, 0, 0, 8, 66, 0,
16, 0, 0, 0, 0, 0,
42, 0, 16, 0, 0, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 0, 0, 56, 0,
- 0, 7, 114, 0, 16, 0,
- 1, 0, 0, 0, 166, 10,
- 16, 0, 0, 0, 0, 0,
- 70, 2, 16, 0, 3, 0,
- 0, 0, 56, 0, 0, 10,
- 114, 0, 16, 0, 2, 0,
+ 0, 0, 26, 0, 16, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 52, 0, 0, 7,
+ 66, 0, 16, 0, 0, 0,
+ 0, 0, 42, 0, 16, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 0, 0,
+ 56, 0, 0, 7, 114, 0,
+ 16, 0, 1, 0, 0, 0,
+ 166, 10, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
- 3, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 128, 64,
+ 3, 0, 0, 0, 56, 0,
+ 0, 10, 114, 0, 16, 0,
+ 2, 0, 0, 0, 70, 2,
+ 16, 0, 3, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 128, 64, 0, 0, 128, 64,
0, 0, 128, 64, 0, 0,
- 128, 64, 0, 0, 0, 0,
- 50, 0, 0, 15, 226, 0,
- 16, 0, 0, 0, 0, 0,
- 86, 5, 16, 0, 0, 0,
- 0, 0, 2, 64, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 191, 0, 0, 0, 191,
- 0, 0, 128, 191, 2, 64,
+ 0, 0, 50, 0, 0, 15,
+ 226, 0, 16, 0, 0, 0,
+ 0, 0, 86, 5, 16, 0,
+ 0, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 191, 0, 0,
+ 0, 191, 0, 0, 128, 191,
+ 2, 64, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 63,
0, 0, 0, 63, 0, 0,
- 0, 63, 0, 0, 0, 0,
- 50, 0, 0, 15, 226, 0,
- 16, 0, 0, 0, 0, 0,
- 86, 14, 16, 0, 0, 0,
- 0, 0, 2, 64, 0, 0,
- 0, 0, 0, 0, 11, 215,
- 163, 60, 206, 204, 76, 60,
- 148, 194, 245, 59, 2, 64,
+ 0, 0, 50, 0, 0, 15,
+ 226, 0, 16, 0, 0, 0,
+ 0, 0, 86, 14, 16, 0,
+ 0, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
- 205, 204, 204, 60, 205, 204,
- 204, 60, 143, 194, 245, 60,
+ 11, 215, 163, 60, 206, 204,
+ 76, 60, 148, 194, 245, 59,
+ 2, 64, 0, 0, 0, 0,
+ 0, 0, 205, 204, 204, 60,
+ 205, 204, 204, 60, 143, 194,
+ 245, 60, 56, 0, 0, 7,
+ 226, 0, 16, 0, 0, 0,
+ 0, 0, 86, 14, 16, 0,
+ 0, 0, 0, 0, 6, 9,
+ 16, 0, 2, 0, 0, 0,
56, 0, 0, 7, 226, 0,
16, 0, 0, 0, 0, 0,
- 86, 14, 16, 0, 0, 0,
- 0, 0, 6, 9, 16, 0,
- 2, 0, 0, 0, 56, 0,
- 0, 7, 226, 0, 16, 0,
- 0, 0, 0, 0, 6, 0,
- 16, 0, 0, 0, 0, 0,
- 86, 14, 16, 0, 0, 0,
- 0, 0, 50, 0, 0, 9,
- 114, 0, 16, 0, 0, 0,
- 0, 0, 70, 2, 16, 0,
- 1, 0, 0, 0, 6, 0,
- 16, 0, 0, 0, 0, 0,
- 150, 7, 16, 0, 0, 0,
- 0, 0, 56, 0, 0, 8,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 42, 16, 16, 0,
- 8, 0, 0, 0, 58, 128,
- 32, 0, 0, 0, 0, 0,
- 17, 0, 0, 0, 56, 0,
- 0, 7, 130, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
- 1, 64, 0, 0, 59, 170,
- 184, 63, 25, 0, 0, 5,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 0, 0,
+ 6, 0, 16, 0, 0, 0,
+ 0, 0, 86, 14, 16, 0,
+ 0, 0, 0, 0, 50, 0,
0, 9, 114, 0, 16, 0,
0, 0, 0, 0, 70, 2,
+ 16, 0, 1, 0, 0, 0,
+ 6, 0, 16, 0, 0, 0,
+ 0, 0, 150, 7, 16, 0,
+ 0, 0, 0, 0, 56, 0,
+ 0, 8, 130, 0, 16, 0,
+ 0, 0, 0, 0, 42, 16,
+ 16, 0, 8, 0, 0, 0,
+ 58, 128, 32, 0, 0, 0,
+ 0, 0, 17, 0, 0, 0,
+ 56, 0, 0, 7, 130, 0,
16, 0, 0, 0, 0, 0,
- 70, 130, 32, 128, 65, 0,
- 0, 0, 0, 0, 0, 0,
- 17, 0, 0, 0, 50, 0,
- 0, 10, 114, 0, 16, 0,
- 0, 0, 0, 0, 246, 15,
+ 58, 0, 16, 0, 0, 0,
+ 0, 0, 1, 64, 0, 0,
+ 59, 170, 184, 63, 25, 0,
+ 0, 5, 130, 0, 16, 0,
+ 0, 0, 0, 0, 58, 0,
+ 16, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 114, 0,
16, 0, 0, 0, 0, 0,
70, 2, 16, 0, 0, 0,
- 0, 0, 70, 130, 32, 0,
- 0, 0, 0, 0, 17, 0,
- 0, 0, 47, 0, 0, 6,
- 114, 0, 16, 0, 0, 0,
- 0, 0, 70, 2, 16, 128,
- 129, 0, 0, 0, 0, 0,
- 0, 0, 56, 0, 0, 10,
- 114, 0, 16, 0, 0, 0,
+ 0, 0, 70, 130, 32, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 17, 0, 0, 0,
+ 50, 0, 0, 10, 114, 0,
+ 16, 0, 0, 0, 0, 0,
+ 246, 15, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
- 0, 0, 0, 0, 2, 64,
- 0, 0, 47, 186, 232, 62,
- 47, 186, 232, 62, 47, 186,
- 232, 62, 0, 0, 0, 0,
- 25, 0, 0, 5, 114, 32,
+ 0, 0, 0, 0, 70, 130,
+ 32, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 47, 0,
+ 0, 6, 114, 0, 16, 0,
+ 0, 0, 0, 0, 70, 2,
+ 16, 128, 129, 0, 0, 0,
+ 0, 0, 0, 0, 56, 0,
+ 0, 10, 114, 0, 16, 0,
+ 0, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0,
- 70, 2, 16, 0, 0, 0,
- 0, 0, 54, 0, 0, 5,
- 130, 32, 16, 0, 0, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 128, 63, 62, 0,
- 0, 1, 83, 84, 65, 84,
- 148, 0, 0, 0, 179, 0,
- 0, 0, 6, 0, 0, 0,
- 0, 0, 0, 0, 8, 0,
- 0, 0, 146, 0, 0, 0,
- 1, 0, 0, 0, 4, 0,
- 0, 0, 4, 0, 0, 0,
- 3, 0, 0, 0, 0, 0,
+ 2, 64, 0, 0, 47, 186,
+ 232, 62, 47, 186, 232, 62,
+ 47, 186, 232, 62, 0, 0,
+ 0, 0, 25, 0, 0, 5,
+ 114, 32, 16, 0, 0, 0,
+ 0, 0, 70, 2, 16, 0,
+ 0, 0, 0, 0, 54, 0,
+ 0, 5, 130, 32, 16, 0,
+ 0, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 62, 0, 0, 1, 83, 84,
+ 65, 84, 148, 0, 0, 0,
+ 179, 0, 0, 0, 6, 0,
0, 0, 0, 0, 0, 0,
+ 8, 0, 0, 0, 146, 0,
+ 0, 0, 1, 0, 0, 0,
+ 4, 0, 0, 0, 4, 0,
+ 0, 0, 3, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 12, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 3, 0, 0, 0, 4, 0,
+ 0, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 3, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
@@ -1549,5 +1554,5 @@ const BYTE g_meshPS[] =
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0
+ 0, 0, 0, 0
};
diff --git a/demo/d3d11/shaders/meshShadowPS.hlsl b/demo/d3d/shaders/meshShadowPS.hlsl
index cb60c22..96d7371 100644
--- a/demo/d3d11/shaders/meshShadowPS.hlsl
+++ b/demo/d3d/shaders/meshShadowPS.hlsl
@@ -5,7 +5,8 @@ cbuffer constBuf : register(b0)
MeshShaderConst gParams;
};
-float4 meshPS_Shadow(MeshVertexOut input) : SV_TARGET
+
+void meshPS_Shadow(MeshVertexOut input)
{
- return float4(0.0, 0.0, 0.0, 1.0);
}
+
diff --git a/demo/d3d11/shaders/meshShadowPS.hlsl.h b/demo/d3d/shaders/meshShadowPS.hlsl.h
index 3794f61..f921264 100644
--- a/demo/d3d11/shaders/meshShadowPS.hlsl.h
+++ b/demo/d3d/shaders/meshShadowPS.hlsl.h
@@ -9,12 +9,12 @@
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
-// TEXCOORD 0 xyzw 1 NONE float
+// TEXCOORD 0 xyz 1 NONE float
// TEXCOORD 1 xyzw 2 NONE float
-// TEXCOORD 2 xyzw 3 NONE float
-// TEXCOORD 3 xyzw 4 NONE float
+// TEXCOORD 2 xyz 3 NONE float
+// TEXCOORD 3 xyz 4 NONE float
// TEXCOORD 4 xyzw 5 NONE float
-// TEXCOORD 5 xyzw 6 NONE float
+// TEXCOORD 5 xy 6 NONE float
// TEXCOORD 6 xyzw 7 NONE float
// TEXCOORD 7 xyzw 8 NONE float
//
@@ -23,27 +23,24 @@
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
-// SV_TARGET 0 xyzw 0 TARGET float xyzw
-//
+// no Output
ps_5_0
dcl_globalFlags refactoringAllowed
-dcl_output o0.xyzw
-mov o0.xyzw, l(0,0,0,1.000000)
ret
-// Approximately 2 instruction slots used
+// Approximately 1 instruction slots used
#endif
const BYTE g_meshPS_Shadow[] =
{
- 68, 88, 66, 67, 106, 78,
- 82, 142, 162, 137, 138, 82,
- 3, 68, 165, 116, 56, 116,
- 165, 11, 1, 0, 0, 0,
- 192, 2, 0, 0, 5, 0,
+ 68, 88, 66, 67, 92, 14,
+ 98, 50, 73, 255, 171, 211,
+ 114, 130, 157, 79, 70, 204,
+ 106, 183, 1, 0, 0, 0,
+ 112, 2, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
172, 0, 0, 0, 172, 1,
- 0, 0, 224, 1, 0, 0,
- 36, 2, 0, 0, 82, 68,
+ 0, 0, 188, 1, 0, 0,
+ 212, 1, 0, 0, 82, 68,
69, 70, 112, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
@@ -73,7 +70,7 @@ const BYTE g_meshPS_Shadow[] =
0, 0, 236, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
- 1, 0, 0, 0, 15, 0,
+ 1, 0, 0, 0, 7, 0,
0, 0, 236, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
@@ -81,11 +78,11 @@ const BYTE g_meshPS_Shadow[] =
0, 0, 236, 0, 0, 0,
2, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
- 3, 0, 0, 0, 15, 0,
+ 3, 0, 0, 0, 7, 0,
0, 0, 236, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
- 4, 0, 0, 0, 15, 0,
+ 4, 0, 0, 0, 7, 0,
0, 0, 236, 0, 0, 0,
4, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
@@ -93,7 +90,7 @@ const BYTE g_meshPS_Shadow[] =
0, 0, 236, 0, 0, 0,
5, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
- 6, 0, 0, 0, 15, 0,
+ 6, 0, 0, 0, 3, 0,
0, 0, 236, 0, 0, 0,
6, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
@@ -107,32 +104,19 @@ const BYTE g_meshPS_Shadow[] =
78, 0, 84, 69, 88, 67,
79, 79, 82, 68, 0, 171,
171, 171, 79, 83, 71, 78,
- 44, 0, 0, 0, 1, 0,
+ 8, 0, 0, 0, 0, 0,
0, 0, 8, 0, 0, 0,
- 32, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0,
- 0, 0, 15, 0, 0, 0,
- 83, 86, 95, 84, 65, 82,
- 71, 69, 84, 0, 171, 171,
- 83, 72, 69, 88, 60, 0,
+ 83, 72, 69, 88, 16, 0,
0, 0, 80, 0, 0, 0,
- 15, 0, 0, 0, 106, 8,
- 0, 1, 101, 0, 0, 3,
- 242, 32, 16, 0, 0, 0,
- 0, 0, 54, 0, 0, 8,
- 242, 32, 16, 0, 0, 0,
- 0, 0, 2, 64, 0, 0,
+ 4, 0, 0, 0, 106, 8,
+ 0, 1, 62, 0, 0, 1,
+ 83, 84, 65, 84, 148, 0,
+ 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 128, 63, 62, 0,
- 0, 1, 83, 84, 65, 84,
- 148, 0, 0, 0, 2, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
@@ -140,7 +124,6 @@ const BYTE g_meshPS_Shadow[] =
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
@@ -152,5 +135,5 @@ const BYTE g_meshPS_Shadow[] =
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0
+ 0, 0, 0, 0, 0, 0
};
diff --git a/demo/d3d/shaders/meshVS.hlsl b/demo/d3d/shaders/meshVS.hlsl
new file mode 100644
index 0000000..d2fa9e5
--- /dev/null
+++ b/demo/d3d/shaders/meshVS.hlsl
@@ -0,0 +1,35 @@
+#include "shaderCommon.h"
+
+cbuffer constBuf : register(b0)
+{
+ MeshShaderConst gParams;
+};
+
+MeshVertexOut meshVS(MeshVertexIn input)
+{
+ const float4x4 modelViewProjectionMatrix = gParams.modelViewProjection;
+ const float4x4 modelViewMatrix = gParams.modelView;
+ const float4x4 objectTransform = gParams.objectTransform;
+ const float4x4 lightTransform = gParams.lightTransform;
+
+ float3 n = normalize(mul(objectTransform, float4(input.normal, 0.0)).xyz);
+ float3 p = mul(objectTransform, float4(input.position.xyz, 1.0)).xyz;
+
+ // calculate window-space point size
+ MeshVertexOut output;
+ output.position = mul(modelViewProjectionMatrix, float4(p + gParams.expand * n, 1.0));
+
+ output.worldNormal = n;
+ output.lightOffsetPosition = mul(lightTransform, float4(p + n * gParams.bias, 1.0));
+ output.viewLightDir = mul(modelViewMatrix, float4(gParams.lightDir, 0.0));
+ output.worldPosition = p;
+ if (gParams.colorArray)
+ output.color = input.color;
+ else
+ output.color = gParams.color;
+ output.texCoord = float2(input.texCoord.x, 1.0f - input.texCoord.y); // flip the y component of uv (glsl to hlsl conversion)
+ output.secondaryColor = gParams.secondaryColor;
+ output.viewPosition = mul(modelViewMatrix, float4(input.position.xyz, 1.0));
+
+ return output;
+}
diff --git a/demo/d3d11/shaders/meshVS.hlsl.h b/demo/d3d/shaders/meshVS.hlsl.h
index cc314af..15198ae 100644
--- a/demo/d3d11/shaders/meshVS.hlsl.h
+++ b/demo/d3d/shaders/meshVS.hlsl.h
@@ -11,8 +11,8 @@
// struct MeshShaderConst
// {
//
-// float4x4 modelviewprojection; // Offset: 0
-// float4x4 modelview; // Offset: 64
+// float4x4 modelViewProjection; // Offset: 0
+// float4x4 modelView; // Offset: 64
// float4x4 objectTransform; // Offset: 128
// float4x4 lightTransform; // Offset: 192
// float4 clipPlane; // Offset: 256
@@ -31,7 +31,7 @@
// int grid; // Offset: 560
// int tex; // Offset: 564
// int colorArray; // Offset: 568
-// int _pad2; // Offset: 572
+// int increaseGfxLoadForAsyncComputeTesting;// Offset: 572
//
// } gParams; // Offset: 0 Size: 576
//
@@ -61,12 +61,12 @@
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float xyzw
-// TEXCOORD 0 xyzw 1 NONE float xyzw
+// TEXCOORD 0 xyz 1 NONE float xyz
// TEXCOORD 1 xyzw 2 NONE float xyzw
-// TEXCOORD 2 xyzw 3 NONE float xyzw
-// TEXCOORD 3 xyzw 4 NONE float xyzw
+// TEXCOORD 2 xyz 3 NONE float xyz
+// TEXCOORD 3 xyz 4 NONE float xyz
// TEXCOORD 4 xyzw 5 NONE float xyzw
-// TEXCOORD 5 xyzw 6 NONE float xyzw
+// TEXCOORD 5 xy 6 NONE float xy
// TEXCOORD 6 xyzw 7 NONE float xyzw
// TEXCOORD 7 xyzw 8 NONE float xyzw
//
@@ -78,12 +78,12 @@ dcl_input v1.xyz
dcl_input v2.xy
dcl_input v3.xyzw
dcl_output_siv o0.xyzw, position
-dcl_output o1.xyzw
+dcl_output o1.xyz
dcl_output o2.xyzw
-dcl_output o3.xyzw
-dcl_output o4.xyzw
+dcl_output o3.xyz
+dcl_output o4.xyz
dcl_output o5.xyzw
-dcl_output o6.xyzw
+dcl_output o6.xy
dcl_output o7.xyzw
dcl_output o8.xyzw
dcl_temps 4
@@ -105,44 +105,41 @@ add o0.xyzw, r2.xyzw, cb0[3].xyzw
mov o1.xyz, r0.xyzx
mad r0.xyz, r0.xyzx, cb0[34].xxxx, r1.xyzx
mov o4.xyz, r1.xyzx
-mov o1.w, l(0)
mul r1.xyzw, r0.yyyy, cb0[13].xyzw
mad r1.xyzw, cb0[12].xyzw, r0.xxxx, r1.xyzw
mad r0.xyzw, cb0[14].xyzw, r0.zzzz, r1.xyzw
add o2.xyzw, r0.xyzw, cb0[15].xyzw
-mul r0.xyzw, cb0[5].xyzw, cb0[33].yyyy
-mad r0.xyzw, cb0[4].xyzw, cb0[33].xxxx, r0.xyzw
-mad o3.xyzw, cb0[6].xyzw, cb0[33].zzzz, r0.xyzw
-mov o4.w, l(0)
+mul r0.xyz, cb0[5].xyzx, cb0[33].yyyy
+mad r0.xyz, cb0[4].xyzx, cb0[33].xxxx, r0.xyzx
+mad o3.xyz, cb0[6].xyzx, cb0[33].zzzz, r0.xyzx
movc o5.xyzw, cb0[35].zzzz, v3.xyzw, cb0[18].xyzw
mad o6.xy, v2.xyxx, l(1.000000, -1.000000, 0.000000, 0.000000), l(0.000000, 1.000000, 0.000000, 0.000000)
-mov o6.zw, l(0,0,0,0)
mov o7.xyzw, cb0[19].xyzw
mul r0.xyzw, v0.yyyy, cb0[5].xyzw
mad r0.xyzw, cb0[4].xyzw, v0.xxxx, r0.xyzw
mad r0.xyzw, cb0[6].xyzw, v0.zzzz, r0.xyzw
add o8.xyzw, r0.xyzw, cb0[7].xyzw
ret
-// Approximately 36 instruction slots used
+// Approximately 33 instruction slots used
#endif
const BYTE g_meshVS[] =
{
- 68, 88, 66, 67, 128, 165,
- 34, 49, 122, 47, 91, 168,
- 78, 217, 246, 213, 221, 36,
- 22, 221, 1, 0, 0, 0,
- 204, 11, 0, 0, 5, 0,
+ 68, 88, 66, 67, 224, 200,
+ 225, 174, 179, 134, 152, 85,
+ 252, 211, 193, 254, 28, 42,
+ 106, 184, 1, 0, 0, 0,
+ 164, 11, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
- 24, 4, 0, 0, 168, 4,
- 0, 0, 168, 5, 0, 0,
- 48, 11, 0, 0, 82, 68,
- 69, 70, 220, 3, 0, 0,
+ 56, 4, 0, 0, 200, 4,
+ 0, 0, 200, 5, 0, 0,
+ 8, 11, 0, 0, 82, 68,
+ 69, 70, 252, 3, 0, 0,
1, 0, 0, 0, 104, 0,
0, 0, 1, 0, 0, 0,
60, 0, 0, 0, 0, 5,
254, 255, 0, 1, 0, 0,
- 168, 3, 0, 0, 82, 68,
+ 200, 3, 0, 0, 82, 68,
49, 49, 60, 0, 0, 0,
24, 0, 0, 0, 32, 0,
0, 0, 40, 0, 0, 0,
@@ -162,7 +159,7 @@ const BYTE g_meshVS[] =
0, 0, 168, 0, 0, 0,
0, 0, 0, 0, 64, 2,
0, 0, 2, 0, 0, 0,
- 132, 3, 0, 0, 0, 0,
+ 164, 3, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
@@ -170,8 +167,8 @@ const BYTE g_meshVS[] =
115, 0, 77, 101, 115, 104,
83, 104, 97, 100, 101, 114,
67, 111, 110, 115, 116, 0,
- 109, 111, 100, 101, 108, 118,
- 105, 101, 119, 112, 114, 111,
+ 109, 111, 100, 101, 108, 86,
+ 105, 101, 119, 80, 114, 111,
106, 101, 99, 116, 105, 111,
110, 0, 102, 108, 111, 97,
116, 52, 120, 52, 0, 171,
@@ -182,7 +179,7 @@ const BYTE g_meshVS[] =
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 212, 0,
0, 0, 109, 111, 100, 101,
- 108, 118, 105, 101, 119, 0,
+ 108, 86, 105, 101, 119, 0,
111, 98, 106, 101, 99, 116,
84, 114, 97, 110, 115, 102,
111, 114, 109, 0, 108, 105,
@@ -244,268 +241,270 @@ const BYTE g_meshVS[] =
0, 0, 72, 2, 0, 0,
116, 101, 120, 0, 99, 111,
108, 111, 114, 65, 114, 114,
- 97, 121, 0, 95, 112, 97,
- 100, 50, 0, 171, 171, 171,
- 192, 0, 0, 0, 224, 0,
- 0, 0, 0, 0, 0, 0,
- 4, 1, 0, 0, 224, 0,
- 0, 0, 64, 0, 0, 0,
- 14, 1, 0, 0, 224, 0,
- 0, 0, 128, 0, 0, 0,
- 30, 1, 0, 0, 224, 0,
- 0, 0, 192, 0, 0, 0,
- 45, 1, 0, 0, 64, 1,
- 0, 0, 0, 1, 0, 0,
- 100, 1, 0, 0, 64, 1,
- 0, 0, 16, 1, 0, 0,
- 109, 1, 0, 0, 64, 1,
- 0, 0, 32, 1, 0, 0,
- 115, 1, 0, 0, 64, 1,
- 0, 0, 48, 1, 0, 0,
- 130, 1, 0, 0, 144, 1,
- 0, 0, 64, 1, 0, 0,
- 180, 1, 0, 0, 196, 1,
- 0, 0, 0, 2, 0, 0,
- 232, 1, 0, 0, 244, 1,
- 0, 0, 12, 2, 0, 0,
- 24, 2, 0, 0, 196, 1,
- 0, 0, 16, 2, 0, 0,
- 33, 2, 0, 0, 244, 1,
- 0, 0, 28, 2, 0, 0,
- 39, 2, 0, 0, 244, 1,
- 0, 0, 32, 2, 0, 0,
- 44, 2, 0, 0, 244, 1,
- 0, 0, 36, 2, 0, 0,
- 51, 2, 0, 0, 244, 1,
- 0, 0, 40, 2, 0, 0,
- 59, 2, 0, 0, 244, 1,
+ 97, 121, 0, 105, 110, 99,
+ 114, 101, 97, 115, 101, 71,
+ 102, 120, 76, 111, 97, 100,
+ 70, 111, 114, 65, 115, 121,
+ 110, 99, 67, 111, 109, 112,
+ 117, 116, 101, 84, 101, 115,
+ 116, 105, 110, 103, 0, 171,
+ 171, 171, 192, 0, 0, 0,
+ 224, 0, 0, 0, 0, 0,
+ 0, 0, 4, 1, 0, 0,
+ 224, 0, 0, 0, 64, 0,
+ 0, 0, 14, 1, 0, 0,
+ 224, 0, 0, 0, 128, 0,
+ 0, 0, 30, 1, 0, 0,
+ 224, 0, 0, 0, 192, 0,
+ 0, 0, 45, 1, 0, 0,
+ 64, 1, 0, 0, 0, 1,
+ 0, 0, 100, 1, 0, 0,
+ 64, 1, 0, 0, 16, 1,
+ 0, 0, 109, 1, 0, 0,
+ 64, 1, 0, 0, 32, 1,
+ 0, 0, 115, 1, 0, 0,
+ 64, 1, 0, 0, 48, 1,
+ 0, 0, 130, 1, 0, 0,
+ 144, 1, 0, 0, 64, 1,
+ 0, 0, 180, 1, 0, 0,
+ 196, 1, 0, 0, 0, 2,
+ 0, 0, 232, 1, 0, 0,
+ 244, 1, 0, 0, 12, 2,
+ 0, 0, 24, 2, 0, 0,
+ 196, 1, 0, 0, 16, 2,
+ 0, 0, 33, 2, 0, 0,
+ 244, 1, 0, 0, 28, 2,
+ 0, 0, 39, 2, 0, 0,
+ 244, 1, 0, 0, 32, 2,
0, 0, 44, 2, 0, 0,
- 67, 2, 0, 0, 76, 2,
- 0, 0, 48, 2, 0, 0,
- 112, 2, 0, 0, 76, 2,
- 0, 0, 52, 2, 0, 0,
- 116, 2, 0, 0, 76, 2,
- 0, 0, 56, 2, 0, 0,
- 127, 2, 0, 0, 76, 2,
- 0, 0, 60, 2, 0, 0,
- 5, 0, 0, 0, 1, 0,
- 144, 0, 0, 0, 21, 0,
- 136, 2, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 176, 0, 0, 0,
- 77, 105, 99, 114, 111, 115,
- 111, 102, 116, 32, 40, 82,
- 41, 32, 72, 76, 83, 76,
- 32, 83, 104, 97, 100, 101,
- 114, 32, 67, 111, 109, 112,
- 105, 108, 101, 114, 32, 54,
- 46, 51, 46, 57, 54, 48,
- 48, 46, 49, 54, 51, 56,
- 52, 0, 171, 171, 73, 83,
- 71, 78, 136, 0, 0, 0,
- 4, 0, 0, 0, 8, 0,
- 0, 0, 104, 0, 0, 0,
+ 244, 1, 0, 0, 36, 2,
+ 0, 0, 51, 2, 0, 0,
+ 244, 1, 0, 0, 40, 2,
+ 0, 0, 59, 2, 0, 0,
+ 244, 1, 0, 0, 44, 2,
+ 0, 0, 67, 2, 0, 0,
+ 76, 2, 0, 0, 48, 2,
+ 0, 0, 112, 2, 0, 0,
+ 76, 2, 0, 0, 52, 2,
+ 0, 0, 116, 2, 0, 0,
+ 76, 2, 0, 0, 56, 2,
+ 0, 0, 127, 2, 0, 0,
+ 76, 2, 0, 0, 60, 2,
+ 0, 0, 5, 0, 0, 0,
+ 1, 0, 144, 0, 0, 0,
+ 21, 0, 168, 2, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 176, 0,
+ 0, 0, 77, 105, 99, 114,
+ 111, 115, 111, 102, 116, 32,
+ 40, 82, 41, 32, 72, 76,
+ 83, 76, 32, 83, 104, 97,
+ 100, 101, 114, 32, 67, 111,
+ 109, 112, 105, 108, 101, 114,
+ 32, 54, 46, 51, 46, 57,
+ 54, 48, 48, 46, 49, 54,
+ 51, 56, 52, 0, 171, 171,
+ 73, 83, 71, 78, 136, 0,
+ 0, 0, 4, 0, 0, 0,
+ 8, 0, 0, 0, 104, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 7, 7,
- 0, 0, 113, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 1, 0, 0, 0, 7, 7,
- 0, 0, 120, 0, 0, 0,
+ 7, 7, 0, 0, 113, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 2, 0, 0, 0, 3, 3,
- 0, 0, 129, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 1, 0, 0, 0,
+ 7, 7, 0, 0, 120, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 3, 0, 0, 0, 15, 15,
- 0, 0, 80, 79, 83, 73,
- 84, 73, 79, 78, 0, 78,
- 79, 82, 77, 65, 76, 0,
- 84, 69, 88, 67, 79, 79,
- 82, 68, 0, 67, 79, 76,
- 79, 82, 0, 171, 79, 83,
- 71, 78, 248, 0, 0, 0,
- 9, 0, 0, 0, 8, 0,
- 0, 0, 224, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 15, 0,
- 0, 0, 236, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 2, 0, 0, 0,
+ 3, 3, 0, 0, 129, 0,
0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
0, 0, 3, 0, 0, 0,
- 1, 0, 0, 0, 15, 0,
- 0, 0, 236, 0, 0, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 2, 0, 0, 0, 15, 0,
- 0, 0, 236, 0, 0, 0,
- 2, 0, 0, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 3, 0, 0, 0, 15, 0,
- 0, 0, 236, 0, 0, 0,
- 3, 0, 0, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 4, 0, 0, 0, 15, 0,
- 0, 0, 236, 0, 0, 0,
- 4, 0, 0, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 5, 0, 0, 0, 15, 0,
- 0, 0, 236, 0, 0, 0,
- 5, 0, 0, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 6, 0, 0, 0, 15, 0,
- 0, 0, 236, 0, 0, 0,
- 6, 0, 0, 0, 0, 0,
+ 15, 15, 0, 0, 80, 79,
+ 83, 73, 84, 73, 79, 78,
+ 0, 78, 79, 82, 77, 65,
+ 76, 0, 84, 69, 88, 67,
+ 79, 79, 82, 68, 0, 67,
+ 79, 76, 79, 82, 0, 171,
+ 79, 83, 71, 78, 248, 0,
+ 0, 0, 9, 0, 0, 0,
+ 8, 0, 0, 0, 224, 0,
+ 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
+ 15, 0, 0, 0, 236, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 1, 0, 0, 0,
+ 7, 8, 0, 0, 236, 0,
+ 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 2, 0, 0, 0,
+ 15, 0, 0, 0, 236, 0,
+ 0, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
0, 0, 3, 0, 0, 0,
- 7, 0, 0, 0, 15, 0,
- 0, 0, 236, 0, 0, 0,
- 7, 0, 0, 0, 0, 0,
+ 7, 8, 0, 0, 236, 0,
0, 0, 3, 0, 0, 0,
- 8, 0, 0, 0, 15, 0,
- 0, 0, 83, 86, 95, 80,
- 79, 83, 73, 84, 73, 79,
- 78, 0, 84, 69, 88, 67,
- 79, 79, 82, 68, 0, 171,
- 171, 171, 83, 72, 69, 88,
- 128, 5, 0, 0, 80, 0,
- 1, 0, 96, 1, 0, 0,
- 106, 8, 0, 1, 89, 0,
- 0, 4, 70, 142, 32, 0,
- 0, 0, 0, 0, 36, 0,
- 0, 0, 95, 0, 0, 3,
- 114, 16, 16, 0, 0, 0,
- 0, 0, 95, 0, 0, 3,
- 114, 16, 16, 0, 1, 0,
- 0, 0, 95, 0, 0, 3,
- 50, 16, 16, 0, 2, 0,
- 0, 0, 95, 0, 0, 3,
- 242, 16, 16, 0, 3, 0,
- 0, 0, 103, 0, 0, 4,
- 242, 32, 16, 0, 0, 0,
- 0, 0, 1, 0, 0, 0,
- 101, 0, 0, 3, 242, 32,
- 16, 0, 1, 0, 0, 0,
- 101, 0, 0, 3, 242, 32,
- 16, 0, 2, 0, 0, 0,
- 101, 0, 0, 3, 242, 32,
- 16, 0, 3, 0, 0, 0,
- 101, 0, 0, 3, 242, 32,
- 16, 0, 4, 0, 0, 0,
- 101, 0, 0, 3, 242, 32,
- 16, 0, 5, 0, 0, 0,
- 101, 0, 0, 3, 242, 32,
- 16, 0, 6, 0, 0, 0,
- 101, 0, 0, 3, 242, 32,
- 16, 0, 7, 0, 0, 0,
- 101, 0, 0, 3, 242, 32,
- 16, 0, 8, 0, 0, 0,
- 104, 0, 0, 2, 4, 0,
- 0, 0, 56, 0, 0, 8,
- 114, 0, 16, 0, 0, 0,
- 0, 0, 86, 21, 16, 0,
- 1, 0, 0, 0, 70, 130,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 4, 0, 0, 0,
+ 7, 8, 0, 0, 236, 0,
+ 0, 0, 4, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 5, 0, 0, 0,
+ 15, 0, 0, 0, 236, 0,
+ 0, 0, 5, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 6, 0, 0, 0,
+ 3, 12, 0, 0, 236, 0,
+ 0, 0, 6, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 7, 0, 0, 0,
+ 15, 0, 0, 0, 236, 0,
+ 0, 0, 7, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 8, 0, 0, 0,
+ 15, 0, 0, 0, 83, 86,
+ 95, 80, 79, 83, 73, 84,
+ 73, 79, 78, 0, 84, 69,
+ 88, 67, 79, 79, 82, 68,
+ 0, 171, 171, 171, 83, 72,
+ 69, 88, 56, 5, 0, 0,
+ 80, 0, 1, 0, 78, 1,
+ 0, 0, 106, 8, 0, 1,
+ 89, 0, 0, 4, 70, 142,
32, 0, 0, 0, 0, 0,
- 9, 0, 0, 0, 50, 0,
+ 36, 0, 0, 0, 95, 0,
+ 0, 3, 114, 16, 16, 0,
+ 0, 0, 0, 0, 95, 0,
+ 0, 3, 114, 16, 16, 0,
+ 1, 0, 0, 0, 95, 0,
+ 0, 3, 50, 16, 16, 0,
+ 2, 0, 0, 0, 95, 0,
+ 0, 3, 242, 16, 16, 0,
+ 3, 0, 0, 0, 103, 0,
+ 0, 4, 242, 32, 16, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 101, 0, 0, 3,
+ 114, 32, 16, 0, 1, 0,
+ 0, 0, 101, 0, 0, 3,
+ 242, 32, 16, 0, 2, 0,
+ 0, 0, 101, 0, 0, 3,
+ 114, 32, 16, 0, 3, 0,
+ 0, 0, 101, 0, 0, 3,
+ 114, 32, 16, 0, 4, 0,
+ 0, 0, 101, 0, 0, 3,
+ 242, 32, 16, 0, 5, 0,
+ 0, 0, 101, 0, 0, 3,
+ 50, 32, 16, 0, 6, 0,
+ 0, 0, 101, 0, 0, 3,
+ 242, 32, 16, 0, 7, 0,
+ 0, 0, 101, 0, 0, 3,
+ 242, 32, 16, 0, 8, 0,
+ 0, 0, 104, 0, 0, 2,
+ 4, 0, 0, 0, 56, 0,
+ 0, 8, 114, 0, 16, 0,
+ 0, 0, 0, 0, 86, 21,
+ 16, 0, 1, 0, 0, 0,
+ 70, 130, 32, 0, 0, 0,
+ 0, 0, 9, 0, 0, 0,
+ 50, 0, 0, 10, 114, 0,
+ 16, 0, 0, 0, 0, 0,
+ 70, 130, 32, 0, 0, 0,
+ 0, 0, 8, 0, 0, 0,
+ 6, 16, 16, 0, 1, 0,
+ 0, 0, 70, 2, 16, 0,
+ 0, 0, 0, 0, 50, 0,
0, 10, 114, 0, 16, 0,
0, 0, 0, 0, 70, 130,
32, 0, 0, 0, 0, 0,
- 8, 0, 0, 0, 6, 16,
+ 10, 0, 0, 0, 166, 26,
16, 0, 1, 0, 0, 0,
70, 2, 16, 0, 0, 0,
- 0, 0, 50, 0, 0, 10,
- 114, 0, 16, 0, 0, 0,
- 0, 0, 70, 130, 32, 0,
- 0, 0, 0, 0, 10, 0,
- 0, 0, 166, 26, 16, 0,
- 1, 0, 0, 0, 70, 2,
- 16, 0, 0, 0, 0, 0,
- 16, 0, 0, 7, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 70, 2, 16, 0, 0, 0,
+ 0, 0, 16, 0, 0, 7,
+ 130, 0, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
- 0, 0, 0, 0, 68, 0,
- 0, 5, 130, 0, 16, 0,
- 0, 0, 0, 0, 58, 0,
+ 0, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0,
- 56, 0, 0, 7, 114, 0,
+ 68, 0, 0, 5, 130, 0,
16, 0, 0, 0, 0, 0,
- 246, 15, 16, 0, 0, 0,
- 0, 0, 70, 2, 16, 0,
- 0, 0, 0, 0, 56, 0,
- 0, 8, 114, 0, 16, 0,
- 1, 0, 0, 0, 86, 21,
+ 58, 0, 16, 0, 0, 0,
+ 0, 0, 56, 0, 0, 7,
+ 114, 0, 16, 0, 0, 0,
+ 0, 0, 246, 15, 16, 0,
+ 0, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0,
- 70, 130, 32, 0, 0, 0,
- 0, 0, 9, 0, 0, 0,
+ 56, 0, 0, 8, 114, 0,
+ 16, 0, 1, 0, 0, 0,
+ 86, 21, 16, 0, 0, 0,
+ 0, 0, 70, 130, 32, 0,
+ 0, 0, 0, 0, 9, 0,
+ 0, 0, 50, 0, 0, 10,
+ 114, 0, 16, 0, 1, 0,
+ 0, 0, 70, 130, 32, 0,
+ 0, 0, 0, 0, 8, 0,
+ 0, 0, 6, 16, 16, 0,
+ 0, 0, 0, 0, 70, 2,
+ 16, 0, 1, 0, 0, 0,
50, 0, 0, 10, 114, 0,
16, 0, 1, 0, 0, 0,
70, 130, 32, 0, 0, 0,
- 0, 0, 8, 0, 0, 0,
- 6, 16, 16, 0, 0, 0,
+ 0, 0, 10, 0, 0, 0,
+ 166, 26, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
- 1, 0, 0, 0, 50, 0,
- 0, 10, 114, 0, 16, 0,
- 1, 0, 0, 0, 70, 130,
- 32, 0, 0, 0, 0, 0,
- 10, 0, 0, 0, 166, 26,
- 16, 0, 0, 0, 0, 0,
- 70, 2, 16, 0, 1, 0,
- 0, 0, 0, 0, 0, 8,
- 114, 0, 16, 0, 1, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 8, 114, 0, 16, 0,
+ 1, 0, 0, 0, 70, 2,
+ 16, 0, 1, 0, 0, 0,
+ 70, 130, 32, 0, 0, 0,
+ 0, 0, 11, 0, 0, 0,
+ 50, 0, 0, 10, 114, 0,
+ 16, 0, 2, 0, 0, 0,
+ 86, 133, 32, 0, 0, 0,
+ 0, 0, 34, 0, 0, 0,
+ 70, 2, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
- 1, 0, 0, 0, 70, 130,
- 32, 0, 0, 0, 0, 0,
- 11, 0, 0, 0, 50, 0,
- 0, 10, 114, 0, 16, 0,
- 2, 0, 0, 0, 86, 133,
- 32, 0, 0, 0, 0, 0,
- 34, 0, 0, 0, 70, 2,
- 16, 0, 0, 0, 0, 0,
- 70, 2, 16, 0, 1, 0,
- 0, 0, 56, 0, 0, 8,
- 242, 0, 16, 0, 3, 0,
- 0, 0, 86, 5, 16, 0,
- 2, 0, 0, 0, 70, 142,
- 32, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 50, 0,
+ 1, 0, 0, 0, 56, 0,
+ 0, 8, 242, 0, 16, 0,
+ 3, 0, 0, 0, 86, 5,
+ 16, 0, 2, 0, 0, 0,
+ 70, 142, 32, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 50, 0, 0, 10, 242, 0,
+ 16, 0, 3, 0, 0, 0,
+ 70, 142, 32, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 6, 0, 16, 0, 2, 0,
+ 0, 0, 70, 14, 16, 0,
+ 3, 0, 0, 0, 50, 0,
0, 10, 242, 0, 16, 0,
- 3, 0, 0, 0, 70, 142,
+ 2, 0, 0, 0, 70, 142,
32, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 6, 0,
+ 2, 0, 0, 0, 166, 10,
16, 0, 2, 0, 0, 0,
70, 14, 16, 0, 3, 0,
- 0, 0, 50, 0, 0, 10,
- 242, 0, 16, 0, 2, 0,
- 0, 0, 70, 142, 32, 0,
- 0, 0, 0, 0, 2, 0,
- 0, 0, 166, 10, 16, 0,
- 2, 0, 0, 0, 70, 14,
- 16, 0, 3, 0, 0, 0,
- 0, 0, 0, 8, 242, 32,
+ 0, 0, 0, 0, 0, 8,
+ 242, 32, 16, 0, 0, 0,
+ 0, 0, 70, 14, 16, 0,
+ 2, 0, 0, 0, 70, 142,
+ 32, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 54, 0,
+ 0, 5, 114, 32, 16, 0,
+ 1, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0,
- 70, 14, 16, 0, 2, 0,
- 0, 0, 70, 142, 32, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 54, 0, 0, 5,
- 114, 32, 16, 0, 1, 0,
- 0, 0, 70, 2, 16, 0,
- 0, 0, 0, 0, 50, 0,
- 0, 10, 114, 0, 16, 0,
- 0, 0, 0, 0, 70, 2,
+ 50, 0, 0, 10, 114, 0,
16, 0, 0, 0, 0, 0,
- 6, 128, 32, 0, 0, 0,
- 0, 0, 34, 0, 0, 0,
- 70, 2, 16, 0, 1, 0,
- 0, 0, 54, 0, 0, 5,
- 114, 32, 16, 0, 4, 0,
+ 70, 2, 16, 0, 0, 0,
+ 0, 0, 6, 128, 32, 0,
+ 0, 0, 0, 0, 34, 0,
0, 0, 70, 2, 16, 0,
1, 0, 0, 0, 54, 0,
- 0, 5, 130, 32, 16, 0,
- 1, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 0, 0,
+ 0, 5, 114, 32, 16, 0,
+ 4, 0, 0, 0, 70, 2,
+ 16, 0, 1, 0, 0, 0,
56, 0, 0, 8, 242, 0,
16, 0, 1, 0, 0, 0,
86, 5, 16, 0, 0, 0,
@@ -530,97 +529,88 @@ const BYTE g_meshVS[] =
16, 0, 0, 0, 0, 0,
70, 142, 32, 0, 0, 0,
0, 0, 15, 0, 0, 0,
- 56, 0, 0, 9, 242, 0,
+ 56, 0, 0, 9, 114, 0,
16, 0, 0, 0, 0, 0,
- 70, 142, 32, 0, 0, 0,
+ 70, 130, 32, 0, 0, 0,
0, 0, 5, 0, 0, 0,
86, 133, 32, 0, 0, 0,
0, 0, 33, 0, 0, 0,
- 50, 0, 0, 11, 242, 0,
+ 50, 0, 0, 11, 114, 0,
16, 0, 0, 0, 0, 0,
- 70, 142, 32, 0, 0, 0,
+ 70, 130, 32, 0, 0, 0,
0, 0, 4, 0, 0, 0,
6, 128, 32, 0, 0, 0,
0, 0, 33, 0, 0, 0,
- 70, 14, 16, 0, 0, 0,
+ 70, 2, 16, 0, 0, 0,
0, 0, 50, 0, 0, 11,
- 242, 32, 16, 0, 3, 0,
- 0, 0, 70, 142, 32, 0,
+ 114, 32, 16, 0, 3, 0,
+ 0, 0, 70, 130, 32, 0,
0, 0, 0, 0, 6, 0,
0, 0, 166, 138, 32, 0,
0, 0, 0, 0, 33, 0,
- 0, 0, 70, 14, 16, 0,
- 0, 0, 0, 0, 54, 0,
- 0, 5, 130, 32, 16, 0,
- 4, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 0, 0,
- 55, 0, 0, 11, 242, 32,
- 16, 0, 5, 0, 0, 0,
- 166, 138, 32, 0, 0, 0,
- 0, 0, 35, 0, 0, 0,
- 70, 30, 16, 0, 3, 0,
- 0, 0, 70, 142, 32, 0,
- 0, 0, 0, 0, 18, 0,
- 0, 0, 50, 0, 0, 15,
- 50, 32, 16, 0, 6, 0,
- 0, 0, 70, 16, 16, 0,
- 2, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 128, 63,
- 0, 0, 128, 191, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 2, 64, 0, 0, 0, 0,
- 0, 0, 0, 0, 128, 63,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 54, 0, 0, 8,
- 194, 32, 16, 0, 6, 0,
+ 0, 0, 70, 2, 16, 0,
+ 0, 0, 0, 0, 55, 0,
+ 0, 11, 242, 32, 16, 0,
+ 5, 0, 0, 0, 166, 138,
+ 32, 0, 0, 0, 0, 0,
+ 35, 0, 0, 0, 70, 30,
+ 16, 0, 3, 0, 0, 0,
+ 70, 142, 32, 0, 0, 0,
+ 0, 0, 18, 0, 0, 0,
+ 50, 0, 0, 15, 50, 32,
+ 16, 0, 6, 0, 0, 0,
+ 70, 16, 16, 0, 2, 0,
0, 0, 2, 64, 0, 0,
+ 0, 0, 128, 63, 0, 0,
+ 128, 191, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
+ 0, 0, 128, 63, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 54, 0,
- 0, 6, 242, 32, 16, 0,
- 7, 0, 0, 0, 70, 142,
- 32, 0, 0, 0, 0, 0,
- 19, 0, 0, 0, 56, 0,
- 0, 8, 242, 0, 16, 0,
- 0, 0, 0, 0, 86, 21,
- 16, 0, 0, 0, 0, 0,
+ 54, 0, 0, 6, 242, 32,
+ 16, 0, 7, 0, 0, 0,
70, 142, 32, 0, 0, 0,
- 0, 0, 5, 0, 0, 0,
+ 0, 0, 19, 0, 0, 0,
+ 56, 0, 0, 8, 242, 0,
+ 16, 0, 0, 0, 0, 0,
+ 86, 21, 16, 0, 0, 0,
+ 0, 0, 70, 142, 32, 0,
+ 0, 0, 0, 0, 5, 0,
+ 0, 0, 50, 0, 0, 10,
+ 242, 0, 16, 0, 0, 0,
+ 0, 0, 70, 142, 32, 0,
+ 0, 0, 0, 0, 4, 0,
+ 0, 0, 6, 16, 16, 0,
+ 0, 0, 0, 0, 70, 14,
+ 16, 0, 0, 0, 0, 0,
50, 0, 0, 10, 242, 0,
16, 0, 0, 0, 0, 0,
70, 142, 32, 0, 0, 0,
- 0, 0, 4, 0, 0, 0,
- 6, 16, 16, 0, 0, 0,
+ 0, 0, 6, 0, 0, 0,
+ 166, 26, 16, 0, 0, 0,
0, 0, 70, 14, 16, 0,
- 0, 0, 0, 0, 50, 0,
- 0, 10, 242, 0, 16, 0,
- 0, 0, 0, 0, 70, 142,
- 32, 0, 0, 0, 0, 0,
- 6, 0, 0, 0, 166, 26,
+ 0, 0, 0, 0, 0, 0,
+ 0, 8, 242, 32, 16, 0,
+ 8, 0, 0, 0, 70, 14,
16, 0, 0, 0, 0, 0,
- 70, 14, 16, 0, 0, 0,
- 0, 0, 0, 0, 0, 8,
- 242, 32, 16, 0, 8, 0,
- 0, 0, 70, 14, 16, 0,
- 0, 0, 0, 0, 70, 142,
- 32, 0, 0, 0, 0, 0,
- 7, 0, 0, 0, 62, 0,
- 0, 1, 83, 84, 65, 84,
- 148, 0, 0, 0, 36, 0,
- 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 13, 0,
- 0, 0, 28, 0, 0, 0,
+ 70, 142, 32, 0, 0, 0,
+ 0, 0, 7, 0, 0, 0,
+ 62, 0, 0, 1, 83, 84,
+ 65, 84, 148, 0, 0, 0,
+ 33, 0, 0, 0, 4, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0,
+ 13, 0, 0, 0, 28, 0,
0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 6, 0, 0, 0,
- 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
@@ -631,5 +621,5 @@ const BYTE g_meshVS[] =
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0, 0
+ 0, 0, 0, 0
};
diff --git a/demo/d3d/shaders/passThroughVS.hlsl b/demo/d3d/shaders/passThroughVS.hlsl
new file mode 100644
index 0000000..f8005d7
--- /dev/null
+++ b/demo/d3d/shaders/passThroughVS.hlsl
@@ -0,0 +1,14 @@
+#include "shaderCommon.h"
+
+cbuffer constBuf : register(b0)
+{
+ FluidShaderConst gParams;
+};
+
+PassthroughVertexOut passThroughVS(MeshVertexIn input)
+{
+ PassthroughVertexOut output;
+ output.position = float4(input.position, 1.0f);
+ output.texCoord = input.texCoord;
+ return output;
+}
diff --git a/demo/d3d11/shaders/passThroughVS.hlsl.h b/demo/d3d/shaders/passThroughVS.hlsl.h
index 4b1b2cf..3ff9109 100644
--- a/demo/d3d11/shaders/passThroughVS.hlsl.h
+++ b/demo/d3d/shaders/passThroughVS.hlsl.h
@@ -8,8 +8,10 @@
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
-// POSITION 0 xy 0 NONE float xy
-// TEXCOORD 0 xy 1 NONE float xy
+// POSITION 0 xyz 0 NONE float xyz
+// NORMAL 0 xyz 1 NONE float
+// TEXCOORD 0 xy 2 NONE float xy
+// COLOR 0 xyzw 3 NONE float
//
//
// Output signature:
@@ -21,28 +23,28 @@
//
vs_5_0
dcl_globalFlags refactoringAllowed
-dcl_input v0.xy
-dcl_input v1.xy
+dcl_input v0.xyz
+dcl_input v2.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
-mov o0.xy, v0.xyxx
-mov o0.zw, l(0,0,0,1.000000)
-mov o1.xy, v1.xyxx
+mov o0.xyz, v0.xyzx
+mov o0.w, l(1.000000)
+mov o1.xy, v2.xyxx
ret
// Approximately 4 instruction slots used
#endif
const BYTE g_passThroughVS[] =
{
- 68, 88, 66, 67, 187, 133,
- 114, 171, 205, 36, 113, 9,
- 245, 108, 33, 122, 172, 89,
- 138, 214, 1, 0, 0, 0,
- 136, 2, 0, 0, 5, 0,
+ 68, 88, 66, 67, 185, 168,
+ 119, 184, 113, 66, 215, 46,
+ 63, 211, 78, 140, 226, 35,
+ 139, 164, 1, 0, 0, 0,
+ 184, 2, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
- 172, 0, 0, 0, 0, 1,
- 0, 0, 88, 1, 0, 0,
- 236, 1, 0, 0, 82, 68,
+ 172, 0, 0, 0, 60, 1,
+ 0, 0, 148, 1, 0, 0,
+ 28, 2, 0, 0, 82, 68,
69, 70, 112, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
@@ -63,20 +65,30 @@ const BYTE g_passThroughVS[] =
46, 51, 46, 57, 54, 48,
48, 46, 49, 54, 51, 56,
52, 0, 171, 171, 73, 83,
- 71, 78, 76, 0, 0, 0,
- 2, 0, 0, 0, 8, 0,
- 0, 0, 56, 0, 0, 0,
+ 71, 78, 136, 0, 0, 0,
+ 4, 0, 0, 0, 8, 0,
+ 0, 0, 104, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 7, 7,
+ 0, 0, 113, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 3, 3,
- 0, 0, 65, 0, 0, 0,
+ 1, 0, 0, 0, 7, 0,
+ 0, 0, 120, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
- 1, 0, 0, 0, 3, 3,
+ 2, 0, 0, 0, 3, 3,
+ 0, 0, 129, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 3, 0, 0, 0, 15, 0,
0, 0, 80, 79, 83, 73,
- 84, 73, 79, 78, 0, 84,
- 69, 88, 67, 79, 79, 82,
- 68, 0, 171, 171, 79, 83,
+ 84, 73, 79, 78, 0, 78,
+ 79, 82, 77, 65, 76, 0,
+ 84, 69, 88, 67, 79, 79,
+ 82, 68, 0, 67, 79, 76,
+ 79, 82, 0, 171, 79, 83,
71, 78, 80, 0, 0, 0,
2, 0, 0, 0, 8, 0,
0, 0, 56, 0, 0, 0,
@@ -92,29 +104,27 @@ const BYTE g_passThroughVS[] =
78, 0, 84, 69, 88, 67,
79, 79, 82, 68, 0, 171,
171, 171, 83, 72, 69, 88,
- 140, 0, 0, 0, 80, 0,
- 1, 0, 35, 0, 0, 0,
+ 128, 0, 0, 0, 80, 0,
+ 1, 0, 32, 0, 0, 0,
106, 8, 0, 1, 95, 0,
- 0, 3, 50, 16, 16, 0,
+ 0, 3, 114, 16, 16, 0,
0, 0, 0, 0, 95, 0,
0, 3, 50, 16, 16, 0,
- 1, 0, 0, 0, 103, 0,
+ 2, 0, 0, 0, 103, 0,
0, 4, 242, 32, 16, 0,
0, 0, 0, 0, 1, 0,
0, 0, 101, 0, 0, 3,
50, 32, 16, 0, 1, 0,
0, 0, 54, 0, 0, 5,
- 50, 32, 16, 0, 0, 0,
- 0, 0, 70, 16, 16, 0,
+ 114, 32, 16, 0, 0, 0,
+ 0, 0, 70, 18, 16, 0,
0, 0, 0, 0, 54, 0,
- 0, 8, 194, 32, 16, 0,
- 0, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
+ 0, 5, 130, 32, 16, 0,
+ 0, 0, 0, 0, 1, 64,
0, 0, 0, 0, 128, 63,
54, 0, 0, 5, 50, 32,
16, 0, 1, 0, 0, 0,
- 70, 16, 16, 0, 1, 0,
+ 70, 16, 16, 0, 2, 0,
0, 0, 62, 0, 0, 1,
83, 84, 65, 84, 148, 0,
0, 0, 4, 0, 0, 0,
diff --git a/demo/d3d/shaders/pointGS.hlsl b/demo/d3d/shaders/pointGS.hlsl
new file mode 100644
index 0000000..4d654af
--- /dev/null
+++ b/demo/d3d/shaders/pointGS.hlsl
@@ -0,0 +1,68 @@
+#include "shaderCommon.h"
+
+cbuffer constBuf : register(b0)
+{
+ PointShaderConst gParams;
+};
+
+static const float2 corners[4] =
+{
+ float2(0.0, 1.0), float2(0.0, 0.0), float2(1.0, 1.0), float2(1.0, 0.0)
+};
+
+[maxvertexcount(4)]
+void pointGS(point PointVertexOut input[1], inout TriangleStream<PointGeoOut> triStream)
+{
+ const float4x4 modelViewMatrix = gParams.modelView;
+ const float pointRadius = gParams.pointRadius;
+ const float pointScale = gParams.pointScale;
+ const float4x4 lightTransform = gParams.lightTransform;
+ const float3 lightDir = gParams.lightDir.xyz;
+ const int mode = gParams.mode;
+
+ const float4 viewPosition = input[0].viewPosition;
+ const float density = input[0].density;
+ const unsigned int phase = input[0].phase;
+ const float4 modelPosition = input[0].modelPosition;
+
+ //float spriteSize = (pointRadius / viewPos.z);
+ const float spriteSize = pointRadius * 2;
+
+ PointGeoOut output;
+ for (int i = 0; i < 4; ++i)
+ {
+ const float2 corner = corners[i];
+ float4 eyePos = viewPosition; // start with point position
+ eyePos.xy += spriteSize * (corner - float2(0.5, 0.5)); // add corner position
+ output.position = mul(gParams.projection, eyePos); // complete transformation
+
+ // use corner as texCoord, flip the y component of uv (glsl to hlsl conversion)
+ output.texCoord = float2(corner.x, 1.0f - corner.y);
+ output.lightOffsetPosition = mul(lightTransform, float4(modelPosition.xyz - lightDir * pointRadius * 2.0, 1.0));
+ output.viewLightDir = mul(modelViewMatrix, float4(lightDir, 0.0)).xyz;
+
+ if (mode == 1)
+ {
+ // density visualization
+ if (density < 0.0f)
+ output.reflectance = float4(lerp(float3(0.1, 0.1, 1.0), float3(0.1, 1.0, 1.0), -density), 0);
+ else
+ output.reflectance = float4(lerp(float3(1.0, 1.0, 1.0), float3(0.1, 0.2, 1.0), density), 0);
+ }
+ else if (mode == 2)
+ {
+ //gl_PointSize *= clamp(inPosition.w * 0.25, 0.0f, 1.0);
+ float tmp = clamp(modelPosition.w * 0.05, 0.0f, 1.0);
+ output.reflectance = float4(tmp, tmp, tmp, tmp);
+ }
+ else
+ {
+ output.reflectance = float4(lerp(gParams.colors[phase % 8].xyz * 2.0, float3(1.0, 1.0, 1.0), 0.1), 0);
+ }
+
+ output.modelPosition= modelPosition.xyz;
+ output.viewPosition = viewPosition.xyz;
+
+ triStream.Append(output);
+ }
+}
diff --git a/demo/d3d11/shaders/pointGS.hlsl.h b/demo/d3d/shaders/pointGS.hlsl.h
index afc1b76..46806ac 100644
--- a/demo/d3d11/shaders/pointGS.hlsl.h
+++ b/demo/d3d/shaders/pointGS.hlsl.h
@@ -11,7 +11,7 @@
// struct PointShaderConst
// {
//
-// float4x4 modelview; // Offset: 0
+// float4x4 modelView; // Offset: 0
// float4x4 projection; // Offset: 64
// float4x4 lightTransform; // Offset: 128
// float4 colors[8]; // Offset: 192
@@ -55,12 +55,12 @@
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float xyzw
-// TEXCOORD 0 xyzw 1 NONE float xyzw
+// TEXCOORD 0 xy 1 NONE float xy
// TEXCOORD 1 xyzw 2 NONE float xyzw
-// TEXCOORD 2 xyzw 3 NONE float xyzw
+// TEXCOORD 2 xyz 3 NONE float xyz
// TEXCOORD 3 xyzw 4 NONE float xyzw
-// TEXCOORD 4 xyzw 5 NONE float xyzw
-// TEXCOORD 5 xyzw 6 NONE float xyzw
+// TEXCOORD 4 xyz 5 NONE float xyz
+// TEXCOORD 5 xyz 6 NONE float xyz
//
gs_5_0
dcl_globalFlags refactoringAllowed
@@ -74,19 +74,17 @@ dcl_input v[1][1].x
dcl_input v[1][2].x
dcl_input v[1][3].xyzw
dcl_temps 8
-dcl_indexableTemp x0[6], 4
dcl_inputprimitive point
dcl_stream m0
dcl_outputtopology trianglestrip
dcl_output_siv o0.xyzw, position
-dcl_output o1.xyzw
+dcl_output o1.xy
dcl_output o2.xyzw
-dcl_output o3.xyzw
+dcl_output o3.xyz
dcl_output o4.xyzw
-dcl_output o5.xyzw
-dcl_output o6.xyzw
+dcl_output o5.xyz
+dcl_output o6.xyz
dcl_maxout 4
-mov x0[3].w, l(0)
add r0.x, cb0[34].x, cb0[34].x
mul r0.yzw, cb0[33].xxyz, cb0[34].xxxx
mad r0.yzw, -r0.yyzw, l(0.000000, 2.000000, 2.000000, 2.000000), v[0][3].xxyz
@@ -94,72 +92,69 @@ mul r1.xyzw, r0.zzzz, cb0[9].xyzw
mad r1.xyzw, cb0[8].xyzw, r0.yyyy, r1.xyzw
mad r1.xyzw, cb0[10].xyzw, r0.wwww, r1.xyzw
add r1.xyzw, r1.xyzw, cb0[11].xyzw
-mul r2.xyzw, cb0[1].xyzw, cb0[33].yyyy
-mad r2.xyzw, cb0[0].xyzw, cb0[33].xxxx, r2.xyzw
-mad r2.xyzw, cb0[2].xyzw, cb0[33].zzzz, r2.xyzw
-lt r0.y, v[0][1].x, l(0.000000)
-mad r3.xyz, v[0][1].xxxx, l(0.000000, -0.900000, 0.000000, 0.000000), l(0.100000, 0.100000, 1.000000, 0.000000)
-mad r4.xyz, v[0][1].xxxx, l(-0.900000, -0.800000, 0.000000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
-ieq r0.zw, l(0, 0, 1, 2), cb0[35].xxxx
-mul r3.w, l(0.050000), v[0][3].w
-mov_sat r5.xyz, r3.wwww
-and r3.w, l(7), v[0][2].x
-add r6.xyz, cb0[r3.w + 12].xyzx, cb0[r3.w + 12].xyzx
-mad r7.xyz, -cb0[r3.w + 12].xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
-mad r6.xyz, r7.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r6.xyzx
-movc r3.xyz, r0.yyyy, r3.xyzx, r4.xyzx
-mov r0.y, l(0)
+mul r0.yzw, cb0[1].xxyz, cb0[33].yyyy
+mad r0.yzw, cb0[0].xxyz, cb0[33].xxxx, r0.yyzw
+mad r0.yzw, cb0[2].xxyz, cb0[33].zzzz, r0.yyzw
+lt r2.x, v[0][1].x, l(0.000000)
+mad r2.yzw, v[0][1].xxxx, l(0.000000, -0.900000, -0.800000, 0.000000), l(0.000000, 1.000000, 1.000000, 1.000000)
+mov r3.xz, l(0.100000,0,1.000000,0)
+mad r3.y, v[0][1].x, l(-0.900000), l(0.100000)
+movc r2.xyz, r2.xxxx, r3.xyzx, r2.yzwy
+mov r2.w, l(0)
+ieq r3.xy, l(1, 2, 0, 0), cb0[35].xxxx
+mul r3.z, l(0.050000), v[0][3].w
+mov_sat r4.xyzw, r3.zzzz
+and r3.z, l(7), v[0][2].x
+add r5.xyz, cb0[r3.z + 12].xyzx, cb0[r3.z + 12].xyzx
+mad r6.xyz, -cb0[r3.z + 12].xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
+mad r5.xyz, r6.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r5.xyzx
+mov r5.w, l(0)
+mov r3.z, l(0)
loop
- ige r3.w, r0.y, l(4)
+ ige r3.w, r3.z, l(4)
breakc_nz r3.w
- add r4.xy, l(-0.500000, -0.500000, 0.000000, 0.000000), icb[r0.y + 0].xyxx
- mad r4.xy, r0.xxxx, r4.xyxx, v[0][0].xyxx
- mul r7.xyzw, r4.yyyy, cb0[5].xyzw
- mad r4.xyzw, cb0[4].xyzw, r4.xxxx, r7.xyzw
- mad r4.xyzw, cb0[6].xyzw, v[0][0].zzzz, r4.xyzw
- mad r4.xyzw, cb0[7].xyzw, v[0][0].wwww, r4.xyzw
- add r3.w, l(1.000000), -icb[r0.y + 0].y
- if_nz r0.z
- mov r7.xyz, r3.xyzx
+ add r6.xy, l(-0.500000, -0.500000, 0.000000, 0.000000), icb[r3.z + 0].xyxx
+ mad r6.xy, r0.xxxx, r6.xyxx, v[0][0].xyxx
+ mul r7.xyzw, r6.yyyy, cb0[5].xyzw
+ mad r6.xyzw, cb0[4].xyzw, r6.xxxx, r7.xyzw
+ mad r6.xyzw, cb0[6].xyzw, v[0][0].zzzz, r6.xyzw
+ mad r6.xyzw, cb0[7].xyzw, v[0][0].wwww, r6.xyzw
+ add r3.w, l(1.000000), -icb[r3.z + 0].y
+ if_nz r3.x
+ mov r7.xyzw, r2.xyzw
else
- if_nz r0.w
- mov x0[3].w, r5.z
- mov r7.xyz, r5.xyzx
+ if_nz r3.y
+ mov r7.xyzw, r4.xyzw
else
- mov r7.xyz, r6.xyzx
+ mov r7.xyzw, r5.xyzw
endif
endif
- mov r5.w, x0[3].w
- mov o0.xyzw, r4.xyzw
- mov o1.x, icb[r0.y + 0].x
+ mov o0.xyzw, r6.xyzw
+ mov o1.x, icb[r3.z + 0].x
mov o1.y, r3.w
- mov o1.zw, l(0,0,0,0)
mov o2.xyzw, r1.xyzw
- mov o3.xyzw, r2.xyzw
- mov o4.xyz, r7.xyzx
- mov o4.w, r5.w
+ mov o3.xyz, r0.yzwy
+ mov o4.xyzw, r7.xyzw
mov o5.xyz, v[0][3].xyzx
- mov o5.w, l(0)
mov o6.xyz, v[0][0].xyzx
- mov o6.w, l(0)
emit_stream m0
- iadd r0.y, r0.y, l(1)
+ iadd r3.z, r3.z, l(1)
endloop
ret
-// Approximately 60 instruction slots used
+// Approximately 56 instruction slots used
#endif
const BYTE g_pointGS[] =
{
- 68, 88, 66, 67, 83, 238,
- 66, 156, 86, 118, 105, 62,
- 85, 224, 176, 224, 229, 4,
- 226, 151, 1, 0, 0, 0,
- 188, 13, 0, 0, 5, 0,
+ 68, 88, 66, 67, 225, 171,
+ 155, 174, 109, 180, 8, 136,
+ 18, 164, 43, 168, 152, 216,
+ 179, 151, 1, 0, 0, 0,
+ 56, 13, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
176, 3, 0, 0, 64, 4,
0, 0, 44, 5, 0, 0,
- 32, 13, 0, 0, 82, 68,
+ 156, 12, 0, 0, 82, 68,
69, 70, 116, 3, 0, 0,
1, 0, 0, 0, 104, 0,
0, 0, 1, 0, 0, 0,
@@ -194,7 +189,7 @@ const BYTE g_pointGS[] =
116, 83, 104, 97, 100, 101,
114, 67, 111, 110, 115, 116,
0, 109, 111, 100, 101, 108,
- 118, 105, 101, 119, 0, 102,
+ 86, 105, 101, 119, 0, 102,
108, 111, 97, 116, 52, 120,
52, 0, 3, 0, 3, 0,
4, 0, 4, 0, 0, 0,
@@ -343,7 +338,7 @@ const BYTE g_pointGS[] =
0, 0, 216, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
- 1, 0, 0, 0, 15, 0,
+ 1, 0, 0, 0, 3, 12,
0, 0, 0, 0, 0, 0,
216, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
@@ -353,7 +348,7 @@ const BYTE g_pointGS[] =
0, 0, 2, 0, 0, 0,
0, 0, 0, 0, 3, 0,
0, 0, 3, 0, 0, 0,
- 15, 0, 0, 0, 0, 0,
+ 7, 8, 0, 0, 0, 0,
0, 0, 216, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
@@ -362,18 +357,18 @@ const BYTE g_pointGS[] =
216, 0, 0, 0, 4, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 5, 0,
- 0, 0, 15, 0, 0, 0,
+ 0, 0, 7, 8, 0, 0,
0, 0, 0, 0, 216, 0,
0, 0, 5, 0, 0, 0,
0, 0, 0, 0, 3, 0,
0, 0, 6, 0, 0, 0,
- 15, 0, 0, 0, 83, 86,
+ 7, 8, 0, 0, 83, 86,
95, 80, 79, 83, 73, 84,
73, 79, 78, 0, 84, 69,
88, 67, 79, 79, 82, 68,
0, 171, 171, 171, 83, 72,
- 69, 88, 236, 7, 0, 0,
- 80, 0, 2, 0, 251, 1,
+ 69, 88, 104, 7, 0, 0,
+ 80, 0, 2, 0, 218, 1,
0, 0, 106, 8, 0, 1,
53, 24, 0, 0, 18, 0,
0, 0, 0, 0, 0, 0,
@@ -401,161 +396,165 @@ const BYTE g_pointGS[] =
0, 4, 242, 16, 32, 0,
1, 0, 0, 0, 3, 0,
0, 0, 104, 0, 0, 2,
- 8, 0, 0, 0, 105, 0,
- 0, 4, 0, 0, 0, 0,
- 6, 0, 0, 0, 4, 0,
- 0, 0, 93, 8, 0, 1,
- 143, 0, 0, 3, 0, 0,
- 17, 0, 0, 0, 0, 0,
- 92, 40, 0, 1, 103, 0,
- 0, 4, 242, 32, 16, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 1, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 2, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 3, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 4, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 5, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 6, 0,
- 0, 0, 94, 0, 0, 2,
- 4, 0, 0, 0, 54, 0,
- 0, 6, 130, 48, 32, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 1, 64, 0, 0,
+ 8, 0, 0, 0, 93, 8,
+ 0, 1, 143, 0, 0, 3,
+ 0, 0, 17, 0, 0, 0,
+ 0, 0, 92, 40, 0, 1,
+ 103, 0, 0, 4, 242, 32,
+ 16, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 101, 0,
+ 0, 3, 50, 32, 16, 0,
+ 1, 0, 0, 0, 101, 0,
+ 0, 3, 242, 32, 16, 0,
+ 2, 0, 0, 0, 101, 0,
+ 0, 3, 114, 32, 16, 0,
+ 3, 0, 0, 0, 101, 0,
+ 0, 3, 242, 32, 16, 0,
+ 4, 0, 0, 0, 101, 0,
+ 0, 3, 114, 32, 16, 0,
+ 5, 0, 0, 0, 101, 0,
+ 0, 3, 114, 32, 16, 0,
+ 6, 0, 0, 0, 94, 0,
+ 0, 2, 4, 0, 0, 0,
+ 0, 0, 0, 9, 18, 0,
+ 16, 0, 0, 0, 0, 0,
+ 10, 128, 32, 0, 0, 0,
+ 0, 0, 34, 0, 0, 0,
+ 10, 128, 32, 0, 0, 0,
+ 0, 0, 34, 0, 0, 0,
+ 56, 0, 0, 9, 226, 0,
+ 16, 0, 0, 0, 0, 0,
+ 6, 137, 32, 0, 0, 0,
+ 0, 0, 33, 0, 0, 0,
+ 6, 128, 32, 0, 0, 0,
+ 0, 0, 34, 0, 0, 0,
+ 50, 0, 0, 14, 226, 0,
+ 16, 0, 0, 0, 0, 0,
+ 86, 14, 16, 128, 65, 0,
0, 0, 0, 0, 0, 0,
- 0, 9, 18, 0, 16, 0,
- 0, 0, 0, 0, 10, 128,
- 32, 0, 0, 0, 0, 0,
- 34, 0, 0, 0, 10, 128,
- 32, 0, 0, 0, 0, 0,
- 34, 0, 0, 0, 56, 0,
- 0, 9, 226, 0, 16, 0,
- 0, 0, 0, 0, 6, 137,
+ 2, 64, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 64,
+ 0, 0, 0, 64, 0, 0,
+ 0, 64, 6, 25, 32, 0,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 56, 0, 0, 8,
+ 242, 0, 16, 0, 1, 0,
+ 0, 0, 166, 10, 16, 0,
+ 0, 0, 0, 0, 70, 142,
32, 0, 0, 0, 0, 0,
- 33, 0, 0, 0, 6, 128,
+ 9, 0, 0, 0, 50, 0,
+ 0, 10, 242, 0, 16, 0,
+ 1, 0, 0, 0, 70, 142,
32, 0, 0, 0, 0, 0,
- 34, 0, 0, 0, 50, 0,
- 0, 14, 226, 0, 16, 0,
- 0, 0, 0, 0, 86, 14,
- 16, 128, 65, 0, 0, 0,
- 0, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 64, 0, 0,
- 0, 64, 0, 0, 0, 64,
- 6, 25, 32, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 56, 0, 0, 8, 242, 0,
- 16, 0, 1, 0, 0, 0,
- 166, 10, 16, 0, 0, 0,
- 0, 0, 70, 142, 32, 0,
- 0, 0, 0, 0, 9, 0,
+ 8, 0, 0, 0, 86, 5,
+ 16, 0, 0, 0, 0, 0,
+ 70, 14, 16, 0, 1, 0,
0, 0, 50, 0, 0, 10,
242, 0, 16, 0, 1, 0,
0, 0, 70, 142, 32, 0,
- 0, 0, 0, 0, 8, 0,
- 0, 0, 86, 5, 16, 0,
+ 0, 0, 0, 0, 10, 0,
+ 0, 0, 246, 15, 16, 0,
0, 0, 0, 0, 70, 14,
16, 0, 1, 0, 0, 0,
- 50, 0, 0, 10, 242, 0,
- 16, 0, 1, 0, 0, 0,
- 70, 142, 32, 0, 0, 0,
- 0, 0, 10, 0, 0, 0,
- 246, 15, 16, 0, 0, 0,
- 0, 0, 70, 14, 16, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 8, 242, 0, 16, 0,
- 1, 0, 0, 0, 70, 14,
+ 0, 0, 0, 8, 242, 0,
16, 0, 1, 0, 0, 0,
- 70, 142, 32, 0, 0, 0,
- 0, 0, 11, 0, 0, 0,
- 56, 0, 0, 9, 242, 0,
- 16, 0, 2, 0, 0, 0,
- 70, 142, 32, 0, 0, 0,
- 0, 0, 1, 0, 0, 0,
- 86, 133, 32, 0, 0, 0,
- 0, 0, 33, 0, 0, 0,
- 50, 0, 0, 11, 242, 0,
- 16, 0, 2, 0, 0, 0,
- 70, 142, 32, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 6, 128, 32, 0, 0, 0,
- 0, 0, 33, 0, 0, 0,
- 70, 14, 16, 0, 2, 0,
- 0, 0, 50, 0, 0, 11,
- 242, 0, 16, 0, 2, 0,
+ 70, 14, 16, 0, 1, 0,
0, 0, 70, 142, 32, 0,
- 0, 0, 0, 0, 2, 0,
- 0, 0, 166, 138, 32, 0,
+ 0, 0, 0, 0, 11, 0,
+ 0, 0, 56, 0, 0, 9,
+ 226, 0, 16, 0, 0, 0,
+ 0, 0, 6, 137, 32, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 86, 133, 32, 0,
0, 0, 0, 0, 33, 0,
- 0, 0, 70, 14, 16, 0,
- 2, 0, 0, 0, 49, 0,
- 0, 8, 34, 0, 16, 0,
- 0, 0, 0, 0, 10, 16,
- 32, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 0, 0,
- 50, 0, 0, 16, 114, 0,
- 16, 0, 3, 0, 0, 0,
- 6, 16, 32, 0, 0, 0,
- 0, 0, 1, 0, 0, 0,
- 2, 64, 0, 0, 0, 0,
- 0, 0, 102, 102, 102, 191,
+ 0, 0, 50, 0, 0, 11,
+ 226, 0, 16, 0, 0, 0,
+ 0, 0, 6, 137, 32, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 2, 64, 0, 0,
- 205, 204, 204, 61, 205, 204,
- 204, 61, 0, 0, 128, 63,
+ 0, 0, 6, 128, 32, 0,
+ 0, 0, 0, 0, 33, 0,
+ 0, 0, 86, 14, 16, 0,
0, 0, 0, 0, 50, 0,
- 0, 16, 114, 0, 16, 0,
- 4, 0, 0, 0, 6, 16,
+ 0, 11, 226, 0, 16, 0,
+ 0, 0, 0, 0, 6, 137,
+ 32, 0, 0, 0, 0, 0,
+ 2, 0, 0, 0, 166, 138,
32, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 2, 64,
- 0, 0, 102, 102, 102, 191,
- 205, 204, 76, 191, 0, 0,
+ 33, 0, 0, 0, 86, 14,
+ 16, 0, 0, 0, 0, 0,
+ 49, 0, 0, 8, 18, 0,
+ 16, 0, 2, 0, 0, 0,
+ 10, 16, 32, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 0, 0, 50, 0, 0, 16,
+ 226, 0, 16, 0, 2, 0,
+ 0, 0, 6, 16, 32, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 2, 64, 0, 0,
+ 0, 0, 0, 0, 102, 102,
+ 102, 191, 205, 204, 76, 191,
+ 0, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
- 2, 64, 0, 0, 0, 0,
+ 0, 0, 128, 63, 0, 0,
128, 63, 0, 0, 128, 63,
+ 54, 0, 0, 8, 82, 0,
+ 16, 0, 3, 0, 0, 0,
+ 2, 64, 0, 0, 205, 204,
+ 204, 61, 0, 0, 0, 0,
0, 0, 128, 63, 0, 0,
+ 0, 0, 50, 0, 0, 10,
+ 34, 0, 16, 0, 3, 0,
+ 0, 0, 10, 16, 32, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 1, 64, 0, 0,
+ 102, 102, 102, 191, 1, 64,
+ 0, 0, 205, 204, 204, 61,
+ 55, 0, 0, 9, 114, 0,
+ 16, 0, 2, 0, 0, 0,
+ 6, 0, 16, 0, 2, 0,
+ 0, 0, 70, 2, 16, 0,
+ 3, 0, 0, 0, 150, 7,
+ 16, 0, 2, 0, 0, 0,
+ 54, 0, 0, 5, 130, 0,
+ 16, 0, 2, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
0, 0, 32, 0, 0, 11,
- 194, 0, 16, 0, 0, 0,
+ 50, 0, 16, 0, 3, 0,
0, 0, 2, 64, 0, 0,
+ 1, 0, 0, 0, 2, 0,
0, 0, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0,
- 2, 0, 0, 0, 6, 128,
+ 0, 0, 0, 0, 6, 128,
32, 0, 0, 0, 0, 0,
35, 0, 0, 0, 56, 0,
- 0, 8, 130, 0, 16, 0,
+ 0, 8, 66, 0, 16, 0,
3, 0, 0, 0, 1, 64,
0, 0, 205, 204, 76, 61,
58, 16, 32, 0, 0, 0,
0, 0, 3, 0, 0, 0,
- 54, 32, 0, 5, 114, 0,
- 16, 0, 5, 0, 0, 0,
- 246, 15, 16, 0, 3, 0,
+ 54, 32, 0, 5, 242, 0,
+ 16, 0, 4, 0, 0, 0,
+ 166, 10, 16, 0, 3, 0,
0, 0, 1, 0, 0, 8,
- 130, 0, 16, 0, 3, 0,
+ 66, 0, 16, 0, 3, 0,
0, 0, 1, 64, 0, 0,
7, 0, 0, 0, 10, 16,
32, 0, 0, 0, 0, 0,
2, 0, 0, 0, 0, 0,
0, 13, 114, 0, 16, 0,
- 6, 0, 0, 0, 70, 130,
+ 5, 0, 0, 0, 70, 130,
32, 6, 0, 0, 0, 0,
- 12, 0, 0, 0, 58, 0,
+ 12, 0, 0, 0, 42, 0,
16, 0, 3, 0, 0, 0,
70, 130, 32, 6, 0, 0,
0, 0, 12, 0, 0, 0,
- 58, 0, 16, 0, 3, 0,
+ 42, 0, 16, 0, 3, 0,
0, 0, 50, 0, 0, 19,
- 114, 0, 16, 0, 7, 0,
+ 114, 0, 16, 0, 6, 0,
0, 0, 70, 130, 32, 134,
65, 0, 0, 0, 0, 0,
0, 0, 12, 0, 0, 0,
- 58, 0, 16, 0, 3, 0,
+ 42, 0, 16, 0, 3, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 64, 0, 0,
0, 64, 0, 0, 0, 64,
@@ -564,168 +563,142 @@ const BYTE g_pointGS[] =
0, 0, 128, 63, 0, 0,
128, 63, 0, 0, 0, 0,
50, 0, 0, 12, 114, 0,
- 16, 0, 6, 0, 0, 0,
- 70, 2, 16, 0, 7, 0,
+ 16, 0, 5, 0, 0, 0,
+ 70, 2, 16, 0, 6, 0,
0, 0, 2, 64, 0, 0,
205, 204, 204, 61, 205, 204,
204, 61, 205, 204, 204, 61,
0, 0, 0, 0, 70, 2,
- 16, 0, 6, 0, 0, 0,
- 55, 0, 0, 9, 114, 0,
- 16, 0, 3, 0, 0, 0,
- 86, 5, 16, 0, 0, 0,
- 0, 0, 70, 2, 16, 0,
- 3, 0, 0, 0, 70, 2,
- 16, 0, 4, 0, 0, 0,
- 54, 0, 0, 5, 34, 0,
- 16, 0, 0, 0, 0, 0,
+ 16, 0, 5, 0, 0, 0,
+ 54, 0, 0, 5, 130, 0,
+ 16, 0, 5, 0, 0, 0,
1, 64, 0, 0, 0, 0,
- 0, 0, 48, 0, 0, 1,
- 33, 0, 0, 7, 130, 0,
- 16, 0, 3, 0, 0, 0,
- 26, 0, 16, 0, 0, 0,
+ 0, 0, 54, 0, 0, 5,
+ 66, 0, 16, 0, 3, 0,
0, 0, 1, 64, 0, 0,
- 4, 0, 0, 0, 3, 0,
- 4, 3, 58, 0, 16, 0,
- 3, 0, 0, 0, 0, 0,
- 0, 11, 50, 0, 16, 0,
- 4, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 191,
- 0, 0, 0, 191, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 70, 144, 144, 0, 26, 0,
- 16, 0, 0, 0, 0, 0,
- 50, 0, 0, 10, 50, 0,
- 16, 0, 4, 0, 0, 0,
- 6, 0, 16, 0, 0, 0,
- 0, 0, 70, 0, 16, 0,
- 4, 0, 0, 0, 70, 16,
- 32, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 56, 0,
- 0, 8, 242, 0, 16, 0,
- 7, 0, 0, 0, 86, 5,
- 16, 0, 4, 0, 0, 0,
- 70, 142, 32, 0, 0, 0,
- 0, 0, 5, 0, 0, 0,
- 50, 0, 0, 10, 242, 0,
- 16, 0, 4, 0, 0, 0,
- 70, 142, 32, 0, 0, 0,
+ 0, 0, 0, 0, 48, 0,
+ 0, 1, 33, 0, 0, 7,
+ 130, 0, 16, 0, 3, 0,
+ 0, 0, 42, 0, 16, 0,
+ 3, 0, 0, 0, 1, 64,
0, 0, 4, 0, 0, 0,
- 6, 0, 16, 0, 4, 0,
- 0, 0, 70, 14, 16, 0,
- 7, 0, 0, 0, 50, 0,
- 0, 11, 242, 0, 16, 0,
- 4, 0, 0, 0, 70, 142,
- 32, 0, 0, 0, 0, 0,
- 6, 0, 0, 0, 166, 26,
- 32, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 70, 14,
- 16, 0, 4, 0, 0, 0,
+ 3, 0, 4, 3, 58, 0,
+ 16, 0, 3, 0, 0, 0,
+ 0, 0, 0, 11, 50, 0,
+ 16, 0, 6, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 191, 0, 0, 0, 191,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 70, 144, 144, 0,
+ 42, 0, 16, 0, 3, 0,
+ 0, 0, 50, 0, 0, 10,
+ 50, 0, 16, 0, 6, 0,
+ 0, 0, 6, 0, 16, 0,
+ 0, 0, 0, 0, 70, 0,
+ 16, 0, 6, 0, 0, 0,
+ 70, 16, 32, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 56, 0, 0, 8, 242, 0,
+ 16, 0, 7, 0, 0, 0,
+ 86, 5, 16, 0, 6, 0,
+ 0, 0, 70, 142, 32, 0,
+ 0, 0, 0, 0, 5, 0,
+ 0, 0, 50, 0, 0, 10,
+ 242, 0, 16, 0, 6, 0,
+ 0, 0, 70, 142, 32, 0,
+ 0, 0, 0, 0, 4, 0,
+ 0, 0, 6, 0, 16, 0,
+ 6, 0, 0, 0, 70, 14,
+ 16, 0, 7, 0, 0, 0,
50, 0, 0, 11, 242, 0,
- 16, 0, 4, 0, 0, 0,
+ 16, 0, 6, 0, 0, 0,
70, 142, 32, 0, 0, 0,
- 0, 0, 7, 0, 0, 0,
- 246, 31, 32, 0, 0, 0,
+ 0, 0, 6, 0, 0, 0,
+ 166, 26, 32, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 70, 14, 16, 0, 4, 0,
- 0, 0, 0, 0, 0, 9,
- 130, 0, 16, 0, 3, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 128, 63, 26, 144,
- 144, 128, 65, 0, 0, 0,
- 26, 0, 16, 0, 0, 0,
- 0, 0, 31, 0, 4, 3,
- 42, 0, 16, 0, 0, 0,
- 0, 0, 54, 0, 0, 5,
- 114, 0, 16, 0, 7, 0,
- 0, 0, 70, 2, 16, 0,
- 3, 0, 0, 0, 18, 0,
- 0, 1, 31, 0, 4, 3,
- 58, 0, 16, 0, 0, 0,
- 0, 0, 54, 0, 0, 6,
- 130, 48, 32, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 42, 0, 16, 0, 5, 0,
- 0, 0, 54, 0, 0, 5,
- 114, 0, 16, 0, 7, 0,
- 0, 0, 70, 2, 16, 0,
- 5, 0, 0, 0, 18, 0,
- 0, 1, 54, 0, 0, 5,
- 114, 0, 16, 0, 7, 0,
- 0, 0, 70, 2, 16, 0,
- 6, 0, 0, 0, 21, 0,
- 0, 1, 21, 0, 0, 1,
- 54, 0, 0, 6, 130, 0,
+ 70, 14, 16, 0, 6, 0,
+ 0, 0, 50, 0, 0, 11,
+ 242, 0, 16, 0, 6, 0,
+ 0, 0, 70, 142, 32, 0,
+ 0, 0, 0, 0, 7, 0,
+ 0, 0, 246, 31, 32, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 70, 14, 16, 0,
+ 6, 0, 0, 0, 0, 0,
+ 0, 9, 130, 0, 16, 0,
+ 3, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 26, 144, 144, 128, 65, 0,
+ 0, 0, 42, 0, 16, 0,
+ 3, 0, 0, 0, 31, 0,
+ 4, 3, 10, 0, 16, 0,
+ 3, 0, 0, 0, 54, 0,
+ 0, 5, 242, 0, 16, 0,
+ 7, 0, 0, 0, 70, 14,
+ 16, 0, 2, 0, 0, 0,
+ 18, 0, 0, 1, 31, 0,
+ 4, 3, 26, 0, 16, 0,
+ 3, 0, 0, 0, 54, 0,
+ 0, 5, 242, 0, 16, 0,
+ 7, 0, 0, 0, 70, 14,
+ 16, 0, 4, 0, 0, 0,
+ 18, 0, 0, 1, 54, 0,
+ 0, 5, 242, 0, 16, 0,
+ 7, 0, 0, 0, 70, 14,
16, 0, 5, 0, 0, 0,
- 58, 48, 32, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 54, 0, 0, 5, 242, 32,
- 16, 0, 0, 0, 0, 0,
- 70, 14, 16, 0, 4, 0,
- 0, 0, 54, 0, 0, 6,
- 18, 32, 16, 0, 1, 0,
- 0, 0, 10, 144, 144, 0,
- 26, 0, 16, 0, 0, 0,
- 0, 0, 54, 0, 0, 5,
- 34, 32, 16, 0, 1, 0,
- 0, 0, 58, 0, 16, 0,
+ 21, 0, 0, 1, 21, 0,
+ 0, 1, 54, 0, 0, 5,
+ 242, 32, 16, 0, 0, 0,
+ 0, 0, 70, 14, 16, 0,
+ 6, 0, 0, 0, 54, 0,
+ 0, 6, 18, 32, 16, 0,
+ 1, 0, 0, 0, 10, 144,
+ 144, 0, 42, 0, 16, 0,
3, 0, 0, 0, 54, 0,
- 0, 8, 194, 32, 16, 0,
- 1, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
+ 0, 5, 34, 32, 16, 0,
+ 1, 0, 0, 0, 58, 0,
+ 16, 0, 3, 0, 0, 0,
54, 0, 0, 5, 242, 32,
16, 0, 2, 0, 0, 0,
70, 14, 16, 0, 1, 0,
0, 0, 54, 0, 0, 5,
- 242, 32, 16, 0, 3, 0,
- 0, 0, 70, 14, 16, 0,
- 2, 0, 0, 0, 54, 0,
- 0, 5, 114, 32, 16, 0,
- 4, 0, 0, 0, 70, 2,
- 16, 0, 7, 0, 0, 0,
- 54, 0, 0, 5, 130, 32,
- 16, 0, 4, 0, 0, 0,
- 58, 0, 16, 0, 5, 0,
- 0, 0, 54, 0, 0, 6,
- 114, 32, 16, 0, 5, 0,
- 0, 0, 70, 18, 32, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 54, 0, 0, 5,
- 130, 32, 16, 0, 5, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 0, 0, 54, 0,
- 0, 6, 114, 32, 16, 0,
- 6, 0, 0, 0, 70, 18,
- 32, 0, 0, 0, 0, 0,
+ 114, 32, 16, 0, 3, 0,
+ 0, 0, 150, 7, 16, 0,
0, 0, 0, 0, 54, 0,
- 0, 5, 130, 32, 16, 0,
- 6, 0, 0, 0, 1, 64,
+ 0, 5, 242, 32, 16, 0,
+ 4, 0, 0, 0, 70, 14,
+ 16, 0, 7, 0, 0, 0,
+ 54, 0, 0, 6, 114, 32,
+ 16, 0, 5, 0, 0, 0,
+ 70, 18, 32, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 54, 0, 0, 6, 114, 32,
+ 16, 0, 6, 0, 0, 0,
+ 70, 18, 32, 0, 0, 0,
0, 0, 0, 0, 0, 0,
117, 0, 0, 3, 0, 0,
17, 0, 0, 0, 0, 0,
- 30, 0, 0, 7, 34, 0,
- 16, 0, 0, 0, 0, 0,
- 26, 0, 16, 0, 0, 0,
+ 30, 0, 0, 7, 66, 0,
+ 16, 0, 3, 0, 0, 0,
+ 42, 0, 16, 0, 3, 0,
0, 0, 1, 64, 0, 0,
1, 0, 0, 0, 22, 0,
0, 1, 62, 0, 0, 1,
83, 84, 65, 84, 148, 0,
- 0, 0, 60, 0, 0, 0,
+ 0, 0, 56, 0, 0, 0,
8, 0, 0, 0, 4, 0,
0, 0, 11, 0, 0, 0,
24, 0, 0, 0, 3, 0,
0, 0, 1, 0, 0, 0,
3, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
- 6, 0, 0, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 5, 0, 0, 0, 1, 0,
+ 8, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 5, 0, 0, 0,
diff --git a/demo/d3d/shaders/pointPS.hlsl b/demo/d3d/shaders/pointPS.hlsl
new file mode 100644
index 0000000..62c8ab4
--- /dev/null
+++ b/demo/d3d/shaders/pointPS.hlsl
@@ -0,0 +1,81 @@
+#include "shaderCommon.h"
+
+cbuffer constBuf : register(b0)
+{
+ PointShaderConst gParams;
+};
+
+Texture2D<float> shadowTexture : register(t0); // shadow map
+
+SamplerComparisonState shadowSampler : register(s0); // texture sample used to sample depth from shadow texture in this sample
+
+float sqr(float x) { return x * x; }
+
+float shadowSample(float4 lightOffsetPosition)
+{
+ float3 pos = float3(lightOffsetPosition.xyz / lightOffsetPosition.w);
+ //float3 uvw = (pos.xyz * 0.5) + vec3(0.5);
+ float3 uvw = (pos.xyz * float3(0.5, 0.5, 1.0)) + float3(0.5, 0.5, 0.0);
+
+ // user clip
+ if (uvw.x < 0.0 || uvw.x > 1.0)
+ return 1.0;
+ if (uvw.y < 0.0 || uvw.y > 1.0)
+ return 1.0;
+
+ float s = 0.0;
+ float radius = 0.002;
+
+ // flip uv y-coordinate
+ uvw.y = 1.0f - uvw.y;
+
+ [unroll]
+ for (int i = 0; i < 8; i++)
+ {
+ float2 shadowTaps = gParams.shadowTaps[i].xy;
+ shadowTaps.y = 1.0f - shadowTaps.y;
+
+ //s += shadow2D(shadowTex, vec3(uvw.xy + shadowTaps[i] * radius, uvw.z)).r;
+ s += shadowTexture.SampleCmp(shadowSampler, uvw.xy + shadowTaps * radius, uvw.z);
+ }
+ s /= 8.0;
+
+ return s;
+}
+
+float4 pointPS(PointGeoOut input) : SV_TARGET
+{
+ const float spotMin = gParams.spotMin;
+ const float spotMax = gParams.spotMax;
+
+ // calculate normal from texture coordinates
+ float3 normal;
+ normal.xy = input.texCoord * float2(2.0, -2.0) + float2(-1.0, 1.0);
+ float mag = dot(normal.xy, normal.xy);
+ if (mag > 1.0)
+ {
+ discard; // kill pixels outside circle
+ }
+
+ normal.z = sqrt(1.0 - mag);
+
+ if (gParams.mode == 2)
+ {
+ float alpha = normal.z * input.reflectance.w;
+ return float4(input.reflectance.xyz * alpha, alpha);
+ }
+
+ // calculate lighting
+ float shadow = shadowSample(input.lightOffsetPosition);
+
+ float3 lPos = float3(input.lightOffsetPosition.xyz / input.lightOffsetPosition.w);
+ float attenuation = max(smoothstep(spotMax, spotMin, dot(lPos.xy, lPos.xy)), 0.05);
+
+ float3 diffuse = float3(0.9, 0.9, 0.9);
+ float3 reflectance = input.reflectance.xyz;
+
+ float3 lo = diffuse * reflectance * max(0.0, sqr(-dot(input.viewLightDir, normal) * 0.5 + 0.5)) * max(0.2, shadow) * attenuation;
+
+ const float tmp = 1.0 / 2.2;
+ return float4(pow(abs(lo), float3(tmp, tmp, tmp)), 1.0);
+}
diff --git a/demo/d3d11/shaders/pointPS.hlsl.h b/demo/d3d/shaders/pointPS.hlsl.h
index 843b166..1320e1d 100644
--- a/demo/d3d11/shaders/pointPS.hlsl.h
+++ b/demo/d3d/shaders/pointPS.hlsl.h
@@ -11,7 +11,7 @@
// struct PointShaderConst
// {
//
-// float4x4 modelview; // Offset: 0
+// float4x4 modelView; // Offset: 0
// float4x4 projection; // Offset: 64
// float4x4 lightTransform; // Offset: 128
// float4 colors[8]; // Offset: 192
@@ -47,12 +47,12 @@
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
-// TEXCOORD 0 xyzw 1 NONE float xy
+// TEXCOORD 0 xy 1 NONE float xy
// TEXCOORD 1 xyzw 2 NONE float xyzw
-// TEXCOORD 2 xyzw 3 NONE float xyz
+// TEXCOORD 2 xyz 3 NONE float xyz
// TEXCOORD 3 xyzw 4 NONE float xyzw
-// TEXCOORD 4 xyzw 5 NONE float
-// TEXCOORD 5 xyzw 6 NONE float
+// TEXCOORD 4 xyz 5 NONE float
+// TEXCOORD 5 xyz 6 NONE float
//
//
// Output signature:
@@ -71,7 +71,7 @@ dcl_input_ps linear v2.xyzw
dcl_input_ps linear v3.xyz
dcl_input_ps linear v4.xyzw
dcl_output o0.xyzw
-dcl_temps 4
+dcl_temps 6
mad r0.xy, v1.xyxx, l(2.000000, -2.000000, 0.000000, 0.000000), l(-1.000000, 1.000000, 0.000000, 0.000000)
dp2 r0.x, r0.xyxx, r0.xyxx
lt r0.y, l(1.000000), r0.x
@@ -90,59 +90,59 @@ mad r2.xyz, r1.xyzx, l(0.500000, 0.500000, 1.000000, 0.000000), l(0.500000, 0.50
lt r0.w, r2.x, l(0.000000)
lt r1.z, l(1.000000), r2.x
or r0.w, r0.w, r1.z
+add r1.z, -cb0[20].y, l(1.000000)
+mul r3.x, cb0[20].x, l(0.002000)
+mul r3.y, r1.z, l(0.002000)
+add r2.w, -r2.y, l(1.000000)
+add r1.zw, r2.xxxw, r3.xxxy
+sample_c_indexable(texture2d)(float,float,float,float) r1.z, r1.zwzz, t0.xxxx, s0, r2.z
+add r1.w, -cb0[21].y, l(1.000000)
+mul r3.x, cb0[21].x, l(0.002000)
+mul r3.y, r1.w, l(0.002000)
+add r3.xy, r2.xwxx, r3.xyxx
+sample_c_indexable(texture2d)(float,float,float,float) r1.w, r3.xyxx, t0.xxxx, s0, r2.z
+add r3.x, -cb0[22].y, l(1.000000)
+mul r4.x, cb0[22].x, l(0.002000)
+mul r4.y, r3.x, l(0.002000)
+add r3.xy, r2.xwxx, r4.xyxx
+sample_c_indexable(texture2d)(float,float,float,float) r3.x, r3.xyxx, t0.xxxx, s0, r2.z
+add r3.y, -cb0[23].y, l(1.000000)
+mul r4.x, cb0[23].x, l(0.002000)
+mul r4.y, r3.y, l(0.002000)
+add r3.yz, r2.xxwx, r4.xxyx
+sample_c_indexable(texture2d)(float,float,float,float) r3.y, r3.yzyy, t0.xxxx, s0, r2.z
+add r3.z, -cb0[24].y, l(1.000000)
+mul r4.x, cb0[24].x, l(0.002000)
+mul r4.y, r3.z, l(0.002000)
+add r3.zw, r2.xxxw, r4.xxxy
+sample_c_indexable(texture2d)(float,float,float,float) r3.z, r3.zwzz, t0.xxxx, s0, r2.z
+add r3.w, -cb0[25].y, l(1.000000)
+mul r4.x, cb0[25].x, l(0.002000)
+mul r4.y, r3.w, l(0.002000)
+add r4.xy, r2.xwxx, r4.xyxx
+sample_c_indexable(texture2d)(float,float,float,float) r3.w, r4.xyxx, t0.xxxx, s0, r2.z
+add r4.x, -cb0[26].y, l(1.000000)
+mul r5.x, cb0[26].x, l(0.002000)
+mul r5.y, r4.x, l(0.002000)
+add r4.xy, r2.xwxx, r5.xyxx
+sample_c_indexable(texture2d)(float,float,float,float) r4.x, r4.xyxx, t0.xxxx, s0, r2.z
+add r4.y, -cb0[27].y, l(1.000000)
+mul r5.x, cb0[27].x, l(0.002000)
+mul r5.y, r4.y, l(0.002000)
+add r2.xw, r2.xxxw, r5.xxxy
+sample_c_indexable(texture2d)(float,float,float,float) r2.x, r2.xwxx, t0.xxxx, s0, r2.z
if_z r0.w
lt r0.w, r2.y, l(0.000000)
- lt r1.z, l(1.000000), r2.y
- or r0.w, r0.w, r1.z
+ lt r2.y, l(1.000000), r2.y
+ or r0.w, r0.w, r2.y
if_z r0.w
- add r0.w, -cb0[20].y, l(1.000000)
- mul r3.x, cb0[20].x, l(0.002000)
- mul r3.y, r0.w, l(0.002000)
- add r2.w, -r2.y, l(1.000000)
- add r1.zw, r2.xxxw, r3.xxxy
- sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r1.zwzz, t0.xxxx, s0, r2.z
- add r1.z, -cb0[21].y, l(1.000000)
- mul r3.x, cb0[21].x, l(0.002000)
- mul r3.y, r1.z, l(0.002000)
- add r1.zw, r2.xxxw, r3.xxxy
- sample_c_lz_indexable(texture2d)(float,float,float,float) r1.z, r1.zwzz, t0.xxxx, s0, r2.z
- add r0.w, r0.w, r1.z
- add r1.z, -cb0[22].y, l(1.000000)
- mul r3.x, cb0[22].x, l(0.002000)
- mul r3.y, r1.z, l(0.002000)
- add r1.zw, r2.xxxw, r3.xxxy
- sample_c_lz_indexable(texture2d)(float,float,float,float) r1.z, r1.zwzz, t0.xxxx, s0, r2.z
- add r0.w, r0.w, r1.z
- add r1.z, -cb0[23].y, l(1.000000)
- mul r3.x, cb0[23].x, l(0.002000)
- mul r3.y, r1.z, l(0.002000)
- add r1.zw, r2.xxxw, r3.xxxy
- sample_c_lz_indexable(texture2d)(float,float,float,float) r1.z, r1.zwzz, t0.xxxx, s0, r2.z
- add r0.w, r0.w, r1.z
- add r1.z, -cb0[24].y, l(1.000000)
- mul r3.x, cb0[24].x, l(0.002000)
- mul r3.y, r1.z, l(0.002000)
- add r1.zw, r2.xxxw, r3.xxxy
- sample_c_lz_indexable(texture2d)(float,float,float,float) r1.z, r1.zwzz, t0.xxxx, s0, r2.z
- add r0.w, r0.w, r1.z
- add r1.z, -cb0[25].y, l(1.000000)
- mul r3.x, cb0[25].x, l(0.002000)
- mul r3.y, r1.z, l(0.002000)
- add r1.zw, r2.xxxw, r3.xxxy
- sample_c_lz_indexable(texture2d)(float,float,float,float) r1.z, r1.zwzz, t0.xxxx, s0, r2.z
- add r0.w, r0.w, r1.z
- add r1.z, -cb0[26].y, l(1.000000)
- mul r3.x, cb0[26].x, l(0.002000)
- mul r3.y, r1.z, l(0.002000)
- add r1.zw, r2.xxxw, r3.xxxy
- sample_c_lz_indexable(texture2d)(float,float,float,float) r1.z, r1.zwzz, t0.xxxx, s0, r2.z
- add r0.w, r0.w, r1.z
- add r1.z, -cb0[27].y, l(1.000000)
- mul r3.x, cb0[27].x, l(0.002000)
- mul r3.y, r1.z, l(0.002000)
- add r1.zw, r2.xxxw, r3.xxxy
- sample_c_lz_indexable(texture2d)(float,float,float,float) r1.z, r1.zwzz, t0.xxxx, s0, r2.z
- add r0.w, r0.w, r1.z
+ add r0.w, r1.w, r1.z
+ add r0.w, r3.x, r0.w
+ add r0.w, r3.y, r0.w
+ add r0.w, r3.z, r0.w
+ add r0.w, r3.w, r0.w
+ add r0.w, r4.x, r0.w
+ add r0.w, r2.x, r0.w
mul r0.w, r0.w, l(0.125000)
else
mov r0.w, l(1.000000)
@@ -178,10 +178,10 @@ ret
const BYTE g_pointPS[] =
{
- 68, 88, 66, 67, 43, 46,
- 192, 8, 211, 105, 212, 151,
- 103, 8, 148, 62, 30, 192,
- 144, 175, 1, 0, 0, 0,
+ 68, 88, 66, 67, 132, 161,
+ 61, 72, 143, 190, 218, 225,
+ 129, 194, 219, 86, 52, 88,
+ 26, 5, 1, 0, 0, 0,
244, 17, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
12, 4, 0, 0, 220, 4,
@@ -236,7 +236,7 @@ const BYTE g_pointPS[] =
105, 110, 116, 83, 104, 97,
100, 101, 114, 67, 111, 110,
115, 116, 0, 109, 111, 100,
- 101, 108, 118, 105, 101, 119,
+ 101, 108, 86, 105, 101, 119,
0, 102, 108, 111, 97, 116,
52, 120, 52, 0, 3, 0,
3, 0, 4, 0, 4, 0,
@@ -360,7 +360,7 @@ const BYTE g_pointPS[] =
0, 0, 188, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
- 1, 0, 0, 0, 15, 3,
+ 1, 0, 0, 0, 3, 3,
0, 0, 188, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
@@ -368,7 +368,7 @@ const BYTE g_pointPS[] =
0, 0, 188, 0, 0, 0,
2, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
- 3, 0, 0, 0, 15, 7,
+ 3, 0, 0, 0, 7, 7,
0, 0, 188, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
@@ -376,11 +376,11 @@ const BYTE g_pointPS[] =
0, 0, 188, 0, 0, 0,
4, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
- 5, 0, 0, 0, 15, 0,
+ 5, 0, 0, 0, 7, 0,
0, 0, 188, 0, 0, 0,
5, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
- 6, 0, 0, 0, 15, 0,
+ 6, 0, 0, 0, 7, 0,
0, 0, 83, 86, 95, 80,
79, 83, 73, 84, 73, 79,
78, 0, 84, 69, 88, 67,
@@ -415,7 +415,7 @@ const BYTE g_pointPS[] =
4, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
0, 0, 0, 0, 104, 0,
- 0, 2, 4, 0, 0, 0,
+ 0, 2, 6, 0, 0, 0,
50, 0, 0, 15, 50, 0,
16, 0, 0, 0, 0, 0,
70, 16, 16, 0, 1, 0,
@@ -496,26 +496,8 @@ const BYTE g_pointPS[] =
0, 0, 58, 0, 16, 0,
0, 0, 0, 0, 42, 0,
16, 0, 1, 0, 0, 0,
- 31, 0, 0, 3, 58, 0,
- 16, 0, 0, 0, 0, 0,
- 49, 0, 0, 7, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 26, 0, 16, 0, 2, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 0, 0, 49, 0,
- 0, 7, 66, 0, 16, 0,
- 1, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 128, 63,
- 26, 0, 16, 0, 2, 0,
- 0, 0, 60, 0, 0, 7,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 42, 0,
+ 0, 0, 0, 9, 66, 0,
16, 0, 1, 0, 0, 0,
- 31, 0, 0, 3, 58, 0,
- 16, 0, 0, 0, 0, 0,
- 0, 0, 0, 9, 130, 0,
- 16, 0, 0, 0, 0, 0,
26, 128, 32, 128, 65, 0,
0, 0, 0, 0, 0, 0,
20, 0, 0, 0, 1, 64,
@@ -527,8 +509,8 @@ const BYTE g_pointPS[] =
1, 64, 0, 0, 111, 18,
3, 59, 56, 0, 0, 7,
34, 0, 16, 0, 3, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 1, 64,
+ 0, 0, 42, 0, 16, 0,
+ 1, 0, 0, 0, 1, 64,
0, 0, 111, 18, 3, 59,
0, 0, 0, 8, 130, 0,
16, 0, 2, 0, 0, 0,
@@ -540,16 +522,16 @@ const BYTE g_pointPS[] =
0, 0, 6, 12, 16, 0,
2, 0, 0, 0, 6, 4,
16, 0, 3, 0, 0, 0,
- 71, 0, 0, 141, 194, 0,
+ 70, 0, 0, 141, 194, 0,
0, 128, 67, 85, 21, 0,
- 130, 0, 16, 0, 0, 0,
+ 66, 0, 16, 0, 1, 0,
0, 0, 230, 10, 16, 0,
1, 0, 0, 0, 6, 112,
16, 0, 0, 0, 0, 0,
0, 96, 16, 0, 0, 0,
0, 0, 42, 0, 16, 0,
2, 0, 0, 0, 0, 0,
- 0, 9, 66, 0, 16, 0,
+ 0, 9, 130, 0, 16, 0,
1, 0, 0, 0, 26, 128,
32, 128, 65, 0, 0, 0,
0, 0, 0, 0, 21, 0,
@@ -562,231 +544,249 @@ const BYTE g_pointPS[] =
0, 0, 111, 18, 3, 59,
56, 0, 0, 7, 34, 0,
16, 0, 3, 0, 0, 0,
- 42, 0, 16, 0, 1, 0,
+ 58, 0, 16, 0, 1, 0,
0, 0, 1, 64, 0, 0,
111, 18, 3, 59, 0, 0,
- 0, 7, 194, 0, 16, 0,
- 1, 0, 0, 0, 6, 12,
+ 0, 7, 50, 0, 16, 0,
+ 3, 0, 0, 0, 198, 0,
16, 0, 2, 0, 0, 0,
- 6, 4, 16, 0, 3, 0,
- 0, 0, 71, 0, 0, 141,
+ 70, 0, 16, 0, 3, 0,
+ 0, 0, 70, 0, 0, 141,
194, 0, 0, 128, 67, 85,
- 21, 0, 66, 0, 16, 0,
- 1, 0, 0, 0, 230, 10,
- 16, 0, 1, 0, 0, 0,
+ 21, 0, 130, 0, 16, 0,
+ 1, 0, 0, 0, 70, 0,
+ 16, 0, 3, 0, 0, 0,
6, 112, 16, 0, 0, 0,
0, 0, 0, 96, 16, 0,
0, 0, 0, 0, 42, 0,
16, 0, 2, 0, 0, 0,
- 0, 0, 0, 7, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 58, 0, 16, 0, 0, 0,
- 0, 0, 42, 0, 16, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 9, 66, 0, 16, 0,
- 1, 0, 0, 0, 26, 128,
- 32, 128, 65, 0, 0, 0,
- 0, 0, 0, 0, 22, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 128, 63, 56, 0,
- 0, 8, 18, 0, 16, 0,
- 3, 0, 0, 0, 10, 128,
- 32, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 18, 0,
+ 16, 0, 3, 0, 0, 0,
+ 26, 128, 32, 128, 65, 0,
+ 0, 0, 0, 0, 0, 0,
22, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 56, 0, 0, 8, 18, 0,
+ 16, 0, 4, 0, 0, 0,
+ 10, 128, 32, 0, 0, 0,
+ 0, 0, 22, 0, 0, 0,
+ 1, 64, 0, 0, 111, 18,
+ 3, 59, 56, 0, 0, 7,
+ 34, 0, 16, 0, 4, 0,
+ 0, 0, 10, 0, 16, 0,
+ 3, 0, 0, 0, 1, 64,
0, 0, 111, 18, 3, 59,
- 56, 0, 0, 7, 34, 0,
+ 0, 0, 0, 7, 50, 0,
16, 0, 3, 0, 0, 0,
- 42, 0, 16, 0, 1, 0,
- 0, 0, 1, 64, 0, 0,
- 111, 18, 3, 59, 0, 0,
- 0, 7, 194, 0, 16, 0,
- 1, 0, 0, 0, 6, 12,
- 16, 0, 2, 0, 0, 0,
- 6, 4, 16, 0, 3, 0,
- 0, 0, 71, 0, 0, 141,
- 194, 0, 0, 128, 67, 85,
- 21, 0, 66, 0, 16, 0,
- 1, 0, 0, 0, 230, 10,
- 16, 0, 1, 0, 0, 0,
- 6, 112, 16, 0, 0, 0,
- 0, 0, 0, 96, 16, 0,
- 0, 0, 0, 0, 42, 0,
- 16, 0, 2, 0, 0, 0,
- 0, 0, 0, 7, 130, 0,
+ 198, 0, 16, 0, 2, 0,
+ 0, 0, 70, 0, 16, 0,
+ 4, 0, 0, 0, 70, 0,
+ 0, 141, 194, 0, 0, 128,
+ 67, 85, 21, 0, 18, 0,
+ 16, 0, 3, 0, 0, 0,
+ 70, 0, 16, 0, 3, 0,
+ 0, 0, 6, 112, 16, 0,
+ 0, 0, 0, 0, 0, 96,
16, 0, 0, 0, 0, 0,
- 58, 0, 16, 0, 0, 0,
- 0, 0, 42, 0, 16, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 9, 66, 0, 16, 0,
- 1, 0, 0, 0, 26, 128,
- 32, 128, 65, 0, 0, 0,
+ 42, 0, 16, 0, 2, 0,
+ 0, 0, 0, 0, 0, 9,
+ 34, 0, 16, 0, 3, 0,
+ 0, 0, 26, 128, 32, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 23, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 56, 0, 0, 8,
+ 18, 0, 16, 0, 4, 0,
+ 0, 0, 10, 128, 32, 0,
0, 0, 0, 0, 23, 0,
0, 0, 1, 64, 0, 0,
- 0, 0, 128, 63, 56, 0,
- 0, 8, 18, 0, 16, 0,
- 3, 0, 0, 0, 10, 128,
- 32, 0, 0, 0, 0, 0,
- 23, 0, 0, 0, 1, 64,
- 0, 0, 111, 18, 3, 59,
- 56, 0, 0, 7, 34, 0,
+ 111, 18, 3, 59, 56, 0,
+ 0, 7, 34, 0, 16, 0,
+ 4, 0, 0, 0, 26, 0,
16, 0, 3, 0, 0, 0,
- 42, 0, 16, 0, 1, 0,
- 0, 0, 1, 64, 0, 0,
- 111, 18, 3, 59, 0, 0,
- 0, 7, 194, 0, 16, 0,
- 1, 0, 0, 0, 6, 12,
- 16, 0, 2, 0, 0, 0,
- 6, 4, 16, 0, 3, 0,
- 0, 0, 71, 0, 0, 141,
- 194, 0, 0, 128, 67, 85,
- 21, 0, 66, 0, 16, 0,
- 1, 0, 0, 0, 230, 10,
- 16, 0, 1, 0, 0, 0,
- 6, 112, 16, 0, 0, 0,
- 0, 0, 0, 96, 16, 0,
- 0, 0, 0, 0, 42, 0,
- 16, 0, 2, 0, 0, 0,
- 0, 0, 0, 7, 130, 0,
+ 1, 64, 0, 0, 111, 18,
+ 3, 59, 0, 0, 0, 7,
+ 98, 0, 16, 0, 3, 0,
+ 0, 0, 6, 3, 16, 0,
+ 2, 0, 0, 0, 6, 1,
+ 16, 0, 4, 0, 0, 0,
+ 70, 0, 0, 141, 194, 0,
+ 0, 128, 67, 85, 21, 0,
+ 34, 0, 16, 0, 3, 0,
+ 0, 0, 150, 5, 16, 0,
+ 3, 0, 0, 0, 6, 112,
16, 0, 0, 0, 0, 0,
- 58, 0, 16, 0, 0, 0,
+ 0, 96, 16, 0, 0, 0,
0, 0, 42, 0, 16, 0,
- 1, 0, 0, 0, 0, 0,
+ 2, 0, 0, 0, 0, 0,
0, 9, 66, 0, 16, 0,
- 1, 0, 0, 0, 26, 128,
+ 3, 0, 0, 0, 26, 128,
32, 128, 65, 0, 0, 0,
0, 0, 0, 0, 24, 0,
0, 0, 1, 64, 0, 0,
0, 0, 128, 63, 56, 0,
0, 8, 18, 0, 16, 0,
- 3, 0, 0, 0, 10, 128,
+ 4, 0, 0, 0, 10, 128,
32, 0, 0, 0, 0, 0,
24, 0, 0, 0, 1, 64,
0, 0, 111, 18, 3, 59,
56, 0, 0, 7, 34, 0,
- 16, 0, 3, 0, 0, 0,
- 42, 0, 16, 0, 1, 0,
+ 16, 0, 4, 0, 0, 0,
+ 42, 0, 16, 0, 3, 0,
0, 0, 1, 64, 0, 0,
111, 18, 3, 59, 0, 0,
0, 7, 194, 0, 16, 0,
- 1, 0, 0, 0, 6, 12,
+ 3, 0, 0, 0, 6, 12,
16, 0, 2, 0, 0, 0,
- 6, 4, 16, 0, 3, 0,
- 0, 0, 71, 0, 0, 141,
+ 6, 4, 16, 0, 4, 0,
+ 0, 0, 70, 0, 0, 141,
194, 0, 0, 128, 67, 85,
21, 0, 66, 0, 16, 0,
- 1, 0, 0, 0, 230, 10,
- 16, 0, 1, 0, 0, 0,
+ 3, 0, 0, 0, 230, 10,
+ 16, 0, 3, 0, 0, 0,
6, 112, 16, 0, 0, 0,
0, 0, 0, 96, 16, 0,
0, 0, 0, 0, 42, 0,
16, 0, 2, 0, 0, 0,
- 0, 0, 0, 7, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 58, 0, 16, 0, 0, 0,
- 0, 0, 42, 0, 16, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 9, 66, 0, 16, 0,
- 1, 0, 0, 0, 26, 128,
- 32, 128, 65, 0, 0, 0,
- 0, 0, 0, 0, 25, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 128, 63, 56, 0,
- 0, 8, 18, 0, 16, 0,
- 3, 0, 0, 0, 10, 128,
- 32, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 130, 0,
+ 16, 0, 3, 0, 0, 0,
+ 26, 128, 32, 128, 65, 0,
+ 0, 0, 0, 0, 0, 0,
25, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 56, 0, 0, 8, 18, 0,
+ 16, 0, 4, 0, 0, 0,
+ 10, 128, 32, 0, 0, 0,
+ 0, 0, 25, 0, 0, 0,
+ 1, 64, 0, 0, 111, 18,
+ 3, 59, 56, 0, 0, 7,
+ 34, 0, 16, 0, 4, 0,
+ 0, 0, 58, 0, 16, 0,
+ 3, 0, 0, 0, 1, 64,
0, 0, 111, 18, 3, 59,
- 56, 0, 0, 7, 34, 0,
+ 0, 0, 0, 7, 50, 0,
+ 16, 0, 4, 0, 0, 0,
+ 198, 0, 16, 0, 2, 0,
+ 0, 0, 70, 0, 16, 0,
+ 4, 0, 0, 0, 70, 0,
+ 0, 141, 194, 0, 0, 128,
+ 67, 85, 21, 0, 130, 0,
16, 0, 3, 0, 0, 0,
- 42, 0, 16, 0, 1, 0,
+ 70, 0, 16, 0, 4, 0,
+ 0, 0, 6, 112, 16, 0,
+ 0, 0, 0, 0, 0, 96,
+ 16, 0, 0, 0, 0, 0,
+ 42, 0, 16, 0, 2, 0,
+ 0, 0, 0, 0, 0, 9,
+ 18, 0, 16, 0, 4, 0,
+ 0, 0, 26, 128, 32, 128,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 26, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 56, 0, 0, 8,
+ 18, 0, 16, 0, 5, 0,
+ 0, 0, 10, 128, 32, 0,
+ 0, 0, 0, 0, 26, 0,
0, 0, 1, 64, 0, 0,
- 111, 18, 3, 59, 0, 0,
- 0, 7, 194, 0, 16, 0,
- 1, 0, 0, 0, 6, 12,
- 16, 0, 2, 0, 0, 0,
- 6, 4, 16, 0, 3, 0,
- 0, 0, 71, 0, 0, 141,
- 194, 0, 0, 128, 67, 85,
- 21, 0, 66, 0, 16, 0,
- 1, 0, 0, 0, 230, 10,
- 16, 0, 1, 0, 0, 0,
- 6, 112, 16, 0, 0, 0,
- 0, 0, 0, 96, 16, 0,
- 0, 0, 0, 0, 42, 0,
- 16, 0, 2, 0, 0, 0,
- 0, 0, 0, 7, 130, 0,
+ 111, 18, 3, 59, 56, 0,
+ 0, 7, 34, 0, 16, 0,
+ 5, 0, 0, 0, 10, 0,
+ 16, 0, 4, 0, 0, 0,
+ 1, 64, 0, 0, 111, 18,
+ 3, 59, 0, 0, 0, 7,
+ 50, 0, 16, 0, 4, 0,
+ 0, 0, 198, 0, 16, 0,
+ 2, 0, 0, 0, 70, 0,
+ 16, 0, 5, 0, 0, 0,
+ 70, 0, 0, 141, 194, 0,
+ 0, 128, 67, 85, 21, 0,
+ 18, 0, 16, 0, 4, 0,
+ 0, 0, 70, 0, 16, 0,
+ 4, 0, 0, 0, 6, 112,
16, 0, 0, 0, 0, 0,
- 58, 0, 16, 0, 0, 0,
+ 0, 96, 16, 0, 0, 0,
0, 0, 42, 0, 16, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 9, 66, 0, 16, 0,
- 1, 0, 0, 0, 26, 128,
+ 2, 0, 0, 0, 0, 0,
+ 0, 9, 34, 0, 16, 0,
+ 4, 0, 0, 0, 26, 128,
32, 128, 65, 0, 0, 0,
- 0, 0, 0, 0, 26, 0,
+ 0, 0, 0, 0, 27, 0,
0, 0, 1, 64, 0, 0,
0, 0, 128, 63, 56, 0,
0, 8, 18, 0, 16, 0,
- 3, 0, 0, 0, 10, 128,
+ 5, 0, 0, 0, 10, 128,
32, 0, 0, 0, 0, 0,
- 26, 0, 0, 0, 1, 64,
+ 27, 0, 0, 0, 1, 64,
0, 0, 111, 18, 3, 59,
56, 0, 0, 7, 34, 0,
- 16, 0, 3, 0, 0, 0,
- 42, 0, 16, 0, 1, 0,
+ 16, 0, 5, 0, 0, 0,
+ 26, 0, 16, 0, 4, 0,
0, 0, 1, 64, 0, 0,
111, 18, 3, 59, 0, 0,
- 0, 7, 194, 0, 16, 0,
- 1, 0, 0, 0, 6, 12,
+ 0, 7, 146, 0, 16, 0,
+ 2, 0, 0, 0, 6, 12,
16, 0, 2, 0, 0, 0,
- 6, 4, 16, 0, 3, 0,
- 0, 0, 71, 0, 0, 141,
+ 6, 4, 16, 0, 5, 0,
+ 0, 0, 70, 0, 0, 141,
194, 0, 0, 128, 67, 85,
- 21, 0, 66, 0, 16, 0,
- 1, 0, 0, 0, 230, 10,
- 16, 0, 1, 0, 0, 0,
+ 21, 0, 18, 0, 16, 0,
+ 2, 0, 0, 0, 198, 0,
+ 16, 0, 2, 0, 0, 0,
6, 112, 16, 0, 0, 0,
0, 0, 0, 96, 16, 0,
0, 0, 0, 0, 42, 0,
16, 0, 2, 0, 0, 0,
+ 31, 0, 0, 3, 58, 0,
+ 16, 0, 0, 0, 0, 0,
+ 49, 0, 0, 7, 130, 0,
+ 16, 0, 0, 0, 0, 0,
+ 26, 0, 16, 0, 2, 0,
+ 0, 0, 1, 64, 0, 0,
+ 0, 0, 0, 0, 49, 0,
+ 0, 7, 34, 0, 16, 0,
+ 2, 0, 0, 0, 1, 64,
+ 0, 0, 0, 0, 128, 63,
+ 26, 0, 16, 0, 2, 0,
+ 0, 0, 60, 0, 0, 7,
+ 130, 0, 16, 0, 0, 0,
+ 0, 0, 58, 0, 16, 0,
+ 0, 0, 0, 0, 26, 0,
+ 16, 0, 2, 0, 0, 0,
+ 31, 0, 0, 3, 58, 0,
+ 16, 0, 0, 0, 0, 0,
0, 0, 0, 7, 130, 0,
16, 0, 0, 0, 0, 0,
- 58, 0, 16, 0, 0, 0,
+ 58, 0, 16, 0, 1, 0,
0, 0, 42, 0, 16, 0,
1, 0, 0, 0, 0, 0,
- 0, 9, 66, 0, 16, 0,
- 1, 0, 0, 0, 26, 128,
- 32, 128, 65, 0, 0, 0,
- 0, 0, 0, 0, 27, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 128, 63, 56, 0,
- 0, 8, 18, 0, 16, 0,
- 3, 0, 0, 0, 10, 128,
- 32, 0, 0, 0, 0, 0,
- 27, 0, 0, 0, 1, 64,
- 0, 0, 111, 18, 3, 59,
- 56, 0, 0, 7, 34, 0,
+ 0, 7, 130, 0, 16, 0,
+ 0, 0, 0, 0, 10, 0,
16, 0, 3, 0, 0, 0,
- 42, 0, 16, 0, 1, 0,
- 0, 0, 1, 64, 0, 0,
- 111, 18, 3, 59, 0, 0,
- 0, 7, 194, 0, 16, 0,
- 1, 0, 0, 0, 6, 12,
- 16, 0, 2, 0, 0, 0,
- 6, 4, 16, 0, 3, 0,
- 0, 0, 71, 0, 0, 141,
- 194, 0, 0, 128, 67, 85,
- 21, 0, 66, 0, 16, 0,
- 1, 0, 0, 0, 230, 10,
- 16, 0, 1, 0, 0, 0,
- 6, 112, 16, 0, 0, 0,
- 0, 0, 0, 96, 16, 0,
- 0, 0, 0, 0, 42, 0,
- 16, 0, 2, 0, 0, 0,
+ 58, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 0, 7,
+ 130, 0, 16, 0, 0, 0,
+ 0, 0, 26, 0, 16, 0,
+ 3, 0, 0, 0, 58, 0,
+ 16, 0, 0, 0, 0, 0,
0, 0, 0, 7, 130, 0,
16, 0, 0, 0, 0, 0,
+ 42, 0, 16, 0, 3, 0,
+ 0, 0, 58, 0, 16, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 7, 130, 0, 16, 0,
+ 0, 0, 0, 0, 58, 0,
+ 16, 0, 3, 0, 0, 0,
58, 0, 16, 0, 0, 0,
- 0, 0, 42, 0, 16, 0,
- 1, 0, 0, 0, 56, 0,
+ 0, 0, 0, 0, 0, 7,
+ 130, 0, 16, 0, 0, 0,
+ 0, 0, 10, 0, 16, 0,
+ 4, 0, 0, 0, 58, 0,
+ 16, 0, 0, 0, 0, 0,
+ 0, 0, 0, 7, 130, 0,
+ 16, 0, 0, 0, 0, 0,
+ 10, 0, 16, 0, 2, 0,
+ 0, 0, 58, 0, 16, 0,
+ 0, 0, 0, 0, 56, 0,
0, 7, 130, 0, 16, 0,
0, 0, 0, 0, 58, 0,
16, 0, 0, 0, 0, 0,
@@ -920,7 +920,7 @@ const BYTE g_pointPS[] =
128, 63, 62, 0, 0, 1,
83, 84, 65, 84, 148, 0,
0, 0, 101, 0, 0, 0,
- 4, 0, 0, 0, 0, 0,
+ 6, 0, 0, 0, 0, 0,
0, 0, 5, 0, 0, 0,
75, 0, 0, 0, 1, 0,
0, 0, 2, 0, 0, 0,
diff --git a/demo/d3d/shaders/pointShadowPS.hlsl b/demo/d3d/shaders/pointShadowPS.hlsl
new file mode 100644
index 0000000..d8fcff8
--- /dev/null
+++ b/demo/d3d/shaders/pointShadowPS.hlsl
@@ -0,0 +1,17 @@
+#include "shaderCommon.h"
+
+cbuffer constBuf : register(b0)
+{
+ PointShaderConst gParams;
+};
+
+void pointShadowPS(PointGeoOut input)
+{
+ // calculate normal from texture coordinates
+ float2 normal = input.texCoord.xy - float2(0.5, 0.5);
+ float mag = dot(normal.xy, normal.xy);
+ if (mag > 0.5 * 0.5)
+ {
+ discard; // kill pixels outside circle
+ }
+}
diff --git a/demo/d3d/shaders/pointShadowPS.hlsl.h b/demo/d3d/shaders/pointShadowPS.hlsl.h
new file mode 100644
index 0000000..ee3c121
--- /dev/null
+++ b/demo/d3d/shaders/pointShadowPS.hlsl.h
@@ -0,0 +1,157 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------- ------
+// SV_POSITION 0 xyzw 0 POS float
+// TEXCOORD 0 xy 1 NONE float xy
+// TEXCOORD 1 xyzw 2 NONE float
+// TEXCOORD 2 xyz 3 NONE float
+// TEXCOORD 3 xyzw 4 NONE float
+// TEXCOORD 4 xyz 5 NONE float
+// TEXCOORD 5 xyz 6 NONE float
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------- ------
+// no Output
+ps_5_0
+dcl_globalFlags refactoringAllowed
+dcl_input_ps linear v1.xy
+dcl_temps 1
+add r0.xy, v1.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
+dp2 r0.x, r0.xyxx, r0.xyxx
+lt r0.x, l(0.250000), r0.x
+discard_nz r0.x
+ret
+// Approximately 5 instruction slots used
+#endif
+
+const BYTE g_pointShadowPS[] =
+{
+ 68, 88, 66, 67, 124, 19,
+ 253, 39, 130, 123, 235, 41,
+ 10, 2, 21, 191, 153, 200,
+ 242, 4, 1, 0, 0, 0,
+ 192, 2, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 172, 0, 0, 0, 124, 1,
+ 0, 0, 140, 1, 0, 0,
+ 36, 2, 0, 0, 82, 68,
+ 69, 70, 112, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 60, 0, 0, 0, 0, 5,
+ 255, 255, 0, 1, 0, 0,
+ 60, 0, 0, 0, 82, 68,
+ 49, 49, 60, 0, 0, 0,
+ 24, 0, 0, 0, 32, 0,
+ 0, 0, 40, 0, 0, 0,
+ 36, 0, 0, 0, 12, 0,
+ 0, 0, 0, 0, 0, 0,
+ 77, 105, 99, 114, 111, 115,
+ 111, 102, 116, 32, 40, 82,
+ 41, 32, 72, 76, 83, 76,
+ 32, 83, 104, 97, 100, 101,
+ 114, 32, 67, 111, 109, 112,
+ 105, 108, 101, 114, 32, 54,
+ 46, 51, 46, 57, 54, 48,
+ 48, 46, 49, 54, 51, 56,
+ 52, 0, 171, 171, 73, 83,
+ 71, 78, 200, 0, 0, 0,
+ 7, 0, 0, 0, 8, 0,
+ 0, 0, 176, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 15, 0,
+ 0, 0, 188, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 1, 0, 0, 0, 3, 3,
+ 0, 0, 188, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 2, 0, 0, 0, 15, 0,
+ 0, 0, 188, 0, 0, 0,
+ 2, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 3, 0, 0, 0, 7, 0,
+ 0, 0, 188, 0, 0, 0,
+ 3, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 4, 0, 0, 0, 15, 0,
+ 0, 0, 188, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 5, 0, 0, 0, 7, 0,
+ 0, 0, 188, 0, 0, 0,
+ 5, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 6, 0, 0, 0, 7, 0,
+ 0, 0, 83, 86, 95, 80,
+ 79, 83, 73, 84, 73, 79,
+ 78, 0, 84, 69, 88, 67,
+ 79, 79, 82, 68, 0, 171,
+ 171, 171, 79, 83, 71, 78,
+ 8, 0, 0, 0, 0, 0,
+ 0, 0, 8, 0, 0, 0,
+ 83, 72, 69, 88, 144, 0,
+ 0, 0, 80, 0, 0, 0,
+ 36, 0, 0, 0, 106, 8,
+ 0, 1, 98, 16, 0, 3,
+ 50, 16, 16, 0, 1, 0,
+ 0, 0, 104, 0, 0, 2,
+ 1, 0, 0, 0, 0, 0,
+ 0, 10, 50, 0, 16, 0,
+ 0, 0, 0, 0, 70, 16,
+ 16, 0, 1, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 0, 191, 0, 0, 0, 191,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 15, 0, 0, 7,
+ 18, 0, 16, 0, 0, 0,
+ 0, 0, 70, 0, 16, 0,
+ 0, 0, 0, 0, 70, 0,
+ 16, 0, 0, 0, 0, 0,
+ 49, 0, 0, 7, 18, 0,
+ 16, 0, 0, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 128, 62, 10, 0, 16, 0,
+ 0, 0, 0, 0, 13, 0,
+ 4, 3, 10, 0, 16, 0,
+ 0, 0, 0, 0, 62, 0,
+ 0, 1, 83, 84, 65, 84,
+ 148, 0, 0, 0, 5, 0,
+ 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0
+};
diff --git a/demo/d3d11/shaders/pointVS.hlsl b/demo/d3d/shaders/pointVS.hlsl
index 6ab4b6c..ecd1e38 100644
--- a/demo/d3d11/shaders/pointVS.hlsl
+++ b/demo/d3d/shaders/pointVS.hlsl
@@ -7,20 +7,19 @@ cbuffer constBuf : register(b0)
PointVertexOut pointVS(PointVertexIn input, uint instance : SV_VertexID)
{
- const float4 gl_Vertex = input.position;
- const float4x4 gl_ModelViewMatrix = gParams.modelview;
+ const float4 modelPosition = input.position;
+ const float4x4 modelViewMatrix = gParams.modelView;
float density = input.density;
int phase = input.phase;
// calculate window-space point size
- float4 viewPos = mul(gl_ModelViewMatrix, float4(gl_Vertex.xyz, 1.0));
+ float4 viewPos = mul(modelViewMatrix, float4(modelPosition.xyz, 1.0));
PointVertexOut output;
- output.position = viewPos;
+ output.viewPosition = viewPos;
output.density = density;
output.phase = phase;
- output.vertex = gl_Vertex;
-
+ output.modelPosition = modelPosition;
return output;
}
diff --git a/demo/d3d11/shaders/pointVS.hlsl.h b/demo/d3d/shaders/pointVS.hlsl.h
index b78b3f1..5051a59 100644
--- a/demo/d3d11/shaders/pointVS.hlsl.h
+++ b/demo/d3d/shaders/pointVS.hlsl.h
@@ -11,7 +11,7 @@
// struct PointShaderConst
// {
//
-// float4x4 modelview; // Offset: 0
+// float4x4 modelView; // Offset: 0
// float4x4 projection; // Offset: 64
// float4x4 lightTransform; // Offset: 128
// float4 colors[8]; // Offset: 192
@@ -83,10 +83,10 @@ ret
const BYTE g_pointVS[] =
{
- 68, 88, 66, 67, 195, 164,
- 148, 248, 252, 197, 222, 222,
- 84, 139, 94, 6, 43, 78,
- 110, 120, 1, 0, 0, 0,
+ 68, 88, 66, 67, 214, 36,
+ 191, 126, 186, 99, 189, 31,
+ 31, 225, 65, 123, 198, 88,
+ 217, 159, 1, 0, 0, 0,
192, 6, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
176, 3, 0, 0, 68, 4,
@@ -126,7 +126,7 @@ const BYTE g_pointVS[] =
116, 83, 104, 97, 100, 101,
114, 67, 111, 110, 115, 116,
0, 109, 111, 100, 101, 108,
- 118, 105, 101, 119, 0, 102,
+ 86, 105, 101, 119, 0, 102,
108, 111, 97, 116, 52, 120,
52, 0, 3, 0, 3, 0,
4, 0, 4, 0, 0, 0,
diff --git a/demo/d3d11/shaders/shaderCommon.h b/demo/d3d/shaders/shaderCommon.h
index 176c97d..2a9cc67 100644
--- a/demo/d3d11/shaders/shaderCommon.h
+++ b/demo/d3d/shaders/shaderCommon.h
@@ -1,7 +1,7 @@
struct MeshShaderConst
{
- float4x4 modelviewprojection;
- float4x4 modelview;
+ float4x4 modelViewProjection;
+ float4x4 modelView;
float4x4 objectTransform;
float4x4 lightTransform;
@@ -25,12 +25,12 @@ struct MeshShaderConst
int grid;
int tex;
int colorArray;
- int _pad2;
+ int increaseGfxLoadForAsyncComputeTesting;
};
struct DebugRenderConst
{
- float4x4 modelview;
+ float4x4 modelView;
float4x4 projection;
};
@@ -49,14 +49,22 @@ struct MeshVertexOut
float4 position : SV_POSITION;
//float3 normal : NORMAL;
//float4 color : COLOR;
- float4 texCoord[8] : TEXCOORD;
//float clipDistance[1] : CLIP_DISTANCE;
+
+ float3 worldNormal: TEXCOORD0; ///< Normal in world space
+ float4 lightOffsetPosition: TEXCOORD1; ///< Position in light space (offset slightly)
+ float3 viewLightDir: TEXCOORD2; ///< Light direction in view space
+ float3 worldPosition: TEXCOORD3; ///< Position in worldspace
+ float4 color: TEXCOORD4; ///< Color
+ float2 texCoord: TEXCOORD5; ///< Tex coords
+ float4 secondaryColor: TEXCOORD6; ///< Secondary color
+ float4 viewPosition: TEXCOORD7; ///< Position in view space
};
#endif
struct PointShaderConst
{
- float4x4 modelview;
+ float4x4 modelView;
float4x4 projection;
float4x4 lightTransform;
@@ -87,26 +95,33 @@ struct PointVertexIn
struct PointVertexOut
{
- float4 position : POSITION;
+ float4 viewPosition : POSITION;
float density : DENSITY;
int phase : PHASE;
- float4 vertex : VERTEX;
+ float4 modelPosition : VERTEX;
};
struct PointGeoOut
{
float4 position : SV_POSITION;
- float4 texCoord[6] : TEXCOORD;
+
+ float2 texCoord: TEXCOORD0;
+ float4 lightOffsetPosition: TEXCOORD1;
+ float3 viewLightDir: TEXCOORD2; //< Light direction in view space
+ float4 reflectance: TEXCOORD3;
+ float3 modelPosition: TEXCOORD4; ///< Model space position
+ float3 viewPosition : TEXCOORD5; ///< View space position
};
+
#endif
struct FluidShaderConst
{
- float4x4 modelviewprojection;
- float4x4 modelview;
+ float4x4 modelViewProjection;
+ float4x4 modelView;
float4x4 projection; // ogl projection
- float4x4 modelview_inverse;
- float4x4 projection_inverse; // ogl inverse projection
+ float4x4 inverseModelView;
+ float4x4 inverseProjection; // ogl inverse projection
float4 invTexScale;
@@ -149,25 +164,27 @@ struct FluidVertexIn
struct FluidVertexOut
{
float4 position : POSITION;
- float4 texCoord[6] : TEXCOORD;
+ float4 bounds: TEXCOORD0; // xmin, xmax, ymin, ymax
+ float4 invQ0: TEXCOORD1;
+ float4 invQ1: TEXCOORD2;
+ float4 invQ2: TEXCOORD3;
+ float4 invQ3: TEXCOORD4;
+ float4 ndcPos: TEXCOORD5; /// Position in normalized device coordinates (ie /w)
};
struct FluidGeoOut
{
float4 position : SV_POSITION;
- float4 texCoord[4] : TEXCOORD;
-};
-
-struct PassthroughVertexIn
-{
- float2 position : POSITION;
- float2 texCoord : TEXCOORD;
+ float4 invQ0 : TEXCOORD0;
+ float4 invQ1 : TEXCOORD1;
+ float4 invQ2 : TEXCOORD2;
+ float4 invQ3 : TEXCOORD3;
};
struct PassthroughVertexOut
{
float4 position : SV_POSITION;
- float2 texCoord[1] : TEXCOORD;
+ float2 texCoord : TEXCOORD;
};
#endif
@@ -204,7 +221,7 @@ struct DiffuseShaderConst
struct DiffuseVertexIn
{
float4 position : POSITION; // lifetime in w
- float4 velocity : VELOCITY;
+ float4 velocity : VELOCITY; // holding velocity in u
};
struct DiffuseVertexOut
@@ -229,7 +246,7 @@ struct DiffuseGeometryOut
float4 lightDir : LIGHTDIR;
float4 color : COLOR;
- float4 uv : UV;
+ float2 uv : UV;
};
diff --git a/demo/d3d/shadersDemoContext.cpp b/demo/d3d/shadersDemoContext.cpp
new file mode 100644
index 0000000..d1e7c99
--- /dev/null
+++ b/demo/d3d/shadersDemoContext.cpp
@@ -0,0 +1,184 @@
+// to fix min max windows macros
+#define NOMINMAX
+
+// SDL
+#include <SDL_syswm.h>
+
+// This
+#include "shadersDemoContext.h"
+
+DemoContext* s_context = NULL;
+
+void SetDemoContext(DemoContext* context)
+{
+ s_context = context;
+}
+
+DemoContext* GetDemoContext()
+{
+ return s_context;
+}
+
+void ReshapeRender(SDL_Window* window)
+{
+ int width, height;
+ SDL_GetWindowSize(window, &width, &height);
+ s_context->onSizeChanged(width, height, false);
+}
+
+void DestroyRender()
+{
+ if (s_context)
+ {
+ delete s_context;
+ s_context = nullptr;
+ }
+}
+
+void StartFrame(Vec4 colorIn) { s_context->startFrame(colorIn); }
+void EndFrame() { s_context->endFrame(); }
+void PresentFrame(bool fullSync) { s_context->presentFrame(fullSync); }
+
+void FlushGraphicsAndWait() { s_context->flushGraphicsAndWait(); }
+
+void ReadFrame(int* backbuffer, int width, int height)
+{
+ assert(0);
+}
+
+void GetViewRay(int x, int y, Vec3& origin, Vec3& dir) { return s_context->getViewRay(x, y, origin, dir); }
+
+void SetFillMode(bool wire) { s_context->setFillMode(wire); }
+
+void SetCullMode(bool enabled) { s_context->setCullMode(enabled); }
+
+void SetView(Matrix44 view, Matrix44 projection) { return s_context->setView(view, projection); }
+
+FluidRenderer* CreateFluidRenderer(uint32_t width, uint32_t height) { return s_context->createFluidRenderer(width, height); }
+
+void DestroyFluidRenderer(FluidRenderer* renderer) { return s_context->destroyFluidRenderer(renderer); }
+
+FluidRenderBuffers* CreateFluidRenderBuffers(int numParticles, bool enableInterop) { return s_context->createFluidRenderBuffers(numParticles, enableInterop); }
+
+void UpdateFluidRenderBuffers(FluidRenderBuffers* buffers, Vec4* particles, float* densities, Vec4* anisotropy1, Vec4* anisotropy2, Vec4* anisotropy3, int numParticles, int* indices, int numIndices)
+{
+ s_context->updateFluidRenderBuffers(buffers, particles, densities, anisotropy1, anisotropy2, anisotropy3, numParticles, indices, numIndices);
+}
+
+void UpdateFluidRenderBuffers(FluidRenderBuffers* buffers, NvFlexSolver* flex, bool anisotropy, bool density) { return s_context->updateFluidRenderBuffers(buffers, flex, anisotropy, density); }
+
+void DestroyFluidRenderBuffers(FluidRenderBuffers* buffers) { return s_context->destroyFluidRenderBuffers(buffers); }
+
+ShadowMap* ShadowCreate() { return s_context->shadowCreate(); }
+
+void ShadowDestroy(ShadowMap* map) { s_context->shadowDestroy(map); }
+
+void ShadowBegin(ShadowMap* map) { s_context->shadowBegin(map); }
+
+void ShadowEnd() { s_context->shadowEnd(); }
+
+
+void BindSolidShader(Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowMap, float bias, Vec4 fogColor)
+{
+ s_context->bindSolidShader(lightPos, lightTarget, lightTransform, shadowMap, bias, fogColor);
+}
+
+void UnbindSolidShader() { s_context->unbindSolidShader(); }
+
+void DrawMesh(const Mesh* m, Vec3 color) { s_context->drawMesh(m, color); }
+
+void DrawCloth(const Vec4* positions, const Vec4* normals, const float* uvs, const int* indices, int numTris, int numPositions, int colorIndex, float expand, bool twosided, bool smooth)
+{
+ s_context->drawCloth(positions, normals, uvs, indices, numTris, numPositions, colorIndex, expand, twosided, smooth);
+}
+
+void DrawRope(Vec4* positions, int* indices, int numIndices, float radius, int color)
+{
+ s_context->drawRope(positions, indices, numIndices, radius, color);
+}
+
+void DrawPlane(const Vec4& p, bool color) { s_context->drawPlane(p, color); }
+
+void DrawPlanes(Vec4* planes, int n, float bias) { s_context->drawPlanes(planes, n, bias); }
+
+GpuMesh* CreateGpuMesh(const Mesh* m)
+{
+ return m ? s_context->createGpuMesh(m) : nullptr;
+}
+
+void DestroyGpuMesh(GpuMesh* m) { s_context->destroyGpuMesh(m); }
+
+void DrawGpuMesh(GpuMesh* m, const Matrix44& xform, const Vec3& color) { s_context->drawGpuMesh(m, xform, color); }
+
+void DrawGpuMeshInstances(GpuMesh* m, const Matrix44* xforms, int n, const Vec3& color) { s_context->drawGpuMeshInstances(m, xforms, n, color); }
+
+void DrawPoints(FluidRenderBuffers* buffers, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowTex, bool showDensity)
+{
+ s_context->drawPoints(buffers, n, offset, radius, screenWidth, screenAspect, fov, lightPos, lightTarget, lightTransform, shadowTex, showDensity);
+}
+
+void RenderEllipsoids(FluidRenderer* renderer, FluidRenderBuffers* buffers, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowMap, Vec4 color, float blur, float ior, bool debug)
+{
+ s_context->renderEllipsoids(renderer, buffers, n, offset, radius, screenWidth, screenAspect, fov, lightPos, lightTarget, lightTransform, shadowMap, color, blur, ior, debug);
+}
+
+DiffuseRenderBuffers* CreateDiffuseRenderBuffers(int numDiffuseParticles, bool& enableInterop) { return s_context->createDiffuseRenderBuffers(numDiffuseParticles, enableInterop); }
+
+void DestroyDiffuseRenderBuffers(DiffuseRenderBuffers* buffers) { return s_context->destroyDiffuseRenderBuffers(buffers); }
+
+void UpdateDiffuseRenderBuffers(DiffuseRenderBuffers* buffers, Vec4* diffusePositions, Vec4* diffuseVelocities, int numDiffuseParticles)
+{
+ s_context->updateDiffuseRenderBuffers(buffers, diffusePositions, diffuseVelocities, numDiffuseParticles);
+}
+
+void UpdateDiffuseRenderBuffers(DiffuseRenderBuffers* buffers, NvFlexSolver* solver) { return s_context->updateDiffuseRenderBuffers(buffers, solver); }
+
+int GetNumDiffuseRenderParticles(DiffuseRenderBuffers* buffers) { return s_context->getNumDiffuseRenderParticles(buffers); }
+
+void RenderDiffuse(FluidRenderer* render, DiffuseRenderBuffers* buffers, int n, float radius, float screenWidth, float screenAspect, float fov, Vec4 color, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowMap, float motionBlur, float inscatter, float outscatter, bool shadowEnabled, bool front)
+{
+ s_context->drawDiffuse(render, buffers, n, radius, screenWidth, screenAspect, fov, color, lightPos, lightTarget, lightTransform, shadowMap, motionBlur, inscatter, outscatter, shadowEnabled, front);
+}
+
+void BeginLines() { s_context->beginLines(); }
+
+void DrawLine(const Vec3& p, const Vec3& q, const Vec4& color) { s_context->drawLine(p, q, color); }
+
+void EndLines() { s_context->endLines(); }
+
+void BeginPoints(float size) {}
+void DrawPoint(const Vec3& p, const Vec4& color) {}
+void EndPoints() {}
+
+float RendererGetDeviceTimestamps(unsigned long long* begin, unsigned long long* end, unsigned long long* freq)
+{
+ return s_context->rendererGetDeviceTimestamps(begin, end, freq);
+}
+
+void* GetGraphicsCommandQueue() { return s_context->getGraphicsCommandQueue(); }
+void GraphicsTimerBegin() { s_context->graphicsTimerBegin(); }
+void GraphicsTimerEnd() { s_context->graphicsTimerEnd(); }
+
+void StartGpuWork() { s_context->startGpuWork(); }
+void EndGpuWork() { s_context->endGpuWork(); }
+
+void DrawImguiGraph() { return s_context->drawImguiGraph(); }
+
+void GetRenderDevice(void** deviceOut, void** contextOut) { return s_context->getRenderDevice(deviceOut, contextOut); }
+
+void InitRender(const RenderInitOptions& options)
+{
+ if (!s_context)
+ {
+ assert(false && "A context has not been set with SetDemoContext!");
+ return;
+ }
+ if (!s_context->initialize(options))
+ {
+ assert(!"Unable to initialize context!");
+ delete s_context;
+ s_context = nullptr;
+ return;
+ }
+}
+
diff --git a/demo/d3d/shadersDemoContext.h b/demo/d3d/shadersDemoContext.h
new file mode 100644
index 0000000..030dee6
--- /dev/null
+++ b/demo/d3d/shadersDemoContext.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+#pragma once
+
+#include "../shaders.h"
+
+#include "demoContext.h"
+
+// This file implements the Shaders.h 'interface' through the DemoContext interface
+
+void SetDemoContext(DemoContext* context);
+DemoContext* GetDemoContext();
+
diff --git a/demo/d3d11/appD3D11Ctx.cpp b/demo/d3d11/appD3D11Ctx.cpp
index 85129e5..2d6b721 100644
--- a/demo/d3d11/appD3D11Ctx.cpp
+++ b/demo/d3d11/appD3D11Ctx.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
*
* NVIDIA CORPORATION and its licensors retain all intellectual property
* and proprietary rights in and to this software, related documentation
@@ -25,45 +25,56 @@
#include <SDL_video.h>
#include <SDL_syswm.h>
-AppGraphProfiler* appGraphCreateProfiler(AppGraphCtx* ctx);
-void appGraphProfilerFrameBegin(AppGraphProfiler* profiler);
-void appGraphProfilerFrameEnd(AppGraphProfiler* profiler);
-void appGraphProfilerEnable(AppGraphProfiler* profiler, bool enabled);
-void appGraphProfilerBegin(AppGraphProfiler* profiler, const char* label);
-void appGraphProfilerEnd(AppGraphProfiler* profiler, const char* label);
-bool appGraphProfilerGet(AppGraphProfiler* profiler, const char** plabel, float* cpuTime, float* gpuTime, int index);
-void appGraphReleaseProfiler(AppGraphProfiler* profiler);
+namespace
+{
+ // COM object release utilities
+ template <class T>
+ void inline COMRelease(T& t)
+ {
+ if (t) t->Release();
+ t = nullptr;
+ }
+
+ template <class T>
+ void inline COMRelease(T& t, UINT arraySize)
+ {
+ for (UINT i = 0; i < arraySize; i++)
+ {
+ if (t[i]) t[i]->Release();
+ t[i] = nullptr;
+ }
+ }
+}
-AppGraphCtx::AppGraphCtx()
+AppGraphProfilerD3D11* appGraphCreateProfilerD3D11(AppGraphCtx* ctx);
+void appGraphProfilerD3D11FrameBegin(AppGraphProfilerD3D11* profiler);
+void appGraphProfilerD3D11FrameEnd(AppGraphProfilerD3D11* profiler);
+void appGraphProfilerD3D11Enable(AppGraphProfilerD3D11* profiler, bool enabled);
+void appGraphProfilerD3D11Begin(AppGraphProfilerD3D11* profiler, const char* label);
+void appGraphProfilerD3D11End(AppGraphProfilerD3D11* profiler, const char* label);
+bool appGraphProfilerD3D11Get(AppGraphProfilerD3D11* profiler, const char** plabel, float* cpuTime, float* gpuTime, int index);
+void appGraphReleaseProfiler(AppGraphProfilerD3D11* profiler);
+
+AppGraphCtxD3D11::AppGraphCtxD3D11()
{
- m_profiler = appGraphCreateProfiler(this);
- memset(&m_viewport, 0, sizeof(m_viewport));
+ m_profiler = appGraphCreateProfilerD3D11(cast_from_AppGraphCtxD3D11(this));
}
-AppGraphCtx::~AppGraphCtx()
+AppGraphCtxD3D11::~AppGraphCtxD3D11()
{
- AppGraphCtxReleaseRenderTarget(this);
-
- COMRelease(m_swapChain);
- COMRelease(m_backBuffer);
- COMRelease(m_rtv);
- COMRelease(m_depthStencil);
- COMRelease(m_dsv);
- COMRelease(m_depthSRV);
- COMRelease(m_depthState);
- COMRelease(m_blendState);
- COMRelease(m_resolvedTarget);
- COMRelease(m_resolvedTargetSRV);
- COMRelease(m_deviceContext);
+ AppGraphCtxReleaseRenderTargetD3D11(cast_from_AppGraphCtxD3D11(this));
+
COMRelease(m_device);
+ COMRelease(m_deviceContext);
+ COMRelease(m_depthState);
appGraphReleaseProfiler(m_profiler);
m_profiler = nullptr;
}
-AppGraphCtx* AppGraphCtxCreate(int deviceID)
+AppGraphCtx* AppGraphCtxCreateD3D11(int deviceID)
{
- AppGraphCtx* context = new AppGraphCtx;
+ AppGraphCtxD3D11* context = new AppGraphCtxD3D11;
HRESULT hr = S_OK;
@@ -148,30 +159,71 @@ AppGraphCtx* AppGraphCtxCreate(int deviceID)
return nullptr;
}
- // create blend state
- D3D11_BLEND_DESC blendStateDesc = {};
- blendStateDesc.RenderTarget[0].BlendEnable = TRUE;
- blendStateDesc.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_ALPHA;
- blendStateDesc.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_ALPHA;
- blendStateDesc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD;
- blendStateDesc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_ONE;
- blendStateDesc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_ZERO;
- blendStateDesc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
- blendStateDesc.RenderTarget[0].RenderTargetWriteMask = 0x0f;
-
- if (hr = context->m_device->CreateBlendState(&blendStateDesc, &context->m_blendState))
+ return cast_from_AppGraphCtxD3D11(context);
+}
+
+void AppGraphCtxInitRenderTargetD3D11(AppGraphCtx* context, SDL_Window* window, bool fullscreen, int numMSAASamples);
+
+bool AppGraphCtxUpdateSizeD3D11(AppGraphCtx* contextIn, SDL_Window* window, bool fullscreen, int numMSAASamples)
+{
+ auto context = cast_to_AppGraphCtxD3D11(contextIn);
+
+ // TODO: fix iflip fullscreen support
+ fullscreen = false;
+
+ bool sizeChanged = false;
+ int width, height;
+ SDL_GetWindowSize(window, &width, &height);
+
+ // sync with window
+ {
+ HWND hWnd = nullptr;
+ // get Windows handle to this SDL window
+ SDL_SysWMinfo winInfo;
+ SDL_VERSION(&winInfo.version);
+ if (SDL_GetWindowWMInfo(window, &winInfo))
+ {
+ if (winInfo.subsystem == SDL_SYSWM_WINDOWS)
+ {
+ hWnd = winInfo.info.win.window;
+ }
+ }
+ context->m_hWnd = hWnd;
+ context->m_fullscreen = fullscreen;
+
+ HRESULT hr = S_OK;
+
+ if (context->m_winW != width || context->m_winH != height)
+ {
+ context->m_winW = width;
+ context->m_winH = height;
+ sizeChanged = true;
+ context->m_valid = (context->m_winW != 0 && context->m_winH != 0);
+ }
+ }
+
+ if (sizeChanged)
{
- delete context;
- return nullptr;
+ const bool wasValid = context->m_valid;
+ // Release
+ AppGraphCtxReleaseRenderTargetD3D11(cast_from_AppGraphCtxD3D11(context));
+ // If was valid recreate it
+ if (wasValid)
+ {
+ // Reset the size (the release sets it, to 0,0)
+ context->m_winW = width;
+ context->m_winH = height;
+ //
+ AppGraphCtxInitRenderTargetD3D11(cast_from_AppGraphCtxD3D11(context), window, fullscreen, numMSAASamples);
+ }
}
- return context;
+ return context->m_valid;
}
-void AppGraphCtxInitRenderTarget(AppGraphCtx* context, SDL_Window* window, bool fullscreen, int samples)
+void AppGraphCtxInitRenderTargetD3D11(AppGraphCtx* contextIn, SDL_Window* window, bool fullscreen, int numMSAASamples)
{
- // TODO: fix iflip fullscreen support
- fullscreen = false;
+ auto context = cast_to_AppGraphCtxD3D11(contextIn);
HWND hWnd = nullptr;
// get Windows handle to this SDL window
@@ -187,15 +239,11 @@ void AppGraphCtxInitRenderTarget(AppGraphCtx* context, SDL_Window* window, bool
context->m_hWnd = hWnd;
context->m_fullscreen = fullscreen;
- HRESULT hr = S_OK;
-
- RECT rc;
- GetClientRect(context->m_hWnd, &rc);
- UINT width = rc.right - rc.left;
- UINT height = rc.bottom - rc.top;
+ // Desired size
+ int width, height;
+ SDL_GetWindowSize(window, &width, &height);
- context->m_winW = width;
- context->m_winH = height;
+ HRESULT hr = S_OK;
// enumerate devices
IDXGIFactory1* pFactory = NULL;
@@ -207,15 +255,15 @@ void AppGraphCtxInitRenderTarget(AppGraphCtx* context, SDL_Window* window, bool
DXGI_SWAP_CHAIN_DESC desc;
ZeroMemory(&desc, sizeof(desc));
desc.BufferCount = 1;
- desc.BufferDesc.Width = context->m_winW;
- desc.BufferDesc.Height = context->m_winH;
+ desc.BufferDesc.Width = width;
+ desc.BufferDesc.Height = height;
desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
desc.BufferDesc.RefreshRate.Numerator = 0;
desc.BufferDesc.RefreshRate.Denominator = 0;
desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; // DXGI_SWAP_EFFECT_FLIP_DISCARD;
desc.OutputWindow = context->m_hWnd;
- desc.SampleDesc.Count = samples;
+ desc.SampleDesc.Count = numMSAASamples;
desc.SampleDesc.Quality = 0;
desc.Windowed = TRUE; // m_fullscreen ? FALSE : TRUE;
desc.Flags = 0u;
@@ -249,8 +297,8 @@ void AppGraphCtxInitRenderTarget(AppGraphCtx* context, SDL_Window* window, bool
// configure scissor and viewport
{
- context->m_viewport.Width = float(context->m_winW);
- context->m_viewport.Height = float(context->m_winH);
+ context->m_viewport.Width = float(width);
+ context->m_viewport.Height = float(height);
context->m_viewport.MaxDepth = 1.f;
}
@@ -282,7 +330,7 @@ void AppGraphCtxInitRenderTarget(AppGraphCtx* context, SDL_Window* window, bool
texDesc.MipLevels = 1;
texDesc.ArraySize = 1;
texDesc.Format = DXGI_FORMAT_R32_TYPELESS; // DXGI_FORMAT_R24G8_TYPELESS
- texDesc.SampleDesc.Count = samples;
+ texDesc.SampleDesc.Count = numMSAASamples;
texDesc.SampleDesc.Quality = 0u;
texDesc.Usage = D3D11_USAGE_DEFAULT;
texDesc.BindFlags = D3D11_BIND_DEPTH_STENCIL | D3D11_BIND_SHADER_RESOURCE;
@@ -296,7 +344,7 @@ void AppGraphCtxInitRenderTarget(AppGraphCtx* context, SDL_Window* window, bool
D3D11_DEPTH_STENCIL_VIEW_DESC viewDesc = {};
viewDesc.Format = DXGI_FORMAT_D32_FLOAT;
- viewDesc.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2DMS;
+ viewDesc.ViewDimension = (numMSAASamples > 1) ? D3D11_DSV_DIMENSION_TEXTURE2DMS : D3D11_DSV_DIMENSION_TEXTURE2D;
viewDesc.Flags = 0u;
viewDesc.Texture2D.MipSlice = 0;
@@ -307,7 +355,7 @@ void AppGraphCtxInitRenderTarget(AppGraphCtx* context, SDL_Window* window, bool
D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc = {};
srvDesc.Format = DXGI_FORMAT_R32_FLOAT;
- srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2DMS;
+ srvDesc.ViewDimension = (numMSAASamples > 1) ? D3D11_SRV_DIMENSION_TEXTURE2DMS : D3D11_SRV_DIMENSION_TEXTURE2D;
srvDesc.Texture2D.MipLevels = 1;
srvDesc.Texture2D.MostDetailedMip = 0;
@@ -316,42 +364,12 @@ void AppGraphCtxInitRenderTarget(AppGraphCtx* context, SDL_Window* window, bool
return;
}
}
-
- // resolved texture target (for refraction / scene sampling)
- {
- D3D11_TEXTURE2D_DESC texDesc = {};
- texDesc.Width = width;
- texDesc.Height = height;
- texDesc.MipLevels = 1;
- texDesc.ArraySize = 1;
- texDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
- texDesc.SampleDesc.Count = 1;
- texDesc.SampleDesc.Quality = 0u;
- texDesc.Usage = D3D11_USAGE_DEFAULT;
- texDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
- texDesc.CPUAccessFlags = 0;
- texDesc.MiscFlags = 0;
-
- if (hr = context->m_device->CreateTexture2D(&texDesc, nullptr, &context->m_resolvedTarget))
- {
- return;
- }
-
- D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc = {};
- srvDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
- srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
- srvDesc.Texture2D.MipLevels = 1;
- srvDesc.Texture2D.MostDetailedMip = 0;
-
- if (hr = context->m_device->CreateShaderResourceView(context->m_resolvedTarget, &srvDesc, &context->m_resolvedTargetSRV))
- {
- return;
- }
- }
}
-void AppGraphCtxReleaseRenderTarget(AppGraphCtx* context)
+void AppGraphCtxReleaseRenderTargetD3D11(AppGraphCtx* contextIn)
{
+ auto context = cast_to_AppGraphCtxD3D11(contextIn);
+
if (context->m_swapChain == nullptr)
{
return;
@@ -361,68 +379,78 @@ void AppGraphCtxReleaseRenderTarget(AppGraphCtx* context)
context->m_swapChain->GetFullscreenState(&bFullscreen, nullptr);
if (bFullscreen == TRUE) context->m_swapChain->SetFullscreenState(FALSE, nullptr);
- COMRelease(context->m_swapChain);
COMRelease(context->m_backBuffer);
+ COMRelease(context->m_swapChain);
COMRelease(context->m_rtv);
COMRelease(context->m_depthStencil);
COMRelease(context->m_dsv);
COMRelease(context->m_depthSRV);
- COMRelease(context->m_resolvedTarget);
- COMRelease(context->m_resolvedTargetSRV);
+
+ context->m_valid = false;
+ context->m_winW = 0u;
+ context->m_winH = 0u;
}
-void AppGraphCtxRelease(AppGraphCtx* context)
+void AppGraphCtxReleaseD3D11(AppGraphCtx* context)
{
if (context == nullptr) return;
- delete context;
+ delete cast_to_AppGraphCtxD3D11(context);
}
-void AppGraphCtxResolveFrame(AppGraphCtx* context)
+void AppGraphCtxFrameStartD3D11(AppGraphCtx* contextIn, AppGraphColor clearColor)
{
- context->m_deviceContext->ResolveSubresource(context->m_resolvedTarget, 0, context->m_backBuffer, 0, DXGI_FORMAT_R8G8B8A8_UNORM);
-}
+ auto context = cast_to_AppGraphCtxD3D11(contextIn);
-void AppGraphCtxFrameStart(AppGraphCtx* context, float clearColor[4])
-{
- appGraphProfilerFrameBegin(context->m_profiler);
+ appGraphProfilerD3D11FrameBegin(context->m_profiler);
context->m_deviceContext->RSSetViewports(1, &context->m_viewport);
context->m_deviceContext->RSSetScissorRects(0, nullptr);
context->m_deviceContext->OMSetRenderTargets(1, &context->m_rtv, context->m_dsv);
- context->m_deviceContext->ClearRenderTargetView(context->m_rtv, clearColor);
+ context->m_deviceContext->ClearRenderTargetView(context->m_rtv, &clearColor.r);
context->m_deviceContext->ClearDepthStencilView(context->m_dsv, D3D11_CLEAR_DEPTH, 1.f, 0u);
context->m_deviceContext->OMSetDepthStencilState(context->m_depthState, 0u);
}
-void AppGraphCtxFramePresent(AppGraphCtx* context, bool fullsync)
+void AppGraphCtxFramePresentD3D11(AppGraphCtx* contextIn, bool fullsync)
{
+ auto context = cast_to_AppGraphCtxD3D11(contextIn);
+
context->m_swapChain->Present(fullsync, 0);
-
- appGraphProfilerFrameEnd(context->m_profiler);
+
+ appGraphProfilerD3D11FrameEnd(context->m_profiler);
}
-void AppGraphCtxProfileEnable(AppGraphCtx* context, bool enabled)
+void AppGraphCtxWaitForFramesD3D11(AppGraphCtx* context, unsigned int maxFramesInFlight)
{
- appGraphProfilerEnable(context->m_profiler, enabled);
+ // TODO: Implement
}
-void AppGraphCtxProfileBegin(AppGraphCtx* context, const char* label)
+void AppGraphCtxProfileEnableD3D11(AppGraphCtx* contextIn, bool enabled)
{
- appGraphProfilerBegin(context->m_profiler, label);
+ auto context = cast_to_AppGraphCtxD3D11(contextIn);
+ appGraphProfilerD3D11Enable(context->m_profiler, enabled);
}
-void AppGraphCtxProfileEnd(AppGraphCtx* context, const char* label)
+void AppGraphCtxProfileBeginD3D11(AppGraphCtx* contextIn, const char* label)
{
- appGraphProfilerEnd(context->m_profiler, label);
+ auto context = cast_to_AppGraphCtxD3D11(contextIn);
+ appGraphProfilerD3D11Begin(context->m_profiler, label);
}
-bool AppGraphCtxProfileGet(AppGraphCtx* context, const char** plabel, float* cpuTime, float* gpuTime, int index)
+void AppGraphCtxProfileEndD3D11(AppGraphCtx* contextIn, const char* label)
{
- return appGraphProfilerGet(context->m_profiler, plabel, cpuTime, gpuTime, index);
+ auto context = cast_to_AppGraphCtxD3D11(contextIn);
+ appGraphProfilerD3D11End(context->m_profiler, label);
+}
+
+bool AppGraphCtxProfileGetD3D11(AppGraphCtx* contextIn, const char** plabel, float* cpuTime, float* gpuTime, int index)
+{
+ auto context = cast_to_AppGraphCtxD3D11(contextIn);
+ return appGraphProfilerD3D11Get(context->m_profiler, plabel, cpuTime, gpuTime, index);
}
// ******************************* Profiler *********************************
@@ -544,9 +572,9 @@ namespace
};
}
-struct AppGraphProfiler
+struct AppGraphProfilerD3D11
{
- AppGraphCtx* m_context;
+ AppGraphCtxD3D11* m_context;
int m_state = 0;
bool m_enabled = false;
@@ -563,30 +591,30 @@ struct AppGraphProfiler
TimerValue m_timerValues[m_timersCap];
int m_timerValuesSize = 0;
- AppGraphProfiler(AppGraphCtx* context);
- ~AppGraphProfiler();
+ AppGraphProfilerD3D11(AppGraphCtx* context);
+ ~AppGraphProfilerD3D11();
};
-AppGraphProfiler::AppGraphProfiler(AppGraphCtx* context) : m_context(context)
+AppGraphProfilerD3D11::AppGraphProfilerD3D11(AppGraphCtx* context) : m_context(cast_to_AppGraphCtxD3D11(context))
{
}
-AppGraphProfiler::~AppGraphProfiler()
+AppGraphProfilerD3D11::~AppGraphProfilerD3D11()
{
COMRelease(m_disjoint);
}
-AppGraphProfiler* appGraphCreateProfiler(AppGraphCtx* ctx)
+AppGraphProfilerD3D11* appGraphCreateProfilerD3D11(AppGraphCtx* ctx)
{
- return new AppGraphProfiler(ctx);
+ return new AppGraphProfilerD3D11(ctx);
}
-void appGraphReleaseProfiler(AppGraphProfiler* profiler)
+void appGraphReleaseProfiler(AppGraphProfilerD3D11* profiler)
{
delete profiler;
}
-void appGraphProfilerFrameBegin(AppGraphProfiler* p)
+void appGraphProfilerD3D11FrameBegin(AppGraphProfilerD3D11* p)
{
p->m_frameTime = (float)p->m_frameTimer.getDeltaTime();
@@ -611,7 +639,7 @@ void appGraphProfilerFrameBegin(AppGraphProfiler* p)
}
}
-void appGraphProfilerFrameEnd(AppGraphProfiler* p)
+void appGraphProfilerD3D11FrameEnd(AppGraphProfilerD3D11* p)
{
if (p->m_state == 1)
{
@@ -623,12 +651,12 @@ void appGraphProfilerFrameEnd(AppGraphProfiler* p)
}
}
-void appGraphProfilerEnable(AppGraphProfiler* p, bool enabled)
+void appGraphProfilerD3D11Enable(AppGraphProfilerD3D11* p, bool enabled)
{
p->m_enabled = enabled;
}
-void appGraphProfilerBegin(AppGraphProfiler* p, const char* label)
+void appGraphProfilerD3D11Begin(AppGraphProfilerD3D11* p, const char* label)
{
if (p->m_state == 1 && p->m_timersSize < p->m_timersCap)
{
@@ -652,7 +680,7 @@ void appGraphProfilerBegin(AppGraphProfiler* p, const char* label)
}
}
-void appGraphProfilerEnd(AppGraphProfiler* p, const char* label)
+void appGraphProfilerD3D11End(AppGraphProfilerD3D11* p, const char* label)
{
if (p->m_state == 1)
{
@@ -676,7 +704,7 @@ void appGraphProfilerEnd(AppGraphProfiler* p, const char* label)
}
}
-bool appGraphProfilerFlush(AppGraphProfiler* p)
+bool appGraphProfilerD3D11Flush(AppGraphProfilerD3D11* p)
{
if (p->m_state == 2)
{
@@ -735,9 +763,9 @@ bool appGraphProfilerFlush(AppGraphProfiler* p)
return false;
}
-bool appGraphProfilerGet(AppGraphProfiler* p, const char** plabel, float* cpuTime, float* gpuTime, int index)
+bool appGraphProfilerD3D11Get(AppGraphProfilerD3D11* p, const char** plabel, float* cpuTime, float* gpuTime, int index)
{
- appGraphProfilerFlush(p);
+ appGraphProfilerD3D11Flush(p);
{
if (index < p->m_timerValuesSize)
{
@@ -755,7 +783,8 @@ bool appGraphProfilerGet(AppGraphProfiler* p, const char** plabel, float* cpuTim
return false;
}
-size_t AppGraphCtxDedicatedVideoMemory(AppGraphCtx* context)
+size_t AppGraphCtxDedicatedVideoMemoryD3D11(AppGraphCtx* contextIn)
{
+ auto context = cast_to_AppGraphCtxD3D11(contextIn);
return context->m_dedicatedVideoMemory;
-}
+} \ No newline at end of file
diff --git a/demo/d3d11/appD3D11Ctx.h b/demo/d3d11/appD3D11Ctx.h
index 071952e..80a71f8 100644
--- a/demo/d3d11/appD3D11Ctx.h
+++ b/demo/d3d11/appD3D11Ctx.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
*
* NVIDIA CORPORATION and its licensors retain all intellectual property
* and proprietary rights in and to this software, related documentation
@@ -10,44 +10,26 @@
#pragma once
+#include "../d3d/appGraphCtx.h"
+
#include <windows.h>
#include <d3d11.h>
+struct AppGraphProfilerD3D11;
-template <class T>
-void inline COMRelease(T& t)
-{
- if (t) t->Release();
- t = nullptr;
-}
-
-template <class T>
-void inline COMRelease(T& t, UINT arraySize)
-{
- for (UINT i = 0; i < arraySize; i++)
- {
- if (t[i]) t[i]->Release();
- t[i] = nullptr;
- }
-}
-
-
-
-struct SDL_Window;
-struct AppGraphProfiler;
-
-struct AppGraphCtx
+struct AppGraphCtxD3D11
{
HWND m_hWnd = nullptr;
int m_winW = 0;
int m_winH = 0;
bool m_fullscreen = false;
+ bool m_valid = false;
size_t m_dedicatedVideoMemory = 0u;
// D3D11 objects
- D3D11_VIEWPORT m_viewport;
+ D3D11_VIEWPORT m_viewport = {};
ID3D11Device* m_device = nullptr;
ID3D11DeviceContext* m_deviceContext = nullptr;
IDXGISwapChain* m_swapChain = nullptr;
@@ -57,37 +39,43 @@ struct AppGraphCtx
ID3D11DepthStencilView* m_dsv = nullptr;
ID3D11ShaderResourceView* m_depthSRV = nullptr;
ID3D11DepthStencilState* m_depthState = nullptr;
- ID3D11BlendState* m_blendState = nullptr;
+
+ AppGraphProfilerD3D11* m_profiler = nullptr;
- ID3D11Texture2D* m_resolvedTarget = nullptr;
- ID3D11ShaderResourceView* m_resolvedTargetSRV = nullptr;
+ AppGraphCtxD3D11();
+ ~AppGraphCtxD3D11();
+};
- AppGraphProfiler* m_profiler = nullptr;
+inline AppGraphCtxD3D11* cast_to_AppGraphCtxD3D11(AppGraphCtx* appctx)
+{
+ return (AppGraphCtxD3D11*)(appctx);
+}
- AppGraphCtx();
- ~AppGraphCtx();
-};
+inline AppGraphCtx* cast_from_AppGraphCtxD3D11(AppGraphCtxD3D11* appctx)
+{
+ return (AppGraphCtx*)(appctx);
+}
-AppGraphCtx* AppGraphCtxCreate(int deviceID);
+APP_GRAPH_CTX_API AppGraphCtx* AppGraphCtxCreateD3D11(int deviceID);
-void AppGraphCtxInitRenderTarget(AppGraphCtx* context, SDL_Window* window, bool fullscreen, int);
+APP_GRAPH_CTX_API bool AppGraphCtxUpdateSizeD3D11(AppGraphCtx* context, SDL_Window* window, bool fullscreen, int numMSAASamples);
-void AppGraphCtxReleaseRenderTarget(AppGraphCtx* context);
+APP_GRAPH_CTX_API void AppGraphCtxReleaseRenderTargetD3D11(AppGraphCtx* context);
-void AppGraphCtxRelease(AppGraphCtx* context);
+APP_GRAPH_CTX_API void AppGraphCtxReleaseD3D11(AppGraphCtx* context);
-void AppGraphCtxFrameStart(AppGraphCtx* context, float clearColor[4]);
+APP_GRAPH_CTX_API void AppGraphCtxFrameStartD3D11(AppGraphCtx* context, AppGraphColor clearColor);
-void AppGraphCtxFramePresent(AppGraphCtx* context, bool fullsync);
+APP_GRAPH_CTX_API void AppGraphCtxFramePresentD3D11(AppGraphCtx* context, bool fullsync);
-void AppGraphCtxResolveFrame(AppGraphCtx* context);
+APP_GRAPH_CTX_API void AppGraphCtxWaitForFramesD3D11(AppGraphCtx* context, unsigned int maxFramesInFlight);
-void AppGraphCtxProfileEnable(AppGraphCtx* context, bool enabled);
+APP_GRAPH_CTX_API void AppGraphCtxProfileEnableD3D11(AppGraphCtx* context, bool enabled);
-void AppGraphCtxProfileBegin(AppGraphCtx* context, const char* label);
+APP_GRAPH_CTX_API void AppGraphCtxProfileBeginD3D11(AppGraphCtx* context, const char* label);
-void AppGraphCtxProfileEnd(AppGraphCtx* context, const char* label);
+APP_GRAPH_CTX_API void AppGraphCtxProfileEndD3D11(AppGraphCtx* context, const char* label);
-bool AppGraphCtxProfileGet(AppGraphCtx* context, const char** plabel, float* cpuTime, float* gpuTime, int index);
+APP_GRAPH_CTX_API bool AppGraphCtxProfileGetD3D11(AppGraphCtx* context, const char** plabel, float* cpuTime, float* gpuTime, int index);
-size_t AppGraphCtxDedicatedVideoMemory(AppGraphCtx* context); \ No newline at end of file
+APP_GRAPH_CTX_API size_t AppGraphCtxDedicatedVideoMemoryD3D11(AppGraphCtx* context);
diff --git a/demo/d3d11/debugLineRender.h b/demo/d3d11/debugLineRender.h
deleted file mode 100644
index 6132935..0000000
--- a/demo/d3d11/debugLineRender.h
+++ /dev/null
@@ -1,199 +0,0 @@
-#pragma once
-
-
-#include "shaders/debugLineVS.hlsl.h"
-#include "shaders/debugLinePS.hlsl.h"
-
-
-struct DebugVertex
-{
- Vec3 position;
- Vec4 color;
-};
-
-struct DebugLineRender
-{
-
- void Init(ID3D11Device* d, ID3D11DeviceContext* c)
- {
- device = d;
- context = c;
-
- // create the rasterizer state
- {
- D3D11_RASTERIZER_DESC desc = {};
- desc.FillMode = D3D11_FILL_SOLID;
- desc.CullMode = D3D11_CULL_BACK;
- desc.FrontCounterClockwise = TRUE; // This is non-default
- desc.DepthBias = 0;
- desc.DepthBiasClamp = 0.f;
- desc.SlopeScaledDepthBias = 0.f;
- desc.DepthClipEnable = TRUE;
- desc.ScissorEnable = FALSE; // This is non-default
- desc.MultisampleEnable = TRUE;
- desc.AntialiasedLineEnable = FALSE;
-
- device->CreateRasterizerState(&desc, &rasterizerState);
- }
-
- {
- D3D11_DEPTH_STENCIL_DESC depthStateDesc = {};
- depthStateDesc.DepthEnable = FALSE; // disable depth test
- depthStateDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
- depthStateDesc.DepthFunc = D3D11_COMPARISON_LESS_EQUAL;
-
- device->CreateDepthStencilState(&depthStateDesc, &depthStencilState);
- }
-
- // create the input layout
- {
- D3D11_INPUT_ELEMENT_DESC inputElementDescs[] =
- {
- { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
- { "COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
- };
-
- device->CreateInputLayout(inputElementDescs, 2, g_debugLineVS, sizeof(g_debugLineVS), &inputLayout);
- }
-
- // create the blend state
- {
- D3D11_BLEND_DESC blendDesc = {};
-
- blendDesc.AlphaToCoverageEnable = false;
- blendDesc.IndependentBlendEnable = false;
- blendDesc.RenderTarget[0].BlendEnable = false;
- blendDesc.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_ALPHA;
- blendDesc.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_ALPHA;
- blendDesc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD;
- blendDesc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_SRC_ALPHA;
- blendDesc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_INV_SRC_ALPHA;
- blendDesc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
- blendDesc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
-
- device->CreateBlendState(&blendDesc, &blendState);
- }
-
- // create the shaders
- device->CreateVertexShader(g_debugLineVS, sizeof(g_debugLineVS), nullptr, &vertexShader);
- device->CreatePixelShader(g_debugLinePS, sizeof(g_debugLinePS), nullptr, &pixelShader);
-
- // create a constant buffer
- {
- D3D11_BUFFER_DESC bufDesc;
- bufDesc.ByteWidth = sizeof(Matrix44);
- bufDesc.Usage = D3D11_USAGE_DYNAMIC;
- bufDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
- bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
- bufDesc.MiscFlags = 0;
-
- device->CreateBuffer(&bufDesc, NULL, &constantBuffer);
- }
- }
-
- void Destroy()
- {
- COMRelease(depthStencilState);
- COMRelease(rasterizerState);
- COMRelease(inputLayout);
- COMRelease(blendState);
- COMRelease(vertexShader);
- COMRelease(pixelShader);
- COMRelease(constantBuffer);
- COMRelease(vertexBuffer);
- }
-
- void AddLine(const Vec3& p, const Vec3& q, const Vec4& color)
- {
- DebugVertex v = { p, color };
- DebugVertex w = { q, color };
-
- queued.push_back(v);
- queued.push_back(w);
- }
-
- void FlushLines(const Matrix44& viewProj)
- {
- if (queued.empty())
- return;
-
- // recreate vertex buffer if not big enough for queued lines
- if (vertexBufferSize < int(queued.size()))
- {
- if (vertexBuffer)
- vertexBuffer->Release();
-
- D3D11_BUFFER_DESC bufferDesc;
- bufferDesc.Usage = D3D11_USAGE_DYNAMIC;
- bufferDesc.ByteWidth = UINT(sizeof(DebugVertex)*queued.size());
- bufferDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
- bufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
- bufferDesc.MiscFlags = 0;
-
- device->CreateBuffer(&bufferDesc, 0, &vertexBuffer);
-
- vertexBufferSize = int(queued.size());
- }
-
- // update vertex buffer
- D3D11_MAPPED_SUBRESOURCE res;
- context->Map(vertexBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- memcpy(res.pData, &queued[0], sizeof(DebugVertex)*queued.size());
- context->Unmap(vertexBuffer, 0);
-
- // update constant buffer
- {
- D3D11_MAPPED_SUBRESOURCE mappedResource = {};
- if (S_OK == context->Map(constantBuffer, 0u, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource))
- {
- memcpy(mappedResource.pData, &viewProj, sizeof(viewProj));
-
- context->Unmap(constantBuffer, 0u);
- }
- }
-
- // configure for line renderering
- context->VSSetShader(vertexShader, nullptr, 0u);
- context->GSSetShader(nullptr, nullptr, 0u);
- context->PSSetShader(pixelShader, nullptr, 0u);
-
- context->IASetInputLayout(inputLayout);
- context->OMSetBlendState(blendState, nullptr, 0xFFFFFFFF);
-
- context->VSSetConstantBuffers(0, 1, &constantBuffer);
-
- context->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_LINELIST);
-
- context->RSSetState(rasterizerState);
-
- UINT vertexStride = sizeof(DebugVertex);
- UINT offset = 0u;
- context->IASetVertexBuffers(0, 1, &vertexBuffer, &vertexStride, &offset);
-
-
- // kick
- context->Draw(UINT(queued.size()), 0);
-
- // empty queue
- queued.resize(0);
-
- }
-
-
- std::vector<DebugVertex> queued;
-
- ID3D11Buffer* vertexBuffer = nullptr;
- int vertexBufferSize = 0;
-
- ID3D11DepthStencilState* depthStencilState = nullptr;
- ID3D11RasterizerState* rasterizerState = nullptr;
- ID3D11InputLayout* inputLayout = nullptr;
- ID3D11BlendState* blendState = nullptr;
- ID3D11VertexShader* vertexShader = nullptr;
- ID3D11PixelShader* pixelShader = nullptr;
- ID3D11Buffer* constantBuffer = nullptr;
-
- ID3D11Device* device = nullptr;
- ID3D11DeviceContext* context = nullptr;
-
-}; \ No newline at end of file
diff --git a/demo/d3d11/debugLineRenderD3D11.cpp b/demo/d3d11/debugLineRenderD3D11.cpp
new file mode 100644
index 0000000..2b0b432
--- /dev/null
+++ b/demo/d3d11/debugLineRenderD3D11.cpp
@@ -0,0 +1,170 @@
+/*
+* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+#define NOMINMAX
+#include <d3d11.h>
+
+#include <math.h>
+
+#include "../d3d/shaders/debugLineVS.hlsl.h"
+#include "../d3d/shaders/debugLinePS.hlsl.h"
+
+// this
+#include "debugLineRenderD3D11.h"
+
+void DebugLineRenderD3D11::init(ID3D11Device* d, ID3D11DeviceContext* c)
+{
+ m_device = d;
+ m_context = c;
+
+ // create the rasterizer state
+ {
+ D3D11_RASTERIZER_DESC desc = {};
+ desc.FillMode = D3D11_FILL_SOLID;
+ desc.CullMode = D3D11_CULL_BACK;
+ desc.FrontCounterClockwise = TRUE; // This is non-default
+ desc.DepthBias = 0;
+ desc.DepthBiasClamp = 0.f;
+ desc.SlopeScaledDepthBias = 0.f;
+ desc.DepthClipEnable = TRUE;
+ desc.ScissorEnable = FALSE; // This is non-default
+ desc.MultisampleEnable = TRUE;
+ desc.AntialiasedLineEnable = FALSE;
+
+ m_device->CreateRasterizerState(&desc, m_rasterizerState.GetAddressOf());
+ }
+
+ {
+ D3D11_DEPTH_STENCIL_DESC depthStateDesc = {};
+ depthStateDesc.DepthEnable = FALSE; // disable depth test
+ depthStateDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
+ depthStateDesc.DepthFunc = D3D11_COMPARISON_LESS_EQUAL;
+
+ m_device->CreateDepthStencilState(&depthStateDesc, m_depthStencilState.GetAddressOf());
+ }
+
+ // create the input layout
+ {
+ D3D11_INPUT_ELEMENT_DESC inputElementDescs[] =
+ {
+ { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
+ { "COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
+ };
+
+ m_device->CreateInputLayout(inputElementDescs, 2, g_debugLineVS, sizeof(g_debugLineVS), m_inputLayout.GetAddressOf());
+ }
+
+ // create the blend state
+ {
+ D3D11_BLEND_DESC blendDesc = {};
+
+ blendDesc.AlphaToCoverageEnable = false;
+ blendDesc.IndependentBlendEnable = false;
+ blendDesc.RenderTarget[0].BlendEnable = false;
+ blendDesc.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_ALPHA;
+ blendDesc.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_ALPHA;
+ blendDesc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD;
+ blendDesc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_SRC_ALPHA;
+ blendDesc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_INV_SRC_ALPHA;
+ blendDesc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
+ blendDesc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
+
+ m_device->CreateBlendState(&blendDesc, m_blendState.GetAddressOf());
+ }
+
+ // create the shaders
+ m_device->CreateVertexShader(g_debugLineVS, sizeof(g_debugLineVS), nullptr, m_vertexShader.GetAddressOf());
+ m_device->CreatePixelShader(g_debugLinePS, sizeof(g_debugLinePS), nullptr, m_pixelShader.GetAddressOf());
+
+ // create a constant buffer
+ {
+ D3D11_BUFFER_DESC bufDesc;
+ bufDesc.ByteWidth = sizeof(Matrix44);
+ bufDesc.Usage = D3D11_USAGE_DYNAMIC;
+ bufDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
+ bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+ bufDesc.MiscFlags = 0;
+
+ m_device->CreateBuffer(&bufDesc, NULL, m_constantBuffer.GetAddressOf());
+ }
+}
+
+void DebugLineRenderD3D11::addLine(const Vec3& p, const Vec3& q, const Vec4& color)
+{
+ Vertex v = { p, color };
+ Vertex w = { q, color };
+
+ m_queued.push_back(v);
+ m_queued.push_back(w);
+}
+
+void DebugLineRenderD3D11::flush(const Matrix44& viewProj)
+{
+ if (m_queued.empty())
+ return;
+
+ // recreate vertex buffer if not big enough for queued lines
+ if (m_vertexBufferSize < int(m_queued.size()))
+ {
+ m_vertexBuffer = nullptr;
+
+ D3D11_BUFFER_DESC bufferDesc;
+ bufferDesc.Usage = D3D11_USAGE_DYNAMIC;
+ bufferDesc.ByteWidth = UINT(sizeof(Vertex)*m_queued.size());
+ bufferDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
+ bufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+ bufferDesc.MiscFlags = 0;
+
+ m_device->CreateBuffer(&bufferDesc, 0, &m_vertexBuffer);
+
+ m_vertexBufferSize = int(m_queued.size());
+ }
+
+ // update vertex buffer
+ D3D11_MAPPED_SUBRESOURCE res;
+ m_context->Map(m_vertexBuffer.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
+ memcpy(res.pData, &m_queued[0], sizeof(Vertex)*m_queued.size());
+ m_context->Unmap(m_vertexBuffer.Get(), 0);
+
+ // update constant buffer
+ {
+ D3D11_MAPPED_SUBRESOURCE mappedResource = {};
+ if (SUCCEEDED(m_context->Map(m_constantBuffer.Get(), 0u, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource)))
+ {
+ memcpy(mappedResource.pData, &viewProj, sizeof(viewProj));
+ m_context->Unmap(m_constantBuffer.Get(), 0u);
+ }
+ }
+
+ // configure for line renderering
+ m_context->VSSetShader(m_vertexShader.Get(), nullptr, 0u);
+ m_context->GSSetShader(nullptr, nullptr, 0u);
+ m_context->PSSetShader(m_pixelShader.Get(), nullptr, 0u);
+
+ m_context->IASetInputLayout(m_inputLayout.Get());
+ m_context->OMSetBlendState(m_blendState.Get(), nullptr, 0xFFFFFFFF);
+
+ m_context->VSSetConstantBuffers(0, 1, m_constantBuffer.GetAddressOf());
+
+ m_context->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_LINELIST);
+
+ m_context->RSSetState(m_rasterizerState.Get());
+
+ UINT vertexStride = sizeof(Vertex);
+ UINT offset = 0u;
+ m_context->IASetVertexBuffers(0, 1, m_vertexBuffer.GetAddressOf(), &vertexStride, &offset);
+
+ // kick
+ m_context->Draw(UINT(m_queued.size()), 0);
+
+ // empty queue
+ m_queued.resize(0);
+
+}
diff --git a/demo/d3d11/debugLineRenderD3D11.h b/demo/d3d11/debugLineRenderD3D11.h
new file mode 100644
index 0000000..1509065
--- /dev/null
+++ b/demo/d3d11/debugLineRenderD3D11.h
@@ -0,0 +1,42 @@
+#pragma once
+
+#include <vector>
+#include "core/maths.h"
+
+#include <wrl.h>
+using namespace Microsoft::WRL;
+
+struct DebugLineRenderD3D11
+{
+ struct Vertex
+ {
+ Vec3 position;
+ Vec4 color;
+ };
+
+ void init(ID3D11Device* d, ID3D11DeviceContext* c);
+ void addLine(const Vec3& p, const Vec3& q, const Vec4& color);
+ void flush(const Matrix44& viewProj);
+
+ DebugLineRenderD3D11():
+ m_vertexBufferSize(0),
+ m_device(nullptr),
+ m_context(nullptr)
+ {}
+
+ std::vector<Vertex> m_queued;
+
+ ComPtr<ID3D11Buffer> m_vertexBuffer;
+ int m_vertexBufferSize;
+
+ ComPtr<ID3D11DepthStencilState> m_depthStencilState;
+ ComPtr<ID3D11RasterizerState> m_rasterizerState;
+ ComPtr<ID3D11InputLayout> m_inputLayout;
+ ComPtr<ID3D11BlendState> m_blendState;
+ ComPtr<ID3D11VertexShader> m_vertexShader;
+ ComPtr<ID3D11PixelShader> m_pixelShader;
+ ComPtr<ID3D11Buffer> m_constantBuffer;
+
+ ID3D11Device* m_device;
+ ID3D11DeviceContext* m_context;
+}; \ No newline at end of file
diff --git a/demo/d3d11/demoContextD3D11.cpp b/demo/d3d11/demoContextD3D11.cpp
new file mode 100644
index 0000000..0eaf0f4
--- /dev/null
+++ b/demo/d3d11/demoContextD3D11.cpp
@@ -0,0 +1,1147 @@
+#include "core/maths.h"
+#include "core/extrude.h"
+
+#include "shaders.h"
+
+#include "meshRenderD3D11.h"
+#include "pointRenderD3D11.h"
+#include "fluidRenderD3D11.h"
+#include "diffuseRenderD3D11.h"
+#include "debugLineRenderD3D11.h"
+
+#include "shadowMapD3D11.h"
+#include "renderTargetD3D11.h"
+
+#include "imguiGraphD3D11.h"
+
+#include "appD3D11Ctx.h"
+
+#include "../d3d/demoContext.h"
+#include "../d3d/loader.h"
+
+#include <d3d11.h>
+#include <d3dcompiler.h>
+
+#include <cstdlib>
+
+// this
+#include "demoContextD3D11.h"
+
+namespace
+{
+// COM object release utilities
+template <class T>
+void inline COMRelease(T& t)
+{
+ if (t) t->Release();
+ t = nullptr;
+}
+
+template <class T>
+void inline COMRelease(T& t, UINT arraySize)
+{
+ for (UINT i = 0; i < arraySize; i++)
+ {
+ if (t[i]) t[i]->Release();
+ t[i] = nullptr;
+ }
+}
+}
+
+extern Colour g_colors[];
+static const int kShadowResolution = 2048;
+
+DemoContext* CreateDemoContextD3D11()
+{
+ return new DemoContextD3D11;
+}
+
+DemoContextD3D11::DemoContextD3D11()
+{
+ m_appGraphCtx = nullptr;
+ m_appGraphCtxD3D11 = nullptr;
+ memset(&m_meshDrawParams, 0, sizeof(m_meshDrawParams));
+
+ m_spotMin = 0.5f;
+ m_spotMax = 1.0f;
+ m_shadowBias = 0.075f;
+
+ m_shadowMap = nullptr;
+ m_immediateMesh = nullptr;
+
+ m_window = nullptr;
+
+ m_msaaSamples = 1;
+
+ m_renderTimerDisjoint = nullptr;
+ m_renderTimerBegin = nullptr;
+ m_renderTimerEnd = nullptr;
+ m_renderCompletionFence = nullptr;
+
+ m_compositeBlendState = nullptr;
+
+ m_fluidResolvedTarget = nullptr;
+ m_fluidResolvedTargetSRV = nullptr;
+
+ m_debugLineRender = new DebugLineRenderD3D11;
+ m_meshRenderer = new MeshRendererD3D11;
+ m_pointRenderer = new PointRendererD3D11;
+ m_diffuseRenderer = new DiffuseRendererD3D11;
+}
+
+// convert an OpenGL style projection matrix to D3D (clip z range [0, 1])
+Matrix44 ConvertToD3DProjection(const Matrix44& proj)
+{
+ Matrix44 scale = Matrix44::kIdentity;
+ scale.columns[2][2] = 0.5f;
+
+ Matrix44 bias = Matrix44::kIdentity;
+ bias.columns[3][2] = 1.0f;
+
+ return scale*bias*proj;
+}
+
+#define checkDxErrors(err) __checkDxErrors (err, __FILE__, __LINE__)
+
+inline void __checkDxErrors(HRESULT err, const char *file, const int line)
+{
+ if (FAILED(err))
+ {
+ char* lpMsgBuf;
+
+ FormatMessage(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL,
+ err,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPTSTR)&lpMsgBuf,
+ 0, NULL);
+
+ fprintf(stdout, "DX Error = %04d \"%s\" from file <%s>, line %i.\n",
+ err, lpMsgBuf, file, line);
+
+ exit(EXIT_FAILURE);
+ }
+}
+
+DemoContextD3D11::~DemoContextD3D11()
+{
+ imguiGraphDestroy();
+
+ COMRelease(m_renderTimerBegin);
+ COMRelease(m_renderTimerEnd);
+ COMRelease(m_renderTimerDisjoint);
+ COMRelease(m_renderCompletionFence);
+
+ COMRelease(m_compositeBlendState);
+
+ COMRelease(m_fluidResolvedTarget);
+ COMRelease(m_fluidResolvedTargetSRV);
+
+ delete m_immediateMesh;
+ delete m_debugLineRender;
+ delete m_meshRenderer;
+ delete m_pointRenderer;
+ delete m_diffuseRenderer;
+
+ // do this first, since it flushes all GPU work
+ AppGraphCtxReleaseRenderTarget(m_appGraphCtx);
+ AppGraphCtxRelease(m_appGraphCtx);
+}
+
+bool DemoContextD3D11::initialize(const RenderInitOptions& options)
+{
+ {
+ // Load external modules
+ loadModules(APP_CONTEXT_D3D11);
+ }
+
+ // must always have at least one sample
+ m_msaaSamples = Max(1, options.numMsaaSamples);
+ // create app graph context
+ m_appGraphCtx = AppGraphCtxCreate(0);
+ m_appGraphCtxD3D11 = cast_to_AppGraphCtxD3D11(m_appGraphCtx);
+
+ AppGraphCtxUpdateSize(m_appGraphCtx, options.window, options.fullscreen, m_msaaSamples);
+ _onWindowSizeChanged(m_appGraphCtxD3D11->m_winW, m_appGraphCtxD3D11->m_winH, false);
+
+ //AppGraphCtxInitRenderTarget(m_appGraphCtx, options.window, options.fullscreen, m_msaaSamples);
+ //gScene = getScene(0);
+
+ AppGraphColor clearVal = { 0.0f, 0.0f, 0.0f, 1.0f };
+ AppGraphCtxFrameStart(m_appGraphCtx, clearVal);
+
+ ID3D11Device* device = m_appGraphCtxD3D11->m_device;
+ ID3D11DeviceContext* deviceContext = m_appGraphCtxD3D11->m_deviceContext;
+
+ {
+ // create imgui, connect to app graph context
+ ImguiGraphDescD3D11 desc;
+ desc.device = device;
+ desc.deviceContext = deviceContext;
+ desc.winW = m_appGraphCtxD3D11->m_winW;
+ desc.winH = m_appGraphCtxD3D11->m_winH;
+
+ // Use Dx11 context
+ const int defaultFontHeight = (options.defaultFontHeight <= 0) ? 15 : options.defaultFontHeight;
+
+ if (!imguiGraphInit("../../data/DroidSans.ttf", float(defaultFontHeight), (ImguiGraphDesc*)&desc))
+ {
+ return false;
+ }
+ }
+
+ AppGraphCtxFramePresent(m_appGraphCtx, true);
+
+ m_pointRenderer->init(device, deviceContext);
+ m_meshRenderer->init(device, deviceContext, options.asyncComputeBenchmark);
+ m_debugLineRender->init(device, deviceContext);
+ m_diffuseRenderer->init(device, deviceContext);
+
+ {
+ // create blend state - used for composite phase of water rendering
+ D3D11_BLEND_DESC blendStateDesc = {};
+ blendStateDesc.RenderTarget[0].BlendEnable = TRUE;
+ blendStateDesc.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_ALPHA;
+ blendStateDesc.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_ALPHA;
+ blendStateDesc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD;
+ blendStateDesc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_ONE;
+ blendStateDesc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_ZERO;
+ blendStateDesc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
+ blendStateDesc.RenderTarget[0].RenderTargetWriteMask = 0x0f;
+
+ if (FAILED(device->CreateBlendState(&blendStateDesc, &m_compositeBlendState)))
+ {
+ return false;
+ }
+ }
+
+ // create a mesh for immediate mode rendering
+ m_immediateMesh = new GpuMeshD3D11(device, deviceContext);
+
+ m_window = options.window;
+
+ D3D11_QUERY_DESC tdesc;
+ ZeroMemory(&tdesc, sizeof(tdesc));
+ tdesc.Query = D3D11_QUERY_TIMESTAMP;
+ device->CreateQuery(&tdesc, &m_renderTimerBegin);
+ device->CreateQuery(&tdesc, &m_renderTimerEnd);
+
+ tdesc.Query = D3D11_QUERY_EVENT;
+ device->CreateQuery(&tdesc, &m_renderCompletionFence);
+
+ ZeroMemory(&tdesc, sizeof(tdesc));
+ tdesc.Query = D3D11_QUERY_TIMESTAMP_DISJOINT;
+ device->CreateQuery(&tdesc, &m_renderTimerDisjoint);
+
+ return true;
+}
+
+void DemoContextD3D11::getRenderDevice(void** deviceOut, void** contextOut)
+{
+ *deviceOut = m_appGraphCtxD3D11->m_device;
+ *contextOut = m_appGraphCtxD3D11->m_deviceContext;
+}
+
+void DemoContextD3D11::onSizeChanged(int width, int height, bool minimized)
+{
+ AppGraphCtxUpdateSize(m_appGraphCtx, m_window, false, m_msaaSamples);
+ _onWindowSizeChanged(m_appGraphCtxD3D11->m_winW, m_appGraphCtxD3D11->m_winH, false);
+}
+
+void DemoContextD3D11::_onWindowSizeChanged(int width, int height, bool minimized)
+{
+ if (m_fluidResolvedTarget)
+ {
+ D3D11_TEXTURE2D_DESC desc;
+ m_fluidResolvedTarget->GetDesc(&desc);
+ if (desc.Width == width && desc.Height == height)
+ {
+ return;
+ }
+
+ COMRelease(m_fluidResolvedTarget);
+ COMRelease(m_fluidResolvedTargetSRV);
+ }
+
+ // Recreate...
+
+ ID3D11Device* device = m_appGraphCtxD3D11->m_device;
+
+ // resolved texture target (for refraction / scene sampling)
+ {
+ D3D11_TEXTURE2D_DESC texDesc = {};
+ texDesc.Width = width;
+ texDesc.Height = height;
+ texDesc.MipLevels = 1;
+ texDesc.ArraySize = 1;
+ texDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
+ texDesc.SampleDesc.Count = 1;
+ texDesc.SampleDesc.Quality = 0u;
+ texDesc.Usage = D3D11_USAGE_DEFAULT;
+ texDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
+ texDesc.CPUAccessFlags = 0;
+ texDesc.MiscFlags = 0;
+
+ if (FAILED(device->CreateTexture2D(&texDesc, nullptr, &m_fluidResolvedTarget)))
+ {
+ return;
+ }
+
+ D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc = {};
+ srvDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
+ srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
+ srvDesc.Texture2D.MipLevels = 1;
+ srvDesc.Texture2D.MostDetailedMip = 0;
+
+ if (FAILED(device->CreateShaderResourceView(m_fluidResolvedTarget, &srvDesc, &m_fluidResolvedTargetSRV)))
+ {
+ return;
+ }
+ }
+}
+
+void DemoContextD3D11::startFrame(Vec4 clear)
+{
+ AppGraphColor clearColor = { clear.x, clear.y, clear.z, clear.w };
+ AppGraphCtxFrameStart(m_appGraphCtx, clearColor);
+
+ MeshDrawParamsD3D& meshDrawParams = m_meshDrawParams;
+
+ memset(&meshDrawParams, 0, sizeof(MeshDrawParamsD3D));
+ meshDrawParams.renderStage = MESH_DRAW_LIGHT;
+ meshDrawParams.renderMode = MESH_RENDER_SOLID;
+ meshDrawParams.cullMode = MESH_CULL_BACK;
+ meshDrawParams.projection = (XMMATRIX)Matrix44::kIdentity;
+ meshDrawParams.view = (XMMATRIX)Matrix44::kIdentity;
+ meshDrawParams.model = DirectX::XMMatrixMultiply(
+ DirectX::XMMatrixScaling(1.0f, 1.0f, 1.0f),
+ DirectX::XMMatrixTranslation(0.0f, 0.0f, 0.0f)
+ );
+}
+
+void DemoContextD3D11::_flushFrame()
+{
+ m_appGraphCtxD3D11->m_deviceContext->Flush();
+}
+
+void DemoContextD3D11::endFrame()
+{
+ _flushFrame();
+
+ ImguiGraphDescD3D11 desc;
+
+ desc.device = m_appGraphCtxD3D11->m_device;
+ desc.deviceContext = m_appGraphCtxD3D11->m_deviceContext;
+ desc.winW = m_appGraphCtxD3D11->m_winW;
+ desc.winH = m_appGraphCtxD3D11->m_winH;
+
+ imguiGraphUpdate((ImguiGraphDesc*)&desc);
+ //m_imguiGraphContext->update(&desc);
+}
+
+void DemoContextD3D11::presentFrame(bool fullsync)
+{
+ AppGraphCtxFramePresent(m_appGraphCtx, fullsync);
+}
+
+void DemoContextD3D11::getViewRay(int x, int y, Vec3& origin, Vec3& dir)
+{
+ using namespace DirectX;
+
+ XMVECTOR nearVector = XMVector3Unproject(XMVectorSet(float(x), float(m_appGraphCtxD3D11->m_winH-y), 0.0f, 0.0f), 0.0f, 0.0f, (float)m_appGraphCtxD3D11->m_winW, (float)m_appGraphCtxD3D11->m_winH, 0.0f, 1.0f, (XMMATRIX)m_proj, XMMatrixIdentity(), (XMMATRIX)m_view);
+ XMVECTOR farVector = XMVector3Unproject(XMVectorSet(float(x), float(m_appGraphCtxD3D11->m_winH-y), 1.0f, 0.0f), 0.0f, 0.0f, (float)m_appGraphCtxD3D11->m_winW, (float)m_appGraphCtxD3D11->m_winH, 0.0f, 1.0f, (XMMATRIX)m_proj, XMMatrixIdentity(), (XMMATRIX)m_view);
+
+ origin = Vec3(XMVectorGetX(nearVector), XMVectorGetY(nearVector), XMVectorGetZ(nearVector));
+ XMVECTOR tmp = farVector - nearVector;
+ dir = Normalize(Vec3(XMVectorGetX(tmp), XMVectorGetY(tmp), XMVectorGetZ(tmp)));
+}
+
+void DemoContextD3D11::setFillMode(bool wire)
+{
+ m_meshDrawParams.renderMode = wire ? MESH_RENDER_WIREFRAME : MESH_RENDER_SOLID;
+}
+
+void DemoContextD3D11::setCullMode(bool enabled)
+{
+ m_meshDrawParams.cullMode = enabled ? MESH_CULL_BACK : MESH_CULL_NONE;
+}
+
+void DemoContextD3D11::setView(Matrix44 view, Matrix44 projection)
+{
+ Matrix44 vp = projection*view;
+
+ m_meshDrawParams.model = (XMMATRIX)Matrix44::kIdentity;
+ m_meshDrawParams.view = (XMMATRIX)view;
+ m_meshDrawParams.projection = (XMMATRIX)(ConvertToD3DProjection(projection));
+
+ m_view = view;
+ m_proj = ConvertToD3DProjection(projection);
+}
+
+FluidRenderer* DemoContextD3D11::createFluidRenderer(uint32_t width, uint32_t height)
+{
+ FluidRendererD3D11* renderer = new(_aligned_malloc(sizeof(FluidRendererD3D11), 16)) FluidRendererD3D11;
+ renderer->init(m_appGraphCtxD3D11->m_device, m_appGraphCtxD3D11->m_deviceContext, width, height);
+ return (FluidRenderer*)renderer;
+}
+
+void DemoContextD3D11::destroyFluidRenderer(FluidRenderer* rendererIn)
+{
+ FluidRendererD3D11* renderer = (FluidRendererD3D11*)rendererIn;
+ renderer->~FluidRendererD3D11();
+ _aligned_free(renderer);
+}
+
+FluidRenderBuffers* DemoContextD3D11::createFluidRenderBuffers(int numParticles, bool enableInterop)
+{
+ FluidRenderBuffersD3D11* buffers = new FluidRenderBuffersD3D11;
+ buffers->m_numParticles = numParticles;
+
+ ID3D11Device* device = m_appGraphCtxD3D11->m_device;
+
+ {
+ D3D11_BUFFER_DESC bufDesc;
+ bufDesc.ByteWidth = numParticles*sizeof(Vec4);
+ bufDesc.Usage = D3D11_USAGE_DYNAMIC;
+ bufDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
+ bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+ bufDesc.MiscFlags = 0;
+ bufDesc.StructureByteStride = 0;
+
+ device->CreateBuffer(&bufDesc, NULL, &buffers->m_positions);
+
+ device->CreateBuffer(&bufDesc, NULL, &buffers->m_anisotropiesArr[0]);
+ device->CreateBuffer(&bufDesc, NULL, &buffers->m_anisotropiesArr[1]);
+ device->CreateBuffer(&bufDesc, NULL, &buffers->m_anisotropiesArr[2]);
+
+ bufDesc.ByteWidth = numParticles*sizeof(float);
+ device->CreateBuffer(&bufDesc, NULL, &buffers->m_densities);
+ }
+
+ {
+ D3D11_BUFFER_DESC bufDesc;
+ bufDesc.ByteWidth = numParticles * sizeof(int);
+ bufDesc.Usage = D3D11_USAGE_DYNAMIC;
+ bufDesc.BindFlags = D3D11_BIND_INDEX_BUFFER;
+ bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+ bufDesc.MiscFlags = 0;
+ bufDesc.StructureByteStride = 0;
+
+ device->CreateBuffer(&bufDesc, NULL, &buffers->m_indices);
+ }
+
+ if (enableInterop)
+ {
+ extern NvFlexLibrary* g_flexLib;
+
+ buffers->m_positionsBuf = NvFlexRegisterD3DBuffer(g_flexLib, buffers->m_positions.Get(), numParticles, sizeof(Vec4));
+ buffers->m_densitiesBuf = NvFlexRegisterD3DBuffer(g_flexLib, buffers->m_densities.Get(), numParticles, sizeof(float));
+ buffers->m_indicesBuf = NvFlexRegisterD3DBuffer(g_flexLib, buffers->m_indices.Get(), numParticles, sizeof(int));
+
+ buffers->m_anisotropiesBufArr[0] = NvFlexRegisterD3DBuffer(g_flexLib, buffers->m_anisotropiesArr[0].Get(), numParticles, sizeof(Vec4));
+ buffers->m_anisotropiesBufArr[1] = NvFlexRegisterD3DBuffer(g_flexLib, buffers->m_anisotropiesArr[1].Get(), numParticles, sizeof(Vec4));
+ buffers->m_anisotropiesBufArr[2] = NvFlexRegisterD3DBuffer(g_flexLib, buffers->m_anisotropiesArr[2].Get(), numParticles, sizeof(Vec4));
+ }
+
+ return reinterpret_cast<FluidRenderBuffers*>(buffers);
+}
+
+void DemoContextD3D11::updateFluidRenderBuffers(FluidRenderBuffers* buffersIn, NvFlexSolver* solver, bool anisotropy, bool density)
+{
+ FluidRenderBuffersD3D11& buffers = *reinterpret_cast<FluidRenderBuffersD3D11*>(buffersIn);
+ if (!anisotropy)
+ {
+ // regular particles
+ NvFlexGetParticles(solver, buffers.m_positionsBuf, NULL);
+ }
+ else
+ {
+ // fluid buffers
+ NvFlexGetSmoothParticles(solver, buffers.m_positionsBuf, NULL);
+ NvFlexGetAnisotropy(solver, buffers.m_anisotropiesBufArr[0], buffers.m_anisotropiesBufArr[1], buffers.m_anisotropiesBufArr[2], NULL);
+ }
+
+ if (density)
+ {
+ NvFlexGetDensities(solver, buffers.m_densitiesBuf, NULL);
+ }
+ else
+ {
+ NvFlexGetPhases(solver, buffers.m_densitiesBuf, NULL);
+ }
+
+ NvFlexGetActive(solver, buffers.m_indicesBuf, NULL);
+}
+
+void DemoContextD3D11::updateFluidRenderBuffers(FluidRenderBuffers* buffersIn, Vec4* particles, float* densities, Vec4* anisotropy1, Vec4* anisotropy2, Vec4* anisotropy3, int numParticles, int* indices, int numIndices)
+{
+ FluidRenderBuffersD3D11& buffers = *reinterpret_cast<FluidRenderBuffersD3D11*>(buffersIn);
+ D3D11_MAPPED_SUBRESOURCE res;
+ ID3D11DeviceContext* deviceContext = m_appGraphCtxD3D11->m_deviceContext;
+
+ // vertices
+ if (particles)
+ {
+ deviceContext->Map(buffers.m_positions.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
+ memcpy(res.pData, particles, sizeof(Vec4)*numParticles);
+ deviceContext->Unmap(buffers.m_positions.Get(), 0);
+ }
+
+ Vec4*const anisotropies[3] =
+ {
+ anisotropy1,
+ anisotropy2,
+ anisotropy3,
+ };
+
+ for (int i = 0; i < 3; i++)
+ {
+ const Vec4* anisotropy = anisotropies[i];
+ if (anisotropy)
+ {
+ deviceContext->Map(buffers.m_anisotropiesArr[i].Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
+ memcpy(res.pData, anisotropy, sizeof(Vec4) * numParticles);
+ deviceContext->Unmap(buffers.m_anisotropiesArr[i].Get(), 0);
+ }
+ }
+
+ if (densities)
+ {
+ deviceContext->Map(buffers.m_densities.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
+ memcpy(res.pData, densities, sizeof(float)*numParticles);
+ deviceContext->Unmap(buffers.m_densities.Get(), 0);
+ }
+
+ // indices
+ if (indices)
+ {
+ deviceContext->Map(buffers.m_indices.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
+ memcpy(res.pData, indices, sizeof(int)*numIndices);
+ deviceContext->Unmap(buffers.m_indices.Get(), 0);
+ }
+}
+
+void DemoContextD3D11::destroyFluidRenderBuffers(FluidRenderBuffers* buffers)
+{
+ delete reinterpret_cast<FluidRenderBuffersD3D11*>(buffers);
+}
+
+ShadowMap* DemoContextD3D11::shadowCreate()
+{
+ ShadowMapD3D11* shadowMap = new(_aligned_malloc(sizeof(ShadowMapD3D11), 16)) ShadowMapD3D11;
+ shadowMap->init(m_appGraphCtxD3D11->m_device, kShadowResolution);
+ return (ShadowMap*)shadowMap;
+}
+
+void DemoContextD3D11::shadowDestroy(ShadowMap* map)
+{
+ ShadowMapD3D11* shadowMap = (ShadowMapD3D11*)map;
+ shadowMap->~ShadowMapD3D11();
+ _aligned_free(shadowMap);
+}
+
+void DemoContextD3D11::shadowBegin(ShadowMap* map)
+{
+ ShadowMapD3D11* shadowMap = (ShadowMapD3D11*)map;
+ shadowMap->bindAndClear(m_appGraphCtxD3D11->m_deviceContext);
+
+ m_meshDrawParams.renderStage = MESH_DRAW_SHADOW;
+ m_shadowMap = shadowMap;
+}
+
+void DemoContextD3D11::shadowEnd()
+{
+ ID3D11DeviceContext* deviceContext = m_appGraphCtxD3D11->m_deviceContext;
+
+ // reset to main frame buffer
+ deviceContext->RSSetViewports(1, &m_appGraphCtxD3D11->m_viewport);
+ deviceContext->OMSetRenderTargets(1, &m_appGraphCtxD3D11->m_rtv, m_appGraphCtxD3D11->m_dsv);
+ deviceContext->OMSetDepthStencilState(m_appGraphCtxD3D11->m_depthState, 0u);
+ deviceContext->ClearDepthStencilView(m_appGraphCtxD3D11->m_dsv, D3D11_CLEAR_DEPTH, 1.0, 0);
+
+ m_meshDrawParams.renderStage = MESH_DRAW_NULL;
+}
+
+void DemoContextD3D11::bindSolidShader(Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowMap, float bias, Vec4 fogColor)
+{
+ m_meshDrawParams.renderStage = MESH_DRAW_LIGHT;
+
+ m_meshDrawParams.grid = 0;
+ m_meshDrawParams.spotMin = m_spotMin;
+ m_meshDrawParams.spotMax = m_spotMax;
+ m_meshDrawParams.fogColor = (float4&)fogColor;
+
+ m_meshDrawParams.objectTransform = (float4x4&)Matrix44::kIdentity;
+
+ ShadowParamsD3D shadow;
+ RenderParamsUtilD3D::calcShadowParams(lightPos, lightTarget, lightTransform, m_shadowBias, &shadow);
+
+ m_meshDrawParams.lightTransform = shadow.lightTransform;
+ m_meshDrawParams.lightDir = shadow.lightDir;
+ m_meshDrawParams.lightPos = shadow.lightPos;
+ m_meshDrawParams.bias = shadow.bias;
+ memcpy(m_meshDrawParams.shadowTaps, shadow.shadowTaps, sizeof(shadow.shadowTaps));
+
+ m_shadowMap = (ShadowMapD3D11*)shadowMap;
+}
+
+void DemoContextD3D11::unbindSolidShader()
+{
+ m_meshDrawParams.renderStage = MESH_DRAW_NULL;
+}
+
+void DemoContextD3D11::graphicsTimerBegin()
+{
+ ID3D11DeviceContext* deviceContext = m_appGraphCtxD3D11->m_deviceContext;
+ deviceContext->Begin(m_renderTimerDisjoint);
+ deviceContext->End(m_renderTimerBegin); // yes End.
+}
+
+void DemoContextD3D11::graphicsTimerEnd()
+{
+ ID3D11DeviceContext* deviceContext = m_appGraphCtxD3D11->m_deviceContext;
+ deviceContext->End(m_renderTimerEnd);
+ deviceContext->End(m_renderTimerDisjoint);
+ m_timersSet = true;
+}
+
+float DemoContextD3D11::rendererGetDeviceTimestamps(unsigned long long* begin, unsigned long long* end, unsigned long long* freq)
+{
+ float renderTime = 0.0f;
+
+ if (m_timersSet)
+ {
+ ID3D11DeviceContext* deviceContext = m_appGraphCtxD3D11->m_deviceContext;
+
+ D3D11_QUERY_DATA_TIMESTAMP_DISJOINT tsDisjoint;
+ uint64_t renderBegin = 0;
+ uint64_t renderEnd = 0;
+
+ while (S_OK != deviceContext->GetData(m_renderTimerDisjoint, &tsDisjoint, sizeof(tsDisjoint), 0));
+ while (S_OK != deviceContext->GetData(m_renderTimerBegin, &renderBegin, sizeof(UINT64), 0));
+ while (S_OK != deviceContext->GetData(m_renderTimerEnd, &renderEnd, sizeof(UINT64), 0));
+
+ float renderTime = float(renderEnd - renderBegin) / float(tsDisjoint.Frequency);
+
+ if (begin) *begin = renderBegin;
+ if (end) *end = renderEnd;
+ if (freq) *freq = tsDisjoint.Frequency;
+ }
+
+ return renderTime;
+}
+
+void DemoContextD3D11::drawMesh(const Mesh* m, Vec3 color)
+{
+ if (m)
+ {
+ if (m->m_colours.size())
+ {
+ m_meshDrawParams.colorArray = 1;
+ m_immediateMesh->updateData((Vec3*)&m->m_positions[0], &m->m_normals[0], NULL, (Vec4*)&m->m_colours[0], (int*)&m->m_indices[0], m->GetNumVertices(), int(m->GetNumFaces()));
+ }
+ else
+ {
+ m_meshDrawParams.colorArray = 0;
+ m_immediateMesh->updateData((Vec3*)&m->m_positions[0], &m->m_normals[0], NULL, NULL, (int*)&m->m_indices[0], m->GetNumVertices(), int(m->GetNumFaces()));
+ }
+
+ m_meshDrawParams.color = (float4&)color;
+ m_meshDrawParams.secondaryColor = (float4&)color;
+ m_meshDrawParams.objectTransform = (float4x4&)Matrix44::kIdentity;
+ m_meshDrawParams.shadowMap = (ShadowMapD3D*)m_shadowMap;
+
+ m_meshRenderer->draw(m_immediateMesh, &m_meshDrawParams);
+
+ if (m->m_colours.size())
+ m_meshDrawParams.colorArray = 0;
+
+ }
+}
+
+void DemoContextD3D11::drawCloth(const Vec4* positions, const Vec4* normals, const float* uvs, const int* indices, int numTris, int numPositions, int colorIndex, float expand, bool twosided, bool smooth)
+{
+ if (!numTris)
+ return;
+
+ m_immediateMesh->updateData(positions, normals, NULL, NULL, indices, numPositions, numTris);
+
+ if (twosided)
+ SetCullMode(false);
+
+ m_meshDrawParams.bias = 0.0f;
+ m_meshDrawParams.expand = expand;
+
+ m_meshDrawParams.color = (const float4&)(g_colors[colorIndex + 1] * 1.5f);
+ m_meshDrawParams.secondaryColor = (const float4&)(g_colors[colorIndex] * 1.5f);
+ m_meshDrawParams.objectTransform = (float4x4&)Matrix44::kIdentity;
+ m_meshDrawParams.shadowMap = (ShadowMapD3D*)m_shadowMap;
+
+ m_meshRenderer->draw(m_immediateMesh, &m_meshDrawParams);
+
+ if (twosided)
+ setCullMode(true);
+
+ m_meshDrawParams.bias = m_shadowBias;
+ m_meshDrawParams.expand = 0.0f;
+}
+
+void DemoContextD3D11::drawRope(Vec4* positions, int* indices, int numIndices, float radius, int color)
+{
+ if (numIndices < 2)
+ return;
+
+ std::vector<Vec3> vertices;
+ std::vector<Vec3> normals;
+ std::vector<int> triangles;
+
+ // flatten curve
+ std::vector<Vec3> curve(numIndices);
+ for (int i = 0; i < numIndices; ++i)
+ curve[i] = Vec3(positions[indices[i]]);
+
+ const int resolution = 8;
+ const int smoothing = 3;
+
+ vertices.reserve(resolution*numIndices*smoothing);
+ normals.reserve(resolution*numIndices*smoothing);
+ triangles.reserve(numIndices*resolution * 6 * smoothing);
+
+ Extrude(&curve[0], int(curve.size()), vertices, normals, triangles, radius, resolution, smoothing);
+
+ m_immediateMesh->updateData(&vertices[0], &normals[0], NULL, NULL, &triangles[0], int(vertices.size()), int(triangles.size())/3);
+
+ setCullMode(false);
+
+ m_meshDrawParams.color = (const float4&)(g_colors[color % 8] * 1.5f);
+ m_meshDrawParams.secondaryColor = (const float4&)(g_colors[color % 8] * 1.5f);
+ m_meshDrawParams.objectTransform = (const float4x4&)Matrix44::kIdentity;
+ m_meshDrawParams.shadowMap = (ShadowMapD3D*)m_shadowMap;
+
+ m_meshRenderer->draw(m_immediateMesh, &m_meshDrawParams);
+
+ setCullMode(true);
+}
+
+void DemoContextD3D11::drawPlane(const Vec4& p, bool color)
+{
+ std::vector<Vec3> vertices;
+ std::vector<Vec3> normals;
+ std::vector<int> indices;
+
+ Vec3 u, v;
+ BasisFromVector(Vec3(p.x, p.y, p.z), &u, &v);
+
+ Vec3 c = Vec3(p.x, p.y, p.z)*-p.w;
+
+ m_meshDrawParams.shadowMap = (ShadowMapD3D*)m_shadowMap;
+
+ if (color)
+ m_meshDrawParams.color = (const float4&)(p * 0.5f + Vec4(0.5f, 0.5f, 0.5f, 0.5f));
+
+ const float kSize = 200.0f;
+ const int kGrid = 3;
+
+ // draw a grid of quads, otherwise z precision suffers
+ for (int x = -kGrid; x <= kGrid; ++x)
+ {
+ for (int y = -kGrid; y <= kGrid; ++y)
+ {
+ Vec3 coff = c + u*float(x)*kSize*2.0f + v*float(y)*kSize*2.0f;
+
+ int indexStart = int(vertices.size());
+
+ vertices.push_back(Vec3(coff + u*kSize + v*kSize));
+ vertices.push_back(Vec3(coff - u*kSize + v*kSize));
+ vertices.push_back(Vec3(coff - u*kSize - v*kSize));
+ vertices.push_back(Vec3(coff + u*kSize - v*kSize));
+
+ normals.push_back(Vec3(p.x, p.y, p.z));
+ normals.push_back(Vec3(p.x, p.y, p.z));
+ normals.push_back(Vec3(p.x, p.y, p.z));
+ normals.push_back(Vec3(p.x, p.y, p.z));
+
+
+ indices.push_back(indexStart+0);
+ indices.push_back(indexStart+1);
+ indices.push_back(indexStart+2);
+
+ indices.push_back(indexStart+2);
+ indices.push_back(indexStart+3);
+ indices.push_back(indexStart+0);
+ }
+ }
+
+ m_immediateMesh->updateData(&vertices[0], &normals[0], NULL, NULL, &indices[0], int(vertices.size()), int(indices.size())/3);
+ m_meshRenderer->draw(m_immediateMesh, &m_meshDrawParams);
+}
+
+void DemoContextD3D11::drawPlanes(Vec4* planes, int n, float bias)
+{
+ m_meshDrawParams.color = (float4&)Vec4(0.9f, 0.9f, 0.9f, 1.0f);
+
+ m_meshDrawParams.bias = 0.0f;
+ m_meshDrawParams.grid = 1;
+ m_meshDrawParams.expand = 0;
+
+ for (int i = 0; i < n; ++i)
+ {
+ Vec4 p = planes[i];
+ p.w -= bias;
+
+ drawPlane(p, false);
+ }
+
+ m_meshDrawParams.grid = 0;
+ m_meshDrawParams.bias = m_shadowBias;
+
+}
+
+GpuMesh* DemoContextD3D11::createGpuMesh(const Mesh* m)
+{
+ GpuMeshD3D11* mesh = new GpuMeshD3D11(m_appGraphCtxD3D11->m_device, m_appGraphCtxD3D11->m_deviceContext);
+ mesh->updateData((Vec3*)&m->m_positions[0], &m->m_normals[0], NULL, NULL, (int*)&m->m_indices[0], m->GetNumVertices(), int(m->GetNumFaces()));
+ return (GpuMesh*)mesh;
+}
+
+void DemoContextD3D11::destroyGpuMesh(GpuMesh* m)
+{
+ delete reinterpret_cast<GpuMeshD3D11*>(m);
+}
+
+void DemoContextD3D11::drawGpuMesh(GpuMesh* meshIn, const Matrix44& xform, const Vec3& color)
+{
+ if (meshIn)
+ {
+ GpuMeshD3D11* mesh = (GpuMeshD3D11*)meshIn;
+
+ MeshDrawParamsD3D params = m_meshDrawParams;
+
+ params.color = (float4&)color;
+ params.secondaryColor = (float4&)color;
+ params.objectTransform = (float4x4&)xform;
+ params.shadowMap = (ShadowMapD3D*)m_shadowMap;
+
+ m_meshRenderer->draw(mesh, &params);
+ }
+}
+
+void DemoContextD3D11::drawGpuMeshInstances(GpuMesh* meshIn, const Matrix44* xforms, int n, const Vec3& color)
+{
+ if (meshIn)
+ {
+ GpuMeshD3D11* mesh = (GpuMeshD3D11*)meshIn;
+
+ m_meshDrawParams.color = (float4&)color;
+ m_meshDrawParams.secondaryColor = (float4&)color;
+ m_meshDrawParams.shadowMap = (ShadowMapD3D*)m_shadowMap;
+
+ // copy params
+ MeshDrawParamsD3D params(m_meshDrawParams);
+
+ for (int i = 0; i < n; ++i)
+ {
+ params.objectTransform = (const float4x4&)xforms[i];
+ m_meshRenderer->draw(mesh, &params);
+ }
+ }
+}
+
+void DemoContextD3D11::drawPoints(FluidRenderBuffers* buffersIn, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowTex, bool showDensity)
+{
+ FluidRenderBuffersD3D11& buffers = *reinterpret_cast<FluidRenderBuffersD3D11*>(buffersIn);
+ if (n == 0)
+ return;
+
+ PointDrawParamsD3D params;
+
+ params.renderMode = POINT_RENDER_SOLID;
+ params.cullMode = POINT_CULL_BACK;
+ params.model = (const XMMATRIX&)Matrix44::kIdentity;
+ params.view = (const XMMATRIX&)m_view;
+ params.projection = (const XMMATRIX&)m_proj;
+
+ params.pointRadius = radius;
+ params.pointScale = screenWidth / screenAspect * (1.0f / (tanf(fov * 0.5f)));
+ params.spotMin = m_spotMin;
+ params.spotMax = m_spotMax;
+
+ int mode = 0;
+ if (showDensity)
+ mode = 1;
+ if (shadowTex == 0)
+ mode = 2;
+ params.mode = mode;
+
+ for (int i = 0; i < 8; i++)
+ params.colors[i] = *((const float4*)&g_colors[i].r);
+
+ // set shadow parameters
+ ShadowParamsD3D shadow;
+ RenderParamsUtilD3D::calcShadowParams(lightPos, lightTarget, lightTransform, m_shadowBias, &shadow);
+ params.lightTransform = shadow.lightTransform;
+ params.lightDir = shadow.lightDir;
+ params.lightPos = shadow.lightPos;
+ memcpy(params.shadowTaps, shadow.shadowTaps, sizeof(shadow.shadowTaps));
+
+ if (m_meshDrawParams.renderStage == MESH_DRAW_SHADOW)
+ {
+ params.renderStage = POINT_DRAW_SHADOW;
+ params.mode = 2;
+ }
+ else
+ {
+ params.renderStage = POINT_DRAW_LIGHT;
+ }
+
+ params.shadowMap = (ShadowMapD3D*)m_shadowMap;
+
+ m_pointRenderer->draw(&params, buffers.m_positions.Get(), buffers.m_densities.Get(), buffers.m_indices.Get(), n, offset);
+}
+
+void DemoContextD3D11::renderEllipsoids(FluidRenderer* rendererIn, FluidRenderBuffers* buffersIn, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowMap, Vec4 color, float blur, float ior, bool debug)
+{
+ FluidRenderBuffersD3D11& buffers = *reinterpret_cast<FluidRenderBuffersD3D11*>(buffersIn);
+ FluidRendererD3D11& renderer = *(FluidRendererD3D11*)rendererIn;
+ if (n == 0)
+ return;
+
+ ID3D11DeviceContext* deviceContext = m_appGraphCtxD3D11->m_deviceContext;
+
+ FluidDrawParamsD3D params;
+
+ params.renderMode = FLUID_RENDER_SOLID;
+ params.cullMode = FLUID_CULL_BACK;
+ params.model = (const XMMATRIX&)Matrix44::kIdentity;
+ params.view = (const XMMATRIX&)m_view;
+ params.projection = (XMMATRIX&)m_proj;
+
+ params.offset = offset;
+ params.n = n;
+ params.renderStage = FLUID_DRAW_LIGHT;
+
+ const float viewHeight = tanf(fov / 2.0f);
+ params.invViewport = float3(1.0f / screenWidth, screenAspect / screenWidth, 1.0f);
+ params.invProjection = float3(screenAspect * viewHeight, viewHeight, 1.0f);
+
+ params.shadowMap = (ShadowMapD3D*)m_shadowMap;
+
+ renderer.m_depthTexture.bindAndClear(m_appGraphCtxD3D11->m_deviceContext);
+
+ // draw static shapes into depth buffer
+ //DrawShapes();
+
+ renderer.drawEllipsoids(&params, &buffers);
+
+
+ //---------------------------------------------------------------
+ // build smooth depth
+
+ renderer.m_depthSmoothTexture.bindAndClear(deviceContext);
+
+ params.blurRadiusWorld = radius * 0.5f;
+ params.blurScale = screenWidth / screenAspect * (1.0f / (tanf(fov * 0.5f)));
+ params.invTexScale = float4(1.0f / screenAspect, 1.0f, 0.0f, 0.0f);
+ params.blurFalloff = blur;
+ params.debug = debug;
+
+ renderer.drawBlurDepth(&params);
+
+ //---------------------------------------------------------------
+ // composite
+
+ {
+ deviceContext->RSSetViewports(1, &m_appGraphCtxD3D11->m_viewport);
+ deviceContext->RSSetScissorRects(0, nullptr);
+
+ deviceContext->OMSetRenderTargets(1, &m_appGraphCtxD3D11->m_rtv, m_appGraphCtxD3D11->m_dsv);
+ deviceContext->OMSetDepthStencilState(m_appGraphCtxD3D11->m_depthState, 0u);
+
+ float blendFactor[4] = { 1.0, 1.0, 1.0, 1.0 };
+ deviceContext->OMSetBlendState(m_compositeBlendState, blendFactor, 0xffff);
+ }
+
+ params.invTexScale = (float4&)Vec2(1.0f / screenWidth, screenAspect / screenWidth);
+ params.clipPosToEye = (float4&)Vec2(tanf(fov*0.5f)*screenAspect, tanf(fov*0.5f));
+ params.color = (float4&)color;
+ params.ior = ior;
+ params.spotMin = m_spotMin;
+ params.spotMax = m_spotMax;
+ params.debug = debug;
+
+ params.lightPos = (const float3&)lightPos;
+ params.lightDir = (const float3&)-Normalize(lightTarget - lightPos);
+ params.lightTransform = (const XMMATRIX&)(ConvertToD3DProjection(lightTransform));
+
+ // Resolve MS back buffer/copy
+ if (m_msaaSamples > 1)
+ {
+ deviceContext->ResolveSubresource(m_fluidResolvedTarget, 0, m_appGraphCtxD3D11->m_backBuffer, 0, DXGI_FORMAT_R8G8B8A8_UNORM);
+ }
+ else
+ {
+ deviceContext->CopyResource(m_fluidResolvedTarget, m_appGraphCtxD3D11->m_backBuffer);
+ }
+
+ renderer.drawComposite(&params, m_fluidResolvedTargetSRV);
+
+ deviceContext->OMSetBlendState(nullptr, 0, 0xffff);
+}
+
+DiffuseRenderBuffers* DemoContextD3D11::createDiffuseRenderBuffers(int numParticles, bool& enableInterop)
+{
+ ID3D11Device* device = m_appGraphCtxD3D11->m_device;
+ DiffuseRenderBuffersD3D11* buffers = new DiffuseRenderBuffersD3D11;
+
+ buffers->m_numParticles = numParticles;
+ if (numParticles > 0)
+ {
+ {
+ D3D11_BUFFER_DESC bufDesc;
+ bufDesc.ByteWidth = numParticles * sizeof(Vec4);
+ bufDesc.Usage = D3D11_USAGE_DYNAMIC;
+ bufDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
+ bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+ bufDesc.MiscFlags = 0;
+ if (enableInterop)
+ {
+ bufDesc.CPUAccessFlags = 0;
+ bufDesc.Usage = D3D11_USAGE_DEFAULT;
+ bufDesc.MiscFlags = D3D11_RESOURCE_MISC_SHARED;
+ }
+
+ device->CreateBuffer(&bufDesc, NULL, buffers->m_positions.ReleaseAndGetAddressOf());
+ device->CreateBuffer(&bufDesc, NULL, buffers->m_velocities.ReleaseAndGetAddressOf());
+ }
+
+ if (enableInterop)
+ {
+ extern NvFlexLibrary* g_flexLib;
+
+ buffers->m_positionsBuf = NvFlexRegisterD3DBuffer(g_flexLib, buffers->m_positions.Get(), numParticles, sizeof(Vec4));
+ buffers->m_velocitiesBuf = NvFlexRegisterD3DBuffer(g_flexLib, buffers->m_velocities.Get(), numParticles, sizeof(Vec4));
+
+ if (buffers->m_positionsBuf == nullptr ||
+ buffers->m_velocitiesBuf == nullptr)
+ enableInterop = false;
+ }
+ }
+
+ return reinterpret_cast<DiffuseRenderBuffers*>(buffers);
+}
+
+void DemoContextD3D11::destroyDiffuseRenderBuffers(DiffuseRenderBuffers* buffers)
+{
+ delete reinterpret_cast<DiffuseRenderBuffersD3D11*>(buffers);
+}
+
+void DemoContextD3D11::updateDiffuseRenderBuffers(DiffuseRenderBuffers* buffersIn, NvFlexSolver* solver)
+{
+ DiffuseRenderBuffersD3D11* buffers = reinterpret_cast<DiffuseRenderBuffersD3D11*>(buffersIn);
+ // diffuse particles
+ if (buffers->m_numParticles)
+ {
+ NvFlexGetDiffuseParticles(solver, buffers->m_positionsBuf, buffers->m_velocitiesBuf, nullptr);
+ }
+}
+
+void DemoContextD3D11::updateDiffuseRenderBuffers(DiffuseRenderBuffers* buffersIn, Vec4* diffusePositions, Vec4* diffuseVelocities, int numDiffuseParticles)
+{
+ DiffuseRenderBuffersD3D11& buffers = *reinterpret_cast<DiffuseRenderBuffersD3D11*>(buffersIn);
+ ID3D11DeviceContext* deviceContext = m_appGraphCtxD3D11->m_deviceContext;
+
+ D3D11_MAPPED_SUBRESOURCE res;
+
+ // vertices
+ if (diffusePositions)
+ {
+ deviceContext->Map(buffers.m_positions.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
+ memcpy(res.pData, diffusePositions, sizeof(Vec4)*numDiffuseParticles);
+ deviceContext->Unmap(buffers.m_positions.Get(), 0);
+ }
+
+ if (diffuseVelocities)
+ {
+ deviceContext->Map(buffers.m_velocities.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
+ memcpy(res.pData, diffuseVelocities, sizeof(Vec4)*numDiffuseParticles);
+ deviceContext->Unmap(buffers.m_velocities.Get(), 0);
+ }
+}
+
+void DemoContextD3D11::drawDiffuse(FluidRenderer* renderIn, const DiffuseRenderBuffers* buffersIn, int n, float radius, float screenWidth, float screenAspect, float fov, Vec4 color, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowMap, float motionBlur, float inscatter, float outscatter, bool shadowEnabled, bool front)
+{
+ FluidRendererD3D11* render = (FluidRendererD3D11*)renderIn;
+ const DiffuseRenderBuffersD3D11& buffers = *reinterpret_cast<const DiffuseRenderBuffersD3D11*>(buffersIn);
+ if (n == 0)
+ return;
+
+ DiffuseDrawParamsD3D params;
+
+ params.model = (const XMMATRIX&)Matrix44::kIdentity;
+ params.view = (const XMMATRIX&)m_view;
+ params.projection = (const XMMATRIX&)m_proj;
+ params.diffuseRadius = screenWidth / screenAspect * (1.0f / (tanf(fov * 0.5f)));
+ params.diffuseScale = radius;
+ params.spotMin = m_spotMin;
+ params.spotMax = m_spotMax;
+ params.color = float4(1.0f, 1.0f, 1.0f, 1.0f);
+ params.motionScale = motionBlur;
+
+ // set shadow parameters
+ ShadowParamsD3D shadow;
+ RenderParamsUtilD3D::calcShadowParams(lightPos, lightTarget, lightTransform, m_shadowBias, &shadow);
+ params.lightTransform = shadow.lightTransform;
+ params.lightDir = shadow.lightDir;
+ params.lightPos = shadow.lightPos;
+ params.shadowMap = (ShadowMapD3D*)m_shadowMap;
+
+ memcpy(params.shadowTaps, shadow.shadowTaps, sizeof(shadow.shadowTaps));
+
+ m_diffuseRenderer->draw(&params, buffers.m_positions.Get(), buffers.m_velocities.Get(), n);
+
+ // reset depth stencil state
+ m_appGraphCtxD3D11->m_deviceContext->OMSetDepthStencilState(m_appGraphCtxD3D11->m_depthState, 0u);
+}
+
+int DemoContextD3D11::getNumDiffuseRenderParticles(DiffuseRenderBuffers* buffers)
+{
+ return reinterpret_cast<DiffuseRenderBuffersD3D11*>(buffers)->m_numParticles;
+}
+
+void DemoContextD3D11::beginLines()
+{
+}
+
+void DemoContextD3D11::drawLine(const Vec3& p, const Vec3& q, const Vec4& color)
+{
+ m_debugLineRender->addLine(p, q, color);
+}
+
+void DemoContextD3D11::endLines()
+{
+ // draw
+ Matrix44 projectionViewWorld = ((Matrix44&)(m_meshDrawParams.projection))*((Matrix44&)(m_meshDrawParams.view));
+
+ m_debugLineRender->flush(projectionViewWorld);
+}
+
+void DemoContextD3D11::startGpuWork() {}
+void DemoContextD3D11::endGpuWork() {}
+
+void DemoContextD3D11::flushGraphicsAndWait()
+{
+ ID3D11DeviceContext* deviceContext = m_appGraphCtxD3D11->m_deviceContext;
+
+ deviceContext->End(m_renderCompletionFence);
+ while (S_OK != deviceContext->GetData(m_renderCompletionFence, 0, 0, 0));
+}
+
+void* DemoContextD3D11::getGraphicsCommandQueue() { return NULL; }
+
+void DemoContextD3D11::drawImguiGraph()
+{
+ imguiGraphDraw();
+}
diff --git a/demo/d3d11/demoContextD3D11.h b/demo/d3d11/demoContextD3D11.h
new file mode 100644
index 0000000..e01dfe2
--- /dev/null
+++ b/demo/d3d11/demoContextD3D11.h
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+#pragma once
+
+
+struct DemoContextD3D11 : public DemoContext
+{
+public:
+
+ // DemoContext Impl
+ virtual bool initialize(const RenderInitOptions& options);
+ virtual void startFrame(Vec4 colorIn);
+ virtual void endFrame();
+ virtual void presentFrame(bool fullsync);
+ virtual void getViewRay(int x, int y, Vec3& origin, Vec3& dir);
+ virtual void setView(Matrix44 view, Matrix44 projection);
+ virtual void renderEllipsoids(FluidRenderer* renderer, FluidRenderBuffers* buffers, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ::ShadowMap* shadowMap, Vec4 color, float blur, float ior, bool debug);
+ virtual void drawMesh(const Mesh* m, Vec3 color);
+ virtual void drawCloth(const Vec4* positions, const Vec4* normals, const float* uvs, const int* indices, int numTris, int numPositions, int colorIndex, float expand, bool twosided, bool smooth);
+ virtual void drawRope(Vec4* positions, int* indices, int numIndices, float radius, int color);
+ virtual void drawPlane(const Vec4& p, bool color);
+ virtual void drawPlanes(Vec4* planes, int n, float bias);
+ virtual void drawPoints(FluidRenderBuffers* buffers, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ::ShadowMap* shadowTex, bool showDensity);
+ virtual void graphicsTimerBegin();
+ virtual void graphicsTimerEnd();
+ virtual float rendererGetDeviceTimestamps(unsigned long long* begin, unsigned long long* end, unsigned long long* freq);
+ virtual void bindSolidShader(Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ::ShadowMap* shadowMap, float bias, Vec4 fogColor);
+ virtual void unbindSolidShader();
+ virtual ShadowMap* shadowCreate();
+ virtual void shadowDestroy(ShadowMap* map);
+ virtual void shadowBegin(ShadowMap* map);
+ virtual void shadowEnd();
+ virtual FluidRenderer* createFluidRenderer(uint32_t width, uint32_t height);
+ virtual void destroyFluidRenderer(FluidRenderer* renderer);
+ virtual FluidRenderBuffers* createFluidRenderBuffers(int numParticles, bool enableInterop);
+ virtual void updateFluidRenderBuffers(FluidRenderBuffers* buffers, NvFlexSolver* flex, bool anisotropy, bool density);
+ virtual void updateFluidRenderBuffers(FluidRenderBuffers* buffers, Vec4* particles, float* densities, Vec4* anisotropy1, Vec4* anisotropy2, Vec4* anisotropy3, int numParticles, int* indices, int numIndices);
+ virtual void destroyFluidRenderBuffers(FluidRenderBuffers* buffers);
+ virtual GpuMesh* createGpuMesh(const Mesh* m);
+ virtual void destroyGpuMesh(GpuMesh* mesh);
+ virtual void drawGpuMesh(GpuMesh* m, const Matrix44& xform, const Vec3& color);
+ virtual void drawGpuMeshInstances(GpuMesh* m, const Matrix44* xforms, int n, const Vec3& color);
+ virtual DiffuseRenderBuffers* createDiffuseRenderBuffers(int numDiffuseParticles, bool& enableInterop);
+ virtual void destroyDiffuseRenderBuffers(DiffuseRenderBuffers* buffers);
+ virtual void updateDiffuseRenderBuffers(DiffuseRenderBuffers* buffers, Vec4* diffusePositions, Vec4* diffuseVelocities, int numDiffuseParticles);
+ virtual void updateDiffuseRenderBuffers(DiffuseRenderBuffers* buffers, NvFlexSolver* solver);
+ virtual void drawDiffuse(FluidRenderer* render, const DiffuseRenderBuffers* buffers, int n, float radius, float screenWidth, float screenAspect, float fov, Vec4 color, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ::ShadowMap* shadowMap, float motionBlur, float inscatter, float outscatter, bool shadowEnabled, bool front);
+ virtual int getNumDiffuseRenderParticles(DiffuseRenderBuffers* buffers);
+ virtual void beginLines();
+ virtual void drawLine(const Vec3& p, const Vec3& q, const Vec4& color);
+ virtual void endLines();
+ virtual void onSizeChanged(int width, int height, bool minimized);
+ virtual void startGpuWork();
+ virtual void endGpuWork();
+ virtual void flushGraphicsAndWait();
+ virtual void setFillMode(bool wire);
+ virtual void setCullMode(bool enabled);
+ virtual void drawImguiGraph();
+ virtual void* getGraphicsCommandQueue();
+ virtual void getRenderDevice(void** device, void** context);
+
+ DemoContextD3D11();
+ virtual ~DemoContextD3D11();
+
+protected:
+ void _flushFrame();
+ void _onWindowSizeChanged(int width, int height, bool minimized);
+
+ DebugLineRenderD3D11* m_debugLineRender;
+ MeshRendererD3D11* m_meshRenderer;
+ PointRendererD3D11* m_pointRenderer;
+ DiffuseRendererD3D11* m_diffuseRenderer;
+
+ // Used when blending water in the final 'composite' phase
+ ID3D11BlendState* m_compositeBlendState;
+
+ // Target texture resolved/copied to for combination rendering from for water surface
+ ID3D11Texture2D* m_fluidResolvedTarget;
+ ID3D11ShaderResourceView* m_fluidResolvedTargetSRV;
+
+ AppGraphCtx* m_appGraphCtx;
+ AppGraphCtxD3D11* m_appGraphCtxD3D11;
+
+ float m_spotMin;
+ float m_spotMax;
+ float m_shadowBias;
+
+ MeshDrawParamsD3D m_meshDrawParams;
+
+ Matrix44 m_view;
+ Matrix44 m_proj;
+
+ ShadowMapD3D11* m_shadowMap;
+ GpuMeshD3D11* m_immediateMesh;
+
+ SDL_Window* m_window;
+
+ int m_msaaSamples;
+
+ ID3D11Query* m_renderTimerDisjoint;
+ ID3D11Query* m_renderTimerBegin;
+ ID3D11Query* m_renderTimerEnd;
+ ID3D11Query* m_renderCompletionFence;
+ bool m_timersSet = false;
+};
diff --git a/demo/d3d11/diffuseRender.h b/demo/d3d11/diffuseRender.h
deleted file mode 100644
index 69517b2..0000000
--- a/demo/d3d11/diffuseRender.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
- *
- * NVIDIA CORPORATION and its licensors retain all intellectual property
- * and proprietary rights in and to this software, related documentation
- * and any modifications thereto. Any use, reproduction, disclosure or
- * distribution of this software and related documentation without an express
- * license agreement from NVIDIA CORPORATION is strictly prohibited.
- */
-
-#pragma once
-
-#include <DirectXMath.h>
-
-#include "shadowMap.h"
-
-
-typedef DirectX::XMFLOAT3 float3;
-typedef DirectX::XMFLOAT4 float4;
-typedef DirectX::XMFLOAT4X4 float4x4;
-
-struct DiffuseDrawParams
-{
- DirectX::XMMATRIX projection;
- DirectX::XMMATRIX view;
- DirectX::XMMATRIX model;
-
- float diffuseRadius; // point size in world space
- float diffuseScale; // scale to calculate size in pixels
- float spotMin;
- float spotMax;
- float motionScale;
-
- DirectX::XMMATRIX lightTransform;
- float3 lightPos;
- float3 lightDir;
-
- float4 color;
-
- float4 shadowTaps[12];
- ShadowMap* shadowMap;
-
- int mode;
-};
-
-
-struct DiffuseRenderer
-{
- ID3D11Device* m_device = nullptr;
- ID3D11DeviceContext* m_deviceContext = nullptr;
-
- ID3D11InputLayout* m_inputLayout = nullptr;
-
- ID3D11VertexShader* m_diffuseVS = nullptr;
- ID3D11GeometryShader* m_diffuseGS = nullptr;
- ID3D11PixelShader* m_diffusePS = nullptr;
-
- ID3D11Buffer* m_constantBuffer = nullptr;
- ID3D11RasterizerState* m_rasterizerState = nullptr;
-
- ID3D11BlendState* m_blendState = nullptr;
- ID3D11DepthStencilState* m_depthStencilState = nullptr;
-
- void Init(ID3D11Device* device, ID3D11DeviceContext* deviceContext);
- void Destroy();
-
-
- void Draw(const DiffuseDrawParams* params, ID3D11Buffer* positions, ID3D11Buffer* velocities, ID3D11Buffer* indices, int numParticles);
-};
diff --git a/demo/d3d11/diffuseRender.cpp b/demo/d3d11/diffuseRenderD3D11.cpp
index 60ced59..846a8bf 100644
--- a/demo/d3d11/diffuseRender.cpp
+++ b/demo/d3d11/diffuseRenderD3D11.cpp
@@ -21,17 +21,15 @@
#include "appD3D11Ctx.h"
-#include "diffuseRender.h"
+#include "diffuseRenderD3D11.h"
-#include "shaders/diffuseVS.hlsl.h"
-#include "shaders/diffuseGS.hlsl.h"
-#include "shaders/diffusePS.hlsl.h"
+#include "../d3d/shaders/diffuseVS.hlsl.h"
+#include "../d3d/shaders/diffuseGS.hlsl.h"
+#include "../d3d/shaders/diffusePS.hlsl.h"
-#define EXCLUDE_SHADER_STRUCTS 1
-#include "shaders/shaderCommon.h"
+#include "../d3d/shaderCommonD3D.h"
-
-void DiffuseRenderer::Init(ID3D11Device* device, ID3D11DeviceContext* context)
+void DiffuseRendererD3D11::init(ID3D11Device* device, ID3D11DeviceContext* context)
{
m_device = device;
m_deviceContext = context;
@@ -48,9 +46,9 @@ void DiffuseRenderer::Init(ID3D11Device* device, ID3D11DeviceContext* context)
}
// create the shaders
- m_device->CreateVertexShader(g_diffuseVS, sizeof(g_diffuseVS), nullptr, &m_diffuseVS);
- m_device->CreateGeometryShader(g_diffuseGS, sizeof(g_diffuseGS), nullptr, &m_diffuseGS);
- m_device->CreatePixelShader(g_diffusePS, sizeof(g_diffusePS), nullptr, &m_diffusePS);
+ m_device->CreateVertexShader(g_diffuseVS, sizeof(g_diffuseVS), nullptr, &m_diffuseVs);
+ m_device->CreateGeometryShader(g_diffuseGS, sizeof(g_diffuseGS), nullptr, &m_diffuseGs);
+ m_device->CreatePixelShader(g_diffusePS, sizeof(g_diffusePS), nullptr, &m_diffusePs);
{
D3D11_BLEND_DESC blendDesc = {};
@@ -80,7 +78,7 @@ void DiffuseRenderer::Init(ID3D11Device* device, ID3D11DeviceContext* context)
// create a constant buffer
{
D3D11_BUFFER_DESC bufDesc;
- bufDesc.ByteWidth = sizeof(DiffuseShaderConst); // 64 * sizeof(float);
+ bufDesc.ByteWidth = sizeof(Hlsl::DiffuseShaderConst); // 64 * sizeof(float);
bufDesc.Usage = D3D11_USAGE_DYNAMIC;
bufDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
@@ -107,77 +105,43 @@ void DiffuseRenderer::Init(ID3D11Device* device, ID3D11DeviceContext* context)
}
}
-void DiffuseRenderer::Destroy()
-{
- COMRelease(m_inputLayout);
- COMRelease(m_diffuseVS);
- COMRelease(m_diffuseGS);
- COMRelease(m_diffusePS);
- COMRelease(m_constantBuffer);
- COMRelease(m_rasterizerState);
- COMRelease(m_blendState);
- COMRelease(m_depthStencilState);
-}
-
-
-
-void DiffuseRenderer::Draw(const DiffuseDrawParams* params, ID3D11Buffer* positions, ID3D11Buffer* velocities, ID3D11Buffer* indices, int numParticles)
+void DiffuseRendererD3D11::draw(const DiffuseDrawParamsD3D* params, ID3D11Buffer* positions, ID3D11Buffer* velocities, int numParticles)
{
using namespace DirectX;
-
ID3D11DeviceContext* deviceContext = m_deviceContext;
// update constant buffer
{
D3D11_MAPPED_SUBRESOURCE mappedResource = { 0 };
- if (S_OK == deviceContext->Map(m_constantBuffer, 0u, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource))
+ if (SUCCEEDED(deviceContext->Map(m_constantBuffer.Get(), 0u, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource)))
{
- DiffuseShaderConst cParams;
-
- cParams.modelViewProjection = (float4x4&)(XMMatrixMultiply(XMMatrixMultiply(params->model, params->view), params->projection));
- cParams.modelView = (float4x4&)XMMatrixMultiply(params->model, params->view);
- cParams.projection = (float4x4&)params->projection;
-
- cParams.motionBlurScale = params->motionScale;
- cParams.diffuseRadius = params->diffuseRadius;
- cParams.diffuseScale = params->diffuseScale;
- cParams.spotMin = params->spotMin;
- cParams.spotMax = params->spotMax;
-
- cParams.lightTransform = (float4x4&)params->lightTransform;
- cParams.lightPos = params->lightPos;
- cParams.lightDir = params->lightDir;
- cParams.color = params->color;
-
-
- memcpy(cParams.shadowTaps, params->shadowTaps, sizeof(cParams.shadowTaps));
-
- memcpy(mappedResource.pData, &cParams, sizeof(DiffuseShaderConst));
-
- deviceContext->Unmap(m_constantBuffer, 0u);
+ Hlsl::DiffuseShaderConst constBuf;
+ RenderParamsUtilD3D::calcDiffuseConstantBuffer(*params, constBuf);
+ memcpy(mappedResource.pData, &constBuf, sizeof(Hlsl::DiffuseShaderConst));
+ deviceContext->Unmap(m_constantBuffer.Get(), 0u);
}
}
- deviceContext->VSSetShader(m_diffuseVS, nullptr, 0u);
- deviceContext->GSSetShader(m_diffuseGS, nullptr, 0u);
- deviceContext->PSSetShader(m_diffusePS, nullptr, 0u);
+ deviceContext->VSSetShader(m_diffuseVs.Get(), nullptr, 0u);
+ deviceContext->GSSetShader(m_diffuseGs.Get(), nullptr, 0u);
+ deviceContext->PSSetShader(m_diffusePs.Get(), nullptr, 0u);
if (params->shadowMap)
{
- ShadowMap* shadowMap = (ShadowMap*)params->shadowMap;
+ ShadowMapD3D11* shadowMap = (ShadowMapD3D11*)params->shadowMap;
- ID3D11ShaderResourceView* ppSRV[1] = { shadowMap->m_depthSrv.Get() };
- deviceContext->PSSetShaderResources(0, 1, ppSRV);
- ID3D11SamplerState* ppSS[1] = { shadowMap->m_linearSampler.Get() };
- deviceContext->PSSetSamplers(0, 1, ppSS);
+ ID3D11ShaderResourceView* srvs[1] = { shadowMap->m_depthSrv.Get() };
+ deviceContext->PSSetShaderResources(0, 1, srvs);
+ ID3D11SamplerState* samps[1] = { shadowMap->m_linearSampler.Get() };
+ deviceContext->PSSetSamplers(0, 1, samps);
}
- deviceContext->IASetInputLayout(m_inputLayout);
+ deviceContext->IASetInputLayout(m_inputLayout.Get());
deviceContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_POINTLIST);
- deviceContext->VSSetConstantBuffers(0, 1, &m_constantBuffer);
- deviceContext->GSSetConstantBuffers(0, 1, &m_constantBuffer);
- deviceContext->PSSetConstantBuffers(0, 1, &m_constantBuffer);
+ deviceContext->VSSetConstantBuffers(0, 1, m_constantBuffer.GetAddressOf());
+ deviceContext->GSSetConstantBuffers(0, 1, m_constantBuffer.GetAddressOf());
+ deviceContext->PSSetConstantBuffers(0, 1, m_constantBuffer.GetAddressOf());
ID3D11Buffer* vertexBuffers[2] =
{
@@ -194,24 +158,25 @@ void DiffuseRenderer::Draw(const DiffuseDrawParams* params, ID3D11Buffer* positi
unsigned int vertexBufferOffsets[2] = { 0 };
deviceContext->IASetVertexBuffers(0, 2, vertexBuffers, vertexBufferStrides, vertexBufferOffsets);
- deviceContext->IASetIndexBuffer(indices, DXGI_FORMAT_R32_UINT, 0u);
+ deviceContext->IASetIndexBuffer(NV_NULL, DXGI_FORMAT_R32_UINT, 0u);
- deviceContext->OMSetBlendState(m_blendState, nullptr, 0xFFFFFFFF);
- deviceContext->OMSetDepthStencilState(m_depthStencilState, 0u);
+ deviceContext->OMSetBlendState(m_blendState.Get(), nullptr, 0xFFFFFFFF);
+ deviceContext->OMSetDepthStencilState(m_depthStencilState.Get(), 0u);
float depthSign = DirectX::XMVectorGetW(params->projection.r[2]);
if (depthSign < 0.f)
{
- deviceContext->RSSetState(m_rasterizerState);
+ deviceContext->RSSetState(m_rasterizerState.Get());
}
- deviceContext->DrawIndexed(numParticles, 0, 0);
+ deviceContext->Draw(numParticles, 0);
if (depthSign < 0.f)
{
deviceContext->RSSetState(nullptr);
}
+ deviceContext->GSSetShader(nullptr, nullptr, 0u);
deviceContext->OMSetDepthStencilState(nullptr, 0u);
deviceContext->OMSetBlendState(nullptr, nullptr, 0xFFFFFFFF);
}
diff --git a/demo/d3d11/diffuseRenderD3D11.h b/demo/d3d11/diffuseRenderD3D11.h
new file mode 100644
index 0000000..cf4231e
--- /dev/null
+++ b/demo/d3d11/diffuseRenderD3D11.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+#pragma once
+
+#include <DirectXMath.h>
+
+#include "shadowMapD3D11.h"
+#include "../include/NvFlex.h"
+#include "../d3d/renderParamsD3D.h"
+#include "shaders.h"
+
+#include <wrl.h>
+using namespace Microsoft::WRL;
+
+// vertex buffers for diffuse particles
+struct DiffuseRenderBuffersD3D11
+{
+ DiffuseRenderBuffersD3D11() :
+ m_positionsBuf(nullptr),
+ m_velocitiesBuf(nullptr)
+ {
+ m_numParticles = 0;
+ }
+
+ ~DiffuseRenderBuffersD3D11()
+ {
+ if (m_numParticles > 0)
+ {
+ NvFlexUnregisterD3DBuffer(m_positionsBuf);
+ NvFlexUnregisterD3DBuffer(m_velocitiesBuf);
+ }
+ }
+
+ int m_numParticles;
+
+ ComPtr<ID3D11Buffer> m_positions;
+ ComPtr<ID3D11Buffer> m_velocities;
+
+ NvFlexBuffer* m_positionsBuf;
+ NvFlexBuffer* m_velocitiesBuf;
+};
+
+struct DiffuseRendererD3D11
+{
+ void init(ID3D11Device* device, ID3D11DeviceContext* deviceContext);
+
+ void draw(const DiffuseDrawParamsD3D* params, ID3D11Buffer* positions, ID3D11Buffer* velocities, int numParticles);
+
+ DiffuseRendererD3D11():
+ m_device(nullptr),
+ m_deviceContext(nullptr)
+ {}
+
+ ID3D11Device* m_device;
+ ID3D11DeviceContext* m_deviceContext;
+
+ ComPtr<ID3D11InputLayout> m_inputLayout;
+
+ ComPtr<ID3D11VertexShader> m_diffuseVs;
+ ComPtr<ID3D11GeometryShader> m_diffuseGs;
+ ComPtr<ID3D11PixelShader> m_diffusePs;
+
+ ComPtr<ID3D11Buffer> m_constantBuffer;
+ ComPtr<ID3D11RasterizerState> m_rasterizerState;
+
+ ComPtr<ID3D11BlendState> m_blendState;
+ ComPtr<ID3D11DepthStencilState> m_depthStencilState;
+};
diff --git a/demo/d3d11/fluidRender.cpp b/demo/d3d11/fluidRender.cpp
deleted file mode 100644
index f9dd767..0000000
--- a/demo/d3d11/fluidRender.cpp
+++ /dev/null
@@ -1,458 +0,0 @@
-/*
- * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
- *
- * NVIDIA CORPORATION and its licensors retain all intellectual property
- * and proprietary rights in and to this software, related documentation
- * and any modifications thereto. Any use, reproduction, disclosure or
- * distribution of this software and related documentation without an express
- * license agreement from NVIDIA CORPORATION is strictly prohibited.
- */
-
-//direct3d headers
-
-#define NOMINMAX
-
-#include <d3d11.h>
-
-// include the Direct3D Library file
-#pragma comment (lib, "d3d11.lib")
-
-#include <math.h>
-
-#include "appD3D11Ctx.h"
-
-#include "fluidRender.h"
-
-#include "shaders/ellipsoidDepthVS.hlsl.h"
-#include "shaders/ellipsoidDepthGS.hlsl.h"
-#include "shaders/ellipsoidDepthPS.hlsl.h"
-#include "shaders/passThroughVS.hlsl.h"
-#include "shaders/blurDepthPS.hlsl.h"
-#include "shaders/compositePS.hlsl.h"
-
-#define EXCLUDE_SHADER_STRUCTS 1
-#include "shaders/shaderCommon.h"
-
-#include "renderTarget.h"
-#include "shadowMap.h"
-
-#include "shaders.h"
-
-typedef DirectX::XMFLOAT2 float2;
-
-using namespace DirectX;
-
-
-struct PassthroughVertex
-{
- float x, y;
- float u, v;
-};
-
-void FluidRenderer::Init(ID3D11Device* device, ID3D11DeviceContext* context, int width, int height)
-{
- mSceneWidth = width;
- mSceneHeight = height;
-
- mDepthTex.Init(device, width, height);
- mDepthSmoothTex.Init(device, width, height, false);
-
- m_device = device;
- m_deviceContext = context;
-
- // create the input layout
- {
- D3D11_INPUT_ELEMENT_DESC inputElementDescs[] =
- {
- { "POSITION", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
- { "U", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
- { "V", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 2, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
- { "W", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 3, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
- };
-
- m_device->CreateInputLayout(inputElementDescs, 4, g_ellipsoidDepthVS, sizeof(g_ellipsoidDepthVS), &m_ellipsoidDepthLayout);
- }
-
- // create the shaders
- m_device->CreateVertexShader(g_ellipsoidDepthVS, sizeof(g_ellipsoidDepthVS), nullptr, &m_ellipsoidDepthVS);
- m_device->CreateGeometryShader(g_ellipsoidDepthGS, sizeof(g_ellipsoidDepthGS), nullptr, &m_ellipsoidDepthGS);
- m_device->CreatePixelShader(g_ellipsoidDepthPS, sizeof(g_ellipsoidDepthPS), nullptr, &m_ellipsoidDepthPS);
-
- // create the input layout
- {
- D3D11_INPUT_ELEMENT_DESC inputElementDescs[] =
- {
- { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
- { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
- };
-
- m_device->CreateInputLayout(inputElementDescs, 2, g_passThroughVS, sizeof(g_passThroughVS), &m_passThroughLayout);
- }
-
- // pass through shader
- m_device->CreateVertexShader(g_passThroughVS, sizeof(g_passThroughVS), nullptr, &m_passThroughVS);
-
- // full screen pixel shaders
- m_device->CreatePixelShader(g_blurDepthPS, sizeof(g_blurDepthPS), nullptr, &m_blurDepthPS);
- m_device->CreatePixelShader(g_compositePS, sizeof(g_compositePS), nullptr, &m_compositePS);
-
- // create a constant buffer
- {
- D3D11_BUFFER_DESC bufDesc;
- bufDesc.ByteWidth = sizeof(FluidShaderConst); // 64 * sizeof(float);
- bufDesc.Usage = D3D11_USAGE_DYNAMIC;
- bufDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
- bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
- bufDesc.MiscFlags = 0;
-
- m_device->CreateBuffer(&bufDesc, nullptr, &m_constantBuffer);
- }
-
- // create the rastersizer state
- for (int i = 0; i < NUM_FLUID_RENDER_MODES; i++)
- {
- for (int j = 0; j < NUM_FLUID_CULL_MODES; j++)
-
- {
- D3D11_RASTERIZER_DESC desc = {};
- desc.FillMode = (D3D11_FILL_MODE)(D3D11_FILL_WIREFRAME + i);
- desc.CullMode = (D3D11_CULL_MODE)(D3D11_CULL_NONE + j);
- desc.FrontCounterClockwise = TRUE; // This is non-default
- desc.DepthBias = 0;
- desc.DepthBiasClamp = 0.f;
- desc.SlopeScaledDepthBias = 0.f;
- desc.DepthClipEnable = TRUE;
- desc.ScissorEnable = FALSE;
- desc.MultisampleEnable = FALSE;
- desc.AntialiasedLineEnable = FALSE;
-
- m_device->CreateRasterizerState(&desc, &m_rasterizerStateRH[i][j]);
- }
- }
-
- CreateScreenQuad();
-}
-
-void FluidRenderer::Destroy()
-{
- COMRelease(m_ellipsoidDepthLayout);
- COMRelease(m_ellipsoidDepthVS);
- COMRelease(m_ellipsoidDepthGS);
- COMRelease(m_ellipsoidDepthPS);
-
- COMRelease(m_passThroughLayout);
- COMRelease(m_passThroughVS);
-
- COMRelease(m_blurDepthPS);
- COMRelease(m_compositePS);
-
- COMRelease(m_constantBuffer);
-
- for (int i = 0; i < NUM_FLUID_RENDER_MODES; i++)
- for (int j = 0; j < NUM_FLUID_CULL_MODES; j++)
- COMRelease(m_rasterizerStateRH[i][j]);
-
- COMRelease(m_quadVertexBuffer);
- COMRelease(m_quadIndexBuffer);
-}
-
-void FluidRenderer::CreateScreenQuad()
-{
- // create an index buffer
- {
- D3D11_BUFFER_DESC bufDesc;
- bufDesc.ByteWidth = 4*sizeof(UINT);
- bufDesc.Usage = D3D11_USAGE_IMMUTABLE;
- bufDesc.BindFlags = D3D11_BIND_INDEX_BUFFER;
- bufDesc.CPUAccessFlags = DXGI_CPU_ACCESS_NONE;
- bufDesc.MiscFlags = 0;
-
- unsigned int quad_indices[4] = { 0, 1, 3, 2 };
-
- D3D11_SUBRESOURCE_DATA data = { 0 };
- data.pSysMem = quad_indices;
-
- m_device->CreateBuffer(&bufDesc, &data, &m_quadIndexBuffer);
- }
-
- // create a vertex buffer
- {
-
- D3D11_BUFFER_DESC bufDesc;
- bufDesc.ByteWidth = 4*sizeof(PassthroughVertex);
- bufDesc.Usage = D3D11_USAGE_IMMUTABLE;
- bufDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
- bufDesc.CPUAccessFlags = DXGI_CPU_ACCESS_NONE;
- bufDesc.MiscFlags = 0;
-
- D3D11_SUBRESOURCE_DATA data = { 0 };
-
-
- float4 vertices[4] =
- {
- float4(-1.0f, -1.0f, 0.0f, 0.0f),
- float4(1.0f, -1.0f, 1.0f, 0.0f),
- float4(1.0f, 1.0f, 1.0f, 1.0f),
- float4(-1.0f, 1.0f, 0.0f, 1.0f),
- };
-
- data.pSysMem = vertices;
-
- m_device->CreateBuffer(&bufDesc, &data, &m_quadVertexBuffer);
- }
-}
-
-void FluidRenderer::DrawEllipsoids(const FluidDrawParams* params, const FluidRenderBuffers* buffers)
-{
- ID3D11DeviceContext* deviceContext = m_deviceContext;
-
- // update constant buffer
- {
-
- D3D11_BUFFER_DESC desc;
- m_constantBuffer->GetDesc(&desc);
-
- D3D11_MAPPED_SUBRESOURCE mappedResource = {};
- if (S_OK == deviceContext->Map(m_constantBuffer, 0u, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource))
- {
- FluidShaderConst cParams;
-
- cParams.modelviewprojection = (float4x4&)(XMMatrixMultiply(XMMatrixMultiply(params->model, params->view), params->projection));
- cParams.projection = (float4x4&)params->projection;
- cParams.modelview_inverse = (float4x4&)XMMatrixInverse(nullptr, XMMatrixMultiply(params->model, params->view));
- cParams.projection_inverse = (float4x4&)XMMatrixInverse(nullptr, params->projection);
-
- //cParams.invTexScale = invTexScale;
- //cParams.invProjection = invProjection;
- cParams.invViewport = params->invViewport;
-
-
- cParams.blurRadiusWorld = params->blurRadiusWorld;
- cParams.blurScale = params->blurScale;
- cParams.blurFalloff = params->blurFalloff;
- cParams.debug = params->debug;
-
- memcpy(mappedResource.pData, &cParams, sizeof(FluidShaderConst));
-
- deviceContext->Unmap(m_constantBuffer, 0u);
- }
- }
-
- deviceContext->VSSetShader(m_ellipsoidDepthVS, nullptr, 0u);
- deviceContext->GSSetShader(m_ellipsoidDepthGS, nullptr, 0u);
- deviceContext->PSSetShader(m_ellipsoidDepthPS, nullptr, 0u);
-
- deviceContext->IASetInputLayout(m_ellipsoidDepthLayout);
- deviceContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_POINTLIST);
-
- deviceContext->VSSetConstantBuffers(0, 1, &m_constantBuffer);
- deviceContext->GSSetConstantBuffers(0, 1, &m_constantBuffer);
- deviceContext->PSSetConstantBuffers(0, 1, &m_constantBuffer);
-
- ID3D11Buffer* vertexBuffers[4] =
- {
- buffers->mPositionVBO,
- buffers->mAnisotropyVBO[0],
- buffers->mAnisotropyVBO[1],
- buffers->mAnisotropyVBO[2]
- };
-
- unsigned int vertexBufferStrides[4] =
- {
- sizeof(float4),
- sizeof(float4),
- sizeof(float4),
- sizeof(float4)
- };
-
- unsigned int vertexBufferOffsets[4] = { 0 };
-
- deviceContext->IASetVertexBuffers(0, 4, vertexBuffers, vertexBufferStrides, vertexBufferOffsets);
- deviceContext->IASetIndexBuffer(buffers->mIndices, DXGI_FORMAT_R32_UINT, 0u);
-
- float depthSign = DirectX::XMVectorGetW(params->projection.r[2]);
- if (depthSign < 0.f)
- {
- deviceContext->RSSetState(m_rasterizerStateRH[params->renderMode][params->cullMode]);
- }
-
- deviceContext->DrawIndexed(params->n, params->offset, 0);
-
- if (depthSign < 0.f)
- {
- deviceContext->RSSetState(nullptr);
- }
-}
-
-void FluidRenderer::DrawBlurDepth(const FluidDrawParams* params)
-{
- ID3D11DeviceContext* deviceContext = m_deviceContext;
-
- // update constant buffer
- {
- D3D11_MAPPED_SUBRESOURCE mappedResource = {};
- if (S_OK == deviceContext->Map(m_constantBuffer, 0u, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource))
- {
- FluidShaderConst cParams;
-
- cParams.modelviewprojection = (float4x4&)(XMMatrixMultiply(XMMatrixMultiply(params->model, params->view), params->projection));
- cParams.projection = (float4x4&)params->projection;
- cParams.modelview_inverse = (float4x4&)XMMatrixInverse(nullptr, XMMatrixMultiply(params->model, params->view));
- cParams.projection_inverse = (float4x4&)XMMatrixInverse(nullptr, params->projection);
-
- //cParams.invTexScale = params->invTexScale;
- //cParams.invViewport = params->invViewport;
- //cParams.invProjection = params->invProjection;
-
- cParams.blurRadiusWorld = params->blurRadiusWorld;
- cParams.blurScale = params->blurScale;
- cParams.blurFalloff = params->blurFalloff;
- cParams.debug = params->debug;
-
- memcpy(mappedResource.pData, &cParams, sizeof(FluidShaderConst));
-
- deviceContext->Unmap(m_constantBuffer, 0u);
- }
- }
-
- deviceContext->VSSetShader(m_passThroughVS, nullptr, 0u);
- deviceContext->GSSetShader(nullptr, nullptr, 0u);
- deviceContext->PSSetShader(m_blurDepthPS, nullptr, 0u);
-
- ID3D11ShaderResourceView* ppSRV[1] = { mDepthTex.m_backSrv.Get() };
- deviceContext->PSSetShaderResources(0, 1, ppSRV);
-
- deviceContext->IASetInputLayout(m_passThroughLayout);
- deviceContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
-
- deviceContext->VSSetConstantBuffers(0, 1, &m_constantBuffer);
- deviceContext->PSSetConstantBuffers(0, 1, &m_constantBuffer);
-
- UINT vertexStride = sizeof(PassthroughVertex);
- UINT offset = 0u;
- deviceContext->IASetVertexBuffers(0, 1, &m_quadVertexBuffer, &vertexStride, &offset);
- deviceContext->IASetIndexBuffer(m_quadIndexBuffer, DXGI_FORMAT_R32_UINT, 0u);
-
- float depthSign = DirectX::XMVectorGetW(params->projection.r[2]);
- if (depthSign < 0.f)
- {
- deviceContext->RSSetState(m_rasterizerStateRH[params->renderMode][params->cullMode]);
- }
-
- deviceContext->DrawIndexed((UINT)4, 0, 0);
-
- if (depthSign < 0.f)
- {
- deviceContext->RSSetState(nullptr);
- }
-}
-
-void FluidRenderer::DrawComposite(const FluidDrawParams* params, ID3D11ShaderResourceView* sceneMap)
-{
- ID3D11DeviceContext* deviceContext = m_deviceContext;
-
- // update constant buffer
- {
- D3D11_MAPPED_SUBRESOURCE mappedResource = {};
- if (S_OK == deviceContext->Map(m_constantBuffer, 0u, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource))
- {
- FluidShaderConst cParams;
-
- cParams.modelviewprojection = (float4x4&)(XMMatrixMultiply(XMMatrixMultiply(params->model, params->view), params->projection));
- cParams.modelview = (float4x4&)XMMatrixMultiply(params->model, params->view);
- cParams.projection = (float4x4&)params->projection;
- cParams.modelview_inverse = (float4x4&)XMMatrixInverse(nullptr, XMMatrixMultiply(params->model, params->view));
- cParams.projection_inverse = (float4x4&)XMMatrixInverse(nullptr, params->projection);
-
- cParams.lightTransform = (float4x4&)params->lightTransform;
-
- cParams.invTexScale = params->invTexScale;
-
- //cParams.invViewport = params->invViewport;
- //cParams.invProjection = params->invProjection;
-
- cParams.blurRadiusWorld = params->blurRadiusWorld;
- cParams.blurScale = params->blurScale;
- cParams.blurFalloff = params->blurFalloff;
- cParams.debug = params->debug;
-
- cParams.clipPosToEye = params->clipPosToEye;
- cParams.color = params->color;
- cParams.ior = params->ior;
- cParams.spotMin = params->spotMin;
- cParams.spotMax = params->spotMax;
-
- cParams.lightPos = params->lightPos;
- cParams.lightDir = params->lightDir;
-
- memcpy(mappedResource.pData, &cParams, sizeof(FluidShaderConst));
-
- deviceContext->Unmap(m_constantBuffer, 0u);
-
- const float2 taps[] =
- {
- float2(-0.326212f,-0.40581f), float2(-0.840144f,-0.07358f),
- float2(-0.695914f,0.457137f), float2(-0.203345f,0.620716f),
- float2(0.96234f,-0.194983f), float2(0.473434f,-0.480026f),
- float2(0.519456f,0.767022f), float2(0.185461f,-0.893124f),
- float2(0.507431f,0.064425f), float2(0.89642f,0.412458f),
- float2(-0.32194f,-0.932615f), float2(-0.791559f,-0.59771f)
- };
- memcpy(cParams.shadowTaps, taps, sizeof(taps));
- }
- }
-
- deviceContext->VSSetShader(m_passThroughVS, nullptr, 0u);
- deviceContext->GSSetShader(nullptr, nullptr, 0u);
- deviceContext->PSSetShader(m_compositePS, nullptr, 0u);
-
-
- RenderTarget* depthMap = &mDepthSmoothTex;
- ShadowMap* shadowMap = (ShadowMap*)params->shadowMap;
-
- ID3D11ShaderResourceView* ppSRV[3] =
- {
- depthMap->m_backSrv.Get(),
- sceneMap,
- shadowMap->m_depthSrv.Get()
-
- };
- deviceContext->PSSetShaderResources(0, 3, ppSRV);
-
- ID3D11SamplerState* ppSS[2] =
- {
- depthMap->m_linearSampler.Get() ,
- shadowMap->m_linearSampler.Get()
- };
- deviceContext->PSSetSamplers(0, 2, ppSS);
-
-
- deviceContext->IASetInputLayout(m_passThroughLayout);
- deviceContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
-
- deviceContext->VSSetConstantBuffers(0, 1, &m_constantBuffer);
- deviceContext->PSSetConstantBuffers(0, 1, &m_constantBuffer);
-
- UINT vertexStride = sizeof(PassthroughVertex);
- UINT offset = 0u;
- deviceContext->IASetVertexBuffers(0, 1, &m_quadVertexBuffer, &vertexStride, &offset);
- deviceContext->IASetIndexBuffer(m_quadIndexBuffer, DXGI_FORMAT_R32_UINT, 0u);
-
- float depthSign = DirectX::XMVectorGetW(params->projection.r[2]);
- if (depthSign < 0.f)
- {
- deviceContext->RSSetState(m_rasterizerStateRH[params->renderMode][params->cullMode]);
- }
-
- deviceContext->DrawIndexed((UINT)4, 0, 0);
-
- if (depthSign < 0.f)
- {
- deviceContext->RSSetState(nullptr);
- }
-
- // reset srvs
- ID3D11ShaderResourceView* zero[3] = { NULL, NULL, NULL };
- deviceContext->PSSetShaderResources(0, 3, zero);
-}
-
diff --git a/demo/d3d11/fluidRender.h b/demo/d3d11/fluidRender.h
deleted file mode 100644
index 43fee4b..0000000
--- a/demo/d3d11/fluidRender.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
- *
- * NVIDIA CORPORATION and its licensors retain all intellectual property
- * and proprietary rights in and to this software, related documentation
- * and any modifications thereto. Any use, reproduction, disclosure or
- * distribution of this software and related documentation without an express
- * license agreement from NVIDIA CORPORATION is strictly prohibited.
- */
-
-#pragma once
-
-#include <DirectXMath.h>
-
-#include <d3d11.h>
-
-#include "renderTarget.h"
-#include "shadowMap.h"
-
-struct FluidRenderBuffers;
-
-enum FluidRenderMode
-{
- FLUID_RENDER_WIREFRAME,
- FLUID_RENDER_SOLID,
- NUM_FLUID_RENDER_MODES
-};
-
-enum FluidCullMode
-{
- FLUID_CULL_NONE,
- FLUID_CULL_FRONT,
- FLUID_CULL_BACK,
- NUM_FLUID_CULL_MODES
-};
-
-enum FluidDrawStage
-{
- FLUID_DRAW_NULL,
- FLUID_DRAW_SHADOW,
- FLUID_DRAW_REFLECTION,
- FLUID_DRAW_LIGHT
-};
-
-typedef DirectX::XMFLOAT3 float3;
-typedef DirectX::XMFLOAT4 float4;
-typedef DirectX::XMFLOAT4X4 float4x4;
-
-struct FluidDrawParams
-{
- FluidRenderMode renderMode;
- FluidCullMode cullMode;
- FluidDrawStage renderStage;
-
- int offset;
- int n;
-
- DirectX::XMMATRIX projection;
- DirectX::XMMATRIX view;
- DirectX::XMMATRIX model;
-
- float4 invTexScale;
-
- float3 invViewport;
- float3 invProjection;
-
- float blurRadiusWorld;
- float blurScale;
- float blurFalloff;
- int debug;
-
- float3 lightPos;
- float3 lightDir;
- DirectX::XMMATRIX lightTransform;
-
- float4 color;
- float4 clipPosToEye;
-
- float spotMin;
- float spotMax;
- float ior;
-
- ShadowMap* shadowMap;
-};
-
-
-struct FluidRenderer
-{
- ID3D11Device* m_device = nullptr;
- ID3D11DeviceContext* m_deviceContext = nullptr;
-
- ID3D11InputLayout* m_ellipsoidDepthLayout = nullptr;
- ID3D11VertexShader* m_ellipsoidDepthVS = nullptr;
- ID3D11GeometryShader* m_ellipsoidDepthGS = nullptr;
- ID3D11PixelShader* m_ellipsoidDepthPS = nullptr;
-
- ID3D11InputLayout* m_passThroughLayout = nullptr;
- ID3D11VertexShader* m_passThroughVS = nullptr;
-
- ID3D11PixelShader* m_blurDepthPS = nullptr;
- ID3D11PixelShader* m_compositePS = nullptr;
-
- ID3D11Buffer* m_constantBuffer = nullptr;
- ID3D11RasterizerState* m_rasterizerStateRH[NUM_FLUID_RENDER_MODES][NUM_FLUID_CULL_MODES];
-
- ID3D11Buffer* m_quadVertexBuffer;
- ID3D11Buffer* m_quadIndexBuffer;
-
- RenderTarget mDepthTex;
- RenderTarget mDepthSmoothTex;
- RenderTarget mThicknessTex;
-
- int mSceneWidth;
- int mSceneHeight;
-
- void Init(ID3D11Device* device, ID3D11DeviceContext* context, int width, int height);
- void Destroy();
-
- void DrawEllipsoids(const FluidDrawParams* params, const FluidRenderBuffers* buffers);
- void DrawBlurDepth(const FluidDrawParams* params);
- void DrawComposite(const FluidDrawParams* params, ID3D11ShaderResourceView* sceneMap);
-
- void CreateScreenQuad();
-};
-
-
diff --git a/demo/d3d11/fluidRenderD3D11.cpp b/demo/d3d11/fluidRenderD3D11.cpp
new file mode 100644
index 0000000..fa36f9b
--- /dev/null
+++ b/demo/d3d11/fluidRenderD3D11.cpp
@@ -0,0 +1,365 @@
+/*
+ * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+//direct3d headers
+
+#define NOMINMAX
+
+#include <d3d11.h>
+
+// include the Direct3D Library file
+#pragma comment (lib, "d3d11.lib")
+
+#include <math.h>
+
+#include "appD3D11Ctx.h"
+
+#include "fluidRenderD3D11.h"
+
+#include "../d3d/shaders/ellipsoidDepthVS.hlsl.h"
+#include "../d3d/shaders/ellipsoidDepthGS.hlsl.h"
+#include "../d3d/shaders/ellipsoidDepthPS.hlsl.h"
+#include "../d3d/shaders/passThroughVS.hlsl.h"
+#include "../d3d/shaders/blurDepthPS.hlsl.h"
+#include "../d3d/shaders/compositePS.hlsl.h"
+
+#include "../d3d/shaderCommonD3D.h"
+
+#include "renderTargetD3D11.h"
+#include "shadowMapD3D11.h"
+
+#include "shaders.h"
+
+typedef DirectX::XMFLOAT2 float2;
+
+using namespace DirectX;
+
+struct PassthroughVertex
+{
+ float3 position;
+ float3 normal;
+ float2 texcoords;
+ float4 color;
+};
+
+void FluidRendererD3D11::init(ID3D11Device* device, ID3D11DeviceContext* context, int width, int height)
+{
+ m_sceneWidth = width;
+ m_sceneHeight = height;
+
+ m_depthTexture.init(device, width, height);
+ m_depthSmoothTexture.init(device, width, height, false);
+
+ m_device = device;
+ m_deviceContext = context;
+
+ // create the input layout
+ {
+ D3D11_INPUT_ELEMENT_DESC inputElementDescs[] =
+ {
+ { "POSITION", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
+ { "U", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
+ { "V", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 2, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
+ { "W", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 3, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
+ };
+
+ m_device->CreateInputLayout(inputElementDescs, 4, g_ellipsoidDepthVS, sizeof(g_ellipsoidDepthVS), &m_ellipsoidDepthLayout);
+ }
+
+ // create the shaders
+ m_device->CreateVertexShader(g_ellipsoidDepthVS, sizeof(g_ellipsoidDepthVS), nullptr, &m_ellipsoidDepthVs);
+ m_device->CreateGeometryShader(g_ellipsoidDepthGS, sizeof(g_ellipsoidDepthGS), nullptr, &m_ellipsoidDepthGs);
+ m_device->CreatePixelShader(g_ellipsoidDepthPS, sizeof(g_ellipsoidDepthPS), nullptr, &m_ellipsoidDepthPs);
+
+ // create the input layout
+ {
+ D3D11_INPUT_ELEMENT_DESC inputElementDescs[] =
+ {
+ { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
+ { "NORMAL", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
+ { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
+ { "COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 }
+ };
+
+ m_device->CreateInputLayout(inputElementDescs, 4, g_passThroughVS, sizeof(g_passThroughVS), &m_passThroughLayout);
+ }
+
+ // pass through shader
+ m_device->CreateVertexShader(g_passThroughVS, sizeof(g_passThroughVS), nullptr, &m_passThroughVs);
+
+ // full screen pixel shaders
+ m_device->CreatePixelShader(g_blurDepthPS, sizeof(g_blurDepthPS), nullptr, &m_blurDepthPs);
+ m_device->CreatePixelShader(g_compositePS, sizeof(g_compositePS), nullptr, &m_compositePs);
+
+ // create a constant buffer
+ {
+ D3D11_BUFFER_DESC bufDesc;
+ bufDesc.ByteWidth = sizeof(Hlsl::FluidShaderConst); // 64 * sizeof(float);
+ bufDesc.Usage = D3D11_USAGE_DYNAMIC;
+ bufDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
+ bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+ bufDesc.MiscFlags = 0;
+
+ m_device->CreateBuffer(&bufDesc, nullptr, &m_constantBuffer);
+ }
+
+ // create the rastersizer state
+ for (int i = 0; i < NUM_FLUID_RENDER_MODES; i++)
+ {
+ for (int j = 0; j < NUM_FLUID_CULL_MODES; j++)
+ {
+ D3D11_RASTERIZER_DESC desc = {};
+ desc.FillMode = (D3D11_FILL_MODE)(D3D11_FILL_WIREFRAME + i);
+ desc.CullMode = (D3D11_CULL_MODE)(D3D11_CULL_NONE + j);
+ desc.FrontCounterClockwise = TRUE; // This is non-default
+ desc.DepthBias = 0;
+ desc.DepthBiasClamp = 0.f;
+ desc.SlopeScaledDepthBias = 0.f;
+ desc.DepthClipEnable = TRUE;
+ desc.ScissorEnable = FALSE;
+ desc.MultisampleEnable = FALSE;
+ desc.AntialiasedLineEnable = FALSE;
+
+ m_device->CreateRasterizerState(&desc, &m_rasterizerState[i][j]);
+ }
+ }
+
+ _createScreenQuad();
+}
+
+void FluidRendererD3D11::_createScreenQuad()
+{
+ // create an index buffer
+ {
+ D3D11_BUFFER_DESC bufDesc;
+ bufDesc.ByteWidth = 4*sizeof(UINT);
+ bufDesc.Usage = D3D11_USAGE_IMMUTABLE;
+ bufDesc.BindFlags = D3D11_BIND_INDEX_BUFFER;
+ bufDesc.CPUAccessFlags = DXGI_CPU_ACCESS_NONE;
+ bufDesc.MiscFlags = 0;
+
+ unsigned int quad_indices[4] = { 0, 1, 3, 2 };
+
+ D3D11_SUBRESOURCE_DATA data = { 0 };
+ data.pSysMem = quad_indices;
+
+ m_device->CreateBuffer(&bufDesc, &data, &m_quadIndexBuffer);
+ }
+
+ // create a vertex buffer
+ {
+
+ D3D11_BUFFER_DESC bufDesc;
+ bufDesc.ByteWidth = 4*sizeof(PassthroughVertex);
+ bufDesc.Usage = D3D11_USAGE_IMMUTABLE;
+ bufDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
+ bufDesc.CPUAccessFlags = DXGI_CPU_ACCESS_NONE;
+ bufDesc.MiscFlags = 0;
+
+ D3D11_SUBRESOURCE_DATA data = { 0 };
+
+
+ PassthroughVertex vertices[4] =
+ {
+ { {-1.0f, -1.0f, 0.0f}, {0, 1, 0}, {0.0f, 0.0f}, {1, 1, 1, 1}},
+ { { 1.0f, -1.0f, 0.0f}, {0, 1, 0}, {1.0f, 0.0f}, {1, 1, 1, 1}},
+ { { 1.0f, 1.0f, 0.0f}, {0, 1, 0}, {1.0f, 1.0f}, {1, 1, 1, 1}},
+ { {-1.0f, 1.0f, 0.0f}, {0, 1, 0}, {0.0f, 1.0f}, {1, 1, 1, 1}},
+ };
+
+ data.pSysMem = vertices;
+
+ m_device->CreateBuffer(&bufDesc, &data, &m_quadVertexBuffer);
+ }
+}
+
+void FluidRendererD3D11::drawEllipsoids(const FluidDrawParamsD3D* params, const FluidRenderBuffersD3D11* buffers)
+{
+ ID3D11DeviceContext* deviceContext = m_deviceContext;
+
+ // update constant buffer
+ {
+
+ D3D11_BUFFER_DESC desc;
+ m_constantBuffer->GetDesc(&desc);
+
+ D3D11_MAPPED_SUBRESOURCE mappedResource = {};
+ if (SUCCEEDED(deviceContext->Map(m_constantBuffer.Get(), 0u, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource)))
+ {
+ Hlsl::FluidShaderConst constBuf;
+ RenderParamsUtilD3D::calcFluidConstantBuffer(*params, constBuf);
+ memcpy(mappedResource.pData, &constBuf, sizeof(Hlsl::FluidShaderConst));
+ deviceContext->Unmap(m_constantBuffer.Get(), 0u);
+ }
+ }
+
+ deviceContext->VSSetShader(m_ellipsoidDepthVs.Get(), nullptr, 0u);
+ deviceContext->GSSetShader(m_ellipsoidDepthGs.Get(), nullptr, 0u);
+ deviceContext->PSSetShader(m_ellipsoidDepthPs.Get(), nullptr, 0u);
+
+ deviceContext->IASetInputLayout(m_ellipsoidDepthLayout.Get());
+ deviceContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_POINTLIST);
+
+ deviceContext->VSSetConstantBuffers(0, 1, m_constantBuffer.GetAddressOf());
+ deviceContext->GSSetConstantBuffers(0, 1, m_constantBuffer.GetAddressOf());
+ deviceContext->PSSetConstantBuffers(0, 1, m_constantBuffer.GetAddressOf());
+
+ ID3D11Buffer* vertexBuffers[4] =
+ {
+ buffers->m_positions.Get(),
+ buffers->m_anisotropiesArr[0].Get(),
+ buffers->m_anisotropiesArr[1].Get(),
+ buffers->m_anisotropiesArr[2].Get()
+ };
+
+ unsigned int vertexBufferStrides[4] =
+ {
+ sizeof(float4),
+ sizeof(float4),
+ sizeof(float4),
+ sizeof(float4)
+ };
+
+ unsigned int vertexBufferOffsets[4] = { 0 };
+
+ deviceContext->IASetVertexBuffers(0, 4, vertexBuffers, vertexBufferStrides, vertexBufferOffsets);
+ deviceContext->IASetIndexBuffer(buffers->m_indices.Get(), DXGI_FORMAT_R32_UINT, 0u);
+
+ float depthSign = DirectX::XMVectorGetW(params->projection.r[2]);
+ if (depthSign < 0.f)
+ {
+ deviceContext->RSSetState(m_rasterizerState[params->renderMode][params->cullMode].Get());
+ }
+
+ deviceContext->DrawIndexed(params->n, params->offset, 0);
+
+ if (depthSign < 0.f)
+ {
+ deviceContext->RSSetState(nullptr);
+ }
+}
+
+void FluidRendererD3D11::drawBlurDepth(const FluidDrawParamsD3D* params)
+{
+ ID3D11DeviceContext* deviceContext = m_deviceContext;
+
+ // update constant buffer
+ {
+ D3D11_MAPPED_SUBRESOURCE mappedResource = {};
+ if (SUCCEEDED(deviceContext->Map(m_constantBuffer.Get(), 0u, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource)))
+ {
+ Hlsl::FluidShaderConst constBuf;
+ RenderParamsUtilD3D::calcFluidConstantBuffer(*params, constBuf);
+ memcpy(mappedResource.pData, &constBuf, sizeof(Hlsl::FluidShaderConst));
+ deviceContext->Unmap(m_constantBuffer.Get(), 0u);
+ }
+ }
+
+ deviceContext->VSSetShader(m_passThroughVs.Get(), nullptr, 0u);
+ deviceContext->GSSetShader(nullptr, nullptr, 0u);
+ deviceContext->PSSetShader(m_blurDepthPs.Get(), nullptr, 0u);
+
+ ID3D11ShaderResourceView* srvs[1] = { m_depthTexture.m_backSrv.Get() };
+ deviceContext->PSSetShaderResources(0, 1, srvs);
+
+ deviceContext->IASetInputLayout(m_passThroughLayout.Get());
+ deviceContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
+
+ deviceContext->VSSetConstantBuffers(0, 1, m_constantBuffer.GetAddressOf());
+ deviceContext->PSSetConstantBuffers(0, 1, m_constantBuffer.GetAddressOf());
+
+ UINT vertexStride = sizeof(PassthroughVertex);
+ UINT offset = 0u;
+ deviceContext->IASetVertexBuffers(0, 1, m_quadVertexBuffer.GetAddressOf(), &vertexStride, &offset);
+ deviceContext->IASetIndexBuffer(m_quadIndexBuffer.Get(), DXGI_FORMAT_R32_UINT, 0u);
+
+ float depthSign = DirectX::XMVectorGetW(params->projection.r[2]);
+ if (depthSign < 0.f)
+ {
+ deviceContext->RSSetState(m_rasterizerState[params->renderMode][params->cullMode].Get());
+ }
+
+ deviceContext->DrawIndexed((UINT)4, 0, 0);
+
+ if (depthSign < 0.f)
+ {
+ deviceContext->RSSetState(nullptr);
+ }
+}
+
+void FluidRendererD3D11::drawComposite(const FluidDrawParamsD3D* params, ID3D11ShaderResourceView* sceneMap)
+{
+ ID3D11DeviceContext* deviceContext = m_deviceContext;
+
+ // update constant buffer
+ {
+ D3D11_MAPPED_SUBRESOURCE mappedResource = {};
+ if (SUCCEEDED(deviceContext->Map(m_constantBuffer.Get(), 0u, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource)))
+ {
+ Hlsl::FluidShaderConst constBuf;
+ RenderParamsUtilD3D::calcFluidCompositeConstantBuffer(*params, constBuf);
+ memcpy(mappedResource.pData, &constBuf, sizeof(Hlsl::FluidShaderConst));
+ deviceContext->Unmap(m_constantBuffer.Get(), 0u);
+ }
+ }
+
+ deviceContext->VSSetShader(m_passThroughVs.Get(), nullptr, 0u);
+ deviceContext->GSSetShader(nullptr, nullptr, 0u);
+ deviceContext->PSSetShader(m_compositePs.Get(), nullptr, 0u);
+
+ RenderTargetD3D11* depthMap = &m_depthSmoothTexture;
+ ShadowMapD3D11* shadowMap = (ShadowMapD3D11*)params->shadowMap;
+
+ ID3D11ShaderResourceView* srvs[3] =
+ {
+ depthMap->m_backSrv.Get(),
+ sceneMap,
+ shadowMap->m_depthSrv.Get()
+
+ };
+ deviceContext->PSSetShaderResources(0, 3, srvs);
+
+ ID3D11SamplerState* samps[2] =
+ {
+ depthMap->m_linearSampler.Get() ,
+ shadowMap->m_linearSampler.Get()
+ };
+ deviceContext->PSSetSamplers(0, 2, samps);
+
+
+ deviceContext->IASetInputLayout(m_passThroughLayout.Get());
+ deviceContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
+
+ deviceContext->VSSetConstantBuffers(0, 1, m_constantBuffer.GetAddressOf());
+ deviceContext->PSSetConstantBuffers(0, 1, m_constantBuffer.GetAddressOf());
+
+ UINT vertexStride = sizeof(PassthroughVertex);
+ UINT offset = 0u;
+ deviceContext->IASetVertexBuffers(0, 1, m_quadVertexBuffer.GetAddressOf(), &vertexStride, &offset);
+ deviceContext->IASetIndexBuffer(m_quadIndexBuffer.Get(), DXGI_FORMAT_R32_UINT, 0u);
+
+ float depthSign = DirectX::XMVectorGetW(params->projection.r[2]);
+ if (depthSign < 0.f)
+ {
+ deviceContext->RSSetState(m_rasterizerState[params->renderMode][params->cullMode].Get());
+ }
+
+ deviceContext->DrawIndexed((UINT)4, 0, 0);
+
+ if (depthSign < 0.f)
+ {
+ deviceContext->RSSetState(nullptr);
+ }
+
+ // reset srvs
+ ID3D11ShaderResourceView* zero[3] = { NULL, NULL, NULL };
+ deviceContext->PSSetShaderResources(0, 3, zero);
+}
+
diff --git a/demo/d3d11/fluidRenderD3D11.h b/demo/d3d11/fluidRenderD3D11.h
new file mode 100644
index 0000000..ad59534
--- /dev/null
+++ b/demo/d3d11/fluidRenderD3D11.h
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+#pragma once
+
+#include <DirectXMath.h>
+
+#include <d3d11.h>
+
+#include "renderTargetD3D11.h"
+#include "shadowMapD3D11.h"
+#include "../include/NvFlex.h"
+#include "../d3d/renderParamsD3D.h"
+#include "shaders.h"
+
+
+struct FluidRenderBuffersD3D11
+{
+ FluidRenderBuffersD3D11():
+ m_positionsBuf(nullptr),
+ m_densitiesBuf(nullptr),
+ m_indicesBuf(nullptr)
+ {
+ for (int i = 0; i < 3; i++)
+ {
+ m_anisotropiesBufArr[i] = nullptr;
+ }
+ m_numParticles = 0;
+ }
+ ~FluidRenderBuffersD3D11()
+ {
+ NvFlexUnregisterD3DBuffer(m_positionsBuf);
+ NvFlexUnregisterD3DBuffer(m_densitiesBuf);
+ NvFlexUnregisterD3DBuffer(m_indicesBuf);
+
+ for (int i = 0; i < 3; i++)
+ {
+ NvFlexUnregisterD3DBuffer(m_anisotropiesBufArr[i]);
+ }
+ }
+
+ int m_numParticles;
+ ComPtr<ID3D11Buffer> m_positions;
+ ComPtr<ID3D11Buffer> m_densities;
+ ComPtr<ID3D11Buffer> m_anisotropiesArr[3];
+ ComPtr<ID3D11Buffer> m_indices;
+
+ ComPtr<ID3D11Buffer> m_fluid; // to be removed
+
+ // wrapper buffers that allow Flex to write directly to VBOs
+ NvFlexBuffer* m_positionsBuf;
+ NvFlexBuffer* m_densitiesBuf;
+ NvFlexBuffer* m_anisotropiesBufArr[3];
+ NvFlexBuffer* m_indicesBuf;
+};
+
+struct FluidRendererD3D11
+{
+ void init(ID3D11Device* device, ID3D11DeviceContext* context, int width, int height);
+
+ void drawEllipsoids(const FluidDrawParamsD3D* params, const FluidRenderBuffersD3D11* buffers);
+ void drawBlurDepth(const FluidDrawParamsD3D* params);
+ void drawComposite(const FluidDrawParamsD3D* params, ID3D11ShaderResourceView* sceneMap);
+
+ FluidRendererD3D11():
+ m_device(nullptr),
+ m_deviceContext(nullptr)
+ {}
+
+ void _createScreenQuad();
+
+ ID3D11Device* m_device;
+ ID3D11DeviceContext* m_deviceContext;
+
+ ComPtr<ID3D11InputLayout> m_ellipsoidDepthLayout;
+ ComPtr<ID3D11VertexShader> m_ellipsoidDepthVs;
+ ComPtr<ID3D11GeometryShader> m_ellipsoidDepthGs;
+ ComPtr<ID3D11PixelShader> m_ellipsoidDepthPs;
+
+ ComPtr<ID3D11InputLayout> m_passThroughLayout;
+ ComPtr<ID3D11VertexShader> m_passThroughVs;
+
+ ComPtr<ID3D11PixelShader> m_blurDepthPs;
+ ComPtr<ID3D11PixelShader> m_compositePs;
+
+ ComPtr<ID3D11Buffer> m_constantBuffer;
+
+ // Right handed rasterizer state
+ ComPtr<ID3D11RasterizerState> m_rasterizerState[NUM_FLUID_RENDER_MODES][NUM_FLUID_CULL_MODES];
+
+ ComPtr<ID3D11Buffer> m_quadVertexBuffer;
+ ComPtr<ID3D11Buffer> m_quadIndexBuffer;
+
+ RenderTargetD3D11 m_depthTexture;
+ RenderTargetD3D11 m_depthSmoothTexture;
+ RenderTargetD3D11 m_thicknessTexture;
+
+ int m_sceneWidth;
+ int m_sceneHeight;
+};
+
+
diff --git a/demo/d3d11/imguiGraph.h b/demo/d3d11/imguiGraph.h
deleted file mode 100644
index e6e5eb4..0000000
--- a/demo/d3d11/imguiGraph.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
- *
- * NVIDIA CORPORATION and its licensors retain all intellectual property
- * and proprietary rights in and to this software, related documentation
- * and any modifications thereto. Any use, reproduction, disclosure or
- * distribution of this software and related documentation without an express
- * license agreement from NVIDIA CORPORATION is strictly prohibited.
- */
-
-#pragma once
-
-#include <stdint.h>
-
-#define IMGUI_GRAPH_API extern "C" __declspec(dllexport)
-
-struct ImguiGraphDesc;
-
-typedef bool (*imguiGraphInit_t)(const char* fontpath, const ImguiGraphDesc* desc);
-
-typedef void (*imguiGraphUpdate_t)(const ImguiGraphDesc* desc);
-
-bool imguiGraphInit(const char* fontpath, const ImguiGraphDesc* desc);
-
-void imguiGraphUpdate(const ImguiGraphDesc* desc);
-
-void imguiGraphDestroy();
-
-void imguiGraphDraw(); \ No newline at end of file
diff --git a/demo/d3d11/imguiGraphD3D11.cpp b/demo/d3d11/imguiGraphD3D11.cpp
index 89c8c91..2df555d 100644
--- a/demo/d3d11/imguiGraphD3D11.cpp
+++ b/demo/d3d11/imguiGraphD3D11.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
*
* NVIDIA CORPORATION and its licensors retain all intellectual property
* and proprietary rights in and to this software, related documentation
@@ -13,8 +13,8 @@
//direct3d headers
#include <d3d11.h>
-#include "shaders/imguiVS.hlsl.h"
-#include "shaders/imguiPS.hlsl.h"
+#include "../d3d/shaders/imguiVS.hlsl.h"
+#include "../d3d/shaders/imguiPS.hlsl.h"
namespace
{
@@ -77,7 +77,7 @@ namespace
};
}
-void imguiGraphContextDestroy()
+void imguiGraphContextDestroyD3D11()
{
COMRelease(m_rasterizerState);
COMRelease(m_samplerState);
@@ -89,8 +89,10 @@ void imguiGraphContextDestroy()
COMRelease(m_vertexBuffer);
}
-void imguiGraphContextInit(const ImguiGraphDesc* desc)
+void imguiGraphContextInitD3D11(const ImguiGraphDesc* descIn)
{
+ const auto desc = cast_to_imguiGraphDescD3D11(descIn);
+
m_device = desc->device;
m_deviceContext = desc->deviceContext;
m_winW = desc->winW;
@@ -202,15 +204,17 @@ void imguiGraphContextInit(const ImguiGraphDesc* desc)
}
}
-void imguiGraphContextUpdate(const ImguiGraphDesc* desc)
+void imguiGraphContextUpdateD3D11(const ImguiGraphDesc* descIn)
{
+ const auto desc = cast_to_imguiGraphDescD3D11(descIn);
+
m_device = desc->device;
m_deviceContext = desc->deviceContext;
m_winW = desc->winW;
m_winH = desc->winH;
}
-void imguiGraphRecordBegin()
+void imguiGraphRecordBeginD3D11()
{
Params params = {
2.f / float(m_winW), 0.f, 0.f, -1.f,
@@ -319,7 +323,7 @@ static void imguiGraphFlush()
}
}
-void imguiGraphRecordEnd()
+void imguiGraphRecordEndD3D11()
{
ID3D11DeviceContext* context = m_deviceContext;
@@ -341,7 +345,7 @@ void imguiGraphRecordEnd()
context->RSSetState(nullptr);
}
-void imguiGraphEnableScissor(int x, int y, int width, int height)
+void imguiGraphEnableScissorD3D11(int x, int y, int width, int height)
{
// mark end of last region
m_stateScissor.stopIdx = m_stateVertIdx;
@@ -356,7 +360,7 @@ void imguiGraphEnableScissor(int x, int y, int width, int height)
m_stateScissor.height = height;
}
-void imguiGraphDisableScissor()
+void imguiGraphDisableScissorD3D11()
{
if (m_stateVertIdx == 0) return;
@@ -373,13 +377,13 @@ void imguiGraphDisableScissor()
m_stateScissor.height = m_winH;
}
-void imguiGraphVertex2f(float x, float y)
+void imguiGraphVertex2fD3D11(float x, float y)
{
float v[2] = { x,y };
- imguiGraphVertex2fv(v);
+ imguiGraphVertex2fvD3D11(v);
}
-void imguiGraphVertex2fv(const float* v)
+void imguiGraphVertex2fvD3D11(const float* v)
{
// update state
m_stateVert.x = v[0];
@@ -394,13 +398,13 @@ void imguiGraphVertex2fv(const float* v)
}
}
-void imguiGraphTexCoord2f(float u, float v)
+void imguiGraphTexCoord2fD3D11(float u, float v)
{
m_stateVert.u = u;
m_stateVert.v = v;
}
-void imguiGraphColor4ub(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha)
+void imguiGraphColor4ubD3D11(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha)
{
m_stateVert.rgba[0] = red;
m_stateVert.rgba[1] = green;
@@ -408,7 +412,7 @@ void imguiGraphColor4ub(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha)
m_stateVert.rgba[3] = alpha;
}
-void imguiGraphColor4ubv(const uint8_t* v)
+void imguiGraphColor4ubvD3D11(const uint8_t* v)
{
m_stateVert.rgba[0] = v[0];
m_stateVert.rgba[1] = v[1];
@@ -416,18 +420,18 @@ void imguiGraphColor4ubv(const uint8_t* v)
m_stateVert.rgba[3] = v[3];
}
-void imguiGraphFontTextureEnable()
+void imguiGraphFontTextureEnableD3D11()
{
}
-void imguiGraphFontTextureDisable()
+void imguiGraphFontTextureDisableD3D11()
{
m_stateVert.u = -1.f;
m_stateVert.v = -1.f;
}
-void imguiGraphFontTextureInit(unsigned char* data)
+void imguiGraphFontTextureInitD3D11(unsigned char* data)
{
ID3D11DeviceContext* context = m_deviceContext;
@@ -466,7 +470,7 @@ void imguiGraphFontTextureInit(unsigned char* data)
}
-void imguiGraphFontTextureRelease()
+void imguiGraphFontTextureReleaseD3D11()
{
COMRelease(m_texture);
COMRelease(m_textureSRV);
diff --git a/demo/d3d11/imguiGraphD3D11.h b/demo/d3d11/imguiGraphD3D11.h
index be9c88b..8f521a9 100644
--- a/demo/d3d11/imguiGraphD3D11.h
+++ b/demo/d3d11/imguiGraphD3D11.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
*
* NVIDIA CORPORATION and its licensors retain all intellectual property
* and proprietary rights in and to this software, related documentation
@@ -13,12 +13,12 @@
#include <stdint.h>
-#include "imguiGraph.h"
+#include "../d3d/imguiGraph.h"
struct ID3D11Device;
struct ID3D11DeviceContext;
-struct ImguiGraphDesc
+struct ImguiGraphDescD3D11
{
ID3D11Device* device = nullptr;
ID3D11DeviceContext* deviceContext = nullptr;
@@ -27,41 +27,49 @@ struct ImguiGraphDesc
uint32_t maxVertices = 64 * 4096u;
- ImguiGraphDesc() {}
+ ImguiGraphDescD3D11() {}
};
-// Below are the functions that must be implemented per graphics API
+inline const ImguiGraphDescD3D11* cast_to_imguiGraphDescD3D11(const ImguiGraphDesc* desc)
+{
+ return (const ImguiGraphDescD3D11*)(desc);
+}
+
+inline ImguiGraphDesc* cast_from_imguiGraphDescD3D11(ImguiGraphDescD3D11* desc)
+{
+ return (ImguiGraphDesc*)(desc);
+}
-void imguiGraphContextInit(const ImguiGraphDesc* desc);
+IMGUI_GRAPH_API void imguiGraphContextInitD3D11(const ImguiGraphDesc* desc);
-void imguiGraphContextUpdate(const ImguiGraphDesc* desc);
+IMGUI_GRAPH_API void imguiGraphContextUpdateD3D11(const ImguiGraphDesc* desc);
-void imguiGraphContextDestroy();
+IMGUI_GRAPH_API void imguiGraphContextDestroyD3D11();
-void imguiGraphRecordBegin();
+IMGUI_GRAPH_API void imguiGraphRecordBeginD3D11();
-void imguiGraphRecordEnd();
+IMGUI_GRAPH_API void imguiGraphRecordEndD3D11();
-void imguiGraphVertex2f(float x, float y);
+IMGUI_GRAPH_API void imguiGraphVertex2fD3D11(float x, float y);
-void imguiGraphVertex2fv(const float* v);
+IMGUI_GRAPH_API void imguiGraphVertex2fvD3D11(const float* v);
-void imguiGraphTexCoord2f(float u, float v);
+IMGUI_GRAPH_API void imguiGraphTexCoord2fD3D11(float u, float v);
-void imguiGraphColor4ub(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha);
+IMGUI_GRAPH_API void imguiGraphColor4ubD3D11(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha);
-void imguiGraphColor4ubv(const uint8_t* v);
+IMGUI_GRAPH_API void imguiGraphColor4ubvD3D11(const uint8_t* v);
-void imguiGraphFontTextureEnable();
+IMGUI_GRAPH_API void imguiGraphFontTextureEnableD3D11();
-void imguiGraphFontTextureDisable();
+IMGUI_GRAPH_API void imguiGraphFontTextureDisableD3D11();
-void imguiGraphEnableScissor(int x, int y, int width, int height);
+IMGUI_GRAPH_API void imguiGraphEnableScissorD3D11(int x, int y, int width, int height);
-void imguiGraphDisableScissor();
+IMGUI_GRAPH_API void imguiGraphDisableScissorD3D11();
-void imguiGraphFontTextureInit(unsigned char* data);
+IMGUI_GRAPH_API void imguiGraphFontTextureInitD3D11(unsigned char* data);
-void imguiGraphFontTextureRelease();
+IMGUI_GRAPH_API void imguiGraphFontTextureReleaseD3D11();
#endif \ No newline at end of file
diff --git a/demo/d3d11/imguiInteropD3D11.cpp b/demo/d3d11/imguiInteropD3D11.cpp
new file mode 100644
index 0000000..5d22d2e
--- /dev/null
+++ b/demo/d3d11/imguiInteropD3D11.cpp
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+//direct3d headers
+#include <d3d11.h>
+
+#include "appD3D11Ctx.h"
+
+// include the Direct3D Library file
+#pragma comment (lib, "d3d11.lib")
+
+#include "appD3D11Ctx.h"
+#include "imguiGraphD3D11.h"
+
+IMGUI_GRAPH_API bool imguiInteropGraphInitD3D11(imguiGraphInit_t func, const char* fontpath, AppGraphCtx* appctx);
+
+IMGUI_GRAPH_API void imguiInteropGraphUpdateD3D11(imguiGraphUpdate_t func, AppGraphCtx* appctx);
+
+bool imguiInteropGraphInitD3D11(imguiGraphInit_t func, const char* fontpath, AppGraphCtx* appctxIn)
+{
+ ImguiGraphDescD3D11 desc;
+
+ AppGraphCtxD3D11* appctx = cast_to_AppGraphCtxD3D11(appctxIn);
+
+ desc.device = appctx->m_device;
+ desc.deviceContext = appctx->m_deviceContext;
+ desc.winW = appctx->m_winW;
+ desc.winH = appctx->m_winH;
+
+ return func(fontpath, cast_from_imguiGraphDescD3D11(&desc));
+}
+
+void imguiInteropGraphUpdateD3D11(imguiGraphUpdate_t func, AppGraphCtx* appctxIn)
+{
+ ImguiGraphDescD3D11 desc;
+ AppGraphCtxD3D11* appctx = cast_to_AppGraphCtxD3D11(appctxIn);
+
+ desc.device = appctx->m_device;
+ desc.deviceContext = appctx->m_deviceContext;
+ desc.winW = appctx->m_winW;
+ desc.winH = appctx->m_winH;
+
+ return func(cast_from_imguiGraphDescD3D11(&desc));
+} \ No newline at end of file
diff --git a/demo/d3d11/meshRender.cpp b/demo/d3d11/meshRender.cpp
deleted file mode 100644
index b07397b..0000000
--- a/demo/d3d11/meshRender.cpp
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
- *
- * NVIDIA CORPORATION and its licensors retain all intellectual property
- * and proprietary rights in and to this software, related documentation
- * and any modifications thereto. Any use, reproduction, disclosure or
- * distribution of this software and related documentation without an express
- * license agreement from NVIDIA CORPORATION is strictly prohibited.
- */
-
-//direct3d headers
-
-#define NOMINMAX
-
-#include <d3d11.h>
-
-// include the Direct3D Library file
-#pragma comment (lib, "d3d11.lib")
-
-#include <math.h>
-
-#include "meshRender.h"
-#include "appD3d11Ctx.h"
-
-
-#include "shaders/meshVS.hlsl.h"
-#include "shaders/meshPS.hlsl.h"
-#include "shaders/meshShadowPS.hlsl.h"
-
-#define EXCLUDE_SHADER_STRUCTS 1
-#include "shaders/shaderCommon.h"
-
-#include "shadowMap.h"
-
-
-void MeshRenderer::Init(ID3D11Device* device, ID3D11DeviceContext* context)
-{
- for (int i = 0; i < NUM_MESH_RENDER_MODES; i++)
- for (int j = 0; j < NUM_MESH_CULL_MODES; j++)
- m_rasterizerStateRH[i][j] = nullptr;
-
- m_device = device;
- m_deviceContext = context;
-
- // create the input layout
- {
- D3D11_INPUT_ELEMENT_DESC inputElementDescs[] =
- {
- { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
- { "NORMAL", 0, DXGI_FORMAT_R32G32B32_FLOAT, 1, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
- { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 2, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
- { "COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 3, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
- };
-
- m_device->CreateInputLayout(inputElementDescs, 4, g_meshVS, sizeof(g_meshVS), &m_inputLayout);
- }
-
- // create the shaders
- m_device->CreateVertexShader(g_meshVS, sizeof(g_meshVS), nullptr, &m_meshVS);
- m_device->CreatePixelShader(g_meshPS, sizeof(g_meshPS), nullptr, &m_meshPS);
- m_device->CreatePixelShader(g_meshPS_Shadow, sizeof(g_meshPS_Shadow), nullptr, &m_meshPS_Shadow);
-
- // create a constant buffer
- {
- D3D11_BUFFER_DESC bufDesc;
- bufDesc.ByteWidth = sizeof(MeshShaderConst);
- bufDesc.Usage = D3D11_USAGE_DYNAMIC;
- bufDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
- bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
- bufDesc.MiscFlags = 0;
-
- m_device->CreateBuffer(&bufDesc, nullptr, &m_constantBuffer);
- }
-
- // create the rastersizer state
- for (int i = 0; i < NUM_MESH_RENDER_MODES; i++)
- {
- for (int j = 0; j < NUM_MESH_CULL_MODES; j++)
-
- {
- D3D11_RASTERIZER_DESC desc = {};
- desc.FillMode = (D3D11_FILL_MODE)(D3D11_FILL_WIREFRAME + i);
- desc.CullMode = (D3D11_CULL_MODE)(D3D11_CULL_NONE + j);
- desc.FrontCounterClockwise = TRUE; // This is non-default
- desc.DepthBias = 0;
- desc.DepthBiasClamp = 0.f;
- desc.SlopeScaledDepthBias = 0.f;
- desc.DepthClipEnable = TRUE;
- desc.ScissorEnable = FALSE;
- desc.MultisampleEnable = FALSE;
- desc.AntialiasedLineEnable = FALSE;
-
- m_device->CreateRasterizerState(&desc, &m_rasterizerStateRH[i][j]);
- }
- }
-
-}
-
-void MeshRenderer::Destroy()
-{
- COMRelease(m_inputLayout);
- COMRelease(m_meshVS);
- COMRelease(m_meshPS);
- COMRelease(m_meshPS_Shadow);
- COMRelease(m_constantBuffer);
-
- for (int i = 0; i < NUM_MESH_RENDER_MODES; i++)
- for (int j = 0; j < NUM_MESH_CULL_MODES; j++)
- COMRelease(m_rasterizerStateRH[i][j]);
-}
-
-
-void MeshRenderer::Draw(const GpuMesh* mesh, const MeshDrawParams* params)
-{
- using namespace DirectX;
-
- // update constant buffer
- {
- D3D11_MAPPED_SUBRESOURCE mappedResource = {};
- if (S_OK == m_deviceContext->Map(m_constantBuffer, 0u, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource))
- {
- MeshShaderConst cParams;
-
- cParams.modelviewprojection = (float4x4&)(XMMatrixMultiply(XMMatrixMultiply(params->model, params->view), params->projection));
-
- cParams.modelview = (float4x4&)XMMatrixMultiply(params->model, params->view);
-
- cParams.objectTransform = (float4x4&)params->objectTransform;
- cParams.lightTransform = (float4x4&)params->lightTransform;
-
- cParams.clipPlane = params->clipPlane;
- cParams.fogColor = params->fogColor;
- cParams.color = params->color;
- cParams.secondaryColor = params->secondaryColor;
-
- cParams.lightPos = params->lightPos;
- cParams.lightDir = params->lightDir;
-
- cParams.bias = params->bias;
- cParams.expand = params->expand;
- cParams.spotMin = params->spotMin;
- cParams.spotMax = params->spotMax;
-
- cParams.grid = params->grid;
- cParams.tex = params->tex;
- cParams.colorArray = params->colorArray;
-
- memcpy(cParams.shadowTaps, params->shadowTaps, sizeof(cParams.shadowTaps));
-
- memcpy(mappedResource.pData, &cParams, sizeof(MeshShaderConst));
-
- m_deviceContext->Unmap(m_constantBuffer, 0u);
- }
- }
-
- m_deviceContext->VSSetShader(m_meshVS, nullptr, 0u);
- m_deviceContext->GSSetShader(nullptr, nullptr, 0u);
-
- switch (params->renderStage)
- {
- case MESH_DRAW_SHADOW:
- {
- m_deviceContext->PSSetShader(m_meshPS_Shadow, nullptr, 0u);
- break;
- }
- case MESH_DRAW_LIGHT:
- {
- m_deviceContext->PSSetShader(m_meshPS, nullptr, 0u);
-
- ShadowMap* shadowMap = (ShadowMap*)params->shadowMap;
- ID3D11ShaderResourceView* ppSRV[1] = { shadowMap->m_depthSrv.Get() };
- m_deviceContext->PSSetShaderResources(0, 1, ppSRV);
- ID3D11SamplerState* ppSS[1] = { shadowMap->m_linearSampler.Get() };
- m_deviceContext->PSSetSamplers(0, 1, ppSS);
- break;
- }
- default:
- assert(false);
- break;
- }
-
- m_deviceContext->IASetInputLayout(m_inputLayout);
- m_deviceContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
-
- m_deviceContext->VSSetConstantBuffers(0, 1, &m_constantBuffer);
- m_deviceContext->PSSetConstantBuffers(0, 1, &m_constantBuffer);
-
- ID3D11Buffer* vertexBuffers[4] =
- {
- mesh->positionBuffer,
- mesh->normalBuffer,
- mesh->texcoordBuffer,
- mesh->colorBuffer,
- };
-
- unsigned int vertexBufferStrides[4] =
- {
- sizeof(Vec3),
- sizeof(Vec3),
- sizeof(Vec2),
- sizeof(Vec4)
- };
-
- unsigned int vertexBufferOffsets[4] = { 0, 0, 0, 0 };
-
- m_deviceContext->IASetVertexBuffers(0, 4, vertexBuffers, vertexBufferStrides, vertexBufferOffsets);
- m_deviceContext->IASetIndexBuffer(mesh->indexBuffer, DXGI_FORMAT_R32_UINT, 0u);
-
- float depthSign = DirectX::XMVectorGetW(params->projection.r[2]);
- if (depthSign < 0.f)
- {
- m_deviceContext->RSSetState(m_rasterizerStateRH[params->renderMode][params->cullMode]);
- }
-
- m_deviceContext->DrawIndexed((UINT)mesh->mNumFaces*3, 0, 0);
-
- if (depthSign < 0.f)
- {
- m_deviceContext->RSSetState(nullptr);
- }
-}
diff --git a/demo/d3d11/meshRender.h b/demo/d3d11/meshRender.h
deleted file mode 100644
index 01ad181..0000000
--- a/demo/d3d11/meshRender.h
+++ /dev/null
@@ -1,297 +0,0 @@
-
-/*
- * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
- *
- * NVIDIA CORPORATION and its licensors retain all intellectual property
- * and proprietary rights in and to this software, related documentation
- * and any modifications thereto. Any use, reproduction, disclosure or
- * distribution of this software and related documentation without an express
- * license agreement from NVIDIA CORPORATION is strictly prohibited.
- */
-
-#pragma once
-
-#include <DirectXMath.h>
-
-#include "appD3D11Ctx.h"
-
-#include "core/maths.h"
-
-struct ShadowMap;
-
-struct GpuMesh
-{
- ID3D11Buffer* positionBuffer;
- ID3D11Buffer* normalBuffer;
- ID3D11Buffer* texcoordBuffer;
- ID3D11Buffer* colorBuffer;
-
- ID3D11Buffer* indexBuffer;
-
- GpuMesh(ID3D11Device* device, ID3D11DeviceContext* deviceContext)
- : positionBuffer(NULL)
- , normalBuffer(NULL)
- , texcoordBuffer(NULL)
- , colorBuffer(NULL)
- , indexBuffer(NULL)
- , mDevice(device)
- , mDeviceContext(deviceContext)
- , mNumFaces(0)
- , mNumVertices(0)
- {}
-
- ~GpuMesh()
- {
- Release();
- }
-
- void Release()
- {
- COMRelease(positionBuffer);
- COMRelease(normalBuffer);
- COMRelease(texcoordBuffer);
- COMRelease(colorBuffer);
- COMRelease(indexBuffer);
- }
-
- void Resize(int numVertices, int numFaces)
- {
- Release();
-
- {
- // vertex buffers
- D3D11_BUFFER_DESC bufDesc;
- bufDesc.ByteWidth = sizeof(Vec3)*numVertices;
- bufDesc.Usage = D3D11_USAGE_DYNAMIC;
- bufDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
- bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
- bufDesc.MiscFlags = 0;
-
- mDevice->CreateBuffer(&bufDesc, NULL, &positionBuffer);
- mDevice->CreateBuffer(&bufDesc, NULL, &normalBuffer);
-
- bufDesc.ByteWidth = sizeof(Vec2)*numVertices;
- mDevice->CreateBuffer(&bufDesc, NULL, &texcoordBuffer);
-
- bufDesc.ByteWidth = sizeof(Vec4)*numVertices;
- mDevice->CreateBuffer(&bufDesc, NULL, &colorBuffer);
- }
-
- {
- // index buffer
- D3D11_BUFFER_DESC bufDesc;
- bufDesc.ByteWidth = sizeof(int)*numFaces*3;
- bufDesc.Usage = D3D11_USAGE_DYNAMIC;
- bufDesc.BindFlags = D3D11_BIND_INDEX_BUFFER;
- bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
- bufDesc.MiscFlags = 0;
-
- mDevice->CreateBuffer(&bufDesc, NULL, &indexBuffer);
- }
-
- mMaxVertices = numVertices;
- mMaxFaces = numFaces;
- }
-
- void UpdateData(const Vec3* positions, const Vec3* normals, const Vec2* texcoords, const Vec4* colors, const int* indices, int numVertices, int numFaces)
- {
- if (numVertices > mMaxVertices || numFaces > mMaxFaces)
- {
- Resize(numVertices, numFaces);
- }
-
- D3D11_MAPPED_SUBRESOURCE res;
-
- // vertices
- if (positions)
- {
- mDeviceContext->Map(positionBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- memcpy(res.pData, positions, sizeof(Vec3)*numVertices);
- mDeviceContext->Unmap(positionBuffer, 0);
- }
-
- if (normals)
- {
- mDeviceContext->Map(normalBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- memcpy(res.pData, normals, sizeof(Vec3)*numVertices);
- mDeviceContext->Unmap(normalBuffer, 0);
- }
-
- if (texcoords)
- {
- mDeviceContext->Map(texcoordBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- memcpy(res.pData, texcoords, sizeof(Vec2)*numVertices);
- mDeviceContext->Unmap(texcoordBuffer, 0);
- }
-
- if (colors)
- {
- mDeviceContext->Map(colorBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- memcpy(res.pData, colors, sizeof(Vec4)*numVertices);
- mDeviceContext->Unmap(colorBuffer, 0);
- }
-
- // indices
- if (indices)
- {
- mDeviceContext->Map(indexBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- memcpy(res.pData, indices, sizeof(int)*numFaces*3);
- mDeviceContext->Unmap(indexBuffer, 0);
- }
-
- mNumVertices = numVertices;
- mNumFaces = numFaces;
- }
-
- // duplicate method to handle conversion from vec4 to vec3 positions / normals
- void UpdateData(const Vec4* positions, const Vec4* normals, const Vec2* texcoords, const Vec4* colors, const int* indices, int numVertices, int numFaces)
- {
- if (numVertices > mMaxVertices || numFaces > mMaxFaces)
- {
- Resize(numVertices, numFaces);
- }
-
- D3D11_MAPPED_SUBRESOURCE res;
-
- // vertices
- if (positions)
- {
- mDeviceContext->Map(positionBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- for (int i=0; i < numVertices; ++i)
- ((Vec3*)res.pData)[i] = Vec3(positions[i]);
- mDeviceContext->Unmap(positionBuffer, 0);
- }
-
- if (normals)
- {
- mDeviceContext->Map(normalBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- for (int i=0; i < numVertices; ++i)
- ((Vec3*)res.pData)[i] = Vec3(normals[i]);
- mDeviceContext->Unmap(normalBuffer, 0);
- }
-
- if (texcoords)
- {
- mDeviceContext->Map(texcoordBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- memcpy(res.pData, texcoords, sizeof(Vec2)*numVertices);
- mDeviceContext->Unmap(texcoordBuffer, 0);
- }
-
- if (colors)
- {
- mDeviceContext->Map(colorBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- memcpy(res.pData, colors, sizeof(Vec4)*numVertices);
- mDeviceContext->Unmap(colorBuffer, 0);
- }
-
- // indices
- if (indices)
- {
- mDeviceContext->Map(indexBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- memcpy(res.pData, indices, sizeof(int)*numFaces*3);
- mDeviceContext->Unmap(indexBuffer, 0);
- }
-
- mNumVertices = numVertices;
- mNumFaces = numFaces;
- }
-
- int mNumVertices = 0;
- int mNumFaces = 0;
-
- int mMaxVertices = 0;
- int mMaxFaces = 0;
-
- ID3D11Device* mDevice;
- ID3D11DeviceContext* mDeviceContext;
-};
-
-
-
-enum MeshRenderMode
-{
- MESH_RENDER_WIREFRAME,
- MESH_RENDER_SOLID,
- NUM_MESH_RENDER_MODES
-};
-
-enum MeshCullMode
-{
- MESH_CULL_NONE,
- MESH_CULL_FRONT,
- MESH_CULL_BACK,
- NUM_MESH_CULL_MODES
-};
-
-enum MeshDrawStage
-{
- MESH_DRAW_NULL,
- MESH_DRAW_SHADOW,
- MESH_DRAW_REFLECTION,
- MESH_DRAW_LIGHT
-};
-
-typedef DirectX::XMFLOAT3 float3;
-typedef DirectX::XMFLOAT4 float4;
-typedef DirectX::XMFLOAT4X4 float4x4;
-
-struct MeshDrawParams
-{
- MeshRenderMode renderMode;
- MeshCullMode cullMode;
- MeshDrawStage renderStage;
-
- DirectX::XMMATRIX projection;
- DirectX::XMMATRIX view;
- DirectX::XMMATRIX model;
-
- float4x4 objectTransform;
-
- DirectX::XMMATRIX lightTransform;
- float3 lightPos;
- float3 lightDir;
-
- float4 clipPlane;
- float4 fogColor;
- float4 color;
- float4 secondaryColor;
-
- float bias;
- float expand;
- float spotMin;
- float spotMax;
-
- int grid;
- int tex;
- int colorArray;
-
- float4 shadowTaps[12];
- ShadowMap* shadowMap;
-};
-
-struct MeshRenderer
-{
- ID3D11Device* m_device = nullptr;
- ID3D11DeviceContext* m_deviceContext = nullptr;
-
- ID3D11InputLayout* m_inputLayout = nullptr;
- ID3D11VertexShader* m_meshVS = nullptr;
- ID3D11PixelShader* m_meshPS = nullptr;
- ID3D11PixelShader* m_meshPS_Shadow = nullptr;
- ID3D11Buffer* m_constantBuffer = nullptr;
- ID3D11RasterizerState* m_rasterizerStateRH[NUM_MESH_RENDER_MODES][NUM_MESH_CULL_MODES];
-
- ~MeshRenderer()
- {
- Destroy();
- }
-
- void Init(ID3D11Device* device, ID3D11DeviceContext* context);
- void Destroy();
-
- void Draw(const GpuMesh* mesh, const MeshDrawParams* params);
-
-};
-
-
-
diff --git a/demo/d3d11/meshRenderD3D11.cpp b/demo/d3d11/meshRenderD3D11.cpp
new file mode 100644
index 0000000..8936f04
--- /dev/null
+++ b/demo/d3d11/meshRenderD3D11.cpp
@@ -0,0 +1,341 @@
+/*
+ * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+//direct3d headers
+
+#define NOMINMAX
+
+#include <d3d11.h>
+
+// include the Direct3D Library file
+#pragma comment (lib, "d3d11.lib")
+
+#include <math.h>
+
+#include "meshRenderD3D11.h"
+#include "appD3d11Ctx.h"
+
+
+#include "../d3d/shaders/meshVS.hlsl.h"
+#include "../d3d/shaders/meshPS.hlsl.h"
+#include "../d3d/shaders/meshShadowPS.hlsl.h"
+
+#include "../d3d/shaderCommonD3D.h"
+
+#include "shadowMapD3D11.h"
+
+// Make async compute benchmark shader have a unique name
+namespace AsyncComputeBench
+{
+#include "../d3d/shaders/meshAsyncComputeBenchPS.hlsl.h"
+}
+
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! GpuMeshD3D11 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+
+GpuMeshD3D11::GpuMeshD3D11(ID3D11Device* device, ID3D11DeviceContext* deviceContext)
+ : m_device(device)
+ , m_deviceContext(deviceContext)
+ , m_numFaces(0)
+ , m_numVertices(0)
+ , m_maxVertices(0)
+ , m_maxFaces(0)
+{
+}
+
+void GpuMeshD3D11::resize(int numVertices, int numFaces)
+{
+ {
+ // vertex buffers
+ D3D11_BUFFER_DESC bufDesc;
+ bufDesc.ByteWidth = sizeof(Vec3)*numVertices;
+ bufDesc.Usage = D3D11_USAGE_DYNAMIC;
+ bufDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
+ bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+ bufDesc.MiscFlags = 0;
+
+ m_device->CreateBuffer(&bufDesc, NULL, m_positionBuffer.ReleaseAndGetAddressOf());
+ m_device->CreateBuffer(&bufDesc, NULL, m_normalBuffer.ReleaseAndGetAddressOf());
+
+ bufDesc.ByteWidth = sizeof(Vec2)*numVertices;
+ m_device->CreateBuffer(&bufDesc, NULL, m_texcoordBuffer.ReleaseAndGetAddressOf());
+
+ bufDesc.ByteWidth = sizeof(Vec4)*numVertices;
+ m_device->CreateBuffer(&bufDesc, NULL, m_colorBuffer.ReleaseAndGetAddressOf());
+ }
+
+ {
+ // index buffer
+ D3D11_BUFFER_DESC bufDesc;
+ bufDesc.ByteWidth = sizeof(int)*numFaces * 3;
+ bufDesc.Usage = D3D11_USAGE_DYNAMIC;
+ bufDesc.BindFlags = D3D11_BIND_INDEX_BUFFER;
+ bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+ bufDesc.MiscFlags = 0;
+
+ m_device->CreateBuffer(&bufDesc, NULL, &m_indexBuffer);
+ }
+
+ m_maxVertices = numVertices;
+ m_maxFaces = numFaces;
+}
+
+void GpuMeshD3D11::updateData(const Vec3* positions, const Vec3* normals, const Vec2* texcoords, const Vec4* colors, const int* indices, int numVertices, int numFaces)
+{
+ if (numVertices > m_maxVertices || numFaces > m_maxFaces)
+ {
+ resize(numVertices, numFaces);
+ }
+
+ D3D11_MAPPED_SUBRESOURCE res;
+
+ // vertices
+ if (positions)
+ {
+ m_deviceContext->Map(m_positionBuffer.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
+ memcpy(res.pData, positions, sizeof(Vec3)*numVertices);
+ m_deviceContext->Unmap(m_positionBuffer.Get(), 0);
+ }
+
+ if (normals)
+ {
+ m_deviceContext->Map(m_normalBuffer.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
+ memcpy(res.pData, normals, sizeof(Vec3)*numVertices);
+ m_deviceContext->Unmap(m_normalBuffer.Get(), 0);
+ }
+
+ if (texcoords)
+ {
+ m_deviceContext->Map(m_texcoordBuffer.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
+ memcpy(res.pData, texcoords, sizeof(Vec2)*numVertices);
+ m_deviceContext->Unmap(m_texcoordBuffer.Get(), 0);
+ }
+
+ if (colors)
+ {
+ m_deviceContext->Map(m_colorBuffer.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
+ memcpy(res.pData, colors, sizeof(Vec4)*numVertices);
+ m_deviceContext->Unmap(m_colorBuffer.Get(), 0);
+ }
+
+ // indices
+ if (indices)
+ {
+ m_deviceContext->Map(m_indexBuffer.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
+ memcpy(res.pData, indices, sizeof(int)*numFaces * 3);
+ m_deviceContext->Unmap(m_indexBuffer.Get(), 0);
+ }
+
+ m_numVertices = numVertices;
+ m_numFaces = numFaces;
+}
+
+void GpuMeshD3D11::updateData(const Vec4* positions, const Vec4* normals, const Vec2* texcoords, const Vec4* colors, const int* indices, int numVertices, int numFaces)
+{
+ if (numVertices > m_maxVertices || numFaces > m_maxFaces)
+ {
+ resize(numVertices, numFaces);
+ }
+
+ D3D11_MAPPED_SUBRESOURCE res;
+
+ // vertices
+ if (positions)
+ {
+ m_deviceContext->Map(m_positionBuffer.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
+ for (int i = 0; i < numVertices; ++i)
+ ((Vec3*)res.pData)[i] = Vec3(positions[i]);
+ m_deviceContext->Unmap(m_positionBuffer.Get(), 0);
+ }
+
+ if (normals)
+ {
+ m_deviceContext->Map(m_normalBuffer.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
+ for (int i = 0; i < numVertices; ++i)
+ ((Vec3*)res.pData)[i] = Vec3(normals[i]);
+ m_deviceContext->Unmap(m_normalBuffer.Get(), 0);
+ }
+
+ if (texcoords)
+ {
+ m_deviceContext->Map(m_texcoordBuffer.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
+ memcpy(res.pData, texcoords, sizeof(Vec2)*numVertices);
+ m_deviceContext->Unmap(m_texcoordBuffer.Get(), 0);
+ }
+
+ if (colors)
+ {
+ m_deviceContext->Map(m_colorBuffer.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
+ memcpy(res.pData, colors, sizeof(Vec4)*numVertices);
+ m_deviceContext->Unmap(m_colorBuffer.Get(), 0);
+ }
+
+ // indices
+ if (indices)
+ {
+ m_deviceContext->Map(m_indexBuffer.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
+ memcpy(res.pData, indices, sizeof(int)*numFaces * 3);
+ m_deviceContext->Unmap(m_indexBuffer.Get(), 0);
+ }
+
+ m_numVertices = numVertices;
+ m_numFaces = numFaces;
+}
+
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! MeshRendererD3D11 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+
+void MeshRendererD3D11::init(ID3D11Device* device, ID3D11DeviceContext* context, bool asyncComputeBenchmark)
+{
+ m_device = device;
+ m_deviceContext = context;
+
+ // create the input layout
+ {
+ D3D11_INPUT_ELEMENT_DESC inputElementDescs[] =
+ {
+ { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
+ { "NORMAL", 0, DXGI_FORMAT_R32G32B32_FLOAT, 1, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
+ { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 2, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
+ { "COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 3, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
+ };
+
+ m_device->CreateInputLayout(inputElementDescs, 4, g_meshVS, sizeof(g_meshVS), &m_inputLayout);
+ }
+
+ // create the shaders
+
+ if (asyncComputeBenchmark)
+ {
+ m_device->CreatePixelShader(AsyncComputeBench::g_meshPS, sizeof(AsyncComputeBench::g_meshPS), nullptr, &m_meshPs);
+ }
+ else
+ {
+ m_device->CreatePixelShader(g_meshPS, sizeof(g_meshPS), nullptr, &m_meshPs);
+ }
+
+ m_device->CreateVertexShader(g_meshVS, sizeof(g_meshVS), nullptr, &m_meshVs);
+ m_device->CreatePixelShader(g_meshPS_Shadow, sizeof(g_meshPS_Shadow), nullptr, &m_meshShadowPs);
+
+ // create a constant buffer
+ {
+ D3D11_BUFFER_DESC bufDesc;
+ bufDesc.ByteWidth = sizeof(Hlsl::MeshShaderConst);
+ bufDesc.Usage = D3D11_USAGE_DYNAMIC;
+ bufDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
+ bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+ bufDesc.MiscFlags = 0;
+
+ m_device->CreateBuffer(&bufDesc, nullptr, &m_constantBuffer);
+ }
+
+ // create the rastersizer state
+ for (int i = 0; i < NUM_MESH_RENDER_MODES; i++)
+ {
+ for (int j = 0; j < NUM_MESH_CULL_MODES; j++)
+
+ {
+ D3D11_RASTERIZER_DESC desc = {};
+ desc.FillMode = (D3D11_FILL_MODE)(D3D11_FILL_WIREFRAME + i);
+ desc.CullMode = (D3D11_CULL_MODE)(D3D11_CULL_NONE + j);
+ desc.FrontCounterClockwise = TRUE; // This is non-default
+ desc.DepthBias = 0;
+ desc.DepthBiasClamp = 0.f;
+ desc.SlopeScaledDepthBias = 0.f;
+ desc.DepthClipEnable = TRUE;
+ desc.ScissorEnable = FALSE;
+ desc.MultisampleEnable = FALSE;
+ desc.AntialiasedLineEnable = FALSE;
+
+ m_device->CreateRasterizerState(&desc, &m_rasterizerState[i][j]);
+ }
+ }
+}
+
+void MeshRendererD3D11::draw(const GpuMeshD3D11* mesh, const MeshDrawParamsD3D* params)
+{
+ using namespace DirectX;
+
+ // update constant buffer
+ {
+ D3D11_MAPPED_SUBRESOURCE mappedResource = {};
+ if (SUCCEEDED(m_deviceContext->Map(m_constantBuffer.Get(), 0u, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource)))
+ {
+ Hlsl::MeshShaderConst constBuf;
+ RenderParamsUtilD3D::calcMeshConstantBuffer(*params, constBuf);
+ memcpy(mappedResource.pData, &constBuf, sizeof(Hlsl::MeshShaderConst));
+ m_deviceContext->Unmap(m_constantBuffer.Get(), 0u);
+ }
+ }
+
+ m_deviceContext->VSSetShader(m_meshVs.Get(), nullptr, 0u);
+ m_deviceContext->GSSetShader(nullptr, nullptr, 0u);
+
+ switch (params->renderStage)
+ {
+ case MESH_DRAW_SHADOW:
+ {
+ m_deviceContext->PSSetShader(m_meshShadowPs.Get(), nullptr, 0u);
+ break;
+ }
+ case MESH_DRAW_LIGHT:
+ {
+ m_deviceContext->PSSetShader(m_meshPs.Get(), nullptr, 0u);
+
+ ShadowMapD3D11* shadowMap = (ShadowMapD3D11*)params->shadowMap;
+ ID3D11ShaderResourceView* srvs[1] = { shadowMap->m_depthSrv.Get() };
+ m_deviceContext->PSSetShaderResources(0, 1, srvs);
+ ID3D11SamplerState* sampStates[1] = { shadowMap->m_linearSampler.Get() };
+ m_deviceContext->PSSetSamplers(0, 1, sampStates);
+ break;
+ }
+ default:
+ assert(false);
+ break;
+ }
+
+ m_deviceContext->IASetInputLayout(m_inputLayout.Get());
+ m_deviceContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
+
+ m_deviceContext->VSSetConstantBuffers(0, 1, m_constantBuffer.GetAddressOf());
+ m_deviceContext->PSSetConstantBuffers(0, 1, m_constantBuffer.GetAddressOf());
+
+ ID3D11Buffer* vertexBuffers[4] =
+ {
+ mesh->m_positionBuffer.Get(),
+ mesh->m_normalBuffer.Get(),
+ mesh->m_texcoordBuffer.Get(),
+ mesh->m_colorBuffer.Get(),
+ };
+
+ unsigned int vertexBufferStrides[4] =
+ {
+ sizeof(Vec3),
+ sizeof(Vec3),
+ sizeof(Vec2),
+ sizeof(Vec4)
+ };
+
+ unsigned int vertexBufferOffsets[4] = { 0, 0, 0, 0 };
+
+ m_deviceContext->IASetVertexBuffers(0, 4, vertexBuffers, vertexBufferStrides, vertexBufferOffsets);
+ m_deviceContext->IASetIndexBuffer(mesh->m_indexBuffer.Get(), DXGI_FORMAT_R32_UINT, 0u);
+
+ float depthSign = DirectX::XMVectorGetW(params->projection.r[2]);
+ if (depthSign < 0.f)
+ {
+ m_deviceContext->RSSetState(m_rasterizerState[params->renderMode][params->cullMode].Get());
+ }
+
+ m_deviceContext->DrawIndexed((UINT)mesh->m_numFaces*3, 0, 0);
+
+ if (depthSign < 0.f)
+ {
+ m_deviceContext->RSSetState(nullptr);
+ }
+}
diff --git a/demo/d3d11/meshRenderD3D11.h b/demo/d3d11/meshRenderD3D11.h
new file mode 100644
index 0000000..d7d6d1c
--- /dev/null
+++ b/demo/d3d11/meshRenderD3D11.h
@@ -0,0 +1,74 @@
+
+/*
+ * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+#pragma once
+
+#include <DirectXMath.h>
+
+#include "appD3D11Ctx.h"
+
+#include "core/maths.h"
+#include "../d3d/renderParamsD3D.h"
+
+#include <wrl.h>
+using namespace Microsoft::WRL;
+
+struct GpuMeshD3D11
+{
+ GpuMeshD3D11(ID3D11Device* device, ID3D11DeviceContext* deviceContext) ;
+
+ void resize(int numVertices, int numFaces);
+
+ void updateData(const Vec3* positions, const Vec3* normals, const Vec2* texcoords, const Vec4* colors, const int* indices, int numVertices, int numFaces);
+ // duplicate method to handle conversion from vec4 to vec3 positions / normals
+ void updateData(const Vec4* positions, const Vec4* normals, const Vec2* texcoords, const Vec4* colors, const int* indices, int numVertices, int numFaces);
+
+ ComPtr<ID3D11Buffer> m_positionBuffer;
+ ComPtr<ID3D11Buffer> m_normalBuffer;
+ ComPtr<ID3D11Buffer> m_texcoordBuffer;
+ ComPtr<ID3D11Buffer> m_colorBuffer;
+
+ ComPtr<ID3D11Buffer> m_indexBuffer;
+
+ int m_numVertices;
+ int m_numFaces;
+
+ int m_maxVertices;
+ int m_maxFaces;
+
+ ID3D11Device* m_device;
+ ID3D11DeviceContext* m_deviceContext;
+};
+
+
+struct MeshRendererD3D11
+{
+ void init(ID3D11Device* device, ID3D11DeviceContext* context, bool asyncComputeBenchmark);
+ void draw(const GpuMeshD3D11* mesh, const MeshDrawParamsD3D* params);
+
+ MeshRendererD3D11():
+ m_device(nullptr),
+ m_deviceContext(nullptr)
+ {}
+
+ ID3D11Device* m_device;
+ ID3D11DeviceContext* m_deviceContext;
+
+ ComPtr<ID3D11InputLayout> m_inputLayout;
+ ComPtr<ID3D11VertexShader> m_meshVs;
+ ComPtr<ID3D11PixelShader> m_meshPs;
+ ComPtr<ID3D11PixelShader> m_meshShadowPs;
+ ComPtr<ID3D11Buffer> m_constantBuffer;
+ ComPtr<ID3D11RasterizerState> m_rasterizerState[NUM_MESH_RENDER_MODES][NUM_MESH_CULL_MODES];
+};
+
+
+
diff --git a/demo/d3d11/pointRender.h b/demo/d3d11/pointRender.h
deleted file mode 100644
index 9631287..0000000
--- a/demo/d3d11/pointRender.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
- *
- * NVIDIA CORPORATION and its licensors retain all intellectual property
- * and proprietary rights in and to this software, related documentation
- * and any modifications thereto. Any use, reproduction, disclosure or
- * distribution of this software and related documentation without an express
- * license agreement from NVIDIA CORPORATION is strictly prohibited.
- */
-
-#pragma once
-
-#include <DirectXMath.h>
-
-#include "shadowMap.h"
-
-enum PointRenderMode
-{
- POINT_RENDER_WIREFRAME,
- POINT_RENDER_SOLID,
- NUM_POINT_RENDER_MODES
-};
-
-enum PointCullMode
-{
- POINT_CULL_NONE,
- POINT_CULL_FRONT,
- POINT_CULL_BACK,
- NUM_POINT_CULL_MODES
-};
-
-enum PointDrawStage
-{
- POINT_DRAW_NULL,
- POINT_DRAW_SHADOW,
- POINT_DRAW_REFLECTION,
- POINT_DRAW_LIGHT
-};
-
-typedef DirectX::XMFLOAT3 float3;
-typedef DirectX::XMFLOAT4 float4;
-typedef DirectX::XMFLOAT4X4 float4x4;
-
-struct PointDrawParams
-{
- PointRenderMode renderMode;
- PointCullMode cullMode;
- PointDrawStage renderStage;
-
- DirectX::XMMATRIX projection;
- DirectX::XMMATRIX view;
- DirectX::XMMATRIX model;
-
- float pointRadius; // point size in world space
- float pointScale; // scale to calculate size in pixels
- float spotMin;
- float spotMax;
-
- DirectX::XMMATRIX lightTransform;
- float3 lightPos;
- float3 lightDir;
-
- float4 colors[8];
-
- float4 shadowTaps[12];
- ShadowMap* shadowMap;
-
- int mode;
-};
-
-
-struct PointRenderer
-{
- ID3D11Device* m_device = nullptr;
- ID3D11DeviceContext* m_deviceContext = nullptr;
-
- ID3D11InputLayout* m_inputLayout = nullptr;
- ID3D11VertexShader* m_pointVS = nullptr;
- ID3D11GeometryShader* m_pointGS = nullptr;
- ID3D11PixelShader* m_pointPS = nullptr;
- ID3D11Buffer* m_constantBuffer = nullptr;
- ID3D11RasterizerState* m_rasterizerStateRH[NUM_POINT_RENDER_MODES][NUM_POINT_CULL_MODES];
-
- void Init(ID3D11Device* device, ID3D11DeviceContext* deviceContext);
- void Destroy();
-
- void Draw(const PointDrawParams* params, ID3D11Buffer* positions, ID3D11Buffer* colors, ID3D11Buffer* indices, int numParticles, int offset);
-};
diff --git a/demo/d3d11/pointRender.cpp b/demo/d3d11/pointRenderD3D11.cpp
index 1d3a8b0..20dde46 100644
--- a/demo/d3d11/pointRender.cpp
+++ b/demo/d3d11/pointRenderD3D11.cpp
@@ -21,17 +21,18 @@
#include "appD3D11Ctx.h"
-#include "pointRender.h"
+#include "shadowMapD3D11.h"
-#include "shaders/pointVS.hlsl.h"
-#include "shaders/pointGS.hlsl.h"
-#include "shaders/pointPS.hlsl.h"
+#include "pointRenderD3D11.h"
-#define EXCLUDE_SHADER_STRUCTS 1
-#include "shaders/shaderCommon.h"
+#include "../d3d/shaders/pointVS.hlsl.h"
+#include "../d3d/shaders/pointGS.hlsl.h"
+#include "../d3d/shaders/pointPS.hlsl.h"
+#include "../d3d/shaders/pointShadowPS.hlsl.h"
+#include "../d3d/shaderCommonD3D.h"
-void PointRenderer::Init(ID3D11Device* device, ID3D11DeviceContext* context)
+void PointRendererD3D11::init(ID3D11Device* device, ID3D11DeviceContext* context)
{
m_device = device;
m_deviceContext = context;
@@ -49,14 +50,15 @@ void PointRenderer::Init(ID3D11Device* device, ID3D11DeviceContext* context)
}
// create the shaders
- m_device->CreateVertexShader(g_pointVS, sizeof(g_pointVS), nullptr, &m_pointVS);
- m_device->CreateGeometryShader(g_pointGS, sizeof(g_pointGS), nullptr, &m_pointGS);
- m_device->CreatePixelShader(g_pointPS, sizeof(g_pointPS), nullptr, &m_pointPS);
+ m_device->CreateVertexShader(g_pointVS, sizeof(g_pointVS), nullptr, &m_pointVs);
+ m_device->CreateGeometryShader(g_pointGS, sizeof(g_pointGS), nullptr, &m_pointGs);
+ m_device->CreatePixelShader(g_pointPS, sizeof(g_pointPS), nullptr, &m_pointPs);
+ m_device->CreatePixelShader(g_pointShadowPS, sizeof(g_pointShadowPS), nullptr, &m_pointShadowPs);
// create a constant buffer
{
D3D11_BUFFER_DESC bufDesc;
- bufDesc.ByteWidth = sizeof(PointShaderConst); // 64 * sizeof(float);
+ bufDesc.ByteWidth = sizeof(Hlsl::PointShaderConst); // 64 * sizeof(float);
bufDesc.Usage = D3D11_USAGE_DYNAMIC;
bufDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
@@ -65,7 +67,7 @@ void PointRenderer::Init(ID3D11Device* device, ID3D11DeviceContext* context)
m_device->CreateBuffer(&bufDesc, nullptr, &m_constantBuffer);
}
- // create the rastersizer state
+ // create the rasterizer state
for (int i = 0; i < NUM_POINT_RENDER_MODES; i++)
{
for (int j = 0; j < NUM_POINT_CULL_MODES; j++)
@@ -83,27 +85,12 @@ void PointRenderer::Init(ID3D11Device* device, ID3D11DeviceContext* context)
desc.MultisampleEnable = FALSE;
desc.AntialiasedLineEnable = FALSE;
- m_device->CreateRasterizerState(&desc, &m_rasterizerStateRH[i][j]);
+ m_device->CreateRasterizerState(&desc, &m_rasterizerState[i][j]);
}
}
}
-void PointRenderer::Destroy()
-{
- COMRelease(m_inputLayout);
- COMRelease(m_pointVS);
- COMRelease(m_pointGS);
- COMRelease(m_pointPS);
- COMRelease(m_constantBuffer);
-
- for (int i = 0; i < NUM_POINT_RENDER_MODES; i++)
- for (int j = 0; j < NUM_POINT_CULL_MODES; j++)
- COMRelease(m_rasterizerStateRH[i][j]);
-}
-
-
-
-void PointRenderer::Draw(const PointDrawParams* params, ID3D11Buffer* positions, ID3D11Buffer* colors, ID3D11Buffer* indices, int numParticles, int offset)
+void PointRendererD3D11::draw(const PointDrawParamsD3D* params, ID3D11Buffer* positions, ID3D11Buffer* colors, ID3D11Buffer* indices, int numParticles, int offset)
{
using namespace DirectX;
@@ -112,64 +99,45 @@ void PointRenderer::Draw(const PointDrawParams* params, ID3D11Buffer* positions,
// update constant buffer
{
D3D11_MAPPED_SUBRESOURCE mappedResource = {};
- if (S_OK == deviceContext->Map(m_constantBuffer, 0u, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource))
+ if (SUCCEEDED(deviceContext->Map(m_constantBuffer.Get(), 0u, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource)))
{
- PointShaderConst cParams;
-
- cParams.modelview = (float4x4&)XMMatrixMultiply(params->model, params->view);
- cParams.projection = (float4x4&)params->projection;
-
- cParams.pointRadius = params->pointRadius;
- cParams.pointScale = params->pointScale;
- cParams.spotMin = params->spotMin;
- cParams.spotMax = params->spotMax;
-
- cParams.lightTransform = (float4x4&)params->lightTransform;
- cParams.lightPos = params->lightPos;
- cParams.lightDir = params->lightDir;
-
- for (int i = 0; i < 8; i++)
- cParams.colors[i] = params->colors[i];
-
- memcpy(cParams.shadowTaps, params->shadowTaps, sizeof(cParams.shadowTaps));
-
- cParams.mode = params->mode;
-
- memcpy(mappedResource.pData, &cParams, sizeof(PointShaderConst));
-
- deviceContext->Unmap(m_constantBuffer, 0u);
+ Hlsl::PointShaderConst constBuf;
+ RenderParamsUtilD3D::calcPointConstantBuffer(*params, constBuf);
+ memcpy(mappedResource.pData, &constBuf, sizeof(Hlsl::PointShaderConst));
+ deviceContext->Unmap(m_constantBuffer.Get(), 0u);
}
}
- deviceContext->VSSetShader(m_pointVS, nullptr, 0u);
- deviceContext->GSSetShader(m_pointGS, nullptr, 0u);
- deviceContext->PSSetShader(m_pointPS, nullptr, 0u);
+ deviceContext->VSSetShader(m_pointVs.Get(), nullptr, 0u);
+ deviceContext->GSSetShader(m_pointGs.Get(), nullptr, 0u);
+ deviceContext->PSSetShader(m_pointPs.Get(), nullptr, 0u);
if (params->shadowMap)
{
- ShadowMap* shadowMap = (ShadowMap*)params->shadowMap;
+ ShadowMapD3D11* shadowMap = (ShadowMapD3D11*)params->shadowMap;
if (params->renderStage == POINT_DRAW_SHADOW)
{
- ID3D11ShaderResourceView* ppSRV[1] = { nullptr };
- deviceContext->PSSetShaderResources(0, 1, ppSRV);
- ID3D11SamplerState* ppSS[1] = { shadowMap->m_linearSampler.Get() };
- deviceContext->PSSetSamplers(0, 1, ppSS);
+ ID3D11ShaderResourceView* srvs[1] = { nullptr };
+ deviceContext->PSSetShaderResources(0, 1, srvs);
+ ID3D11SamplerState* samps[1] = { shadowMap->m_linearSampler.Get() };
+ deviceContext->PSSetSamplers(0, 1, samps);
+ deviceContext->PSSetShader(m_pointShadowPs.Get(), nullptr, 0u);
}
else
{
- ID3D11ShaderResourceView* ppSRV[1] = { shadowMap->m_depthSrv.Get() };
- deviceContext->PSSetShaderResources(0, 1, ppSRV);
- ID3D11SamplerState* ppSS[1] = { shadowMap->m_linearSampler.Get() };
- deviceContext->PSSetSamplers(0, 1, ppSS);
+ ID3D11ShaderResourceView* srvs[1] = { shadowMap->m_depthSrv.Get() };
+ deviceContext->PSSetShaderResources(0, 1, srvs);
+ ID3D11SamplerState* samps[1] = { shadowMap->m_linearSampler.Get() };
+ deviceContext->PSSetSamplers(0, 1, samps);
}
}
- deviceContext->IASetInputLayout(m_inputLayout);
+ deviceContext->IASetInputLayout(m_inputLayout.Get());
deviceContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_POINTLIST);
- deviceContext->VSSetConstantBuffers(0, 1, &m_constantBuffer);
- deviceContext->GSSetConstantBuffers(0, 1, &m_constantBuffer);
- deviceContext->PSSetConstantBuffers(0, 1, &m_constantBuffer);
+ deviceContext->VSSetConstantBuffers(0, 1, m_constantBuffer.GetAddressOf());
+ deviceContext->GSSetConstantBuffers(0, 1, m_constantBuffer.GetAddressOf());
+ deviceContext->PSSetConstantBuffers(0, 1, m_constantBuffer.GetAddressOf());
ID3D11Buffer* vertexBuffers[3] =
{
@@ -190,11 +158,10 @@ void PointRenderer::Draw(const PointDrawParams* params, ID3D11Buffer* positions,
deviceContext->IASetVertexBuffers(0, 3, vertexBuffers, vertexBufferStrides, vertexBufferOffsets);
deviceContext->IASetIndexBuffer(indices, DXGI_FORMAT_R32_UINT, 0u);
-
float depthSign = DirectX::XMVectorGetW(params->projection.r[2]);
if (depthSign < 0.f)
{
- deviceContext->RSSetState(m_rasterizerStateRH[params->renderMode][params->cullMode]);
+ deviceContext->RSSetState(m_rasterizerState[params->renderMode][params->cullMode].Get());
}
deviceContext->DrawIndexed(numParticles, offset, 0);
diff --git a/demo/d3d11/pointRenderD3D11.h b/demo/d3d11/pointRenderD3D11.h
new file mode 100644
index 0000000..71a6247
--- /dev/null
+++ b/demo/d3d11/pointRenderD3D11.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+#pragma once
+
+#include "../d3d/renderParamsD3D.h"
+
+#include <DirectXMath.h>
+#include <wrl.h>
+using namespace Microsoft::WRL;
+
+
+struct PointRendererD3D11
+{
+ void init(ID3D11Device* device, ID3D11DeviceContext* deviceContext);
+
+ void draw(const PointDrawParamsD3D* params, ID3D11Buffer* positions, ID3D11Buffer* colors, ID3D11Buffer* indices, int numParticles, int offset);
+
+ PointRendererD3D11():
+ m_device(nullptr),
+ m_deviceContext(nullptr)
+ {}
+
+ ID3D11Device* m_device;
+ ID3D11DeviceContext* m_deviceContext;
+
+ ComPtr<ID3D11InputLayout> m_inputLayout;
+ ComPtr<ID3D11VertexShader> m_pointVs;
+ ComPtr<ID3D11GeometryShader> m_pointGs;
+ ComPtr<ID3D11PixelShader> m_pointPs;
+ ComPtr<ID3D11PixelShader> m_pointShadowPs;
+ ComPtr<ID3D11Buffer> m_constantBuffer;
+
+ // Assumes right handed
+ ComPtr<ID3D11RasterizerState> m_rasterizerState[NUM_POINT_RENDER_MODES][NUM_POINT_CULL_MODES];
+};
diff --git a/demo/d3d11/renderTarget.cpp b/demo/d3d11/renderTargetD3D11.cpp
index da71e4f..4035039 100644
--- a/demo/d3d11/renderTarget.cpp
+++ b/demo/d3d11/renderTargetD3D11.cpp
@@ -8,9 +8,9 @@
* license agreement from NVIDIA CORPORATION is strictly prohibited.
*/
-#include "renderTarget.h"
+#include "renderTargetD3D11.h"
-RenderTarget::RenderTarget()
+RenderTargetD3D11::RenderTargetD3D11()
{
}
@@ -56,7 +56,7 @@ static D3D11_SHADER_RESOURCE_VIEW_DESC _getSrvDesc(DXGI_FORMAT format)
return desc;
}
-HRESULT RenderTarget::Init(ID3D11Device* device, int width, int height, bool depthTest)
+HRESULT RenderTargetD3D11::init(ID3D11Device* device, int width, int height, bool depthTest)
{
// set viewport
{
@@ -130,7 +130,7 @@ HRESULT RenderTarget::Init(ID3D11Device* device, int width, int height, bool dep
return S_OK;
}
-void RenderTarget::BindAndClear(ID3D11DeviceContext* context)
+void RenderTargetD3D11::bindAndClear(ID3D11DeviceContext* context)
{
ID3D11RenderTargetView* ppRtv[1] = { m_backRtv.Get() };
context->OMSetRenderTargets(1, ppRtv, m_depthDsv.Get());
diff --git a/demo/d3d11/renderTarget.h b/demo/d3d11/renderTargetD3D11.h
index ae5ff40..b299bec 100644
--- a/demo/d3d11/renderTarget.h
+++ b/demo/d3d11/renderTargetD3D11.h
@@ -20,15 +20,15 @@ using namespace Microsoft::WRL;
#define NV_NULL nullptr
#define NV_RETURN_ON_FAIL(x) { HRESULT _res = (x); if (FAILED(_res)) { return _res; } }
-struct RenderTarget
+struct RenderTargetD3D11
{
public:
- RenderTarget();
+ RenderTargetD3D11();
- HRESULT Init(ID3D11Device* device, int width, int height, bool depthTest = true);
+ HRESULT init(ID3D11Device* device, int width, int height, bool depthTest = true);
- void BindAndClear(ID3D11DeviceContext* context);
+ void bindAndClear(ID3D11DeviceContext* context);
XMMATRIX m_lightView;
XMMATRIX m_lightProjection;
diff --git a/demo/d3d11/shaders/diffuseGS.hlsl b/demo/d3d11/shaders/diffuseGS.hlsl
deleted file mode 100644
index e7a92db..0000000
--- a/demo/d3d11/shaders/diffuseGS.hlsl
+++ /dev/null
@@ -1,176 +0,0 @@
-#include "shaderCommon.h"
-
-cbuffer constBuf : register(b0)
-{
- DiffuseShaderConst gParams;
-};
-
-static const float2 corners[4] =
-{
- float2(0.0, 1.0),
- float2(0.0, 0.0),
- float2(1.0, 1.0),
- float2(1.0, 0.0)
-};
-
-[maxvertexcount(4)]
-void diffuseGS(point DiffuseVertexOut input[1], inout TriangleStream<DiffuseGeometryOut> triStream)
-{
- float4 ndcPos = input[0].ndcPos;
-
- // frustrum culling
- const float ndcBound = 1.0;
- if (ndcPos.x < -ndcBound) return;
- if (ndcPos.x > ndcBound) return;
- if (ndcPos.y < -ndcBound) return;
- if (ndcPos.y > ndcBound) return;
-
- float pointScale = gParams.diffuseScale;
- float velocityScale = 1.0;
-
- float3 v = input[0].viewVel.xyz;
- float3 p = input[0].viewPos.xyz;
-
- // billboard in eye space
- float3 u = float3(0.0, pointScale, 0.0);
- float3 l = float3(pointScale, 0.0, 0.0);
-
- // increase size based on life
- float lifeTime = input[0].worldPos.w;
-
- float lifeFade = lerp(1.0f + gParams.diffusion, 1.0, min(1.0, lifeTime*0.25f));
- u *= lifeFade;
- l *= lifeFade;
-
- float fade = 1.0/(lifeFade*lifeFade);
- float vlen = length(v)*gParams.motionBlurScale;
-
- if (vlen > 0.5)
- {
- float len = max(pointScale, vlen*0.016);
- fade = min(1.0, 2.0/(len/pointScale));
-
- u = normalize(v)*max(pointScale, vlen*0.016); // assume 60hz
- l = normalize(cross(u, float3(0.0, 0.0, -1.0)))*pointScale;
- }
-
-
- {
-
- DiffuseGeometryOut output;
-
- output.worldPos = input[0].worldPos; // vertex world pos (life in w)
- output.viewPos = input[0].viewPos; // vertex eye pos
- output.viewVel.xyz = input[0].viewVel.xyz; // vertex velocity in view space
- output.viewVel.w = fade;
- output.lightDir = mul(gParams.modelView, float4(gParams.lightDir, 0.0));
- output.color = input[0].color;
-
- output.uv = float4(0.0, 1.0, 0.0, 0.0);
- output.clipPos = mul(gParams.projection, float4(p + u - l, 1.0));
- triStream.Append(output);
-
- output.uv = float4(0.0, 0.0, 0.0, 0.0);
- output.clipPos = mul(gParams.projection, float4(p - u - l, 1.0));
- triStream.Append(output);
-
- output.uv = float4(1.0, 1.0, 0.0, 0.0);
- output.clipPos = mul(gParams.projection, float4(p + u + l, 1.0));
- triStream.Append(output);
-
- output.uv = float4(1.0, 0.0, 0.0, 0.0);
- output.clipPos = mul(gParams.projection, float4(p - u + l, 1.0));
- triStream.Append(output);
- }
-
-}
-
-#if 0
-
-
-const char *geometryDiffuseShader =
-"#version 120\n"
-"#extension GL_EXT_geometry_shader4 : enable\n"
-STRINGIFY(
-
-uniform float pointScale; // point size in world space
-uniform float motionBlurScale;
-uniform float diffusion;
-uniform vec3 lightDir;
-
-void main()
-{
- vec4 ndcPos = gl_TexCoordIn[0][5];
-
- // frustrum culling
- const float ndcBound = 1.0;
- if (ndcPos.x < -ndcBound) return;
- if (ndcPos.x > ndcBound) return;
- if (ndcPos.y < -ndcBound) return;
- if (ndcPos.y > ndcBound) return;
-
- float velocityScale = 1.0;
-
- vec3 v = gl_TexCoordIn[0][3].xyz*velocityScale;
- vec3 p = gl_TexCoordIn[0][2].xyz;
-
- // billboard in eye space
- vec3 u = vec3(0.0, pointScale, 0.0);
- vec3 l = vec3(pointScale, 0.0, 0.0);
-
- // increase size based on life
- float lifeFade = mix(1.0f+diffusion, 1.0, min(1.0, gl_TexCoordIn[0][1].w*0.25f));
- u *= lifeFade;
- l *= lifeFade;
-
- //lifeFade = 1.0;
-
- float fade = 1.0/(lifeFade*lifeFade);
- float vlen = length(v)*motionBlurScale;
-
- if (vlen > 0.5)
- {
- float len = max(pointScale, vlen*0.016);
- fade = min(1.0, 2.0/(len/pointScale));
-
- u = normalize(v)*max(pointScale, vlen*0.016); // assume 60hz
- l = normalize(cross(u, vec3(0.0, 0.0, -1.0)))*pointScale;
- }
-
- {
-
- gl_TexCoord[1] = gl_TexCoordIn[0][1]; // vertex world pos (life in w)
- gl_TexCoord[2] = gl_TexCoordIn[0][2]; // vertex eye pos
- gl_TexCoord[3] = gl_TexCoordIn[0][3]; // vertex velocity in view space
- gl_TexCoord[3].w = fade;
- gl_TexCoord[4] = gl_ModelViewMatrix*vec4(lightDir, 0.0);
- gl_TexCoord[4].w = gl_TexCoordIn[0][3].w; // attenuation
- gl_TexCoord[5].xyzw = gl_TexCoordIn[0][4].xyzw; // color
-
- float zbias = 0.0f;//0.00125*2.0;
-
- gl_TexCoord[0] = vec4(0.0, 1.0, 0.0, 0.0);
- gl_Position = gl_ProjectionMatrix * vec4(p + u - l, 1.0);
- gl_Position.z -= zbias;
- EmitVertex();
-
- gl_TexCoord[0] = vec4(0.0, 0.0, 0.0, 0.0);
- gl_Position = gl_ProjectionMatrix * vec4(p - u - l, 1.0);
- gl_Position.z -= zbias;
- EmitVertex();
-
- gl_TexCoord[0] = vec4(1.0, 1.0, 0.0, 0.0);
- gl_Position = gl_ProjectionMatrix * vec4(p + u + l, 1.0);
- gl_Position.z -= zbias;
- EmitVertex();
-
- gl_TexCoord[0] = vec4(1.0, 0.0, 0.0, 0.0);
- gl_Position = gl_ProjectionMatrix * vec4(p - u + l, 1.0);
- gl_Position.z -= zbias;
- EmitVertex();
- }
-}
-);
-
-
-#endif \ No newline at end of file
diff --git a/demo/d3d11/shaders/ellipsoidDepthGS.hlsl b/demo/d3d11/shaders/ellipsoidDepthGS.hlsl
deleted file mode 100644
index 8c892e4..0000000
--- a/demo/d3d11/shaders/ellipsoidDepthGS.hlsl
+++ /dev/null
@@ -1,127 +0,0 @@
-#include "shaderCommon.h"
-
-cbuffer constBuf : register(b0)
-{
- FluidShaderConst gParams;
-};
-
-static const float2 corners[4] =
-{
- float2(0.0, 1.0), float2(0.0, 0.0), float2(1.0, 1.0), float2(1.0, 0.0)
-};
-
-[maxvertexcount(4)]
-void ellipsoidDepthGS(point FluidVertexOut input[1], inout TriangleStream<FluidGeoOut> triStream)
-{
- float4 gl_Position;
- float4 gl_TexCoord[6];
-
- float4 gl_PositionIn[1];
- float4 gl_TexCoordIn[1][6];
-
- gl_PositionIn[0] = input[0].position;
- {
- [unroll]
- for (int i = 0; i < 6; i++)
- gl_TexCoordIn[0][i] = input[0].texCoord[i];
- }
-
- float3 pos = gl_PositionIn[0].xyz;
- float4 bounds = gl_TexCoordIn[0][0];
- float4 ndcPos = gl_TexCoordIn[0][5];
-
- if (ndcPos.w < 0.0)
- return;
-
- // frustrum culling
- const float ndcBound = 1.0;
- if (ndcPos.x < -ndcBound) return;
- if (ndcPos.x > ndcBound) return;
- if (ndcPos.y < -ndcBound) return;
- if (ndcPos.y > ndcBound) return;
-
- float xmin = bounds.x;
- float xmax = bounds.y;
- float ymin = bounds.z;
- float ymax = bounds.w;
-
-
- // inv quadric transform
- gl_TexCoord[0] = gl_TexCoordIn[0][1];
- gl_TexCoord[1] = gl_TexCoordIn[0][2];
- gl_TexCoord[2] = gl_TexCoordIn[0][3];
- gl_TexCoord[3] = gl_TexCoordIn[0][4];
-
- FluidGeoOut output;
-
- gl_Position = float4(xmin, ymax, 0.5, 1.0);
- output.position = gl_Position;
- output.texCoord[0] = gl_TexCoord[0];
- output.texCoord[1] = gl_TexCoord[1];
- output.texCoord[2] = gl_TexCoord[2];
- output.texCoord[3] = gl_TexCoord[3];
- triStream.Append(output);
-
- gl_Position = float4(xmin, ymin, 0.5, 1.0);
- output.position = gl_Position;
- output.texCoord[0] = gl_TexCoord[0];
- output.texCoord[1] = gl_TexCoord[1];
- output.texCoord[2] = gl_TexCoord[2];
- output.texCoord[3] = gl_TexCoord[3];
- triStream.Append(output);
-
- gl_Position = float4(xmax, ymax, 0.5, 1.0);
- output.position = gl_Position;
- output.texCoord[0] = gl_TexCoord[0];
- output.texCoord[1] = gl_TexCoord[1];
- output.texCoord[2] = gl_TexCoord[2];
- output.texCoord[3] = gl_TexCoord[3];
- triStream.Append(output);
-
- gl_Position = float4(xmax, ymin, 0.5, 1.0);
- output.position = gl_Position;
- output.texCoord[0] = gl_TexCoord[0];
- output.texCoord[1] = gl_TexCoord[1];
- output.texCoord[2] = gl_TexCoord[2];
- output.texCoord[3] = gl_TexCoord[3];
- triStream.Append(output);
-
- /*
- void main()
- {
- vec3 pos = gl_PositionIn[0].xyz;
- vec4 bounds = gl_TexCoordIn[0][0];
- vec4 ndcPos = gl_TexCoordIn[0][5];
-
- // frustrum culling
- const float ndcBound = 1.0;
- if (ndcPos.x < -ndcBound) return;
- if (ndcPos.x > ndcBound) return;
- if (ndcPos.y < -ndcBound) return;
- if (ndcPos.y > ndcBound) return;
-
- float xmin = bounds.x;
- float xmax = bounds.y;
- float ymin = bounds.z;
- float ymax = bounds.w;
-
- // inv quadric transform
- gl_TexCoord[0] = gl_TexCoordIn[0][1];
- gl_TexCoord[1] = gl_TexCoordIn[0][2];
- gl_TexCoord[2] = gl_TexCoordIn[0][3];
- gl_TexCoord[3] = gl_TexCoordIn[0][4];
-
- gl_Position = vec4(xmin, ymax, 0.0, 1.0);
- EmitVertex();
-
- gl_Position = vec4(xmin, ymin, 0.0, 1.0);
- EmitVertex();
-
- gl_Position = vec4(xmax, ymax, 0.0, 1.0);
- EmitVertex();
-
- gl_Position = vec4(xmax, ymin, 0.0, 1.0);
- EmitVertex();
- }
- */
-}
diff --git a/demo/d3d11/shaders/ellipsoidDepthPS.hlsl.h b/demo/d3d11/shaders/ellipsoidDepthPS.hlsl.h
deleted file mode 100644
index d21d446..0000000
--- a/demo/d3d11/shaders/ellipsoidDepthPS.hlsl.h
+++ /dev/null
@@ -1,662 +0,0 @@
-#if 0
-//
-// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
-//
-//
-// Buffer Definitions:
-//
-// cbuffer constBuf
-// {
-//
-// struct FluidShaderConst
-// {
-//
-// float4x4 modelviewprojection; // Offset: 0
-// float4x4 modelview; // Offset: 64
-// float4x4 projection; // Offset: 128
-// float4x4 modelview_inverse; // Offset: 192
-// float4x4 projection_inverse; // Offset: 256
-// float4 invTexScale; // Offset: 320
-// float3 invViewport; // Offset: 336
-// float _pad0; // Offset: 348
-// float blurRadiusWorld; // Offset: 352
-// float blurScale; // Offset: 356
-// float blurFalloff; // Offset: 360
-// int debug; // Offset: 364
-// float3 lightPos; // Offset: 368
-// float _pad1; // Offset: 380
-// float3 lightDir; // Offset: 384
-// float _pad2; // Offset: 396
-// float4x4 lightTransform; // Offset: 400
-// float4 color; // Offset: 464
-// float4 clipPosToEye; // Offset: 480
-// float spotMin; // Offset: 496
-// float spotMax; // Offset: 500
-// float ior; // Offset: 504
-// float _pad3; // Offset: 508
-// float4 shadowTaps[12]; // Offset: 512
-//
-// } gParams; // Offset: 0 Size: 704
-//
-// }
-//
-//
-// Resource Bindings:
-//
-// Name Type Format Dim Slot Elements
-// ------------------------------ ---------- ------- ----------- ---- --------
-// constBuf cbuffer NA NA 0 1
-//
-//
-//
-// Input signature:
-//
-// Name Index Mask Register SysValue Format Used
-// -------------------- ----- ------ -------- -------- ------- ------
-// SV_POSITION 0 xyzw 0 POS float xy
-// TEXCOORD 0 xyzw 1 NONE float xyzw
-// TEXCOORD 1 xyzw 2 NONE float xyzw
-// TEXCOORD 2 xyzw 3 NONE float xyzw
-// TEXCOORD 3 xyzw 4 NONE float xyzw
-//
-//
-// Output signature:
-//
-// Name Index Mask Register SysValue Format Used
-// -------------------- ----- ------ -------- -------- ------- ------
-// SV_TARGET 0 xyzw 0 TARGET float xyzw
-// SV_DEPTH 0 N/A oDepth DEPTH float YES
-//
-ps_5_0
-dcl_globalFlags refactoringAllowed
-dcl_constantbuffer cb0[22], immediateIndexed
-dcl_input_ps_siv linear noperspective v0.xy, position
-dcl_input_ps linear v1.xyzw
-dcl_input_ps linear v2.xyzw
-dcl_input_ps linear v3.xyzw
-dcl_input_ps linear v4.xyzw
-dcl_output o0.xyzw
-dcl_output oDepth
-dcl_temps 4
-dp2 r0.x, v0.xxxx, cb0[21].xxxx
-add r0.x, r0.x, l(-1.000000)
-mad r0.y, -v0.y, cb0[21].y, l(1.000000)
-mad r0.y, r0.y, l(2.000000), l(-1.000000)
-mul r0.yzw, r0.yyyy, cb0[17].xxyz
-mad r0.xyz, cb0[16].xyzx, r0.xxxx, r0.yzwy
-add r0.xyz, r0.xyzx, cb0[19].xyzx
-mul r1.xyzw, r0.yyyy, v2.xyzw
-mad r1.xyzw, v1.xyzw, r0.xxxx, r1.xyzw
-mad r1.xyzw, v3.xyzw, r0.zzzz, r1.xyzw
-dp3 r0.w, r1.xyzx, r1.xyzx
-dp3 r1.x, r1.xyzx, v4.xyzx
-mad r1.x, -r1.w, v4.w, r1.x
-dp3 r1.y, v4.xyzx, v4.xyzx
-mad r1.y, -v4.w, v4.w, r1.y
-add r1.z, r1.x, r1.x
-eq r1.w, r0.w, l(0.000000)
-eq r2.x, r1.x, l(0.000000)
-and r1.w, r1.w, r2.x
-mul r2.x, r0.w, r1.y
-mul r2.x, r2.x, l(4.000000)
-mad r2.x, r1.z, r1.z, -r2.x
-lt r2.y, r2.x, l(0.000000)
-not r3.y, r2.y
-lt r1.x, r1.x, l(0.000000)
-movc r1.x, r1.x, l(-1.000000), l(1.000000)
-sqrt r2.x, r2.x
-mad r1.x, r1.x, r2.x, r1.z
-mul r1.x, r1.x, l(-0.500000)
-div r0.w, r1.x, r0.w
-div r1.x, r1.y, r1.x
-lt r1.y, r1.x, r0.w
-movc r3.z, r1.y, r1.x, r0.w
-mov r3.xw, l(0,0,0,-1)
-movc r1.xy, r2.yyyy, r3.xyxx, r3.zwzz
-movc r1.xy, r1.wwww, l(0,-1,0,0), r1.xyxx
-if_nz r1.y
- mul r0.xyz, r0.xyzx, r1.xxxx
- mul r0.yw, r0.yyyy, cb0[9].zzzw
- mad r0.xy, cb0[8].zwzz, r0.xxxx, r0.ywyy
- mad r0.xy, cb0[10].zwzz, r0.zzzz, r0.xyxx
- add r0.xy, r0.xyxx, cb0[11].zwzz
- div oDepth, r0.x, r0.y
- mov o0.x, r0.z
- mov o0.yzw, l(0,1.000000,1.000000,1.000000)
- ret
-endif
-discard_nz l(-1)
-mov o0.xyzw, l(0,0,0,0)
-mov oDepth, l(1.000000)
-ret
-// Approximately 51 instruction slots used
-#endif
-
-const BYTE g_ellipsoidDepthPS[] =
-{
- 68, 88, 66, 67, 67, 187,
- 249, 247, 27, 80, 204, 105,
- 148, 238, 87, 239, 162, 120,
- 35, 255, 1, 0, 0, 0,
- 76, 12, 0, 0, 5, 0,
- 0, 0, 52, 0, 0, 0,
- 116, 4, 0, 0, 20, 5,
- 0, 0, 104, 5, 0, 0,
- 176, 11, 0, 0, 82, 68,
- 69, 70, 56, 4, 0, 0,
- 1, 0, 0, 0, 104, 0,
- 0, 0, 1, 0, 0, 0,
- 60, 0, 0, 0, 0, 5,
- 255, 255, 0, 1, 0, 0,
- 4, 4, 0, 0, 82, 68,
- 49, 49, 60, 0, 0, 0,
- 24, 0, 0, 0, 32, 0,
- 0, 0, 40, 0, 0, 0,
- 36, 0, 0, 0, 12, 0,
- 0, 0, 0, 0, 0, 0,
- 92, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 1, 0,
- 0, 0, 99, 111, 110, 115,
- 116, 66, 117, 102, 0, 171,
- 171, 171, 92, 0, 0, 0,
- 1, 0, 0, 0, 128, 0,
- 0, 0, 192, 2, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 168, 0, 0, 0,
- 0, 0, 0, 0, 192, 2,
- 0, 0, 2, 0, 0, 0,
- 224, 3, 0, 0, 0, 0,
- 0, 0, 255, 255, 255, 255,
- 0, 0, 0, 0, 255, 255,
- 255, 255, 0, 0, 0, 0,
- 103, 80, 97, 114, 97, 109,
- 115, 0, 70, 108, 117, 105,
- 100, 83, 104, 97, 100, 101,
- 114, 67, 111, 110, 115, 116,
- 0, 109, 111, 100, 101, 108,
- 118, 105, 101, 119, 112, 114,
- 111, 106, 101, 99, 116, 105,
- 111, 110, 0, 102, 108, 111,
- 97, 116, 52, 120, 52, 0,
- 171, 171, 3, 0, 3, 0,
- 4, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 213, 0,
- 0, 0, 109, 111, 100, 101,
- 108, 118, 105, 101, 119, 0,
- 112, 114, 111, 106, 101, 99,
- 116, 105, 111, 110, 0, 109,
- 111, 100, 101, 108, 118, 105,
- 101, 119, 95, 105, 110, 118,
- 101, 114, 115, 101, 0, 112,
- 114, 111, 106, 101, 99, 116,
- 105, 111, 110, 95, 105, 110,
- 118, 101, 114, 115, 101, 0,
- 105, 110, 118, 84, 101, 120,
- 83, 99, 97, 108, 101, 0,
- 102, 108, 111, 97, 116, 52,
- 0, 171, 171, 171, 1, 0,
- 3, 0, 1, 0, 4, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 74, 1, 0, 0, 105, 110,
- 118, 86, 105, 101, 119, 112,
- 111, 114, 116, 0, 102, 108,
- 111, 97, 116, 51, 0, 171,
- 1, 0, 3, 0, 1, 0,
- 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 132, 1, 0, 0,
- 95, 112, 97, 100, 48, 0,
- 102, 108, 111, 97, 116, 0,
- 0, 0, 3, 0, 1, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 182, 1, 0, 0,
- 98, 108, 117, 114, 82, 97,
- 100, 105, 117, 115, 87, 111,
- 114, 108, 100, 0, 98, 108,
- 117, 114, 83, 99, 97, 108,
- 101, 0, 98, 108, 117, 114,
- 70, 97, 108, 108, 111, 102,
- 102, 0, 100, 101, 98, 117,
- 103, 0, 105, 110, 116, 0,
- 0, 0, 2, 0, 1, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 12, 2, 0, 0,
- 108, 105, 103, 104, 116, 80,
- 111, 115, 0, 95, 112, 97,
- 100, 49, 0, 108, 105, 103,
- 104, 116, 68, 105, 114, 0,
- 95, 112, 97, 100, 50, 0,
- 108, 105, 103, 104, 116, 84,
- 114, 97, 110, 115, 102, 111,
- 114, 109, 0, 99, 111, 108,
- 111, 114, 0, 99, 108, 105,
- 112, 80, 111, 115, 84, 111,
- 69, 121, 101, 0, 115, 112,
- 111, 116, 77, 105, 110, 0,
- 115, 112, 111, 116, 77, 97,
- 120, 0, 105, 111, 114, 0,
- 95, 112, 97, 100, 51, 0,
- 115, 104, 97, 100, 111, 119,
- 84, 97, 112, 115, 0, 171,
- 171, 171, 1, 0, 3, 0,
- 1, 0, 4, 0, 12, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 74, 1,
- 0, 0, 193, 0, 0, 0,
- 224, 0, 0, 0, 0, 0,
- 0, 0, 4, 1, 0, 0,
- 224, 0, 0, 0, 64, 0,
- 0, 0, 14, 1, 0, 0,
- 224, 0, 0, 0, 128, 0,
- 0, 0, 25, 1, 0, 0,
- 224, 0, 0, 0, 192, 0,
- 0, 0, 43, 1, 0, 0,
- 224, 0, 0, 0, 0, 1,
- 0, 0, 62, 1, 0, 0,
- 84, 1, 0, 0, 64, 1,
- 0, 0, 120, 1, 0, 0,
- 140, 1, 0, 0, 80, 1,
- 0, 0, 176, 1, 0, 0,
- 188, 1, 0, 0, 92, 1,
- 0, 0, 224, 1, 0, 0,
- 188, 1, 0, 0, 96, 1,
- 0, 0, 240, 1, 0, 0,
- 188, 1, 0, 0, 100, 1,
- 0, 0, 250, 1, 0, 0,
- 188, 1, 0, 0, 104, 1,
- 0, 0, 6, 2, 0, 0,
- 16, 2, 0, 0, 108, 1,
- 0, 0, 52, 2, 0, 0,
- 140, 1, 0, 0, 112, 1,
- 0, 0, 61, 2, 0, 0,
- 188, 1, 0, 0, 124, 1,
- 0, 0, 67, 2, 0, 0,
- 140, 1, 0, 0, 128, 1,
- 0, 0, 76, 2, 0, 0,
- 188, 1, 0, 0, 140, 1,
- 0, 0, 82, 2, 0, 0,
- 224, 0, 0, 0, 144, 1,
- 0, 0, 97, 2, 0, 0,
- 84, 1, 0, 0, 208, 1,
- 0, 0, 103, 2, 0, 0,
- 84, 1, 0, 0, 224, 1,
- 0, 0, 116, 2, 0, 0,
- 188, 1, 0, 0, 240, 1,
- 0, 0, 124, 2, 0, 0,
- 188, 1, 0, 0, 244, 1,
- 0, 0, 132, 2, 0, 0,
- 188, 1, 0, 0, 248, 1,
- 0, 0, 136, 2, 0, 0,
- 188, 1, 0, 0, 252, 1,
- 0, 0, 142, 2, 0, 0,
- 156, 2, 0, 0, 0, 2,
- 0, 0, 5, 0, 0, 0,
- 1, 0, 176, 0, 0, 0,
- 24, 0, 192, 2, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 176, 0,
- 0, 0, 77, 105, 99, 114,
- 111, 115, 111, 102, 116, 32,
- 40, 82, 41, 32, 72, 76,
- 83, 76, 32, 83, 104, 97,
- 100, 101, 114, 32, 67, 111,
- 109, 112, 105, 108, 101, 114,
- 32, 54, 46, 51, 46, 57,
- 54, 48, 48, 46, 49, 54,
- 51, 56, 52, 0, 171, 171,
- 73, 83, 71, 78, 152, 0,
- 0, 0, 5, 0, 0, 0,
- 8, 0, 0, 0, 128, 0,
- 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 3, 0,
- 0, 0, 0, 0, 0, 0,
- 15, 3, 0, 0, 140, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 1, 0, 0, 0,
- 15, 15, 0, 0, 140, 0,
- 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 2, 0, 0, 0,
- 15, 15, 0, 0, 140, 0,
- 0, 0, 2, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 3, 0, 0, 0,
- 15, 15, 0, 0, 140, 0,
- 0, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 4, 0, 0, 0,
- 15, 15, 0, 0, 83, 86,
- 95, 80, 79, 83, 73, 84,
- 73, 79, 78, 0, 84, 69,
- 88, 67, 79, 79, 82, 68,
- 0, 171, 171, 171, 79, 83,
- 71, 78, 76, 0, 0, 0,
- 2, 0, 0, 0, 8, 0,
- 0, 0, 56, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 15, 0,
- 0, 0, 66, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 255, 255, 255, 255, 1, 14,
- 0, 0, 83, 86, 95, 84,
- 65, 82, 71, 69, 84, 0,
- 83, 86, 95, 68, 69, 80,
- 84, 72, 0, 171, 83, 72,
- 69, 88, 64, 6, 0, 0,
- 80, 0, 0, 0, 144, 1,
- 0, 0, 106, 8, 0, 1,
- 89, 0, 0, 4, 70, 142,
- 32, 0, 0, 0, 0, 0,
- 22, 0, 0, 0, 100, 32,
- 0, 4, 50, 16, 16, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 98, 16, 0, 3,
- 242, 16, 16, 0, 1, 0,
- 0, 0, 98, 16, 0, 3,
- 242, 16, 16, 0, 2, 0,
- 0, 0, 98, 16, 0, 3,
- 242, 16, 16, 0, 3, 0,
- 0, 0, 98, 16, 0, 3,
- 242, 16, 16, 0, 4, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 0, 0,
- 0, 0, 101, 0, 0, 2,
- 1, 192, 0, 0, 104, 0,
- 0, 2, 4, 0, 0, 0,
- 15, 0, 0, 8, 18, 0,
- 16, 0, 0, 0, 0, 0,
- 6, 16, 16, 0, 0, 0,
- 0, 0, 6, 128, 32, 0,
- 0, 0, 0, 0, 21, 0,
- 0, 0, 0, 0, 0, 7,
- 18, 0, 16, 0, 0, 0,
- 0, 0, 10, 0, 16, 0,
- 0, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 128, 191,
- 50, 0, 0, 11, 34, 0,
- 16, 0, 0, 0, 0, 0,
- 26, 16, 16, 128, 65, 0,
- 0, 0, 0, 0, 0, 0,
- 26, 128, 32, 0, 0, 0,
- 0, 0, 21, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 128, 63, 50, 0, 0, 9,
- 34, 0, 16, 0, 0, 0,
- 0, 0, 26, 0, 16, 0,
- 0, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 0, 64,
- 1, 64, 0, 0, 0, 0,
- 128, 191, 56, 0, 0, 8,
- 226, 0, 16, 0, 0, 0,
- 0, 0, 86, 5, 16, 0,
- 0, 0, 0, 0, 6, 137,
- 32, 0, 0, 0, 0, 0,
- 17, 0, 0, 0, 50, 0,
- 0, 10, 114, 0, 16, 0,
- 0, 0, 0, 0, 70, 130,
- 32, 0, 0, 0, 0, 0,
- 16, 0, 0, 0, 6, 0,
- 16, 0, 0, 0, 0, 0,
- 150, 7, 16, 0, 0, 0,
- 0, 0, 0, 0, 0, 8,
- 114, 0, 16, 0, 0, 0,
- 0, 0, 70, 2, 16, 0,
- 0, 0, 0, 0, 70, 130,
- 32, 0, 0, 0, 0, 0,
- 19, 0, 0, 0, 56, 0,
- 0, 7, 242, 0, 16, 0,
- 1, 0, 0, 0, 86, 5,
- 16, 0, 0, 0, 0, 0,
- 70, 30, 16, 0, 2, 0,
- 0, 0, 50, 0, 0, 9,
- 242, 0, 16, 0, 1, 0,
- 0, 0, 70, 30, 16, 0,
- 1, 0, 0, 0, 6, 0,
- 16, 0, 0, 0, 0, 0,
- 70, 14, 16, 0, 1, 0,
- 0, 0, 50, 0, 0, 9,
- 242, 0, 16, 0, 1, 0,
- 0, 0, 70, 30, 16, 0,
- 3, 0, 0, 0, 166, 10,
- 16, 0, 0, 0, 0, 0,
- 70, 14, 16, 0, 1, 0,
- 0, 0, 16, 0, 0, 7,
- 130, 0, 16, 0, 0, 0,
- 0, 0, 70, 2, 16, 0,
- 1, 0, 0, 0, 70, 2,
- 16, 0, 1, 0, 0, 0,
- 16, 0, 0, 7, 18, 0,
- 16, 0, 1, 0, 0, 0,
- 70, 2, 16, 0, 1, 0,
- 0, 0, 70, 18, 16, 0,
- 4, 0, 0, 0, 50, 0,
- 0, 10, 18, 0, 16, 0,
- 1, 0, 0, 0, 58, 0,
- 16, 128, 65, 0, 0, 0,
- 1, 0, 0, 0, 58, 16,
- 16, 0, 4, 0, 0, 0,
- 10, 0, 16, 0, 1, 0,
- 0, 0, 16, 0, 0, 7,
- 34, 0, 16, 0, 1, 0,
- 0, 0, 70, 18, 16, 0,
- 4, 0, 0, 0, 70, 18,
- 16, 0, 4, 0, 0, 0,
- 50, 0, 0, 10, 34, 0,
- 16, 0, 1, 0, 0, 0,
- 58, 16, 16, 128, 65, 0,
- 0, 0, 4, 0, 0, 0,
- 58, 16, 16, 0, 4, 0,
- 0, 0, 26, 0, 16, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 7, 66, 0, 16, 0,
- 1, 0, 0, 0, 10, 0,
- 16, 0, 1, 0, 0, 0,
- 10, 0, 16, 0, 1, 0,
- 0, 0, 24, 0, 0, 7,
- 130, 0, 16, 0, 1, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 0, 0,
- 24, 0, 0, 7, 18, 0,
- 16, 0, 2, 0, 0, 0,
- 10, 0, 16, 0, 1, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 7, 130, 0, 16, 0,
- 1, 0, 0, 0, 58, 0,
- 16, 0, 1, 0, 0, 0,
- 10, 0, 16, 0, 2, 0,
- 0, 0, 56, 0, 0, 7,
- 18, 0, 16, 0, 2, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 26, 0,
- 16, 0, 1, 0, 0, 0,
- 56, 0, 0, 7, 18, 0,
- 16, 0, 2, 0, 0, 0,
- 10, 0, 16, 0, 2, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 128, 64, 50, 0,
- 0, 10, 18, 0, 16, 0,
- 2, 0, 0, 0, 42, 0,
- 16, 0, 1, 0, 0, 0,
- 42, 0, 16, 0, 1, 0,
- 0, 0, 10, 0, 16, 128,
- 65, 0, 0, 0, 2, 0,
- 0, 0, 49, 0, 0, 7,
- 34, 0, 16, 0, 2, 0,
- 0, 0, 10, 0, 16, 0,
- 2, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 0, 0,
- 59, 0, 0, 5, 34, 0,
- 16, 0, 3, 0, 0, 0,
- 26, 0, 16, 0, 2, 0,
- 0, 0, 49, 0, 0, 7,
- 18, 0, 16, 0, 1, 0,
- 0, 0, 10, 0, 16, 0,
- 1, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 0, 0,
- 55, 0, 0, 9, 18, 0,
- 16, 0, 1, 0, 0, 0,
- 10, 0, 16, 0, 1, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 128, 191, 1, 64,
- 0, 0, 0, 0, 128, 63,
- 75, 0, 0, 5, 18, 0,
- 16, 0, 2, 0, 0, 0,
- 10, 0, 16, 0, 2, 0,
- 0, 0, 50, 0, 0, 9,
- 18, 0, 16, 0, 1, 0,
- 0, 0, 10, 0, 16, 0,
- 1, 0, 0, 0, 10, 0,
- 16, 0, 2, 0, 0, 0,
- 42, 0, 16, 0, 1, 0,
- 0, 0, 56, 0, 0, 7,
- 18, 0, 16, 0, 1, 0,
- 0, 0, 10, 0, 16, 0,
- 1, 0, 0, 0, 1, 64,
- 0, 0, 0, 0, 0, 191,
- 14, 0, 0, 7, 130, 0,
- 16, 0, 0, 0, 0, 0,
- 10, 0, 16, 0, 1, 0,
- 0, 0, 58, 0, 16, 0,
- 0, 0, 0, 0, 14, 0,
- 0, 7, 18, 0, 16, 0,
- 1, 0, 0, 0, 26, 0,
- 16, 0, 1, 0, 0, 0,
- 10, 0, 16, 0, 1, 0,
- 0, 0, 49, 0, 0, 7,
- 34, 0, 16, 0, 1, 0,
- 0, 0, 10, 0, 16, 0,
- 1, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
- 55, 0, 0, 9, 66, 0,
- 16, 0, 3, 0, 0, 0,
- 26, 0, 16, 0, 1, 0,
- 0, 0, 10, 0, 16, 0,
- 1, 0, 0, 0, 58, 0,
- 16, 0, 0, 0, 0, 0,
- 54, 0, 0, 8, 146, 0,
- 16, 0, 3, 0, 0, 0,
- 2, 64, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 255, 255,
- 255, 255, 55, 0, 0, 9,
- 50, 0, 16, 0, 1, 0,
- 0, 0, 86, 5, 16, 0,
- 2, 0, 0, 0, 70, 0,
- 16, 0, 3, 0, 0, 0,
- 230, 10, 16, 0, 3, 0,
- 0, 0, 55, 0, 0, 12,
- 50, 0, 16, 0, 1, 0,
- 0, 0, 246, 15, 16, 0,
- 1, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 0,
- 255, 255, 255, 255, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 70, 0, 16, 0, 1, 0,
- 0, 0, 31, 0, 4, 3,
- 26, 0, 16, 0, 1, 0,
- 0, 0, 56, 0, 0, 7,
- 114, 0, 16, 0, 0, 0,
- 0, 0, 70, 2, 16, 0,
- 0, 0, 0, 0, 6, 0,
- 16, 0, 1, 0, 0, 0,
- 56, 0, 0, 8, 162, 0,
- 16, 0, 0, 0, 0, 0,
- 86, 5, 16, 0, 0, 0,
- 0, 0, 166, 142, 32, 0,
- 0, 0, 0, 0, 9, 0,
- 0, 0, 50, 0, 0, 10,
- 50, 0, 16, 0, 0, 0,
- 0, 0, 230, 138, 32, 0,
- 0, 0, 0, 0, 8, 0,
- 0, 0, 6, 0, 16, 0,
- 0, 0, 0, 0, 214, 5,
- 16, 0, 0, 0, 0, 0,
- 50, 0, 0, 10, 50, 0,
- 16, 0, 0, 0, 0, 0,
- 230, 138, 32, 0, 0, 0,
- 0, 0, 10, 0, 0, 0,
- 166, 10, 16, 0, 0, 0,
- 0, 0, 70, 0, 16, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 8, 50, 0, 16, 0,
- 0, 0, 0, 0, 70, 0,
- 16, 0, 0, 0, 0, 0,
- 230, 138, 32, 0, 0, 0,
- 0, 0, 11, 0, 0, 0,
- 14, 0, 0, 6, 1, 192,
- 0, 0, 10, 0, 16, 0,
- 0, 0, 0, 0, 26, 0,
- 16, 0, 0, 0, 0, 0,
- 54, 0, 0, 5, 18, 32,
- 16, 0, 0, 0, 0, 0,
- 42, 0, 16, 0, 0, 0,
- 0, 0, 54, 0, 0, 8,
- 226, 32, 16, 0, 0, 0,
- 0, 0, 2, 64, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 128, 63, 0, 0, 128, 63,
- 0, 0, 128, 63, 62, 0,
- 0, 1, 21, 0, 0, 1,
- 13, 0, 4, 3, 1, 64,
- 0, 0, 255, 255, 255, 255,
- 54, 0, 0, 8, 242, 32,
- 16, 0, 0, 0, 0, 0,
- 2, 64, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 54, 0, 0, 4,
- 1, 192, 0, 0, 1, 64,
- 0, 0, 0, 0, 128, 63,
- 62, 0, 0, 1, 83, 84,
- 65, 84, 148, 0, 0, 0,
- 51, 0, 0, 0, 4, 0,
- 0, 0, 0, 0, 0, 0,
- 7, 0, 0, 0, 35, 0,
- 0, 0, 0, 0, 0, 0,
- 2, 0, 0, 0, 2, 0,
- 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 5, 0,
- 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0
-};
diff --git a/demo/d3d11/shaders/ellipsoidDepthVS.hlsl b/demo/d3d11/shaders/ellipsoidDepthVS.hlsl
deleted file mode 100644
index 03ef001..0000000
--- a/demo/d3d11/shaders/ellipsoidDepthVS.hlsl
+++ /dev/null
@@ -1,195 +0,0 @@
-#include "shaderCommon.h"
-
-cbuffer constBuf : register(b0)
-{
- FluidShaderConst gParams;
-};
-
-// returns 1.0 for x==0.0 (unlike glsl)
-float Sign(float x) { return x < 0.0 ? -1.0 : 1.0; }
-
-bool solveQuadratic(float a, float b, float c, out float minT, out float maxT)
-{
-#if 0
- // for debugging
- minT = -0.5;
- maxT = 0.5;
- return true;
-#else
- //minT = 0.0f;
- //maxT = 0.0f;
-#endif
-
- if (a == 0.0 && b == 0.0)
- {
- minT = maxT = 0.0;
- return false;
- }
-
- float discriminant = b*b - 4.0*a*c;
-
- if (discriminant < 0.0)
- {
- return false;
- }
-
- float t = -0.5*(b + Sign(b)*sqrt(discriminant));
- minT = t / a;
- maxT = c / t;
-
- if (minT > maxT)
- {
- float tmp = minT;
- minT = maxT;
- maxT = tmp;
- }
-
- return true;
-}
-
-float DotInvW(float4 a, float4 b) { return a.x*b.x + a.y*b.y + a.z*b.z - a.w*b.w; }
-
-FluidVertexOut ellipsoidDepthVS(FluidVertexIn input, uint instance : SV_VertexID)
-{
- float4 gl_Position;
- float4 gl_TexCoord[6];
-
- const float4 gl_Vertex = input.position;
- const float4 q1 = input.q1;
- const float4 q2 = input.q2;
- const float4 q3 = input.q3;
-
- const float4x4 gl_ModelViewProjectionMatrix = gParams.modelviewprojection;
- const float4x4 gl_ModelViewMatrixInverse = gParams.modelview_inverse;
-
- float3 worldPos = gl_Vertex.xyz;
-
- // construct quadric matrix
- float4x4 q;
- q._m00_m10_m20_m30 = float4(q1.xyz*q1.w, 0.0);
- q._m01_m11_m21_m31 = float4(q2.xyz*q2.w, 0.0);
- q._m02_m12_m22_m32 = float4(q3.xyz*q3.w, 0.0);
- q._m03_m13_m23_m33 = float4(worldPos, 1.0);
-
- // transforms a normal to parameter space (inverse transpose of (q*modelview)^-T)
- float4x4 invClip = /*transpose*/(mul(gl_ModelViewProjectionMatrix, q));
-
- // solve for the right hand bounds in homogenous clip space
- float a1 = DotInvW(invClip[3], invClip[3]);
- float b1 = -2.0f*DotInvW(invClip[0], invClip[3]);
- float c1 = DotInvW(invClip[0], invClip[0]);
-
- float xmin;
- float xmax;
- solveQuadratic(a1, b1, c1, xmin, xmax);
-
- // solve for the right hand bounds in homogenous clip space
- float a2 = DotInvW(invClip[3], invClip[3]);
- float b2 = -2.0f*DotInvW(invClip[1], invClip[3]);
- float c2 = DotInvW(invClip[1], invClip[1]);
-
- float ymin;
- float ymax;
- solveQuadratic(a2, b2, c2, ymin, ymax);
-
- gl_Position = float4(worldPos.xyz, 1.0);
- gl_TexCoord[0] = float4(xmin, xmax, ymin, ymax);
-
- // construct inverse quadric matrix (used for ray-casting in parameter space)
- float4x4 invq;
- invq._m00_m10_m20_m30 = float4(q1.xyz / q1.w, 0.0);
- invq._m01_m11_m21_m31 = float4(q2.xyz / q2.w, 0.0);
- invq._m02_m12_m22_m32 = float4(q3.xyz / q3.w, 0.0);
- invq._m03_m13_m23_m33 = float4(0.0, 0.0, 0.0, 1.0);
-
- invq = transpose(invq);
- invq._m03_m13_m23_m33 = -(mul(invq, gl_Position));
-
- // transform a point from view space to parameter space
- invq = mul(invq, gl_ModelViewMatrixInverse);
-
- // pass down
- gl_TexCoord[1] = invq._m00_m10_m20_m30;
- gl_TexCoord[2] = invq._m01_m11_m21_m31;
- gl_TexCoord[3] = invq._m02_m12_m22_m32;
- gl_TexCoord[4] = invq._m03_m13_m23_m33;
-
- // compute ndc pos for frustrum culling in GS
- float4 ndcPos = mul(gl_ModelViewProjectionMatrix, float4(worldPos.xyz, 1.0));
- gl_TexCoord[5].xyz = ndcPos.xyz / ndcPos.w;
- gl_TexCoord[5].w = ndcPos.w;
-
- FluidVertexOut output;
- output.position = gl_Position;
- [unroll]
- for (int j = 0; j < 6; j++)
- output.texCoord[j] = gl_TexCoord[j];
-
- return output;
-
- /*
- // rotation matrix in xyz, scale in w
- attribute vec4 q1;
- attribute vec4 q2;
- attribute vec4 q3;
-
- void main()
- {
- vec3 worldPos = gl_Vertex.xyz;// - vec3(0.0, 0.1*0.25, 0.0); // hack move towards ground to account for anisotropy
-
- // construct quadric matrix
- mat4 q;
- q[0] = vec4(q1.xyz*q1.w, 0.0);
- q[1] = vec4(q2.xyz*q2.w, 0.0);
- q[2] = vec4(q3.xyz*q3.w, 0.0);
- q[3] = vec4(worldPos, 1.0);
-
- // transforms a normal to parameter space (inverse transpose of (q*modelview)^-T)
- mat4 invClip = transpose(gl_ModelViewProjectionMatrix*q);
-
- // solve for the right hand bounds in homogenous clip space
- float a1 = DotInvW(invClip[3], invClip[3]);
- float b1 = -2.0f*DotInvW(invClip[0], invClip[3]);
- float c1 = DotInvW(invClip[0], invClip[0]);
-
- float xmin;
- float xmax;
- solveQuadratic(a1, b1, c1, xmin, xmax);
-
- // solve for the right hand bounds in homogenous clip space
- float a2 = DotInvW(invClip[3], invClip[3]);
- float b2 = -2.0f*DotInvW(invClip[1], invClip[3]);
- float c2 = DotInvW(invClip[1], invClip[1]);
-
- float ymin;
- float ymax;
- solveQuadratic(a2, b2, c2, ymin, ymax);
-
- gl_Position = vec4(worldPos.xyz, 1.0);
- gl_TexCoord[0] = vec4(xmin, xmax, ymin, ymax);
-
- // construct inverse quadric matrix (used for ray-casting in parameter space)
- mat4 invq;
- invq[0] = vec4(q1.xyz / q1.w, 0.0);
- invq[1] = vec4(q2.xyz / q2.w, 0.0);
- invq[2] = vec4(q3.xyz / q3.w, 0.0);
- invq[3] = vec4(0.0, 0.0, 0.0, 1.0);
-
- invq = transpose(invq);
- invq[3] = -(invq*gl_Position);
-
- // transform a point from view space to parameter space
- invq = invq*gl_ModelViewMatrixInverse;
-
- // pass down
- gl_TexCoord[1] = invq[0];
- gl_TexCoord[2] = invq[1];
- gl_TexCoord[3] = invq[2];
- gl_TexCoord[4] = invq[3];
-
- // compute ndc pos for frustrum culling in GS
- vec4 ndcPos = gl_ModelViewProjectionMatrix * vec4(worldPos.xyz, 1.0);
- gl_TexCoord[5] = ndcPos / ndcPos.w;
- }
- */
-}
diff --git a/demo/d3d11/shaders/meshVS.hlsl b/demo/d3d11/shaders/meshVS.hlsl
deleted file mode 100644
index 09f78ec..0000000
--- a/demo/d3d11/shaders/meshVS.hlsl
+++ /dev/null
@@ -1,91 +0,0 @@
-#include "shaderCommon.h"
-
-cbuffer constBuf : register(b0)
-{
- MeshShaderConst gParams;
-};
-
-MeshVertexOut meshVS(MeshVertexIn input)
-{
- float4 gl_Position;
- float4 gl_TexCoord[8];
-
- {
- [unroll]
- for (int i = 0; i < 8; i++)
- gl_TexCoord[i] = float4(0.0f, 0.0f, 0.0f, 0.0f);
- }
-
- const float4x4 gl_ModelViewProjectionMatrix = gParams.modelviewprojection;
- const float4x4 gl_ModelViewMatrix = gParams.modelview;
- const float4x4 objectTransform = gParams.objectTransform;
- const float4x4 lightTransform = gParams.lightTransform;
- const float3 lightDir = gParams.lightDir;
- const float bias = gParams.bias;
- const float4 clipPlane = gParams.clipPlane;
- const float expand = gParams.expand;
- const float4 gl_Color = gParams.color;
- const float4 gl_SecondaryColor = gParams.secondaryColor;
-
- const float3 gl_Vertex = input.position;
- const float3 gl_Normal = input.normal;
- const float2 gl_MultiTexCoord0 = input.texCoord;
-
- float3 n = normalize(mul(objectTransform, float4(gl_Normal, 0.0)).xyz);
- float3 p = mul(objectTransform, float4(gl_Vertex.xyz, 1.0)).xyz;
-
- // calculate window-space point size
- gl_Position = mul(gl_ModelViewProjectionMatrix, float4(p + expand * n, 1.0));
-
- gl_TexCoord[0].xyz = n;
- gl_TexCoord[1] = mul(lightTransform, float4(p + n * bias, 1.0));
- gl_TexCoord[2] = mul(gl_ModelViewMatrix, float4(lightDir, 0.0));
- gl_TexCoord[3].xyz = p;
- if (gParams.colorArray)
- gl_TexCoord[4] = input.color;
- else
- gl_TexCoord[4] = gl_Color;
- gl_TexCoord[5].xy = gl_MultiTexCoord0;
- gl_TexCoord[5].y = 1.0f - gl_TexCoord[5].y; // flip the y component of uv (glsl to hlsl conversion)
- gl_TexCoord[6] = gl_SecondaryColor;
- gl_TexCoord[7] = mul(gl_ModelViewMatrix, float4(gl_Vertex.xyz, 1.0));
-
- MeshVertexOut output;
- output.position = gl_Position;
- {
- [unroll]
- for (int i = 0; i < 8; i++)
- output.texCoord[i] = gl_TexCoord[i];
- }
-
- return output;
-
- /*
- uniform mat4 lightTransform;
- uniform vec3 lightDir;
- uniform float bias;
- uniform vec4 clipPlane;
- uniform float expand;
-
- uniform mat4 objectTransform;
-
- void main()
- {
- vec3 n = normalize((objectTransform*vec4(gl_Normal, 0.0)).xyz);
- vec3 p = (objectTransform*vec4(gl_Vertex.xyz, 1.0)).xyz;
-
- // calculate window-space point size
- gl_Position = gl_ModelViewProjectionMatrix * vec4(p + expand*n, 1.0);
-
- gl_TexCoord[0].xyz = n;
- gl_TexCoord[1] = lightTransform*vec4(p + n*bias, 1.0);
- gl_TexCoord[2] = gl_ModelViewMatrix*vec4(lightDir, 0.0);
- gl_TexCoord[3].xyz = p;
- gl_TexCoord[4] = gl_Color;
- gl_TexCoord[5] = gl_MultiTexCoord0;
- gl_TexCoord[6] = gl_SecondaryColor;
- gl_TexCoord[7] = gl_ModelViewMatrix*vec4(gl_Vertex.xyz, 1.0);
-
- gl_ClipDistance[0] = dot(clipPlane, vec4(gl_Vertex.xyz, 1.0));
- */
-}
diff --git a/demo/d3d11/shaders/passThroughVS.hlsl b/demo/d3d11/shaders/passThroughVS.hlsl
deleted file mode 100644
index 9b16afa..0000000
--- a/demo/d3d11/shaders/passThroughVS.hlsl
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "shaderCommon.h"
-
-cbuffer constBuf : register(b0)
-{
- FluidShaderConst gParams;
-};
-
-PassthroughVertexOut passThroughVS(PassthroughVertexIn input)
-{
- float4 gl_Vertex = float4(input.position, 0.0f, 1.0f);
- float2 gl_MultiTexCoord0 = input.texCoord;
-
- PassthroughVertexOut output;
- output.position = gl_Vertex;
- output.texCoord[0] = gl_MultiTexCoord0;
-
- return output;
-
- /*
- void main()
- {
- gl_Position = vec4(gl_Vertex.xyz, 1.0);
- gl_TexCoord[0] = gl_MultiTexCoord0;
- }
- */
-}
diff --git a/demo/d3d11/shaders/pointGS.hlsl b/demo/d3d11/shaders/pointGS.hlsl
deleted file mode 100644
index 2d8126e..0000000
--- a/demo/d3d11/shaders/pointGS.hlsl
+++ /dev/null
@@ -1,84 +0,0 @@
-#include "shaderCommon.h"
-
-cbuffer constBuf : register(b0)
-{
- PointShaderConst gParams;
-};
-
-static const float2 corners[4] =
-{
- float2(0.0, 1.0), float2(0.0, 0.0), float2(1.0, 1.0), float2(1.0, 0.0)
-};
-
-[maxvertexcount(4)]
-void pointGS(point PointVertexOut input[1], inout TriangleStream<PointGeoOut> triStream)
-{
- float4 gl_Position;
- float4 gl_TexCoord[6];
-
- {
- [unroll]
- for (int i = 0; i < 6; i++)
- gl_TexCoord[i] = float4(0.0f, 0.0f, 0.0f, 0.0f);
- }
-
- const float4x4 gl_ModelViewMatrix = gParams.modelview;
- const float pointRadius = gParams.pointRadius;
- const float pointScale = gParams.pointScale;
- const float4x4 lightTransform = gParams.lightTransform;
- const float3 lightDir = gParams.lightDir.xyz;
- const int mode = gParams.mode;
-
- float4 viewPos = input[0].position;
- float density = input[0].density;
- unsigned int phase = input[0].phase;
- float4 gl_Vertex = input[0].vertex;
-
- //float gl_PointSize = -pointScale * (pointRadius / viewPos.z);
- //float spriteSize = (pointRadius / viewPos.z);
- float spriteSize = pointRadius * 2;
-
- PointGeoOut output;
-
- for (int i = 0; i < 4; ++i)
- {
-
- float4 eyePos = viewPos; // start with point position
- eyePos.xy += spriteSize * (corners[i] - float2(0.5, 0.5)); // add corner position
- gl_Position = mul(gParams.projection, eyePos); // complete transformation
-
- gl_TexCoord[0].xy = corners[i].xy; // use corner as texCoord
- gl_TexCoord[0].y = 1.0f - gl_TexCoord[0].y; // flip the y component of uv (glsl to hlsl conversion)
- gl_TexCoord[1] = mul(lightTransform, float4(gl_Vertex.xyz - lightDir * pointRadius * 2.0, 1.0));
- gl_TexCoord[2] = mul(gl_ModelViewMatrix, float4(lightDir, 0.0));
-
- if (mode == 1)
- {
- // density visualization
- if (density < 0.0f)
- gl_TexCoord[3].xyz = lerp(float3(0.1, 0.1, 1.0), float3(0.1, 1.0, 1.0), -density);
- else
- gl_TexCoord[3].xyz = lerp(float3(1.0, 1.0, 1.0), float3(0.1, 0.2, 1.0), density);
- }
- else if (mode == 2)
- {
- //gl_PointSize *= clamp(gl_Vertex.w * 0.25, 0.0f, 1.0);
- float tmp = clamp(gl_Vertex.w * 0.05, 0.0f, 1.0);
- gl_TexCoord[3].xyzw = float4(tmp, tmp, tmp, tmp);
- }
- else
- {
- gl_TexCoord[3].xyz = lerp(gParams.colors[phase % 8].xyz * 2.0, float3(1.0, 1.0, 1.0), 0.1);
- }
-
- gl_TexCoord[4].xyz = gl_Vertex.xyz;
- gl_TexCoord[5].xyz = viewPos.xyz;
-
- output.position = gl_Position;
- [unroll]
- for (int j = 0; j < 6; j++)
- output.texCoord[j] = gl_TexCoord[j];
-
- triStream.Append(output);
- }
-}
diff --git a/demo/d3d11/shaders/pointPS.hlsl b/demo/d3d11/shaders/pointPS.hlsl
deleted file mode 100644
index e8bcaf4..0000000
--- a/demo/d3d11/shaders/pointPS.hlsl
+++ /dev/null
@@ -1,103 +0,0 @@
-#include "shaderCommon.h"
-
-cbuffer constBuf : register(b0)
-{
- PointShaderConst gParams;
-};
-
-Texture2D<float> shadowTexture : register(t0); // shadow map
-
-SamplerComparisonState shadowSampler : register(s0); // texture sample used to sample depth from shadow texture in this sample
-
-float sqr(float x) { return x * x; }
-
-float shadowSample(float4 gl_TexCoord[6])
-{
- float3 pos = float3(gl_TexCoord[1].xyz / gl_TexCoord[1].w);
- //float3 uvw = (pos.xyz * 0.5) + vec3(0.5);
- float3 uvw = (pos.xyz * float3(0.5, 0.5, 1.0)) + float3(0.5, 0.5, 0.0);
-
- // user clip
- if (uvw.x < 0.0 || uvw.x > 1.0)
- return 1.0;
- if (uvw.y < 0.0 || uvw.y > 1.0)
- return 1.0;
-
- float s = 0.0;
- float radius = 0.002;
-
- // flip uv y-coordinate
- uvw.y = 1.0f - uvw.y;
-
- [unroll]
- for (int i = 0; i < 8; i++)
- {
- float2 shadowTaps = gParams.shadowTaps[i].xy;
- shadowTaps.y = 1.0f - shadowTaps.y;
-
- //s += shadow2D(shadowTex, vec3(uvw.xy + shadowTaps[i] * radius, uvw.z)).r;
- s += shadowTexture.SampleCmpLevelZero(shadowSampler, uvw.xy + shadowTaps * radius, uvw.z);
- }
- s /= 8.0;
-
- return s;
-}
-
-float4 pointPS(PointGeoOut input
- //, out float gl_FragDepth : SV_DEPTH
-) : SV_TARGET
-{
- //gl_FragDepth = 0.0f;
-
- const float spotMin = gParams.spotMin;
- const float spotMax = gParams.spotMax;
-
- float4 gl_FragColor;
- float4 gl_TexCoord[6];
-
- [unroll]
- for (int i = 0; i < 6; i++)
- gl_TexCoord[i] = input.texCoord[i];
-
- // calculate normal from texture coordinates
- float3 normal;
- normal.xy = gl_TexCoord[0].xy * float2(2.0, -2.0) + float2(-1.0, 1.0);
- float mag = dot(normal.xy, normal.xy);
- if (mag > 1.0) discard; // kill pixels outside circle
- normal.z = sqrt(1.0 - mag);
-
- if (gParams.mode == 2)
- {
- float alpha = normal.z * gl_TexCoord[3].w;
- gl_FragColor.xyz = gl_TexCoord[3].xyz * alpha;
- gl_FragColor.w = alpha;
-
- return gl_FragColor;
- }
-
- // calculate lighting
- float shadow = shadowSample(gl_TexCoord);
-
- float3 lPos = float3(gl_TexCoord[1].xyz / gl_TexCoord[1].w);
- float attenuation = max(smoothstep(spotMax, spotMin, dot(lPos.xy, lPos.xy)), 0.05);
-
- float3 diffuse = float3(0.9, 0.9, 0.9);
- float3 reflectance = gl_TexCoord[3].xyz;
-
- float3 Lo = diffuse * reflectance * max(0.0, sqr(-dot(gl_TexCoord[2].xyz, normal) * 0.5 + 0.5)) * max(0.2, shadow) * attenuation;
-
- const float tmp = 1.0 / 2.2;
- gl_FragColor = float4(pow(abs(Lo), float3(tmp, tmp, tmp)), 1.0);
-
- /*
- const float pointRadius = gParams.pointRadius;
- const float4x4 gl_ProjectionMatrix = gParams.projection;
-
- float3 eyePos = gl_TexCoord[5].xyz + normal * pointRadius;
- float4 ndcPos = mul(gl_ProjectionMatrix, float4(eyePos, 1.0));
- ndcPos.z /= ndcPos.w;
- gl_FragDepth = ndcPos.z;
- */
-
- return gl_FragColor;
-}
diff --git a/demo/d3d11/shadersD3D11.cpp b/demo/d3d11/shadersD3D11.cpp
deleted file mode 100644
index 9e1d278..0000000
--- a/demo/d3d11/shadersD3D11.cpp
+++ /dev/null
@@ -1,1041 +0,0 @@
-#include "core/maths.h"
-#include "core/extrude.h"
-
-#include "shaders.h"
-
-#include "meshRender.h"
-#include "pointRender.h"
-#include "fluidRender.h"
-#include "diffuseRender.h"
-#include "debugLineRender.h"
-
-#include "shadowMap.h"
-#include "renderTarget.h"
-
-#include "imguiGraph.h"
-#include "imguiGraphD3D11.h"
-
-#include "appD3D11Ctx.h"
-
-#include <d3d11.h>
-#include <d3dcompiler.h>
-
-#include <cstdlib>
-
-DebugLineRender gDebugLineRender;
-MeshRenderer gMeshRenderer;
-PointRenderer gPointRenderer;
-DiffuseRenderer gDiffuseRenderer;
-
-AppGraphCtx* gAppGraphCtx;
-
-static float gSpotMin = 0.5f;
-static float gSpotMax = 1.0f;
-float gShadowBias = 0.075f;
-
-struct RenderContext
-{
- RenderContext()
- {
- memset(&mMeshDrawParams, 0, sizeof(MeshDrawParams));
- }
-
- MeshDrawParams mMeshDrawParams;
-
- Matrix44 view;
- Matrix44 proj;
-
- ShadowMap* shadowMap;
- GpuMesh* immediateMesh;
-
- SDL_Window* window;
-
- int msaaSamples;
-};
-
-RenderContext gContext;
-
-
-// convert an OpenGL style projection matrix to D3D (clip z range [0, 1])
-Matrix44 ConvertToD3DProjection(const Matrix44& proj)
-{
- Matrix44 scale = Matrix44::kIdentity;
- scale.columns[2][2] = 0.5f;
-
- Matrix44 bias = Matrix44::kIdentity;
- bias.columns[3][2] = 1.0f;
-
- return scale*bias*proj;
-}
-
-#define checkDxErrors(err) __checkDxErrors (err, __FILE__, __LINE__)
-
-inline void __checkDxErrors(HRESULT err, const char *file, const int line)
-{
- if (FAILED(err))
- {
- char* lpMsgBuf;
-
- FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- err,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR)&lpMsgBuf,
- 0, NULL);
-
- fprintf(stdout, "DX Error = %04d \"%s\" from file <%s>, line %i.\n",
- err, lpMsgBuf, file, line);
-
- exit(EXIT_FAILURE);
- }
-}
-
-void InitRender(SDL_Window* window, bool fullscreen, int msaaSamples)
-{
- // must always have at least one sample
- msaaSamples = Max(1, msaaSamples);
-
- // create app graph context
- gAppGraphCtx = AppGraphCtxCreate(0);
-
- AppGraphCtxInitRenderTarget(gAppGraphCtx, window, fullscreen, msaaSamples);
- //gScene = getScene(0);
-
- float clearVal[4] = { 0.0f, 0.0f, 0.0f, 1.0f };
- AppGraphCtxFrameStart(gAppGraphCtx, clearVal);
-
- // create imgui, connect to app graph context
-
- ImguiGraphDesc desc;
- desc.device = gAppGraphCtx->m_device;
- desc.deviceContext = gAppGraphCtx->m_deviceContext;
- desc.winW = gAppGraphCtx->m_winW;
- desc.winH = gAppGraphCtx->m_winH;
-
- imguiGraphInit("../../data/DroidSans.ttf", &desc);
-
- AppGraphCtxFramePresent(gAppGraphCtx, true);
-
- gPointRenderer.Init(gAppGraphCtx->m_device, gAppGraphCtx->m_deviceContext);
- gMeshRenderer.Init(gAppGraphCtx->m_device, gAppGraphCtx->m_deviceContext);
- gDebugLineRender.Init(gAppGraphCtx->m_device, gAppGraphCtx->m_deviceContext);
- gDiffuseRenderer.Init(gAppGraphCtx->m_device, gAppGraphCtx->m_deviceContext);
-
- // create a mesh for immediate mode rendering
- gContext.immediateMesh = new GpuMesh(gAppGraphCtx->m_device, gAppGraphCtx->m_deviceContext);
-
- gContext.window = window;
- gContext.msaaSamples = msaaSamples;
-}
-
-void GetRenderDevice(ID3D11Device** device, ID3D11DeviceContext** context)
-{
- *device = gAppGraphCtx->m_device;
- *context = gAppGraphCtx->m_deviceContext;
-}
-
-void ReshapeRender(SDL_Window* window)
-{
- AppGraphCtxReleaseRenderTarget(gAppGraphCtx);
- AppGraphCtxInitRenderTarget(gAppGraphCtx, window, false, gContext.msaaSamples);
-}
-
-void DestroyRender()
-{
- gDebugLineRender.Destroy();
- gMeshRenderer.Destroy();
- gPointRenderer.Destroy();
- gDiffuseRenderer.Destroy();
-
- imguiGraphDestroy();
-
- delete gContext.immediateMesh;
-
- // do this first, since it flushes all GPU work
- AppGraphCtxReleaseRenderTarget(gAppGraphCtx);
- AppGraphCtxRelease(gAppGraphCtx);
-
- gAppGraphCtx = nullptr;
-}
-
-void StartFrame(Vec4 clear)
-{
- AppGraphCtxFrameStart(gAppGraphCtx, clear);
-
- MeshDrawParams meshDrawParams;
- memset(&meshDrawParams, 0, sizeof(MeshDrawParams));
- meshDrawParams.renderStage = MESH_DRAW_LIGHT;
- meshDrawParams.renderMode = MESH_RENDER_SOLID;
- meshDrawParams.cullMode = MESH_CULL_BACK;
- meshDrawParams.projection = (XMMATRIX)Matrix44::kIdentity;
- meshDrawParams.view = (XMMATRIX)Matrix44::kIdentity;
- meshDrawParams.model = DirectX::XMMatrixMultiply(
- DirectX::XMMatrixScaling(1.0f, 1.0f, 1.0f),
- DirectX::XMMatrixTranslation(0.0f, 0.0f, 0.0f)
- );
-
- gContext.mMeshDrawParams = meshDrawParams;
-}
-
-void FlushFrame()
-{
- gAppGraphCtx->m_deviceContext->Flush();
-
-}
-
-void EndFrame()
-{
- FlushFrame();
-
- ImguiGraphDesc desc;
- desc.device = gAppGraphCtx->m_device;
- desc.deviceContext = gAppGraphCtx->m_deviceContext;
- desc.winW = gAppGraphCtx->m_winW;
- desc.winH = gAppGraphCtx->m_winH;
-
- imguiGraphUpdate(&desc);
-}
-
-void PresentFrame(bool fullsync)
-{
- AppGraphCtxFramePresent(gAppGraphCtx, fullsync);
-
-}
-
-void ReadFrame(int* backbuffer, int width, int height)
-{
- assert(0);
-}
-
-void GetViewRay(int x, int y, Vec3& origin, Vec3& dir)
-{
- using namespace DirectX;
-
- XMVECTOR nearVector = XMVector3Unproject(XMVectorSet(float(x), float(gAppGraphCtx->m_winH-y), 0.0f, 0.0f), 0.0f, 0.0f, (float)gAppGraphCtx->m_winW, (float)gAppGraphCtx->m_winH, 0.0f, 1.0f, (XMMATRIX)gContext.proj, XMMatrixIdentity(), (XMMATRIX)gContext.view);
- XMVECTOR farVector = XMVector3Unproject(XMVectorSet(float(x), float(gAppGraphCtx->m_winH-y), 1.0f, 0.0f), 0.0f, 0.0f, (float)gAppGraphCtx->m_winW, (float)gAppGraphCtx->m_winH, 0.0f, 1.0f, (XMMATRIX)gContext.proj, XMMatrixIdentity(), (XMMATRIX)gContext.view);
-
- origin = Vec3(XMVectorGetX(nearVector), XMVectorGetY(nearVector), XMVectorGetZ(nearVector));
- XMVECTOR tmp = farVector - nearVector;
- dir = Normalize(Vec3(XMVectorGetX(tmp), XMVectorGetY(tmp), XMVectorGetZ(tmp)));
-
-}
-
-Colour gColors[] =
-{
- Colour(0.0f, 0.5f, 1.0f),
- Colour(0.797f, 0.354f, 0.000f),
- Colour(0.092f, 0.465f, 0.820f),
- Colour(0.000f, 0.349f, 0.173f),
- Colour(0.875f, 0.782f, 0.051f),
- Colour(0.000f, 0.170f, 0.453f),
- Colour(0.673f, 0.111f, 0.000f),
- Colour(0.612f, 0.194f, 0.394f)
-};
-
-
-void SetFillMode(bool wire)
-{
- gContext.mMeshDrawParams.renderMode = wire?MESH_RENDER_WIREFRAME:MESH_RENDER_SOLID;
-}
-
-void SetCullMode(bool enabled)
-{
- gContext.mMeshDrawParams.cullMode = enabled?MESH_CULL_BACK:MESH_CULL_NONE;
-}
-
-void SetView(Matrix44 view, Matrix44 projection)
-{
- Matrix44 vp = projection*view;
-
- gContext.mMeshDrawParams.model = (XMMATRIX)Matrix44::kIdentity;
- gContext.mMeshDrawParams.view = (XMMATRIX)view;
- gContext.mMeshDrawParams.projection = (XMMATRIX)(ConvertToD3DProjection(projection));
-
- gContext.view = view;
- gContext.proj = ConvertToD3DProjection(projection);
-}
-
-
-
-FluidRenderer* CreateFluidRenderer(uint32_t width, uint32_t height)
-{
- FluidRenderer* renderer = new(_aligned_malloc(sizeof(FluidRenderer), 16)) FluidRenderer();
- renderer->Init(gAppGraphCtx->m_device, gAppGraphCtx->m_deviceContext, width, height);
-
- return renderer;
-}
-
-void DestroyFluidRenderer(FluidRenderer* renderer)
-{
- renderer->Destroy();
- renderer->~FluidRenderer();
-
- _aligned_free(renderer);
-}
-
-FluidRenderBuffers CreateFluidRenderBuffers(int numParticles, bool enableInterop)
-{
- FluidRenderBuffers buffers = {};
- buffers.mNumFluidParticles = numParticles;
-
- {
- D3D11_BUFFER_DESC bufDesc;
- bufDesc.ByteWidth = numParticles*sizeof(Vec4);
- bufDesc.Usage = D3D11_USAGE_DYNAMIC;
- bufDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
- bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
- bufDesc.MiscFlags = 0;
- bufDesc.StructureByteStride = 0;
-
- gAppGraphCtx->m_device->CreateBuffer(&bufDesc, NULL, &buffers.mPositionVBO);
-
- gAppGraphCtx->m_device->CreateBuffer(&bufDesc, NULL, &buffers.mAnisotropyVBO[0]);
- gAppGraphCtx->m_device->CreateBuffer(&bufDesc, NULL, &buffers.mAnisotropyVBO[1]);
- gAppGraphCtx->m_device->CreateBuffer(&bufDesc, NULL, &buffers.mAnisotropyVBO[2]);
-
- bufDesc.ByteWidth = numParticles*sizeof(float);
- gAppGraphCtx->m_device->CreateBuffer(&bufDesc, NULL, &buffers.mDensityVBO);
- }
-
- {
- D3D11_BUFFER_DESC bufDesc;
- bufDesc.ByteWidth = numParticles * sizeof(int);
- bufDesc.Usage = D3D11_USAGE_DYNAMIC;
- bufDesc.BindFlags = D3D11_BIND_INDEX_BUFFER;
- bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
- bufDesc.MiscFlags = 0;
- bufDesc.StructureByteStride = 0;
-
- gAppGraphCtx->m_device->CreateBuffer(&bufDesc, NULL, &buffers.mIndices);
- }
-
- if (enableInterop)
- {
- extern NvFlexLibrary* g_flexLib;
-
- buffers.mPositionBuf = NvFlexRegisterD3DBuffer(g_flexLib, buffers.mPositionVBO, numParticles, sizeof(Vec4));
- buffers.mDensitiesBuf = NvFlexRegisterD3DBuffer(g_flexLib, buffers.mDensityVBO, numParticles, sizeof(float));
- buffers.mIndicesBuf = NvFlexRegisterD3DBuffer(g_flexLib, buffers.mIndices, numParticles, sizeof(int));
-
- buffers.mAnisotropyBuf[0] = NvFlexRegisterD3DBuffer(g_flexLib, buffers.mAnisotropyVBO[0], numParticles, sizeof(Vec4));
- buffers.mAnisotropyBuf[1] = NvFlexRegisterD3DBuffer(g_flexLib, buffers.mAnisotropyVBO[1], numParticles, sizeof(Vec4));
- buffers.mAnisotropyBuf[2] = NvFlexRegisterD3DBuffer(g_flexLib, buffers.mAnisotropyVBO[2], numParticles, sizeof(Vec4));
- }
-
- return buffers;
-}
-
-void UpdateFluidRenderBuffers(FluidRenderBuffers buffers, NvFlexSolver* solver, bool anisotropy, bool density)
-{
- if (!anisotropy)
- {
- // regular particles
- NvFlexGetParticles(solver, buffers.mPositionBuf, buffers.mNumFluidParticles);
- }
- else
- {
- // fluid buffers
- NvFlexGetSmoothParticles(solver, buffers.mPositionBuf, buffers.mNumFluidParticles);
- NvFlexGetAnisotropy(solver, buffers.mAnisotropyBuf[0], buffers.mAnisotropyBuf[1], buffers.mAnisotropyBuf[2]);
- }
-
- if (density)
- {
- NvFlexGetDensities(solver, buffers.mDensitiesBuf, buffers.mNumFluidParticles);
- }
- else
- {
- NvFlexGetPhases(solver, buffers.mDensitiesBuf, buffers.mNumFluidParticles);
- }
-
- NvFlexGetActive(solver, buffers.mIndicesBuf);
-}
-
-void UpdateFluidRenderBuffers(FluidRenderBuffers buffers, Vec4* particles, float* densities, Vec4* anisotropy1, Vec4* anisotropy2, Vec4* anisotropy3, int numParticles, int* indices, int numIndices)
-{
- D3D11_MAPPED_SUBRESOURCE res;
-
- // vertices
- if (particles)
- {
- gAppGraphCtx->m_deviceContext->Map(buffers.mPositionVBO, 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- memcpy(res.pData, particles, sizeof(Vec4)*numParticles);
- gAppGraphCtx->m_deviceContext->Unmap(buffers.mPositionVBO, 0);
- }
-
- if (anisotropy1)
- {
- gAppGraphCtx->m_deviceContext->Map(buffers.mAnisotropyVBO[0], 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- memcpy(res.pData, anisotropy1, sizeof(Vec4)*numParticles);
- gAppGraphCtx->m_deviceContext->Unmap(buffers.mAnisotropyVBO[0], 0);
- }
-
- if (anisotropy2)
- {
- gAppGraphCtx->m_deviceContext->Map(buffers.mAnisotropyVBO[1], 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- memcpy(res.pData, anisotropy2, sizeof(Vec4)*numParticles);
- gAppGraphCtx->m_deviceContext->Unmap(buffers.mAnisotropyVBO[1], 0);
- }
-
- if (anisotropy3)
- {
- gAppGraphCtx->m_deviceContext->Map(buffers.mAnisotropyVBO[2], 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- memcpy(res.pData, anisotropy3, sizeof(Vec4)*numParticles);
- gAppGraphCtx->m_deviceContext->Unmap(buffers.mAnisotropyVBO[2], 0);
- }
-
- if (densities)
- {
- gAppGraphCtx->m_deviceContext->Map(buffers.mDensityVBO, 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- memcpy(res.pData, densities, sizeof(float)*numParticles);
- gAppGraphCtx->m_deviceContext->Unmap(buffers.mDensityVBO, 0);
- }
-
- // indices
- if (indices)
- {
- gAppGraphCtx->m_deviceContext->Map(buffers.mIndices, 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- memcpy(res.pData, indices, sizeof(int)*numIndices);
- gAppGraphCtx->m_deviceContext->Unmap(buffers.mIndices, 0);
- }
-
-}
-
-void DestroyFluidRenderBuffers(FluidRenderBuffers buffers)
-{
- COMRelease(buffers.mPositionVBO);
- COMRelease(buffers.mAnisotropyVBO[0]);
- COMRelease(buffers.mAnisotropyVBO[1]);
- COMRelease(buffers.mAnisotropyVBO[2]);
- COMRelease(buffers.mDensityVBO);
- COMRelease(buffers.mIndices);
-
- NvFlexUnregisterD3DBuffer(buffers.mPositionBuf);
- NvFlexUnregisterD3DBuffer(buffers.mDensitiesBuf);
- NvFlexUnregisterD3DBuffer(buffers.mIndicesBuf);
-
- NvFlexUnregisterD3DBuffer(buffers.mAnisotropyBuf[0]);
- NvFlexUnregisterD3DBuffer(buffers.mAnisotropyBuf[1]);
- NvFlexUnregisterD3DBuffer(buffers.mAnisotropyBuf[2]);
-}
-
-
-static const int kShadowResolution = 2048;
-
-
-ShadowMap* ShadowCreate()
-{
- ShadowMap* shadowMap = new(_aligned_malloc(sizeof(ShadowMap), 16)) ShadowMap();
- shadowMap->init(gAppGraphCtx->m_device, kShadowResolution);
-
- return shadowMap;
-}
-
-void ShadowDestroy(ShadowMap* map)
-{
- map->~ShadowMap();
- _aligned_free(map);
-}
-
-void ShadowBegin(ShadowMap* map)
-{
- ShadowMap* shadowMap = map;
- shadowMap->bindAndClear(gAppGraphCtx->m_deviceContext);
-
- gContext.mMeshDrawParams.renderStage = MESH_DRAW_SHADOW;
-}
-
-void ShadowEnd()
-{
- AppGraphCtx* context = gAppGraphCtx;
-
- // reset to main frame buffer
- context->m_deviceContext->RSSetViewports(1, &context->m_viewport);
- context->m_deviceContext->OMSetRenderTargets(1, &context->m_rtv, context->m_dsv);
- context->m_deviceContext->OMSetDepthStencilState(context->m_depthState, 0u);
- context->m_deviceContext->ClearDepthStencilView(context->m_dsv, D3D11_CLEAR_DEPTH, 1.0, 0);
-
- gContext.mMeshDrawParams.renderStage = MESH_DRAW_NULL;
-
-}
-
-
-struct ShadowParams
-{
- DirectX::XMMATRIX lightTransform;
- float3 lightPos;
- float3 lightDir;
- float bias;
- float4 shadowTaps[12];
-};
-
-void ShadowApply(ShadowParams* params, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, void* shadowTex)
-{
- params->lightTransform = (DirectX::XMMATRIX&)(ConvertToD3DProjection(lightTransform));
- params->lightPos = (float3&)lightPos;
- params->lightDir = (float3&)Normalize(lightTarget - lightPos);
- params->bias = gShadowBias;
-
- const Vec4 taps[] =
- {
- Vec2(-0.326212f,-0.40581f), Vec2(-0.840144f,-0.07358f),
- Vec2(-0.695914f,0.457137f), Vec2(-0.203345f,0.620716f),
- Vec2(0.96234f,-0.194983f), Vec2(0.473434f,-0.480026f),
- Vec2(0.519456f,0.767022f), Vec2(0.185461f,-0.893124f),
- Vec2(0.507431f,0.064425f), Vec2(0.89642f,0.412458f),
- Vec2(-0.32194f,-0.932615f), Vec2(-0.791559f,-0.59771f)
- };
- memcpy(params->shadowTaps, taps, sizeof(taps));
-
-}
-
-void BindSolidShader(Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowMap, float bias, Vec4 fogColor)
-{
- gContext.mMeshDrawParams.renderStage = MESH_DRAW_LIGHT;
-
- gContext.mMeshDrawParams.grid = 0;
- gContext.mMeshDrawParams.spotMin = gSpotMin;
- gContext.mMeshDrawParams.spotMax = gSpotMax;
- gContext.mMeshDrawParams.fogColor = (float4&)fogColor;
-
- gContext.mMeshDrawParams.objectTransform = (float4x4&)Matrix44::kIdentity;
-
- ShadowParams shadow;
- ShadowApply(&shadow, lightPos, lightTarget, lightTransform, shadowMap);
- gContext.mMeshDrawParams.lightTransform = shadow.lightTransform;
- gContext.mMeshDrawParams.lightDir = shadow.lightDir;
- gContext.mMeshDrawParams.lightPos = shadow.lightPos;
- gContext.mMeshDrawParams.bias = shadow.bias;
- memcpy(gContext.mMeshDrawParams.shadowTaps, shadow.shadowTaps, sizeof(shadow.shadowTaps));
-
- gContext.shadowMap = shadowMap;
-
-}
-
-void UnbindSolidShader()
-{
- gContext.mMeshDrawParams.renderStage = MESH_DRAW_NULL;
-}
-
-void DrawMesh(const Mesh* m, Vec3 color)
-{
- if (m)
- {
- if (m->m_colours.size())
- {
- gContext.mMeshDrawParams.colorArray = 1;
- gContext.immediateMesh->UpdateData((Vec3*)&m->m_positions[0], &m->m_normals[0], NULL, (Vec4*)&m->m_colours[0], (int*)&m->m_indices[0], m->GetNumVertices(), int(m->GetNumFaces()));
- }
- else
- {
- gContext.mMeshDrawParams.colorArray = 0;
- gContext.immediateMesh->UpdateData((Vec3*)&m->m_positions[0], &m->m_normals[0], NULL, NULL, (int*)&m->m_indices[0], m->GetNumVertices(), int(m->GetNumFaces()));
- }
-
- gContext.mMeshDrawParams.color = (float4&)color;
- gContext.mMeshDrawParams.secondaryColor = (float4&)color;
- gContext.mMeshDrawParams.objectTransform = (float4x4&)Matrix44::kIdentity;
- gContext.mMeshDrawParams.shadowMap = gContext.shadowMap;
-
- gMeshRenderer.Draw(gContext.immediateMesh, &gContext.mMeshDrawParams);
-
- if (m->m_colours.size())
- gContext.mMeshDrawParams.colorArray = 0;
-
- }
-}
-
-void DrawCloth(const Vec4* positions, const Vec4* normals, const float* uvs, const int* indices, int numTris, int numPositions, int colorIndex, float expand, bool twosided, bool smooth)
-{
- if (!numTris)
- return;
-
- gContext.immediateMesh->UpdateData(positions, normals, NULL, NULL, indices, numPositions, numTris);
-
- if (twosided)
- SetCullMode(false);
-
- gContext.mMeshDrawParams.bias = 0.0f;
- gContext.mMeshDrawParams.expand = expand;
-
- gContext.mMeshDrawParams.color = (float4&)(gColors[colorIndex + 1] * 1.5f);
- gContext.mMeshDrawParams.secondaryColor = (float4&)(gColors[colorIndex] * 1.5f);
- gContext.mMeshDrawParams.objectTransform = (float4x4&)Matrix44::kIdentity;
- gContext.mMeshDrawParams.shadowMap = gContext.shadowMap;
-
- gMeshRenderer.Draw(gContext.immediateMesh, &gContext.mMeshDrawParams);
-
- if (twosided)
- SetCullMode(true);
-
- gContext.mMeshDrawParams.bias = gShadowBias;
- gContext.mMeshDrawParams.expand = 0.0f;
-
-}
-
-void DrawRope(Vec4* positions, int* indices, int numIndices, float radius, int color)
-{
- if (numIndices < 2)
- return;
-
- std::vector<Vec3> vertices;
- std::vector<Vec3> normals;
- std::vector<int> triangles;
-
- // flatten curve
- std::vector<Vec3> curve(numIndices);
- for (int i = 0; i < numIndices; ++i)
- curve[i] = Vec3(positions[indices[i]]);
-
- const int resolution = 8;
- const int smoothing = 3;
-
- vertices.reserve(resolution*numIndices*smoothing);
- normals.reserve(resolution*numIndices*smoothing);
- triangles.reserve(numIndices*resolution * 6 * smoothing);
-
- Extrude(&curve[0], int(curve.size()), vertices, normals, triangles, radius, resolution, smoothing);
-
- gContext.immediateMesh->UpdateData(&vertices[0], &normals[0], NULL, NULL, &triangles[0], int(vertices.size()), int(triangles.size())/3);
-
- SetCullMode(false);
-
- gContext.mMeshDrawParams.color = (float4&)(gColors[color % 8] * 1.5f);
- gContext.mMeshDrawParams.secondaryColor = (float4&)(gColors[color % 8] * 1.5f);
- gContext.mMeshDrawParams.objectTransform = (float4x4&)Matrix44::kIdentity;
- gContext.mMeshDrawParams.shadowMap = gContext.shadowMap;
-
- gMeshRenderer.Draw(gContext.immediateMesh, &gContext.mMeshDrawParams);
-
- SetCullMode(true);
-}
-
-void DrawPlane(const Vec4& p, bool color)
-{
- std::vector<Vec3> vertices;
- std::vector<Vec3> normals;
- std::vector<int> indices;
-
- Vec3 u, v;
- BasisFromVector(Vec3(p.x, p.y, p.z), &u, &v);
-
- Vec3 c = Vec3(p.x, p.y, p.z)*-p.w;
-
- gContext.mMeshDrawParams.shadowMap = gContext.shadowMap;
-
- if (color)
- gContext.mMeshDrawParams.color = (float4&)(p * 0.5f + Vec4(0.5f, 0.5f, 0.5f, 0.5f));
-
- const float kSize = 200.0f;
- const int kGrid = 3;
-
- // draw a grid of quads, otherwise z precision suffers
- for (int x = -kGrid; x <= kGrid; ++x)
- {
- for (int y = -kGrid; y <= kGrid; ++y)
- {
- Vec3 coff = c + u*float(x)*kSize*2.0f + v*float(y)*kSize*2.0f;
-
- int indexStart = int(vertices.size());
-
- vertices.push_back(Vec3(coff + u*kSize + v*kSize));
- vertices.push_back(Vec3(coff - u*kSize + v*kSize));
- vertices.push_back(Vec3(coff - u*kSize - v*kSize));
- vertices.push_back(Vec3(coff + u*kSize - v*kSize));
-
- normals.push_back(Vec3(p.x, p.y, p.z));
- normals.push_back(Vec3(p.x, p.y, p.z));
- normals.push_back(Vec3(p.x, p.y, p.z));
- normals.push_back(Vec3(p.x, p.y, p.z));
-
-
- indices.push_back(indexStart+0);
- indices.push_back(indexStart+1);
- indices.push_back(indexStart+2);
-
- indices.push_back(indexStart+2);
- indices.push_back(indexStart+3);
- indices.push_back(indexStart+0);
- }
- }
-
- gContext.immediateMesh->UpdateData(&vertices[0], &normals[0], NULL, NULL, &indices[0], int(vertices.size()), int(indices.size())/3);
- gMeshRenderer.Draw(gContext.immediateMesh, &gContext.mMeshDrawParams);
-}
-
-void DrawPlanes(Vec4* planes, int n, float bias)
-{
- gContext.mMeshDrawParams.color = (float4&)Vec4(0.9f, 0.9f, 0.9f, 1.0f);
-
- gContext.mMeshDrawParams.bias = 0.0f;
- gContext.mMeshDrawParams.grid = 1;
- gContext.mMeshDrawParams.expand = 0;
-
- for (int i = 0; i < n; ++i)
- {
- Vec4 p = planes[i];
- p.w -= bias;
-
- DrawPlane(p, false);
- }
-
- gContext.mMeshDrawParams.grid = 0;
- gContext.mMeshDrawParams.bias = gShadowBias;
-
-}
-
-GpuMesh* CreateGpuMesh(const Mesh* m)
-{
- GpuMesh* mesh = new GpuMesh(gAppGraphCtx->m_device, gAppGraphCtx->m_deviceContext);
-
- mesh->UpdateData((Vec3*)&m->m_positions[0], &m->m_normals[0], NULL, NULL, (int*)&m->m_indices[0], m->GetNumVertices(), int(m->GetNumFaces()));
-
- return mesh;
-}
-
-void DestroyGpuMesh(GpuMesh* m)
-{
- delete m;
-}
-
-void DrawGpuMesh(GpuMesh* m, const Matrix44& xform, const Vec3& color)
-{
- if (m)
- {
- MeshDrawParams params = gContext.mMeshDrawParams;
-
- params.color = (float4&)color;
- params.secondaryColor = (float4&)color;
- params.objectTransform = (float4x4&)xform;
- params.shadowMap = gContext.shadowMap;
-
- gMeshRenderer.Draw(m, &params);
- }
-}
-
-void DrawGpuMeshInstances(GpuMesh* m, const Matrix44* xforms, int n, const Vec3& color)
-{
- if (m)
- {
- gContext.mMeshDrawParams.color = (float4&)color;
- gContext.mMeshDrawParams.secondaryColor = (float4&)color;
- gContext.mMeshDrawParams.shadowMap = gContext.shadowMap;
-
- // copy params
- MeshDrawParams params = gContext.mMeshDrawParams;
-
- for (int i = 0; i < n; ++i)
- {
- params.objectTransform = (float4x4&)xforms[i];
-
- gMeshRenderer.Draw(m, &params);
- }
- }
-}
-
-void DrawPoints(VertexBuffer positions, VertexBuffer colors, IndexBuffer indices, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowTex, bool showDensity)
-{
- if (n == 0)
- return;
-
- PointDrawParams params;
-
- params.renderMode = POINT_RENDER_SOLID;
- params.cullMode = POINT_CULL_BACK;
- params.model = (XMMATRIX&)Matrix44::kIdentity;
- params.view = (XMMATRIX&)gContext.view;
- params.projection = (XMMATRIX&)gContext.proj;
-
- params.pointRadius = radius;
- params.pointScale = screenWidth / screenAspect * (1.0f / (tanf(fov * 0.5f)));
- params.spotMin = gSpotMin;
- params.spotMax = gSpotMax;
-
- int mode = 0;
- if (showDensity)
- mode = 1;
- if (shadowTex == 0)
- mode = 2;
- params.mode = mode;
-
- for (int i = 0; i < 8; i++)
- params.colors[i] = *((float4*)&gColors[i].r);
-
- // set shadow parameters
- ShadowParams shadow;
- ShadowApply(&shadow, lightPos, lightTarget, lightTransform, shadowTex);
- params.lightTransform = shadow.lightTransform;
- params.lightDir = shadow.lightDir;
- params.lightPos = shadow.lightPos;
- memcpy(params.shadowTaps, shadow.shadowTaps, sizeof(shadow.shadowTaps));
-
- if (gContext.mMeshDrawParams.renderStage == MESH_DRAW_SHADOW)
- {
- params.renderStage = POINT_DRAW_SHADOW;
- params.mode = 2;
- }
- else
- params.renderStage = POINT_DRAW_LIGHT;
-
- params.shadowMap = gContext.shadowMap;
-
- gPointRenderer.Draw(&params, positions, colors, indices, n, offset);
-
-}
-
-void RenderEllipsoids(FluidRenderer* renderer, FluidRenderBuffers buffers, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowMap, Vec4 color, float blur, float ior, bool debug)
-{
- if (n == 0)
- return;
-
- FluidDrawParams params;
-
- params.renderMode = FLUID_RENDER_SOLID;
- params.cullMode = FLUID_CULL_BACK;
- params.model = (XMMATRIX&)Matrix44::kIdentity;
- params.view = (XMMATRIX&)gContext.view;
- params.projection = (XMMATRIX&)gContext.proj;
-
- params.offset = offset;
- params.n = n;
- params.renderStage = FLUID_DRAW_LIGHT;
-
- const float viewHeight = tanf(fov / 2.0f);
- params.invViewport = float3(1.0f / screenWidth, screenAspect / screenWidth, 1.0f);
- params.invProjection = float3(screenAspect * viewHeight, viewHeight, 1.0f);
-
- params.shadowMap = gContext.shadowMap;
-
- renderer->mDepthTex.BindAndClear(gAppGraphCtx->m_deviceContext);
-
- // draw static shapes into depth buffer
- //DrawShapes();
-
- renderer->DrawEllipsoids(&params, &buffers);
-
-
- //---------------------------------------------------------------
- // build smooth depth
-
- renderer->mDepthSmoothTex.BindAndClear(gAppGraphCtx->m_deviceContext);
-
- params.blurRadiusWorld = radius * 0.5f;
- params.blurScale = screenWidth / screenAspect * (1.0f / (tanf(fov * 0.5f)));
- params.invTexScale = float4(1.0f / screenAspect, 1.0f, 0.0f, 0.0f);
- params.blurFalloff = blur;
- params.debug = debug;
-
- renderer->DrawBlurDepth(&params);
-
- //---------------------------------------------------------------
- // composite
-
- AppGraphCtx* context = gAppGraphCtx;
-
- {
- context->m_deviceContext->RSSetViewports(1, &context->m_viewport);
- context->m_deviceContext->RSSetScissorRects(0, nullptr);
-
- context->m_deviceContext->OMSetRenderTargets(1, &context->m_rtv, context->m_dsv);
- context->m_deviceContext->OMSetDepthStencilState(context->m_depthState, 0u);
-
- float blendFactor[4] = { 1.0, 1.0, 1.0, 1.0 };
- context->m_deviceContext->OMSetBlendState(context->m_blendState, blendFactor, 0xffff);
- }
-
- params.invTexScale = (float4&)Vec2(1.0f / screenWidth, screenAspect / screenWidth);
- params.clipPosToEye = (float4&)Vec2(tanf(fov*0.5f)*screenAspect, tanf(fov*0.5f));
- params.color = (float4&)color;
- params.ior = ior;
- params.spotMin = gSpotMin;
- params.spotMax = gSpotMax;
- params.debug = debug;
-
- params.lightPos = (float3&)lightPos;
- params.lightDir = (float3&)-Normalize(lightTarget - lightPos);
- params.lightTransform = (XMMATRIX&)(ConvertToD3DProjection(lightTransform));
-
-
- AppGraphCtxResolveFrame(context);
-
-
- renderer->DrawComposite(&params, context->m_resolvedTargetSRV);
-
- {
- AppGraphCtx* context = gAppGraphCtx;
- context->m_deviceContext->OMSetBlendState(nullptr, 0, 0xffff);
- }
-}
-
-DiffuseRenderBuffers CreateDiffuseRenderBuffers(int numParticles, bool& enableInterop)
-{
- DiffuseRenderBuffers buffers = {};
- buffers.mNumDiffuseParticles = numParticles;
- if (numParticles > 0)
- {
- {
- D3D11_BUFFER_DESC bufDesc;
- bufDesc.ByteWidth = numParticles * sizeof(Vec4);
- bufDesc.Usage = D3D11_USAGE_DYNAMIC;
- bufDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
- bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
- bufDesc.MiscFlags = 0;
- if (enableInterop)
- {
- bufDesc.CPUAccessFlags = 0;
- bufDesc.Usage = D3D11_USAGE_DEFAULT;
- bufDesc.MiscFlags = D3D11_RESOURCE_MISC_SHARED;
- }
-
- gAppGraphCtx->m_device->CreateBuffer(&bufDesc, NULL, &buffers.mDiffusePositionVBO);
- gAppGraphCtx->m_device->CreateBuffer(&bufDesc, NULL, &buffers.mDiffuseVelocityVBO);
- }
-
- {
- D3D11_BUFFER_DESC bufDesc;
- bufDesc.ByteWidth = numParticles * sizeof(int);
- bufDesc.Usage = D3D11_USAGE_DYNAMIC;
- bufDesc.BindFlags = D3D11_BIND_INDEX_BUFFER;
- bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
- bufDesc.MiscFlags = 0;
- if (enableInterop)
- {
- bufDesc.CPUAccessFlags = 0;
- bufDesc.Usage = D3D11_USAGE_DEFAULT;
- bufDesc.MiscFlags = D3D11_RESOURCE_MISC_SHARED;
- }
-
- gAppGraphCtx->m_device->CreateBuffer(&bufDesc, NULL, &buffers.mDiffuseIndicesIBO);
- }
-
- if (enableInterop)
- {
- extern NvFlexLibrary* g_flexLib;
-
- buffers.mDiffuseIndicesBuf = NvFlexRegisterD3DBuffer(g_flexLib, buffers.mDiffuseIndicesIBO, numParticles, sizeof(int));
- buffers.mDiffusePositionsBuf = NvFlexRegisterD3DBuffer(g_flexLib, buffers.mDiffusePositionVBO, numParticles, sizeof(Vec4));
- buffers.mDiffuseVelocitiesBuf = NvFlexRegisterD3DBuffer(g_flexLib, buffers.mDiffuseVelocityVBO, numParticles, sizeof(Vec4));
-
- if (buffers.mDiffuseIndicesBuf == nullptr ||
- buffers.mDiffusePositionsBuf == nullptr ||
- buffers.mDiffuseVelocitiesBuf == nullptr)
- enableInterop = false;
- }
- }
-
- return buffers;
-}
-
-void DestroyDiffuseRenderBuffers(DiffuseRenderBuffers buffers)
-{
- if (buffers.mNumDiffuseParticles > 0)
- {
- COMRelease(buffers.mDiffusePositionVBO);
- COMRelease(buffers.mDiffuseVelocityVBO);
- COMRelease(buffers.mDiffuseIndicesIBO);
-
- NvFlexUnregisterD3DBuffer(buffers.mDiffuseIndicesBuf);
- NvFlexUnregisterD3DBuffer(buffers.mDiffusePositionsBuf);
- NvFlexUnregisterD3DBuffer(buffers.mDiffuseVelocitiesBuf);
- }
-}
-
-void UpdateDiffuseRenderBuffers(DiffuseRenderBuffers buffers, NvFlexSolver* solver)
-{
- // diffuse particles
- if (buffers.mNumDiffuseParticles)
- {
- NvFlexGetDiffuseParticles(solver, buffers.mDiffusePositionsBuf, buffers.mDiffuseVelocitiesBuf, buffers.mDiffuseIndicesBuf);
- }
-}
-
-void UpdateDiffuseRenderBuffers(DiffuseRenderBuffers buffers, Vec4* diffusePositions, Vec4* diffuseVelocities, int* diffuseIndices, int numDiffuseParticles)
-{
- D3D11_MAPPED_SUBRESOURCE res;
-
- // vertices
- if (diffusePositions)
- {
- gAppGraphCtx->m_deviceContext->Map(buffers.mDiffusePositionVBO, 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- memcpy(res.pData, diffusePositions, sizeof(Vec4)*numDiffuseParticles);
- gAppGraphCtx->m_deviceContext->Unmap(buffers.mDiffusePositionVBO, 0);
- }
-
- if (diffuseVelocities)
- {
- gAppGraphCtx->m_deviceContext->Map(buffers.mDiffuseVelocityVBO, 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- memcpy(res.pData, diffuseVelocities, sizeof(Vec4)*numDiffuseParticles);
- gAppGraphCtx->m_deviceContext->Unmap(buffers.mDiffuseVelocityVBO, 0);
- }
-
- if (diffuseIndices)
- {
- gAppGraphCtx->m_deviceContext->Map(buffers.mDiffuseIndicesIBO, 0, D3D11_MAP_WRITE_DISCARD, 0, &res);
- memcpy(res.pData, diffuseIndices, sizeof(int)*numDiffuseParticles);
- gAppGraphCtx->m_deviceContext->Unmap(buffers.mDiffuseIndicesIBO, 0);
- }
-
-}
-
-void RenderDiffuse(FluidRenderer* render, DiffuseRenderBuffers buffers, int n, float radius, float screenWidth, float screenAspect, float fov, Vec4 color, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowMap, float motionBlur, float inscatter, float outscatter, bool shadowEnabled, bool front)
-{
- if (n == 0)
- return;
-
- DiffuseDrawParams params;
-
- params.model = (const XMMATRIX&)Matrix44::kIdentity;
- params.view = (const XMMATRIX&)gContext.view;
- params.projection = (const XMMATRIX&)gContext.proj;
- params.diffuseRadius = screenWidth / screenAspect * (1.0f / (tanf(fov * 0.5f)));
- params.diffuseScale = radius;
- params.spotMin = gSpotMin;
- params.spotMax = gSpotMax;
- params.color = float4(1.0f, 1.0f, 1.0f, 1.0f);
- params.motionScale = motionBlur;
-
- // set shadow parameters
- ShadowParams shadow;
- ShadowApply(&shadow, lightPos, lightTarget, lightTransform, shadowMap);
- params.lightTransform = shadow.lightTransform;
- params.lightDir = shadow.lightDir;
- params.lightPos = shadow.lightPos;
- params.shadowMap = gContext.shadowMap;
-
- memcpy(params.shadowTaps, shadow.shadowTaps, sizeof(shadow.shadowTaps));
-
-
- gDiffuseRenderer.Draw(&params, buffers.mDiffusePositionVBO, buffers.mDiffuseVelocityVBO, buffers.mDiffuseIndicesIBO, n);
-
- // reset depth stencil state
- gAppGraphCtx->m_deviceContext->OMSetDepthStencilState(gAppGraphCtx->m_depthState, 0u);
-
-
-}
-
-
-void BeginLines()
-{
-
-}
-
-void DrawLine(const Vec3& p, const Vec3& q, const Vec4& color)
-{
- gDebugLineRender.AddLine(p, q, color);
-}
-
-void EndLines()
-{
- // draw
- Matrix44 projectionViewWorld = ((Matrix44&)(gContext.mMeshDrawParams.projection))*((Matrix44&)(gContext.mMeshDrawParams.view));
-
- gDebugLineRender.FlushLines(projectionViewWorld);
-}
-
-void BeginPoints(float size) {}
-void DrawPoint(const Vec3& p, const Vec4& color) {}
-void EndPoints() {}
-
diff --git a/demo/d3d11/shadowMap.cpp b/demo/d3d11/shadowMapD3D11.cpp
index 403ec59..a824929 100644
--- a/demo/d3d11/shadowMap.cpp
+++ b/demo/d3d11/shadowMapD3D11.cpp
@@ -8,9 +8,9 @@
* license agreement from NVIDIA CORPORATION is strictly prohibited.
*/
-#include "shadowMap.h"
+#include "shadowMapD3D11.h"
-ShadowMap::ShadowMap()
+ShadowMapD3D11::ShadowMapD3D11()
{
}
@@ -56,7 +56,7 @@ static D3D11_SHADER_RESOURCE_VIEW_DESC _getSrvDesc(DXGI_FORMAT format)
return desc;
}
-HRESULT ShadowMap::init(ID3D11Device* device, int resolution)
+HRESULT ShadowMapD3D11::init(ID3D11Device* device, int resolution)
{
// set viewport
{
@@ -122,7 +122,7 @@ HRESULT ShadowMap::init(ID3D11Device* device, int resolution)
return S_OK;
}
-void ShadowMap::bindAndClear(ID3D11DeviceContext* context)
+void ShadowMapD3D11::bindAndClear(ID3D11DeviceContext* context)
{
ID3D11RenderTargetView* ppRtv[1] = { m_backRtv.Get() };
context->OMSetRenderTargets(1, ppRtv, m_depthDsv.Get());
@@ -136,7 +136,7 @@ void ShadowMap::bindAndClear(ID3D11DeviceContext* context)
context->ClearDepthStencilView(m_depthDsv.Get(), D3D11_CLEAR_DEPTH, 1.0, 0);
}
-void ShadowMap::setDefaultLight(FXMVECTOR eye, FXMVECTOR at, FXMVECTOR up)
+void ShadowMapD3D11::setDefaultLight(FXMVECTOR eye, FXMVECTOR at, FXMVECTOR up)
{
float sizeX = 50.0f;
float sizeY = 50.0f;
@@ -146,7 +146,7 @@ void ShadowMap::setDefaultLight(FXMVECTOR eye, FXMVECTOR at, FXMVECTOR up)
setLightMatrices(eye, at, up, sizeX, sizeY, znear, zfar);
}
-void ShadowMap::setLightMatrices(FXMVECTOR eye, FXMVECTOR lookAt, FXMVECTOR up, float sizeX, float sizeY, float zNear, float zFar)
+void ShadowMapD3D11::setLightMatrices(FXMVECTOR eye, FXMVECTOR lookAt, FXMVECTOR up, float sizeX, float sizeY, float zNear, float zFar)
{
m_lightView = XMMatrixLookAtLH(eye, lookAt, up);
diff --git a/demo/d3d11/shadowMap.h b/demo/d3d11/shadowMapD3D11.h
index 2ed15ca..1fa79ec 100644
--- a/demo/d3d11/shadowMap.h
+++ b/demo/d3d11/shadowMapD3D11.h
@@ -20,10 +20,9 @@ using namespace Microsoft::WRL;
#define NV_NULL nullptr
#define NV_RETURN_ON_FAIL(x) { HRESULT _res = (x); if (FAILED(_res)) { return _res; } }
-struct ShadowMap
+struct ShadowMapD3D11
{
-
- ShadowMap();
+ ShadowMapD3D11();
HRESULT init(ID3D11Device* device, int resolution);
diff --git a/demo/d3d12/NvCoDx12CircularResourceHeap.cpp b/demo/d3d12/NvCoDx12CircularResourceHeap.cpp
new file mode 100644
index 0000000..040b159
--- /dev/null
+++ b/demo/d3d12/NvCoDx12CircularResourceHeap.cpp
@@ -0,0 +1,204 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+#include "NvCoDx12CircularResourceHeap.h"
+
+namespace nvidia {
+namespace Common {
+
+Dx12CircularResourceHeap::Dx12CircularResourceHeap():
+ m_fence(nullptr),
+ m_device(nullptr),
+ m_blockFreeList(sizeof(Block), __alignof(Block), 16),
+ m_blocks(nullptr)
+{
+ m_back.m_block = nullptr;
+ m_back.m_position = nullptr;
+ m_front.m_block = nullptr;
+ m_front.m_position = nullptr;
+}
+
+Dx12CircularResourceHeap::~Dx12CircularResourceHeap()
+{
+ _freeBlockListResources(m_blocks);
+}
+
+void Dx12CircularResourceHeap::_freeBlockListResources(const Block* start)
+{
+ if (start)
+ {
+ {
+ ID3D12Resource* resource = start->m_resource;
+ resource->Unmap(0, nullptr);
+ resource->Release();
+ }
+ for (Block* block = start->m_next; block != start; block = block->m_next)
+ {
+ ID3D12Resource* resource = block->m_resource;
+ resource->Unmap(0, nullptr);
+ resource->Release();
+ }
+ }
+}
+
+int Dx12CircularResourceHeap::init(ID3D12Device* device, const Desc& desc, Dx12CounterFence* fence)
+{
+ assert(m_blocks == nullptr);
+ assert(desc.m_blockSize > 0);
+
+ m_fence = fence;
+ m_desc = desc;
+ m_device = device;
+
+ return NV_OK;
+}
+
+void Dx12CircularResourceHeap::addSync(uint64_t signalValue)
+{
+ assert(signalValue == m_fence->getCurrentValue());
+ PendingEntry entry;
+ entry.m_completedValue = signalValue;
+ entry.m_cursor = m_front;
+ m_pendingQueue.push_back(entry);
+}
+
+void Dx12CircularResourceHeap::updateCompleted()
+{
+ const uint64_t completedValue = m_fence->getCompletedValue();
+ while (!m_pendingQueue.empty())
+ {
+ const PendingEntry& entry = m_pendingQueue.front();
+ if (entry.m_completedValue <= completedValue)
+ {
+ m_back = entry.m_cursor;
+ m_pendingQueue.pop_front();
+ }
+ else
+ {
+ break;
+ }
+ }
+}
+
+Dx12CircularResourceHeap::Block* Dx12CircularResourceHeap::_newBlock()
+{
+ D3D12_RESOURCE_DESC desc;
+
+ desc.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
+ desc.Alignment = 0;
+ desc.Width = m_desc.m_blockSize;
+ desc.Height = 1;
+ desc.DepthOrArraySize = 1;
+ desc.MipLevels = 1;
+ desc.Format = DXGI_FORMAT_UNKNOWN;
+ desc.SampleDesc.Count = 1;
+ desc.SampleDesc.Quality = 0;
+ desc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
+ desc.Flags = D3D12_RESOURCE_FLAG_NONE;
+
+ ComPtr<ID3D12Resource> resource;
+ int res = m_device->CreateCommittedResource(&m_desc.m_heapProperties, m_desc.m_heapFlags, &desc, m_desc.m_initialState, nullptr, IID_PPV_ARGS(&resource));
+ if (NV_FAILED(res))
+ {
+ printf("Resource allocation failed");
+ return nullptr;
+ }
+
+ uint8_t* data = nullptr;
+ if (m_desc.m_heapProperties.Type == D3D12_HEAP_TYPE_READBACK)
+ {
+ }
+ else
+ {
+ // Map it, and keep it mapped
+ resource->Map(0, nullptr, (void**)&data);
+ }
+
+ // We have no blocks -> so lets allocate the first
+ Block* block = (Block*)m_blockFreeList.allocate();
+ block->m_next = nullptr;
+
+ block->m_resource = resource.Detach();
+ block->m_start = data;
+ return block;
+}
+
+Dx12CircularResourceHeap::Cursor Dx12CircularResourceHeap::allocate(size_t size, size_t alignment)
+{
+ const size_t blockSize = getBlockSize();
+
+ assert(size <= blockSize);
+
+ // If nothing is allocated add the first block
+ if (m_blocks == nullptr)
+ {
+ Block* block = _newBlock();
+ if (!block)
+ {
+ Cursor cursor = {};
+ return cursor;
+ }
+ m_blocks = block;
+ // Make circular
+ block->m_next = block;
+
+ // Point front and back to same position, as currently it is all free
+ m_back = { block, block->m_start };
+ m_front = m_back;
+ }
+
+ // If front and back are in the same block then front MUST be ahead of back (as that defined as
+ // an invariant and is required for block insertion to be possible
+ Block* block = m_front.m_block;
+
+ // Check the invariant
+ assert(block != m_back.m_block || m_front.m_position >= m_back.m_position);
+
+ {
+ uint8_t* cur = (uint8_t*)((size_t(m_front.m_position) + alignment - 1) & ~(alignment - 1));
+ // Does the the allocation fit?
+ if (cur + size <= block->m_start + blockSize)
+ {
+ // It fits
+ // Move the front forward
+ m_front.m_position = cur + size;
+ Cursor cursor = { block, cur };
+ return cursor;
+ }
+ }
+
+ // Okay I can't fit into current block...
+
+ // If the next block contains front, we need to add a block, else we can use that block
+ if (block->m_next == m_back.m_block)
+ {
+ Block* newBlock = _newBlock();
+ // Insert into the list
+ newBlock->m_next = block->m_next;
+ block->m_next = newBlock;
+ }
+
+ // Use the block we are going to add to
+ block = block->m_next;
+ uint8_t* cur = (uint8_t*)((size_t(block->m_start) + alignment - 1) & ~(alignment - 1));
+ // Does the the allocation fit?
+ if (cur + size > block->m_start + blockSize)
+ {
+ printf("Couldn't fit into a free block(!) Alignment breaks it?");
+ Cursor cursor = {};
+ return cursor;
+ }
+ // It fits
+ // Move the front forward
+ m_front.m_block = block;
+ m_front.m_position = cur + size;
+ Cursor cursor = { block, cur };
+ return cursor;
+}
+
+} // namespace Common
+} // namespace nvidia
diff --git a/demo/d3d12/NvCoDx12CircularResourceHeap.h b/demo/d3d12/NvCoDx12CircularResourceHeap.h
new file mode 100644
index 0000000..c88db06
--- /dev/null
+++ b/demo/d3d12/NvCoDx12CircularResourceHeap.h
@@ -0,0 +1,234 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+#ifndef NV_CO_DX12_CIRCULAR_RESOURCE_HEAP_H
+#define NV_CO_DX12_CIRCULAR_RESOURCE_HEAP_H
+
+#include <NvResult.h>
+#include <NvCoFreeList.h>
+#include "NvCoDx12CounterFence.h"
+
+#define NOMINMAX
+#include <d3d12.h>
+#include <wrl.h>
+#include <deque>
+
+using namespace Microsoft::WRL;
+
+/** \addtogroup common
+@{
+*/
+
+namespace nvidia {
+namespace Common {
+
+/*! \brief The Dx12CircularResourceHeap is a heap that is suited for size constrained real-time resources allocation that
+is transitory in nature. It is designed to allocate resources which are used and discarded, often used where in
+previous versions of DirectX the 'DISCARD' flag was used.
+
+The idea is to have a heap which chunks of resource can be allocated, and used for GPU execution,
+and that the heap is able through the addSync/updateCompleted idiom is able to track when the usage of the resources is
+completed allowing them to be reused. The heap is arranged as circularly, with new allocations made from the front, and the back
+being updated as the GPU updating the back when it is informed anything using prior parts of the heap have completed. In this
+arrangement all the heap between the back and the front can be thought of as in use or potentially in use by the GPU. All the heap
+from the front back around to the back, is free and can be allocated from. It is the responsibility of the user of the Heap to make
+sure the invariant holds, but in most normal usage it does so simply.
+
+Another feature of the heap is that it does not require upfront knowledge of how big a heap is needed. The backing resources will be expanded
+dynamically with requests as needed. The only requirement is that know single request can be larger than m_blockSize specified in the Desc
+used to initialize the heap. This is because all the backing resources are allocated to a single size. This limitation means the Dx12CircularResourceHeap
+may not be the best use for example for uploading a texture - because it's design is really around transitory uploads or write backs, and so more suited
+to constant buffers, vertex buffer, index buffers and the like.
+
+To upload a texture at program startup it is most likely better to use a Dx12ResourceScopeManager.
+
+### The addSync/updateCompleted Idiom
+
+Lots of classes in Nv/Common/Platform/Dx12 use the addSync/update idiom. The idiom enables a class to track GPU progress fairly simply. The
+two methods are generally called at a fairly low frequency - say once a frame. The addSync method is given a signalValue that should be the
+value generated from nextSignal on the Dx12Fence that is passed on construction of the type. Calling addSync means when this value is hit
+ALL previous heap allocations will no longer be used. Thus in practice usage looks something like
+
+\code{.cpp}
+
+typedef Dx12CircularResourceHeap Heap;
+
+Heap::Cursor cursor = heap.allocateVertexBuffer(sizeof(Vertex) * numVerts);
+Memory:copy(cursor.m_position, verts, sizeof(Vertex) * numVerts);
+
+// Do a command using the GPU handle
+m_commandList->...
+// Do another command using the GPU handle
+
+m_commandList->...
+
+// Execute the command list on the command queue
+{
+ ID3D12CommandList* lists[] = { m_commandList };
+ m_commandQueue->ExecuteCommandLists(_countof(lists), lists);
+}
+
+// Add a sync point
+const uint64_t signalValue = m_fence.nextSignal(m_commandQueue);
+heap.addSync(signalValue)
+
+// The cursors cannot be used anymore
+
+// At some later point call updateCompleted. This will see where the GPU is at, and make resources available that the GPU no longer accesses.
+heap.updateCompleted();
+
+\endcode
+
+### Implementation
+
+Front and back can be in the same block, but ONLY if back is behind front, because we have to always be able to insert
+new blocks in front of front. So it must be possible to do an block insertion between the two of them.
+
+|--B---F-----| |----------|
+
+When B and F are on top of one another it means there is nothing in the list. NOTE this also means that a move of front can never place it
+top of the back.
+
+https://msdn.microsoft.com/en-us/library/windows/desktop/dn899125%28v=vs.85%29.aspx
+https://msdn.microsoft.com/en-us/library/windows/desktop/mt426646%28v=vs.85%29.aspx
+*/
+class Dx12CircularResourceHeap
+{
+ protected:
+ struct Block;
+
+ //NV_CO_DECLARE_CLASS_BASE(Dx12CircularResourceHeap);
+public:
+ /// The alignment used for VERTEX_BUFFER allocations
+ /// Strictly speaking it seems the hardware can handle 4 byte alignment, but since often in use
+ /// data will be copied from CPU memory to the allocation, using 16 byte alignment is superior as allows
+ /// significantly faster memcpy.
+ /// The sample that shows sizeof(float) - 4 bytes is appropriate is at the link below.
+ /// https://msdn.microsoft.com/en-us/library/windows/desktop/mt426646%28v=vs.85%29.aspx
+ enum
+ {
+ VERTEX_BUFFER_ALIGNMENT = 16,
+ };
+
+ struct Desc
+ {
+ void init()
+ {
+ {
+ D3D12_HEAP_PROPERTIES& props = m_heapProperties;
+
+ props.Type = D3D12_HEAP_TYPE_UPLOAD;
+ props.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
+ props.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
+ props.CreationNodeMask = 1;
+ props.VisibleNodeMask = 1;
+ }
+ m_heapFlags = D3D12_HEAP_FLAG_NONE;
+ m_initialState = D3D12_RESOURCE_STATE_GENERIC_READ;
+ m_blockSize = 0;
+ }
+
+ D3D12_HEAP_PROPERTIES m_heapProperties;
+ D3D12_HEAP_FLAGS m_heapFlags;
+ D3D12_RESOURCE_STATES m_initialState;
+ size_t m_blockSize;
+ };
+
+ /// Cursor position
+ struct Cursor
+ {
+ /// Get GpuHandle
+ inline D3D12_GPU_VIRTUAL_ADDRESS getGpuHandle() const { return m_block->m_resource->GetGPUVirtualAddress() + size_t(m_position - m_block->m_start); }
+ /// Must have a block and position
+ inline bool isValid() const { return m_block != nullptr; }
+ /// Calculate the offset into the underlying resource
+ inline size_t getOffset() const { return size_t(m_position - m_block->m_start); }
+ /// Get the underlying resource
+ inline ID3D12Resource* getResource() const { return m_block->m_resource; }
+
+ Block* m_block; ///< The block index
+ uint8_t* m_position; ///< The current position
+ };
+
+ /// Get the desc used to initialize the heap
+ inline const Desc& getDesc() const { return m_desc; }
+
+ /// Must be called before used
+ /// Block size must be at least as large as the _largest_ thing allocated
+ /// Also note depending on alignment of a resource allocation, the block size might also need to take into account the
+ /// maximum alignment use. It is a REQUIREMENT that a newly allocated resource block is large enough to hold any
+ /// allocation taking into account the alignment used.
+ int init(ID3D12Device* device, const Desc& desc, Dx12CounterFence* fence);
+
+ /// Get the block size
+ inline size_t getBlockSize() const { return m_desc.m_blockSize; }
+
+ /// Allocate constant buffer of specified size
+ Cursor allocate(size_t size, size_t alignment);
+
+ /// Allocate a constant buffer
+ inline Cursor allocateConstantBuffer(size_t size) { return allocate(size, D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT); }
+ /// Allocate a vertex buffer
+ inline Cursor allocateVertexBuffer(size_t size) { return allocate(size, VERTEX_BUFFER_ALIGNMENT); }
+
+ /// Create filled in constant buffer
+ inline Cursor newConstantBuffer(const void* data, size_t size) { Cursor cursor = allocateConstantBuffer(size); memcpy(cursor.m_position, data, size); return cursor; }
+ /// Create in filled in constant buffer
+ template <typename T>
+ inline Cursor newConstantBuffer(const T& in) { return newConstantBuffer(&in, sizeof(T)); }
+
+ /// Look where the GPU has got to and release anything not currently used
+ void updateCompleted();
+ /// Add a sync point - meaning that when this point is hit in the queue
+ /// all of the resources up to this point will no longer be used.
+ void addSync(uint64_t signalValue);
+
+ /// Get the gpu address of this cursor
+ D3D12_GPU_VIRTUAL_ADDRESS getGpuHandle(const Cursor& cursor) const { return cursor.m_block->m_resource->GetGPUVirtualAddress() + size_t(cursor.m_position - cursor.m_block->m_start); }
+
+ /// Ctor
+ Dx12CircularResourceHeap();
+ /// Dtor
+ ~Dx12CircularResourceHeap();
+
+ protected:
+
+ struct Block
+ {
+ ID3D12Resource* m_resource; ///< The mapped resource
+ uint8_t* m_start; ///< Once created the resource is mapped to here
+ Block* m_next; ///< Points to next block in the list
+ };
+ struct PendingEntry
+ {
+ uint64_t m_completedValue; ///< The value when this is completed
+ Cursor m_cursor; ///< the cursor at that point
+ };
+ void _freeBlockListResources(const Block* block);
+ /// Create a new block (with associated resource), do not add the block list
+ Block* _newBlock();
+
+ Block* m_blocks; ///< Circular singly linked list of block. nullptr initially
+ FreeList m_blockFreeList; ///< Free list of actual allocations of blocks
+ std::deque<PendingEntry> m_pendingQueue; ///< Holds the list of pending positions. When the fence value is greater than the value on the queue entry, the entry is done.
+
+ // Allocation is made from the front, and freed from the back.
+ Cursor m_back; ///< Current back position.
+ Cursor m_front; ///< Current front position.
+
+ Desc m_desc; ///< Describes the heap
+
+ Dx12CounterFence* m_fence; ///< The fence to use
+ ID3D12Device* m_device; ///< The device that resources will be constructed on
+};
+
+} // namespace Common
+} // namespace nvidia
+
+/** @} */
+
+#endif // NV_CO_DX12_CIRCULAR_RESOURCE_HEAP_H
diff --git a/demo/d3d12/NvCoDx12CounterFence.cpp b/demo/d3d12/NvCoDx12CounterFence.cpp
new file mode 100644
index 0000000..bca181a
--- /dev/null
+++ b/demo/d3d12/NvCoDx12CounterFence.cpp
@@ -0,0 +1,71 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+#include "NvCoDx12CounterFence.h"
+
+namespace nvidia {
+namespace Common {
+
+Dx12CounterFence::~Dx12CounterFence()
+{
+ if (m_event)
+ {
+ CloseHandle(m_event);
+ }
+}
+
+int Dx12CounterFence::init(ID3D12Device* device, uint64_t initialValue)
+{
+ m_currentValue = initialValue;
+
+ NV_RETURN_ON_FAIL(device->CreateFence(m_currentValue, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&m_fence)));
+ // Create an event handle to use for frame synchronization.
+ m_event = CreateEvent(nullptr, FALSE, FALSE, nullptr);
+ if (m_event == nullptr)
+ {
+ int res = HRESULT_FROM_WIN32(GetLastError());
+ return NV_FAILED(res) ? res : NV_FAIL;
+ }
+ return NV_OK;
+}
+
+uint64_t Dx12CounterFence::nextSignal(ID3D12CommandQueue* commandQueue)
+{
+ // Increment the fence value. Save on the frame - we'll know that frame is done when the fence value >=
+ m_currentValue++;
+ // Schedule a Signal command in the queue.
+ int res = commandQueue->Signal(m_fence.Get(), m_currentValue);
+ if (NV_FAILED(res))
+ {
+ printf("Signal failed");
+ }
+ return m_currentValue;
+}
+
+void Dx12CounterFence::waitUntilCompleted(uint64_t completedValue)
+{
+ // You can only wait for a value that is less than or equal to the current value
+ assert(completedValue <= m_currentValue);
+
+ // Wait until the previous frame is finished.
+ while (m_fence->GetCompletedValue() < completedValue)
+ {
+ // Make it signal with the current value
+ HRESULT res = m_fence->SetEventOnCompletion(completedValue, m_event);
+ if (FAILED(res)) { assert(0); return; }
+
+ WaitForSingleObject(m_event, INFINITE);
+ }
+}
+
+void Dx12CounterFence::nextSignalAndWait(ID3D12CommandQueue* commandQueue)
+{
+ waitUntilCompleted(nextSignal(commandQueue));
+}
+
+} // namespace Common
+} // namespace nvidia
diff --git a/demo/d3d12/NvCoDx12CounterFence.h b/demo/d3d12/NvCoDx12CounterFence.h
new file mode 100644
index 0000000..9add39b
--- /dev/null
+++ b/demo/d3d12/NvCoDx12CounterFence.h
@@ -0,0 +1,82 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+#ifndef NV_CO_DX12_COUNTER_FENCE_H
+#define NV_CO_DX12_COUNTER_FENCE_H
+
+#include <NvResult.h>
+
+#define NOMINMAX
+#include <d3d12.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <assert.h>
+#include <wrl.h>
+
+using namespace Microsoft::WRL;
+
+/** \addtogroup common
+@{
+*/
+
+namespace nvidia {
+namespace Common {
+
+/*! \brief A class to simplify using Dx12 fences.
+
+A fence is a mechanism to track GPU work. This is achieved by having a counter that the CPU holds
+called the current value. Calling nextSignal will increase the CPU counter, and add a fence
+with that value to the commandQueue. When the GPU has completed all the work before the fence it will
+update the completed value. This is typically used when
+the CPU needs to know the GPU has finished some piece of work has completed. To do this the CPU
+can check the completed value, and when it is greater or equal to the value returned by nextSignal the
+CPU will know that all the work prior to when the nextSignal was added to the queue will have completed.
+
+NOTE! This cannot be used across threads, as for amongst other reasons SetEventOnCompletion
+only works with a single value.
+
+Signal on the CommandQueue updates the fence on the GPU side. Signal on the fence object changes
+the value on the CPU side (not used here).
+
+Useful article describing how Dx12 synchronization works:
+https://msdn.microsoft.com/en-us/library/windows/desktop/dn899217%28v=vs.85%29.aspx
+*/
+class Dx12CounterFence
+{
+ //NV_CO_DECLARE_CLASS_BASE(Dx12CounterFence);
+public:
+ /// Must be called before used
+ int init(ID3D12Device* device, uint64_t initialValue = 0);
+ /// Increases the counter, signals the queue and waits for the signal to be hit
+ void nextSignalAndWait(ID3D12CommandQueue* queue);
+ /// Signals with next counter value. Returns the value the signal was called on
+ uint64_t nextSignal(ID3D12CommandQueue* commandQueue);
+ /// Get the current value
+ inline uint64_t getCurrentValue() const { return m_currentValue; }
+ /// Get the completed value
+ inline uint64_t getCompletedValue() const { return m_fence->GetCompletedValue(); }
+
+ /// Waits for the the specified value
+ void waitUntilCompleted(uint64_t completedValue);
+
+ /// Ctor
+ Dx12CounterFence():m_event(nullptr), m_currentValue(0) {}
+ /// Dtor
+ ~Dx12CounterFence();
+
+ protected:
+ HANDLE m_event;
+ ComPtr<ID3D12Fence> m_fence;
+ uint64_t m_currentValue;
+};
+
+} // namespace Common
+} // namespace nvidia
+
+/** @} */
+
+#endif // NV_CO_DX12_COUNTER_FENCE_H
diff --git a/demo/d3d12/NvCoDx12DescriptorHeap.cpp b/demo/d3d12/NvCoDx12DescriptorHeap.cpp
new file mode 100644
index 0000000..acda590
--- /dev/null
+++ b/demo/d3d12/NvCoDx12DescriptorHeap.cpp
@@ -0,0 +1,54 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+#include "NvCoDx12DescriptorHeap.h"
+
+namespace nvidia {
+namespace Common {
+
+Dx12DescriptorHeap::Dx12DescriptorHeap():
+ m_size(0),
+ m_currentIndex(0),
+ m_descriptorSize(0)
+{
+}
+
+int Dx12DescriptorHeap::init(ID3D12Device* device, int size, D3D12_DESCRIPTOR_HEAP_TYPE type, D3D12_DESCRIPTOR_HEAP_FLAGS flags)
+{
+ D3D12_DESCRIPTOR_HEAP_DESC srvHeapDesc = {};
+ srvHeapDesc.NumDescriptors = size;
+ srvHeapDesc.Flags = flags;
+ srvHeapDesc.Type = type;
+ NV_RETURN_ON_FAIL(device->CreateDescriptorHeap(&srvHeapDesc, IID_PPV_ARGS(&m_heap)));
+
+ m_descriptorSize = device->GetDescriptorHandleIncrementSize(type);
+ m_size = size;
+
+ return NV_OK;
+}
+
+int Dx12DescriptorHeap::init(ID3D12Device* device, const D3D12_CPU_DESCRIPTOR_HANDLE* handles, int numHandles, D3D12_DESCRIPTOR_HEAP_TYPE type, D3D12_DESCRIPTOR_HEAP_FLAGS flags)
+{
+ NV_RETURN_ON_FAIL(init(device, numHandles, type, flags));
+ D3D12_CPU_DESCRIPTOR_HANDLE dst = m_heap->GetCPUDescriptorHandleForHeapStart();
+
+ // Copy them all
+ for (int i = 0; i < numHandles; i++, dst.ptr += m_descriptorSize)
+ {
+ D3D12_CPU_DESCRIPTOR_HANDLE src = handles[i];
+ if (src.ptr != 0)
+ {
+ device->CopyDescriptorsSimple(1, dst, src, type);
+ }
+ }
+
+ return NV_OK;
+}
+
+} // namespace Common
+} // namespace nvidia
+
diff --git a/demo/d3d12/NvCoDx12DescriptorHeap.h b/demo/d3d12/NvCoDx12DescriptorHeap.h
new file mode 100644
index 0000000..d323ce6
--- /dev/null
+++ b/demo/d3d12/NvCoDx12DescriptorHeap.h
@@ -0,0 +1,116 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+#ifndef NV_CO_DX12_DESCRIPTOR_HEAP_H
+#define NV_CO_DX12_DESCRIPTOR_HEAP_H
+
+#include <NvResult.h>
+
+#define NOMINMAX
+#include <dxgi.h>
+#include <d3d12.h>
+#include <assert.h>
+#include <wrl.h>
+
+using namespace Microsoft::WRL;
+
+namespace nvidia {
+namespace Common {
+
+/*! \brief A simple class to manage an underlying Dx12 Descriptor Heap. Allocations are made linearly in order. It is not possible to free
+individual allocations, but all allocations can be deallocated with 'deallocateAll'. */
+class Dx12DescriptorHeap
+{
+ //NV_CO_DECLARE_CLASS_BASE(Dx12DescriptorHeap);
+public:
+ /// Initialize
+ int init(ID3D12Device* device, int size, D3D12_DESCRIPTOR_HEAP_TYPE type, D3D12_DESCRIPTOR_HEAP_FLAGS flags);
+ /// Initialize with an array of handles copying over the representation
+ int init(ID3D12Device* device, const D3D12_CPU_DESCRIPTOR_HANDLE* handles, int numHandles, D3D12_DESCRIPTOR_HEAP_TYPE type, D3D12_DESCRIPTOR_HEAP_FLAGS flags);
+
+ /// Get the total amount of descriptors possible on the heap
+ inline int getSize() const { return m_size; }
+ /// Allocate a descriptor. Returns the index, or -1 if none left.
+ inline int allocate();
+ /// Allocate a number of descriptors. Returns the start index (or -1 if not possible)
+ inline int allocate(int numDescriptors);
+
+ /// Deallocates all allocations, and starts allocation from the start of the underlying heap again
+ inline void deallocateAll() { m_currentIndex = 0; }
+
+ /// Get the size of each
+ inline int getDescriptorSize() const { return m_descriptorSize; }
+
+ /// Get the GPU heap start
+ inline D3D12_GPU_DESCRIPTOR_HANDLE getGpuStart() const { return m_heap->GetGPUDescriptorHandleForHeapStart(); }
+ /// Get the CPU heap start
+ inline D3D12_CPU_DESCRIPTOR_HANDLE getCpuStart() const { return m_heap->GetCPUDescriptorHandleForHeapStart(); }
+
+ /// Get the GPU handle at the specified index
+ inline D3D12_GPU_DESCRIPTOR_HANDLE getGpuHandle(int index) const;
+ /// Get the CPU handle at the specified index
+ inline D3D12_CPU_DESCRIPTOR_HANDLE getCpuHandle(int index) const;
+
+ /// Get the underlying heap
+ inline ID3D12DescriptorHeap* getHeap() const { return m_heap.Get(); }
+
+ /// Ctor
+ Dx12DescriptorHeap();
+
+protected:
+ ComPtr<ID3D12DescriptorHeap> m_heap; ///< The underlying heap being allocated from
+ int m_size; ///< Total amount of allocations available on the heap
+ int m_currentIndex; ///< The current descriptor
+ int m_descriptorSize; ///< The size of each descriptor
+};
+
+// ---------------------------------------------------------------------------
+int Dx12DescriptorHeap::allocate()
+{
+ assert(m_currentIndex < m_size);
+ if (m_currentIndex < m_size)
+ {
+ return m_currentIndex++;
+ }
+ return -1;
+}
+// ---------------------------------------------------------------------------
+int Dx12DescriptorHeap::allocate(int numDescriptors)
+{
+ assert(m_currentIndex + numDescriptors <= m_size);
+ if (m_currentIndex + numDescriptors <= m_size)
+ {
+ const int index = m_currentIndex;
+ m_currentIndex += numDescriptors;
+ return index;
+ }
+ return -1;
+}
+// ---------------------------------------------------------------------------
+inline D3D12_CPU_DESCRIPTOR_HANDLE Dx12DescriptorHeap::getCpuHandle(int index) const
+{
+ assert(index >= 0 && index < m_size);
+ D3D12_CPU_DESCRIPTOR_HANDLE start = m_heap->GetCPUDescriptorHandleForHeapStart();
+ D3D12_CPU_DESCRIPTOR_HANDLE dst;
+ dst.ptr = start.ptr + m_descriptorSize * index;
+ return dst;
+}
+// ---------------------------------------------------------------------------
+inline D3D12_GPU_DESCRIPTOR_HANDLE Dx12DescriptorHeap::getGpuHandle(int index) const
+{
+ assert(index >= 0 && index < m_size);
+ D3D12_GPU_DESCRIPTOR_HANDLE start = m_heap->GetGPUDescriptorHandleForHeapStart();
+ D3D12_GPU_DESCRIPTOR_HANDLE dst;
+ dst.ptr = start.ptr + m_descriptorSize * index;
+ return dst;
+}
+
+} // namespace Common
+} // namespace nvidia
+
+
+#endif // NV_CO_DX12_DESCRIPTOR_HEAP_H
diff --git a/demo/d3d12/NvCoDx12Handle.h b/demo/d3d12/NvCoDx12Handle.h
new file mode 100644
index 0000000..bbe8372
--- /dev/null
+++ b/demo/d3d12/NvCoDx12Handle.h
@@ -0,0 +1,162 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+#ifndef NV_CO_DX12_HANDLE_H
+#define NV_CO_DX12_HANDLE_H
+
+// Dx12 types
+#define NOMINMAX
+#include <d3d12.h>
+#include <stdint.h>
+
+/** \addtogroup common
+@{
+*/
+
+namespace nvidia {
+namespace Common {
+
+/*!
+\brief Description of how the intended rendering target is arranged.
+*/
+struct Dx12TargetInfo
+{
+ void init()
+ {
+ m_numRenderTargets = 1;
+ m_renderTargetFormats[0] = DXGI_FORMAT_R8G8B8A8_UNORM;
+ m_depthStencilFormat = DXGI_FORMAT_D24_UNORM_S8_UINT;
+ m_numSamples = 1;
+ m_sampleQuality = 0;
+ m_sampleMask = ~uint32_t(0);
+ }
+
+ int m_numRenderTargets;
+ DXGI_FORMAT m_renderTargetFormats[8]; ///< Format used for render target view access (the actual resource could be different!)
+ DXGI_FORMAT m_depthStencilFormat; ///< Format to use for depth stencil view access (the actual resource could be different!)
+ int m_numSamples; ///< The number of multi sample samples
+ int m_sampleQuality; ///< The multi sample quality
+ uint32_t m_sampleMask; ///< The sample mask
+};
+
+#if 0
+/*!
+\brief Specifies the kinds of types that can be wrapped in ApiHandle/ApiPtr/ConstPtr types */
+class Dx12SubType { Dx12SubType(); public:
+/*! SubTypes for Dx12 */
+enum Enum
+{
+ UNKNOWN, ///< Unknown
+ CONTEXT,
+ DEVICE,
+ BUFFER,
+ FLOAT32,
+ CPU_DESCRIPTOR_HANDLE,
+ COMMAND_QUEUE,
+ TARGET_INFO,
+ COUNT_OF,
+};
+};
+
+// Handle types
+#define NV_DX12_HANDLE_TYPES(x) \
+ x(ID3D12Device, DEVICE, DEVICE) \
+ x(ID3D12GraphicsCommandList, CONTEXT, CONTEXT) \
+ x(ID3D12Resource, BUFFER, BUFFER) \
+ x(ID3D12CommandQueue, COMMAND_QUEUE, UNKNOWN )
+
+// The 'value' types - ie ones that can be passed as pointers, in addition to the handle types
+#define NV_DX12_VALUE_TYPES(x) \
+ x(Float32, FLOAT32, UNKNOWN) \
+ x(D3D12_CPU_DESCRIPTOR_HANDLE, CPU_DESCRIPTOR_HANDLE, CPU_DESCRIPTOR_HANDLE) \
+ x(Dx12TargetInfo, TARGET_INFO, UNKNOWN)
+
+/*!
+\brief A helper class to wrap Dx12 related types to ApiHandle, ApiPtr types, or extract via a cast the Dx12 types back out again.
+
+Some examples of how to wrap and cast handles and pointers
+
+\code{.cpp}
+ID3D12Device* device = ...;
+
+\\ To wrap as a handle
+ApiHandle handle = Dx12Type::wrap(device);
+
+\\ To wrap an array or pointer you can use
+
+Dx12TargetInfo target;
+ApiPtr ptr = Dx12Type::wrapPtr(&target);
+
+\\ If you want to convert a wrapped handle back you can use
+ID3D12Device* device = Dx12Type::cast<ID3D12Device>(handle);
+
+\\ Similarly to get a pointer
+Dx12TargetInfo* target = Dx12Type::castPtr<Dx12TargetInfo>(ptr);
+\endcode
+
+*/
+struct Dx12Type
+{
+ // Used by the macros. NOTE! Should be wrapping type (ie not the actual type - typically with E prefix)
+ typedef Dx12SubType ScopeSubType;
+
+ /// Get the full type for the subtype
+ inline static int getType(Dx12SubType::Enum subType) { return (int(ApiType::DX12) << 8) | int(subType); }
+ /// Get the type via template, needed for arrays
+ template <typename T>
+ inline static int getType() { return getType((T*)NV_NULL); }
+
+ /// Implement getType
+ NV_DX12_HANDLE_TYPES(NV_CO_API_GET_TYPE)
+ /// Implement getHandle, which will return a TypedApiHandle
+ NV_DX12_HANDLE_TYPES(NV_CO_API_WRAP)
+ /// Implement getType for 'value types' (ie structs and others that shouldn't be in a handle)
+ NV_DX12_VALUE_TYPES(NV_CO_API_GET_VALUE_TYPE)
+
+ /// A template to work around warnings from dereferencing NV_NULL
+ template <typename T>
+ inline static int getPtrType() { void* data = NV_NULL; return getType(*(const T*)&data); }
+
+ /// Get a pointer
+ template <typename T>
+ inline static ConstApiPtr wrapPtr(const T* in) { return ConstApiPtr(getPtrType<T>(), in); }
+ template <typename T>
+ inline static ApiPtr wrapPtr(T* in) { return ApiPtr(getPtrType<T>(), in); }
+
+ /// Get from a handle
+ template <typename T>
+ inline static T* cast(const ApiHandle& in) { const int type = getType((T*)NV_NULL); return reinterpret_cast<T*>((type == in.m_type) ? in.m_handle : NV_NULL); }
+ /// Get from
+ template <typename T>
+ inline static const T* cast(const ConstApiPtr& ptr) { const int type = getPtrType<T>(); return reinterpret_cast<const T*>((ptr.m_type == type) ? ptr.getData() : NV_NULL); }
+ // Get from
+ template <typename T>
+ inline static T* cast(const ApiPtr& ptr) { const int type = getPtrType<T>(); return reinterpret_cast<T*>((ptr.m_type == type) ? ptr.getData() : NV_NULL); }
+
+ /// Get the sub type as text
+ static const Char* getSubTypeText(Dx12SubType::Enum subType);
+
+ /// If the match fails - implement casting. Writes impossible casts to Logger and returns NV_NULL.
+ static void* handlePtrCast(int fromType, int toType);
+ static void* handleCast(int fromType, int toType);
+ /// Called when a cast isn't possible. Will output warnings to log and return NV_NULL
+ static void castFailure(int fromType, int toType);
+ /// Log failure
+ static void logCastFailure(int fromType, int toType);
+};
+
+/* For generic handles you can use Dx11Handle. If you want the typed handle type use Dx11Type::wrap(texture) */
+typedef WrapApiHandle<Dx12Type> Dx12Handle;
+
+#endif
+
+} // namespace Common
+} // namespace nvidia
+
+/** @} */
+
+#endif // NV_CO_DX12_HANDLE_H
diff --git a/demo/d3d12/NvCoDx12HelperUtil.cpp b/demo/d3d12/NvCoDx12HelperUtil.cpp
new file mode 100644
index 0000000..46e2265
--- /dev/null
+++ b/demo/d3d12/NvCoDx12HelperUtil.cpp
@@ -0,0 +1,89 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+// Make the DXGI_DEBUG_D3D12 symbol defined in this compilation unit, to avoid link problems
+#define INITGUID
+
+#include "NvCoDx12HelperUtil.h"
+
+namespace nvidia {
+namespace Common {
+
+void Dx12HelperUtil::calcSrvDesc(ID3D12Resource* resource, DXGI_FORMAT pixelFormat, D3D12_SHADER_RESOURCE_VIEW_DESC& descOut)
+{
+ // Get the desc
+ return calcSrvDesc(resource->GetDesc(), pixelFormat, descOut);
+}
+
+void Dx12HelperUtil::calcSrvDesc(const D3D12_RESOURCE_DESC& desc, DXGI_FORMAT pixelFormat, D3D12_SHADER_RESOURCE_VIEW_DESC& descOut)
+{
+
+ // create SRV
+ descOut = D3D12_SHADER_RESOURCE_VIEW_DESC();
+
+ descOut.Format = (pixelFormat == DXGI_FORMAT_UNKNOWN) ? DxFormatUtil::calcFormat(DxFormatUtil::USAGE_SRV, desc.Format) : pixelFormat;
+ descOut.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
+ if (desc.DepthOrArraySize == 1)
+ {
+ descOut.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D;
+
+ descOut.Texture2D.MipLevels = desc.MipLevels;
+ descOut.Texture2D.MostDetailedMip = 0;
+ descOut.Texture2D.PlaneSlice = 0;
+ descOut.Texture2D.ResourceMinLODClamp = 0.0f;
+ }
+ else if (desc.DepthOrArraySize == 6)
+ {
+ descOut.ViewDimension = D3D12_SRV_DIMENSION_TEXTURECUBE;
+
+ descOut.TextureCube.MipLevels = desc.MipLevels;
+ descOut.TextureCube.MostDetailedMip = 0;
+ descOut.TextureCube.ResourceMinLODClamp = 0;
+ }
+ else
+ {
+ descOut.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2DARRAY;
+
+ descOut.Texture2DArray.ArraySize = desc.DepthOrArraySize;
+ descOut.Texture2DArray.MostDetailedMip = 0;
+ descOut.Texture2DArray.MipLevels = desc.MipLevels;
+ descOut.Texture2DArray.FirstArraySlice = 0;
+ descOut.Texture2DArray.PlaneSlice = 0;
+ descOut.Texture2DArray.ResourceMinLODClamp = 0;
+ }
+}
+
+/* static */void Dx12HelperUtil::reportLiveObjects()
+{
+ IDXGIDebug* dxgiDebug;
+ int res = DxDebugUtil::getDebugInterface(&dxgiDebug);
+
+ if (NV_FAILED(res) || !dxgiDebug)
+ {
+ printf("Unable to access debug interface -> can't report live objects");
+ return;
+ }
+ dxgiDebug->ReportLiveObjects(DXGI_DEBUG_D3D12, DXGI_DEBUG_RLO_DETAIL);
+}
+
+/* static */int Dx12HelperUtil::serializeRootSigniture(const D3D12_ROOT_SIGNATURE_DESC& desc, D3D_ROOT_SIGNATURE_VERSION signitureVersion, ComPtr<ID3DBlob>& sigBlobOut)
+{
+ ComPtr<ID3DBlob> error;
+ int res = D3D12SerializeRootSignature(&desc, signitureVersion, &sigBlobOut, &error);
+ if (NV_SUCCEEDED(res))
+ {
+ return res;
+ }
+
+ char* errorText = (char*)error->GetBufferPointer();
+
+ printf("Unable to serialize Dx12 signature: %s\n", errorText);
+ return res;
+}
+
+} // namespace Common
+} // namespace nvidia
diff --git a/demo/d3d12/NvCoDx12HelperUtil.h b/demo/d3d12/NvCoDx12HelperUtil.h
new file mode 100644
index 0000000..1c05253
--- /dev/null
+++ b/demo/d3d12/NvCoDx12HelperUtil.h
@@ -0,0 +1,52 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+#ifndef NV_CO_DX12_HELPER_UTIL_H
+#define NV_CO_DX12_HELPER_UTIL_H
+
+#include <NvResult.h>
+#include <NvCoDxFormatUtil.h>
+#include <NvCoDxDebugUtil.h>
+
+#define NOMINMAX
+#include <d3d12.h>
+#include <stdio.h>
+#include <wrl.h>
+
+using namespace Microsoft::WRL;
+
+/** \addtogroup common
+@{
+*/
+
+namespace nvidia {
+namespace Common {
+
+struct Dx12HelperUtil
+{
+ /// Get a Shader resource view from a resourceDesc
+ /// If pixelFormat is UNKNOWN, will use the pixelFormat in the resourceDesc
+ static void calcSrvDesc(const D3D12_RESOURCE_DESC& resourceDesc, DXGI_FORMAT pixelFormat, D3D12_SHADER_RESOURCE_VIEW_DESC& descOut);
+
+ /// Get a Shader resource view from a resource
+ /// If pixelFormat is UNKNOWN, will use the pixelFormat in the resourceDesc
+ static void calcSrvDesc(ID3D12Resource* resource, DXGI_FORMAT pixelFormat, D3D12_SHADER_RESOURCE_VIEW_DESC& descOut);
+
+ /// Serializes the root signiture. If any errors occur will write to the log
+ static int serializeRootSigniture(const D3D12_ROOT_SIGNATURE_DESC& desc, D3D_ROOT_SIGNATURE_VERSION signitureVersion, ComPtr<ID3DBlob>& sigBlobOut);
+
+ /// Reports to the output debug window any live objects, using debug interface.
+ /// Only works on systems that have "Dxgidebug.dll"
+ static void reportLiveObjects();
+};
+
+} // namespace Common
+} // namespace nvidia
+
+/** @} */
+
+#endif // NV_CO_DX12_DEBUG_UTIL_H
diff --git a/demo/d3d12/NvCoDx12RenderTarget.cpp b/demo/d3d12/NvCoDx12RenderTarget.cpp
new file mode 100644
index 0000000..2ce4d86
--- /dev/null
+++ b/demo/d3d12/NvCoDx12RenderTarget.cpp
@@ -0,0 +1,324 @@
+
+#include "NvCoDx12RenderTarget.h"
+#include "appD3D12Ctx.h"
+
+#include <external/D3D12/include/d3dx12.h>
+
+namespace nvidia {
+namespace Common {
+
+Dx12RenderTarget::Dx12RenderTarget()
+{
+ memset(m_srvIndices, -1, sizeof(m_srvIndices));
+}
+
+int Dx12RenderTarget::init(AppGraphCtxD3D12* renderContext, const Desc& desc)
+{
+ ID3D12Device* device = renderContext->m_device;
+
+ m_desc = desc;
+
+ // set viewport
+ {
+ m_viewport.Width = float(desc.m_width);
+ m_viewport.Height = float(desc.m_height);
+ m_viewport.MinDepth = 0;
+ m_viewport.MaxDepth = 1;
+ m_viewport.TopLeftX = 0;
+ m_viewport.TopLeftY = 0;
+ }
+
+ {
+ m_scissorRect.left = 0;
+ m_scissorRect.top = 0;
+ m_scissorRect.right = desc.m_width;
+ m_scissorRect.bottom = desc.m_height;
+ }
+
+ if (desc.m_targetFormat != DXGI_FORMAT_UNKNOWN)
+ {
+ D3D12_DESCRIPTOR_HEAP_DESC heapDesc = {};
+ heapDesc.NumDescriptors = 1;
+ heapDesc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_RTV;
+ heapDesc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE;
+ NV_RETURN_ON_FAIL(device->CreateDescriptorHeap(&heapDesc, IID_PPV_ARGS(&m_descriptorHeapRtv)));
+
+ DXGI_FORMAT resourceFormat = DxFormatUtil::calcResourceFormat(DxFormatUtil::USAGE_TARGET, m_desc.m_usageFlags, desc.m_targetFormat);
+ DXGI_FORMAT targetFormat = DxFormatUtil::calcFormat(DxFormatUtil::USAGE_TARGET, resourceFormat);
+
+ D3D12_RESOURCE_DESC resourceDesc = CD3DX12_RESOURCE_DESC::Tex2D(resourceFormat, UINT(desc.m_width), UINT(desc.m_height), 1, 1, 1, 0, D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET, D3D12_TEXTURE_LAYOUT_UNKNOWN, 0);
+ D3D12_HEAP_PROPERTIES heapProps = CD3DX12_HEAP_PROPERTIES(D3D12_HEAP_TYPE_DEFAULT);
+
+ // Depending on usage this format may not be right...
+ D3D12_CLEAR_VALUE clearValue;
+ clearValue.Format = targetFormat;
+ clearValue.Color[0] = FLT_MAX;
+ clearValue.Color[1] = FLT_MAX;
+ clearValue.Color[2] = FLT_MAX;
+ clearValue.Color[3] = FLT_MAX;
+
+ NV_RETURN_ON_FAIL(m_renderTarget.initCommitted(device, heapProps, D3D12_HEAP_FLAG_NONE, resourceDesc, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE, &clearValue));
+
+ D3D12_RENDER_TARGET_VIEW_DESC rtvDesc = {};
+ rtvDesc.Format = targetFormat;
+ rtvDesc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2D;
+ rtvDesc.Texture2D.MipSlice = 0;
+ rtvDesc.Texture2D.PlaneSlice = 0;
+ device->CreateRenderTargetView(m_renderTarget, &rtvDesc, m_descriptorHeapRtv->GetCPUDescriptorHandleForHeapStart());
+ }
+
+ // Create the depth stencil descriptor heap
+ if (desc.m_depthStencilFormat != DXGI_FORMAT_UNKNOWN)
+ {
+ D3D12_DESCRIPTOR_HEAP_DESC heapDesc = {};
+ heapDesc.NumDescriptors = 1;
+ heapDesc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_DSV;
+ heapDesc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE;
+ NV_RETURN_ON_FAIL(device->CreateDescriptorHeap(&heapDesc, IID_PPV_ARGS(&m_descriptorHeapDsv)));
+
+ DXGI_FORMAT resourceFormat = DxFormatUtil::calcResourceFormat(DxFormatUtil::USAGE_DEPTH_STENCIL, m_desc.m_usageFlags, desc.m_depthStencilFormat);
+ DXGI_FORMAT depthStencilFormat = DxFormatUtil::calcFormat(DxFormatUtil::USAGE_DEPTH_STENCIL, resourceFormat);
+
+ D3D12_RESOURCE_DESC resourceDesc = CD3DX12_RESOURCE_DESC::Tex2D(resourceFormat, UINT(desc.m_width), UINT(desc.m_height), 1, 1, 1, 0, D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL, D3D12_TEXTURE_LAYOUT_UNKNOWN, 0);
+ D3D12_HEAP_PROPERTIES heapProps = CD3DX12_HEAP_PROPERTIES(D3D12_HEAP_TYPE_DEFAULT);
+
+ D3D12_CLEAR_VALUE clearValue;
+ clearValue.Format = depthStencilFormat;
+ clearValue.DepthStencil.Depth = 1.0f;
+ clearValue.DepthStencil.Stencil = 0;
+ NV_RETURN_ON_FAIL(m_depthStencilBuffer.initCommitted(device, heapProps, D3D12_HEAP_FLAG_NONE, resourceDesc, D3D12_RESOURCE_STATE_DEPTH_WRITE, &clearValue));
+
+ // Create the depth stencil view
+ D3D12_DEPTH_STENCIL_VIEW_DESC dsvDesc = {};
+ dsvDesc.ViewDimension = D3D12_DSV_DIMENSION_TEXTURE2D;
+ dsvDesc.Format = depthStencilFormat;
+ dsvDesc.Texture2D.MipSlice = 0;
+ dsvDesc.Flags = D3D12_DSV_FLAG_NONE;
+ device->CreateDepthStencilView(m_depthStencilBuffer, &dsvDesc, m_descriptorHeapDsv->GetCPUDescriptorHandleForHeapStart());
+ }
+
+ return NV_OK;
+}
+
+/* static */DxFormatUtil::UsageType Dx12RenderTarget::getUsageType(BufferType type)
+{
+ switch (type)
+ {
+ case BUFFER_DEPTH_STENCIL: return DxFormatUtil::USAGE_DEPTH_STENCIL;
+ case BUFFER_TARGET: return DxFormatUtil::USAGE_TARGET;
+ default: return DxFormatUtil::USAGE_UNKNOWN;
+ }
+}
+
+void Dx12RenderTarget::bind(AppGraphCtxD3D12* renderContext)
+{
+ ID3D12GraphicsCommandList* commandList = renderContext->m_commandList;
+
+ // Work out what is bound
+ int numTargets = 0;
+ D3D12_CPU_DESCRIPTOR_HANDLE dsvHandle = {};
+ D3D12_CPU_DESCRIPTOR_HANDLE rtvHandle = {};
+
+ if (m_renderTarget)
+ {
+ rtvHandle = m_descriptorHeapRtv->GetCPUDescriptorHandleForHeapStart();
+ numTargets = 1;
+ }
+ if (m_depthStencilBuffer)
+ {
+ dsvHandle = m_descriptorHeapDsv->GetCPUDescriptorHandleForHeapStart();
+ commandList->OMSetRenderTargets(numTargets, &rtvHandle, FALSE, &dsvHandle);
+ }
+ else
+ {
+ commandList->OMSetRenderTargets(numTargets, &rtvHandle, FALSE, nullptr);
+ }
+
+ commandList->RSSetViewports(1, &m_viewport);
+ commandList->RSSetScissorRects(1, &m_scissorRect);
+}
+
+
+void Dx12RenderTarget::clear(AppGraphCtxD3D12* renderContext)
+{
+ ID3D12GraphicsCommandList* commandList = renderContext->m_commandList;
+ D3D12_RECT rect = { 0, 0, m_desc.m_width, m_desc.m_height };
+
+ // Clear
+ if (m_renderTarget)
+ {
+ D3D12_CPU_DESCRIPTOR_HANDLE rtvHandle = m_descriptorHeapRtv->GetCPUDescriptorHandleForHeapStart();
+ commandList->ClearRenderTargetView(rtvHandle, m_desc.m_targetClearColor, 1, &rect);
+ }
+ if (m_depthStencilBuffer)
+ {
+ D3D12_CPU_DESCRIPTOR_HANDLE dsvHandle = m_descriptorHeapDsv->GetCPUDescriptorHandleForHeapStart();
+ commandList->ClearDepthStencilView(dsvHandle, D3D12_CLEAR_FLAG_DEPTH, m_desc.m_depthStencilClearDepth, 0, 1, &rect);
+ }
+}
+
+void Dx12RenderTarget::bindAndClear(AppGraphCtxD3D12* renderContext)
+{
+ ID3D12GraphicsCommandList* commandList = renderContext->m_commandList;
+
+ // Work out what is bound
+ int numTargets = 0;
+ D3D12_CPU_DESCRIPTOR_HANDLE dsvHandle = {};
+ D3D12_CPU_DESCRIPTOR_HANDLE rtvHandle = {};
+
+ if (m_renderTarget)
+ {
+ rtvHandle = m_descriptorHeapRtv->GetCPUDescriptorHandleForHeapStart();
+ numTargets = 1;
+ }
+ if (m_depthStencilBuffer)
+ {
+ dsvHandle = m_descriptorHeapDsv->GetCPUDescriptorHandleForHeapStart();
+ commandList->OMSetRenderTargets(numTargets, &rtvHandle, FALSE, &dsvHandle);
+ }
+ else
+ {
+ commandList->OMSetRenderTargets(numTargets, &rtvHandle, FALSE, nullptr);
+ }
+
+ commandList->RSSetViewports(1, &m_viewport);
+ commandList->RSSetScissorRects(1, &m_scissorRect);
+
+ D3D12_RECT rect = { 0, 0, m_desc.m_width, m_desc.m_height };
+
+ // Clear
+ if (m_renderTarget)
+ {
+ commandList->ClearRenderTargetView(rtvHandle, m_desc.m_targetClearColor, 1, &rect);
+ }
+ if (m_depthStencilBuffer)
+ {
+ commandList->ClearDepthStencilView(dsvHandle, D3D12_CLEAR_FLAG_DEPTH, m_desc.m_depthStencilClearDepth, 0, 1, &rect);
+ }
+}
+
+void Dx12RenderTarget::setShadowDefaultLight(FXMVECTOR eye, FXMVECTOR at, FXMVECTOR up)
+{
+ float sizeX = 50.0f;
+ float sizeY = 50.0f;
+ float znear = -200.0f;
+ float zfar = 200.0f;
+
+ setShadowLightMatrices(eye, at, up, sizeX, sizeY, znear, zfar);
+}
+
+void Dx12RenderTarget::setShadowLightMatrices(FXMVECTOR eye, FXMVECTOR lookAt, FXMVECTOR up, float sizeX, float sizeY, float zNear, float zFar)
+{
+ m_shadowLightView = XMMatrixLookAtLH(eye, lookAt, up);
+ m_shadowLightProjection = XMMatrixOrthographicLH(sizeX, sizeY, zNear, zFar);
+ DirectX::XMMATRIX clip2Tex(0.5, 0, 0, 0,
+ 0, -0.5, 0, 0,
+ 0, 0, 1, 0,
+ 0.5, 0.5, 0, 1);
+ DirectX::XMMATRIX viewProjection = m_shadowLightView * m_shadowLightProjection;
+ m_shadowLightWorldToTex = viewProjection * clip2Tex;
+}
+
+void Dx12RenderTarget::toWritable(AppGraphCtxD3D12* renderContext)
+{
+ Dx12BarrierSubmitter submitter(renderContext->m_commandList);
+
+ m_renderTarget.transition(D3D12_RESOURCE_STATE_RENDER_TARGET, submitter);
+ m_depthStencilBuffer.transition(D3D12_RESOURCE_STATE_DEPTH_WRITE, submitter);
+}
+
+void Dx12RenderTarget::toReadable(AppGraphCtxD3D12* renderContext)
+{
+ Dx12BarrierSubmitter submitter(renderContext->m_commandList);
+
+ m_renderTarget.transition(D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE, submitter);
+ m_depthStencilBuffer.transition(D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE, submitter);
+}
+
+DXGI_FORMAT Dx12RenderTarget::getSrvFormat(BufferType type) const
+{
+ return Dx12Resource::calcFormat(DxFormatUtil::USAGE_SRV, getResource(type));
+}
+
+DXGI_FORMAT Dx12RenderTarget::getTargetFormat(BufferType type) const
+{
+ return Dx12Resource::calcFormat(getUsageType(type), getResource(type));
+}
+
+D3D12_SHADER_RESOURCE_VIEW_DESC Dx12RenderTarget::calcDefaultSrvDesc(BufferType type) const
+{
+ ID3D12Resource* resource = getResource(type);
+
+ D3D12_RESOURCE_DESC resourceDesc = resource->GetDesc();
+
+ D3D12_SHADER_RESOURCE_VIEW_DESC desc;
+
+ desc.Format = getSrvFormat(type);
+ desc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
+
+ desc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D;
+
+ desc.Texture2D.MipLevels = resourceDesc.MipLevels;
+ desc.Texture2D.MostDetailedMip = 0;
+ desc.Texture2D.PlaneSlice = 0;
+ desc.Texture2D.ResourceMinLODClamp = 0.0f;
+ return desc;
+}
+
+int Dx12RenderTarget::allocateSrvView(BufferType type, ID3D12Device* device, Dx12DescriptorHeap& heap, const D3D12_SHADER_RESOURCE_VIEW_DESC* desc)
+{
+ if (m_srvIndices[type] >= 0)
+ {
+ printf("A srv index has already been associated!");
+ return m_srvIndices[type];
+ }
+
+ if (!desc)
+ {
+ // If not set construct a default desc
+ D3D12_SHADER_RESOURCE_VIEW_DESC defaultDesc = calcDefaultSrvDesc(type);
+ return allocateSrvView(type, device, heap, &defaultDesc);
+ }
+
+ // Create the srv for the shadow buffer
+ ID3D12Resource* resource = getResource(type);
+ int srvIndex = heap.allocate();
+
+ if (srvIndex < 0)
+ {
+ return srvIndex;
+ }
+
+ // Create on the the heap
+ device->CreateShaderResourceView(resource, desc, heap.getCpuHandle(srvIndex));
+
+ m_srvIndices[type] = srvIndex;
+ // Return the allocated index
+ return srvIndex;
+}
+
+void Dx12RenderTarget::setDebugName(BufferType type, const std::wstring& name)
+{
+ getResource(type).setDebugName(name);
+}
+
+void Dx12RenderTarget::setDebugName(const std::wstring& name)
+{
+ std::wstring buf(name);
+ buf += L" [Target]";
+ setDebugName(BUFFER_TARGET, buf);
+ buf = name;
+ buf += L" [DepthStencil]";
+ setDebugName(BUFFER_DEPTH_STENCIL, buf);
+}
+
+
+void Dx12RenderTarget::createSrv(ID3D12Device* device, Dx12DescriptorHeap& heap, BufferType type, int descriptorIndex)
+{
+ D3D12_SHADER_RESOURCE_VIEW_DESC srvDesc = calcDefaultSrvDesc(type);
+ ID3D12Resource* resource = getResource(type);
+ device->CreateShaderResourceView(resource, &srvDesc, heap.getCpuHandle(descriptorIndex));
+}
+
+} // namespace Common
+} // namespace nvidia
diff --git a/demo/d3d12/NvCoDx12RenderTarget.h b/demo/d3d12/NvCoDx12RenderTarget.h
new file mode 100644
index 0000000..48e7fd0
--- /dev/null
+++ b/demo/d3d12/NvCoDx12RenderTarget.h
@@ -0,0 +1,122 @@
+#ifndef NV_CO_DX12_RENDER_TARGET_H
+#define NV_CO_DX12_RENDER_TARGET_H
+
+#include <DirectXMath.h>
+#include <NvCoDx12DescriptorHeap.h>
+#include <NvCoDx12Resource.h>
+#include "appD3D12Ctx.h"
+#include "core/maths.h"
+
+namespace nvidia {
+namespace Common {
+
+using namespace DirectX;
+
+class Dx12RenderTarget
+{
+ //NV_CO_DECLARE_POLYMORPHIC_CLASS_BASE(Dx12RenderTarget);
+public:
+ enum BufferType
+ {
+ BUFFER_TARGET,
+ BUFFER_DEPTH_STENCIL,
+ BUFFER_COUNT_OF,
+ };
+
+ struct Desc
+ {
+ void init(int width, int height, DXGI_FORMAT targetFormat = DXGI_FORMAT_R32_FLOAT, DXGI_FORMAT depthStencilFormat = DXGI_FORMAT_D32_FLOAT, int usageFlags = 0)
+ {
+ m_width = width;
+ m_height = height;
+ m_targetFormat = targetFormat;
+ m_depthStencilFormat = depthStencilFormat;
+ m_usageFlags = usageFlags;
+
+ const Vec4 clearColor = { FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX };
+ m_targetClearColor = clearColor;
+ m_depthStencilClearDepth = 1.0;
+ }
+
+ int m_usageFlags; ///< Usage flags from DxFormatUtil
+ int m_width;
+ int m_height;
+ DXGI_FORMAT m_depthStencilFormat; ///< DXGI_FORMAT_UNKNOWN means don't allocate resource
+ DXGI_FORMAT m_targetFormat; ///< DXGI_FORMAT_UNKNOWN means don't allocate resource
+ Vec4 m_targetClearColor;
+ float m_depthStencilClearDepth;
+ };
+
+ int init(AppGraphCtxD3D12* renderContext, const Desc& desc);
+
+ void setShadowDefaultLight(FXMVECTOR eye, FXMVECTOR at, FXMVECTOR up);
+ void setShadowLightMatrices(FXMVECTOR eye, FXMVECTOR lookAt, FXMVECTOR up, float sizeX, float sizeY, float zNear, float zFar);
+
+ void bind(AppGraphCtxD3D12* renderContext);
+
+ void clear(AppGraphCtxD3D12* renderContext);
+ void bindAndClear(AppGraphCtxD3D12* renderContext);
+
+ void toWritable(AppGraphCtxD3D12* renderContext);
+ void toReadable(AppGraphCtxD3D12* renderContext);
+
+ /// Set the debug name
+ void setDebugName(BufferType type, const std::wstring& name);
+ /// Set name (plus if depth/target) for all buffers
+ void setDebugName(const std::wstring& name);
+
+ /// Get the 'primary' buffer type.
+ BufferType getPrimaryBufferType() const { return m_renderTarget ? BUFFER_TARGET : BUFFER_DEPTH_STENCIL; }
+
+ /// Get the resource by the buffer type
+ const Dx12ResourceBase& getResource(BufferType type) const { return type == BUFFER_TARGET ? m_renderTarget : m_depthStencilBuffer; }
+ Dx12Resource& getResource(BufferType type) { return type == BUFFER_TARGET ? m_renderTarget : m_depthStencilBuffer; }
+
+ /// Calculates a default shader resource view
+ D3D12_SHADER_RESOURCE_VIEW_DESC calcDefaultSrvDesc(BufferType type) const;
+
+ /// Allocates a srv view. Stores the index in m_srvView. If < 0 there isn't an associated srv
+ /// If the desc isn't set one will be created via calcDefaultSrvDesc
+ int allocateSrvView(BufferType type, ID3D12Device* device, Dx12DescriptorHeap& heap, const D3D12_SHADER_RESOURCE_VIEW_DESC* desc = nullptr);
+
+ /// Gets the appropriate format for reading as srv
+ DXGI_FORMAT getSrvFormat(BufferType type) const;
+ /// Gets the suitable target for rendering to
+ DXGI_FORMAT getTargetFormat(BufferType type) const;
+ /// Get the amount of render targets
+ inline int getNumRenderTargets() const { return m_renderTarget ? 1 : 0; }
+
+ /// Create a srv at the index on the heap for the buffer type
+ void createSrv(ID3D12Device* device, Dx12DescriptorHeap& heap, BufferType type, int descriptorIndex);
+
+ /// Get an associated srv heap index (as produced by allocateSrvView)
+ inline int getSrvHeapIndex(BufferType type) const { return m_srvIndices[type]; }
+
+ /// Get the desc
+ inline const Desc& getDesc() const { return m_desc; }
+
+ Dx12RenderTarget();
+
+ static DxFormatUtil::UsageType getUsageType(BufferType type);
+
+ int m_srvIndices[BUFFER_COUNT_OF];
+
+ XMMATRIX m_shadowLightView;
+ XMMATRIX m_shadowLightProjection;
+ XMMATRIX m_shadowLightWorldToTex;
+
+ Desc m_desc;
+
+ D3D12_VIEWPORT m_viewport;
+ D3D12_RECT m_scissorRect;
+
+ Dx12Resource m_renderTarget;
+ ComPtr<ID3D12DescriptorHeap> m_descriptorHeapRtv;
+ Dx12Resource m_depthStencilBuffer;
+ ComPtr<ID3D12DescriptorHeap> m_descriptorHeapDsv;
+};
+
+} // namespace Common
+} // namespace nvidia
+
+#endif // NV_CO_DX12_RENDER_TARGET_H \ No newline at end of file
diff --git a/demo/d3d12/NvCoDx12Resource.cpp b/demo/d3d12/NvCoDx12Resource.cpp
new file mode 100644
index 0000000..e771a15
--- /dev/null
+++ b/demo/d3d12/NvCoDx12Resource.cpp
@@ -0,0 +1,167 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+#include "NvCoDx12Resource.h"
+
+#include <assert.h>
+
+#define NOMINMAX
+#include <wrl.h>
+using namespace Microsoft::WRL;
+
+namespace nvidia {
+namespace Common {
+
+/* !!!!!!!!!!!!!!!!!!!!!!!!! Dx12BarrierSubmitter !!!!!!!!!!!!!!!!!!!!!!!! */
+
+void Dx12BarrierSubmitter::_flush()
+{
+ assert(m_numBarriers > 0);
+
+ if (m_commandList)
+ {
+ m_commandList->ResourceBarrier(UINT(m_numBarriers), m_barriers);
+ }
+ m_numBarriers = 0;
+}
+
+D3D12_RESOURCE_BARRIER& Dx12BarrierSubmitter::_expandOne()
+{
+ _flush();
+ return m_barriers[m_numBarriers++];
+}
+
+/* !!!!!!!!!!!!!!!!!!!!!!!!! Dx12ResourceBase !!!!!!!!!!!!!!!!!!!!!!!! */
+
+void Dx12ResourceBase::transition(D3D12_RESOURCE_STATES nextState, Dx12BarrierSubmitter& submitter)
+{
+ // If there is no resource, then there is nothing to transition
+ if (!m_resource)
+ {
+ return;
+ }
+
+ if (nextState != m_state)
+ {
+ D3D12_RESOURCE_BARRIER& barrier = submitter.expandOne();
+
+ const UINT subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES;
+ const D3D12_RESOURCE_BARRIER_FLAGS flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
+
+ memset(&barrier, 0, sizeof(barrier));
+ barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
+ barrier.Flags = flags;
+ barrier.Transition.pResource = m_resource;
+ barrier.Transition.StateBefore = m_state;
+ barrier.Transition.StateAfter = nextState;
+ barrier.Transition.Subresource = subresource;
+
+ m_prevState = m_state;
+ m_state = nextState;
+ }
+ else
+ {
+ if (nextState == D3D12_RESOURCE_STATE_UNORDERED_ACCESS)
+ {
+ D3D12_RESOURCE_BARRIER& barrier = submitter.expandOne();
+
+ memset(&barrier, 0, sizeof(barrier));
+ barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_UAV;
+ barrier.UAV.pResource = m_resource;
+
+ m_state = nextState;
+ }
+ }
+}
+
+/* static */DXGI_FORMAT Dx12ResourceBase::calcFormat(DxFormatUtil::UsageType usage, ID3D12Resource* resource)
+{
+ return resource ? DxFormatUtil::calcFormat(usage, resource->GetDesc().Format) : DXGI_FORMAT_UNKNOWN;
+}
+
+/* !!!!!!!!!!!!!!!!!!!!!!!!! Dx12Resource !!!!!!!!!!!!!!!!!!!!!!!! */
+
+/* static */void Dx12Resource::setDebugName(ID3D12Resource* resource, const std::wstring& name)
+{
+ if (resource)
+ {
+ resource->SetName(name.c_str());
+ }
+}
+
+void Dx12Resource::setDebugName(const std::wstring& name)
+{
+ setDebugName(m_resource, name);
+}
+
+void Dx12Resource::setDebugName(const wchar_t* name)
+{
+ if (m_resource)
+ {
+ m_resource->SetName(name);
+ }
+}
+
+void Dx12Resource::setResource(ID3D12Resource* resource, D3D12_RESOURCE_STATES initialState)
+{
+ if (resource != m_resource)
+ {
+ if (resource)
+ {
+ resource->AddRef();
+ }
+ if (m_resource)
+ {
+ m_resource->Release();
+ }
+ m_resource = resource;
+ }
+ m_prevState = initialState;
+ m_state = initialState;
+}
+
+void Dx12Resource::setResourceNull()
+{
+ if (m_resource)
+ {
+ m_resource->Release();
+ m_resource = nullptr;
+ }
+}
+
+int Dx12Resource::initCommitted(ID3D12Device* device, const D3D12_HEAP_PROPERTIES& heapProps, D3D12_HEAP_FLAGS heapFlags, const D3D12_RESOURCE_DESC& resourceDesc, D3D12_RESOURCE_STATES initState, const D3D12_CLEAR_VALUE * clearValue)
+{
+ setResourceNull();
+ ComPtr<ID3D12Resource> resource;
+ NV_RETURN_ON_FAIL(device->CreateCommittedResource(&heapProps, heapFlags, &resourceDesc, initState, clearValue, IID_PPV_ARGS(&resource)));
+ setResource(resource.Get(), initState);
+ return NV_OK;
+}
+
+ID3D12Resource* Dx12Resource::detach()
+{
+ ID3D12Resource* resource = m_resource;
+ m_resource = nullptr;
+ return resource;
+}
+
+void Dx12Resource::swap(ComPtr<ID3D12Resource>& resourceInOut)
+{
+ ID3D12Resource* tmp = m_resource;
+ m_resource = resourceInOut.Detach();
+ resourceInOut.Attach(tmp);
+}
+
+void Dx12Resource::setState(D3D12_RESOURCE_STATES state)
+{
+ m_prevState = state;
+ m_state = state;
+}
+
+
+} // namespace Common
+} // namespace nvidia
diff --git a/demo/d3d12/NvCoDx12Resource.h b/demo/d3d12/NvCoDx12Resource.h
new file mode 100644
index 0000000..9bb8dab
--- /dev/null
+++ b/demo/d3d12/NvCoDx12Resource.h
@@ -0,0 +1,140 @@
+#ifndef NV_CO_DX12_RESOURCE_H
+#define NV_CO_DX12_RESOURCE_H
+
+#include <NvResult.h>
+#include <NvCoDxFormatUtil.h>
+
+#define NOMINMAX
+#include <d3d12.h>
+#include <string>
+#include <wrl.h>
+
+using namespace Microsoft::WRL;
+
+namespace nvidia {
+namespace Common {
+
+// Enables more conservative barriers - restoring the state of resources after they are used.
+// Should not need to be enabled in normal builds, as the barriers should correctly sync resources
+// If enabling fixes an issue it implies regular barriers are not correctly used.
+#define NV_CO_ENABLE_CONSERVATIVE_RESOURCE_BARRIERS 0
+
+struct Dx12BarrierSubmitter
+{
+ enum { MAX_BARRIERS = 8 };
+
+ /// Expand one space to hold a barrier
+ inline D3D12_RESOURCE_BARRIER& expandOne() { return (m_numBarriers < MAX_BARRIERS) ? m_barriers[m_numBarriers++] : _expandOne(); }
+ /// Flush barriers to command list
+ inline void flush() { if (m_numBarriers > 0) _flush(); }
+
+ /// Ctor
+ inline Dx12BarrierSubmitter(ID3D12GraphicsCommandList* commandList):m_numBarriers(0), m_commandList(commandList) { }
+ /// Dtor
+ inline ~Dx12BarrierSubmitter() { flush(); }
+
+ protected:
+ D3D12_RESOURCE_BARRIER& _expandOne();
+ void _flush();
+
+ ID3D12GraphicsCommandList* m_commandList;
+ ptrdiff_t m_numBarriers;
+ D3D12_RESOURCE_BARRIER m_barriers[MAX_BARRIERS];
+};
+
+/** The base class for resource types allows for tracking of state. It does not allow for setting of the resource though, such that
+an interface can return a Dx12ResourceBase, and a client cant manipulate it's state, but it cannot replace/change the actual resource */
+struct Dx12ResourceBase
+{
+ /// Add a transition if necessary to the list
+ void transition(D3D12_RESOURCE_STATES nextState, Dx12BarrierSubmitter& submitter);
+ /// Get the current state
+ inline D3D12_RESOURCE_STATES getState() const { return m_state; }
+
+ /// Get the associated resource
+ inline ID3D12Resource* getResource() const { return m_resource; }
+
+ /// True if a resource is set
+ inline bool isSet() const { return m_resource != nullptr; }
+
+ /// Coercable into ID3D12Resource
+ inline operator ID3D12Resource*() const { return m_resource; }
+
+ /// restore previous state
+#if NV_CO_ENABLE_CONSERVATIVE_RESOURCE_BARRIERS
+ inline void restore(Dx12BarrierSubmitter& submitter) { transition(m_prevState, submitter); }
+#else
+ inline void restore(Dx12BarrierSubmitter& submitter) { (void)submitter; }
+#endif
+
+ /// Given the usage, flags, and format will return the most suitable format. Will return DXGI_UNKNOWN if combination is not possible
+ static DXGI_FORMAT calcFormat(DxFormatUtil::UsageType usage, ID3D12Resource* resource);
+
+ /// Ctor
+ inline Dx12ResourceBase() :
+ m_state(D3D12_RESOURCE_STATE_COMMON),
+ m_prevState(D3D12_RESOURCE_STATE_COMMON),
+ m_resource(nullptr)
+ {}
+
+ protected:
+ /// This is protected so as clients cannot slice the class, and so state tracking is lost
+ ~Dx12ResourceBase() {}
+
+ ID3D12Resource* m_resource;
+ D3D12_RESOURCE_STATES m_state;
+ D3D12_RESOURCE_STATES m_prevState;
+};
+
+struct Dx12Resource: public Dx12ResourceBase
+{
+
+ /// Dtor
+ ~Dx12Resource()
+ {
+ if (m_resource)
+ {
+ m_resource->Release();
+ }
+ }
+
+ /// Initialize as committed resource
+ int initCommitted(ID3D12Device* device, const D3D12_HEAP_PROPERTIES& heapProps, D3D12_HEAP_FLAGS heapFlags, const D3D12_RESOURCE_DESC& resourceDesc, D3D12_RESOURCE_STATES initState, const D3D12_CLEAR_VALUE * clearValue);
+
+ /// Set a resource with an initial state
+ void setResource(ID3D12Resource* resource, D3D12_RESOURCE_STATES initialState);
+ /// Make the resource null
+ void setResourceNull();
+ /// Returns the attached resource (with any ref counts) and sets to nullptr on this.
+ ID3D12Resource* detach();
+
+ /// Swaps the resource contents with the contents of the smart pointer
+ void swap(ComPtr<ID3D12Resource>& resourceInOut);
+
+ /// Sets the current state of the resource (the current state is taken to be the future state once the command list has executed)
+ /// NOTE! This must be used with care, otherwise state tracking can be made incorrect.
+ void setState(D3D12_RESOURCE_STATES state);
+
+ /// Set the debug name on a resource
+ static void setDebugName(ID3D12Resource* resource, const std::wstring& name);
+
+ /// Set the the debug name on the resource
+ void setDebugName(const wchar_t* name);
+ /// Set the debug name
+ void setDebugName(const std::wstring& name);
+};
+
+/// Convenient way to set blobs
+struct Dx12Blob : public D3D12_SHADER_BYTECODE
+{
+ template <size_t SIZE>
+ inline Dx12Blob(const BYTE(&in)[SIZE]) { pShaderBytecode = in; BytecodeLength = SIZE; }
+ inline Dx12Blob(const BYTE* in, size_t size) { pShaderBytecode = in; BytecodeLength = size; }
+ inline Dx12Blob() { pShaderBytecode = nullptr; BytecodeLength = 0; }
+ inline Dx12Blob(ID3DBlob* blob) { pShaderBytecode = blob->GetBufferPointer(); BytecodeLength = blob->GetBufferSize(); }
+};
+
+} // namespace Common
+} // namespace nvidia
+
+#endif // NV_CO_DX12_RESOURCE_H
diff --git a/demo/d3d12/NvCoDx12ResourceScopeManager.cpp b/demo/d3d12/NvCoDx12ResourceScopeManager.cpp
new file mode 100644
index 0000000..268ecab
--- /dev/null
+++ b/demo/d3d12/NvCoDx12ResourceScopeManager.cpp
@@ -0,0 +1,179 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+#include "NvCoDx12ResourceScopeManager.h"
+
+#include <assert.h>
+
+namespace nvidia {
+namespace Common {
+
+Dx12ResourceScopeManager::Dx12ResourceScopeManager():
+ m_fence(nullptr),
+ m_device(nullptr)
+{
+}
+
+Dx12ResourceScopeManager::~Dx12ResourceScopeManager()
+{
+ while (!m_entryQueue.empty())
+ {
+ Entry& entry = m_entryQueue.front();
+ entry.m_resource->Release();
+ m_entryQueue.pop_front();
+ }
+}
+
+int Dx12ResourceScopeManager::init(ID3D12Device* device, Dx12CounterFence* fence)
+{
+ m_fence = fence;
+ m_device = device;
+ return NV_OK;
+}
+
+void Dx12ResourceScopeManager::addSync(uint64_t signalValue)
+{
+ (void)signalValue;
+
+ assert(m_fence->getCurrentValue() == signalValue);
+}
+
+void Dx12ResourceScopeManager::updateCompleted()
+{
+ const uint64_t completedValue = m_fence->getCompletedValue();
+ if (!m_entryQueue.empty())
+ {
+ const Entry& entry = m_entryQueue.front();
+ if (entry.m_completedValue >= completedValue)
+ {
+ return;
+ }
+ entry.m_resource->Release();
+ m_entryQueue.pop_front();
+ }
+}
+
+ID3D12Resource* Dx12ResourceScopeManager::newUploadResource(const D3D12_RESOURCE_DESC& resourceDesc, const D3D12_CLEAR_VALUE* clearValue)
+{
+ D3D12_HEAP_PROPERTIES heapProps;
+ {
+ heapProps.Type = D3D12_HEAP_TYPE_UPLOAD;
+ heapProps.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
+ heapProps.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
+ heapProps.CreationNodeMask = 1;
+ heapProps.VisibleNodeMask = 1;
+ }
+ const D3D12_HEAP_FLAGS heapFlags = D3D12_HEAP_FLAG_NONE;
+
+ const D3D12_RESOURCE_STATES initialState = D3D12_RESOURCE_STATE_GENERIC_READ;
+
+ ComPtr<ID3D12Resource> resource;
+ int res = m_device->CreateCommittedResource(&heapProps, heapFlags, &resourceDesc, initialState, clearValue, IID_PPV_ARGS(&resource));
+ if (NV_FAILED(res)) return nullptr;
+
+ // Get the current fence count
+ const uint64_t completedValue = m_fence->getCurrentValue();
+
+ Entry entry;
+ entry.m_completedValue = completedValue;
+ entry.m_resource = resource.Detach();
+ m_entryQueue.push_back(entry);
+
+ return entry.m_resource;
+}
+
+/* static */void Dx12ResourceScopeManager::copy(const D3D12_SUBRESOURCE_DATA& src, size_t rowSizeInBytes, int numRows, int numSlices, const D3D12_MEMCPY_DEST& dst)
+{
+ for (int i = 0; i < numSlices; ++i)
+ {
+ uint8_t* dstSlice = reinterpret_cast<uint8_t*>(dst.pData) + dst.SlicePitch * i;
+ const uint8_t* srcSlice = reinterpret_cast<const uint8_t*>(src.pData) + src.SlicePitch * i;
+ for (int j = 0; j < numRows; ++j)
+ {
+ memcpy(dstSlice + dst.RowPitch * j, srcSlice + src.RowPitch * j, rowSizeInBytes);
+ }
+ }
+}
+
+int Dx12ResourceScopeManager::upload(ID3D12GraphicsCommandList* commandList, const void* srcDataIn, ID3D12Resource* targetResource, D3D12_RESOURCE_STATES targetState)
+{
+ // Get the targetDesc
+ const D3D12_RESOURCE_DESC targetDesc = targetResource->GetDesc();
+ // Ensure it is just a regular buffer
+ assert(targetDesc.Dimension == D3D12_RESOURCE_DIMENSION_BUFFER);
+ assert(targetDesc.Layout == D3D12_TEXTURE_LAYOUT_ROW_MAJOR);
+
+ // The buffer size is the width
+ const size_t bufferSize = size_t(targetDesc.Width);
+
+ D3D12_RESOURCE_DESC uploadDesc = targetDesc;
+ uploadDesc.Flags = D3D12_RESOURCE_FLAG_NONE;
+
+ // Create the upload resource
+ ID3D12Resource* uploadResource = newUploadResource(uploadDesc);
+
+ // Map it and copy
+ {
+ uint8_t* uploadMapped;
+ NV_RETURN_ON_FAIL(uploadResource->Map(0, nullptr, (void**)&uploadMapped));
+ memcpy(uploadMapped, srcDataIn, bufferSize);
+ uploadResource->Unmap(0, nullptr);
+ }
+
+ // Add the copy
+ commandList->CopyBufferRegion(targetResource, 0, uploadResource, 0, bufferSize);
+
+ // Add the barrier
+ {
+ D3D12_RESOURCE_BARRIER barrier = {};
+
+ barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
+ barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
+ D3D12_RESOURCE_TRANSITION_BARRIER& transition = barrier.Transition;
+ transition.pResource = targetResource;
+ transition.StateBefore = D3D12_RESOURCE_STATE_COPY_DEST;
+ transition.StateAfter = targetState;
+ transition.Subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES;
+
+ commandList->ResourceBarrier(1, &barrier);
+ }
+
+ return NV_OK;
+}
+
+void Dx12ResourceScopeManager::add(ID3D12Resource* resource)
+{
+ assert(resource);
+
+ // Get the current fence count
+ const uint64_t completedValue = m_fence->getCurrentValue();
+
+ Entry entry;
+ entry.m_completedValue = completedValue;
+ resource->AddRef();
+ entry.m_resource = resource;
+
+ m_entryQueue.push_back(entry);
+}
+
+int Dx12ResourceScopeManager::uploadWithState(ID3D12GraphicsCommandList* commandList, const void* srcDataIn, Dx12Resource& target, D3D12_RESOURCE_STATES targetState)
+{
+ // make sure we are in the correct initial state
+ if (target.getState() != D3D12_RESOURCE_STATE_COPY_DEST)
+ {
+ Dx12BarrierSubmitter submitter(commandList);
+ target.transition(D3D12_RESOURCE_STATE_COPY_DEST, submitter);
+ }
+ // Do the upload
+ NV_RETURN_ON_FAIL(upload(commandList, srcDataIn, target.getResource(), targetState));
+ target.setState(targetState);
+ return NV_OK;
+}
+
+
+} // namespace Common
+} // namespace nvidia
diff --git a/demo/d3d12/NvCoDx12ResourceScopeManager.h b/demo/d3d12/NvCoDx12ResourceScopeManager.h
new file mode 100644
index 0000000..7bd71ff
--- /dev/null
+++ b/demo/d3d12/NvCoDx12ResourceScopeManager.h
@@ -0,0 +1,100 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+#ifndef NV_CO_DX12_RESOURCE_SCOPE_MANAGER_H
+#define NV_CO_DX12_RESOURCE_SCOPE_MANAGER_H
+
+#include "NvCoDx12Resource.h"
+#include "NvCoDx12CounterFence.h"
+
+// Dx12 types
+#define NOMINMAX
+#include <d3d12.h>
+
+#include <deque>
+
+/** \addtogroup common
+@{
+*/
+
+namespace nvidia {
+namespace Common {
+
+/*! \brief A class to manage the lifetime of resources that are transitory (as used only for a single specific piece of GPU work),
+but arbitrarily sized - such as textures.
+
+With Dx12 there is no management for the lifetime of resources within the Api directly. It is the duty of
+the application to make sure resources are released when they are no longer being referenced. The Dx12ResourceScopeManager
+tries to simplify this management for some common use cases. Firstly when creating a GPU based resource and filling it
+with data, the data must first be copied to an upload buffer, and then to the target gpu based buffer. The upload buffer
+is only needed whilst copying takes place. The method 'upload' will create a temporary upload buffer, and initiate the
+copy into target.
+
+The upload resource will ONLY BE RELEASED when the fences value is greater than the current value. Assuming the command list
+is added to the queue, and the fence is added afterwards (which is the appropriate way), the resources will only be released
+after the fence has been hit AND when updateCompleted is called.
+
+The Dx12ResourceScopeManager is most useful for resource uploads that happen at startup, and might be very large. If you want to
+upload constrained sized (like constant buffer) resources quickly and efficiently at runtime you might be better using Dx12CircularResourceHeap.
+
+The Dx12ResourceScopeManager uses the addSync/updateCompleted idiom, see details in Dx12CircularResourceHeap.
+
+*/
+class Dx12ResourceScopeManager
+{
+ //NV_CO_DECLARE_CLASS_BASE(Dx12ResourceScopeManager);
+public:
+ /// Initialize
+ int init(ID3D12Device* device, Dx12CounterFence* fence);
+
+ /// Allocate constant buffer of specified size
+ ID3D12Resource* newUploadResource(const D3D12_RESOURCE_DESC& resourceDesc, const D3D12_CLEAR_VALUE* clearValue = nullptr);
+ /// Do an upload on the specified command list
+ int upload(ID3D12GraphicsCommandList* commandList, const void* srcDataIn, ID3D12Resource* target, D3D12_RESOURCE_STATES targetState);
+ /// Upload data to the target, and set state. Will add barriers if target is in the wrong state
+ int uploadWithState(ID3D12GraphicsCommandList* commandList, const void* srcDataIn, Dx12Resource& target, D3D12_RESOURCE_STATES targetState);
+
+ /// Add a resource, which will be released when updateCompleted has a greater value
+ void add(ID3D12Resource* resource);
+
+ /// Look where the GPU has got to and release anything not currently used
+ void updateCompleted();
+ /// Add a sync point - meaning that when this point is hit in the queue
+ /// all of the resources up to this point will no longer be used.
+ void addSync(uint64_t signalValue);
+
+ /// Get the device associated with this manager
+ inline ID3D12Device* getDevice() const { return m_device; }
+
+ /// Ctor
+ Dx12ResourceScopeManager();
+ /// Dtor
+ ~Dx12ResourceScopeManager();
+
+ /// Copy from src to dst
+ static void copy(const D3D12_SUBRESOURCE_DATA& src, size_t rowSizeInBytes, int numRows, int numSlices, const D3D12_MEMCPY_DEST& dst);
+
+ protected:
+
+ struct Entry
+ {
+ uint64_t m_completedValue; ///< If less than fence value this is completed
+ ID3D12Resource* m_resource; ///< The mapped resource
+ };
+
+ std::deque<Entry> m_entryQueue;
+
+ Dx12CounterFence* m_fence; ///< The fence to use
+ ID3D12Device* m_device; ///< The device that resources will be constructed on
+};
+
+} // namespace Common
+} // namespace nvidia
+
+/** @} */
+
+#endif // NV_CO_DX12_RESOURCE_SCOPE_MANAGER_H
diff --git a/demo/d3d12/NvCoDxDebugUtil.cpp b/demo/d3d12/NvCoDxDebugUtil.cpp
new file mode 100644
index 0000000..b5ef17c
--- /dev/null
+++ b/demo/d3d12/NvCoDxDebugUtil.cpp
@@ -0,0 +1,32 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+#include "NvCoDxDebugUtil.h"
+
+namespace nvidia {
+namespace Common {
+
+/* static */int DxDebugUtil::getDebugInterface(IDXGIDebug** debugOut)
+{
+ HMODULE module = GetModuleHandleA("Dxgidebug.dll");
+ if (module)
+ {
+ //WINAPI
+ typedef HRESULT(WINAPI *FuncType)(REFIID riid, void **ppDebug);
+ FARPROC funcAddr = GetProcAddress(module, "DXGIGetDebugInterface");
+
+ FuncType debugFunc = (FuncType)funcAddr;
+ if (debugFunc)
+ {
+ return debugFunc(__uuidof(IDXGIDebug), (void**)debugOut);
+ }
+ }
+ return NV_FAIL;
+}
+
+} // namespace Common
+} // namespace nvidia
diff --git a/demo/d3d12/NvCoDxDebugUtil.h b/demo/d3d12/NvCoDxDebugUtil.h
new file mode 100644
index 0000000..8916ecf
--- /dev/null
+++ b/demo/d3d12/NvCoDxDebugUtil.h
@@ -0,0 +1,37 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+#ifndef NV_CO_DX_DEBUG_UTIL_H
+#define NV_CO_DX_DEBUG_UTIL_H
+
+#include <NvResult.h>
+
+#define NOMINMAX
+#include <DXGIDebug.h>
+#include <wrl.h>
+
+using namespace Microsoft::WRL;
+
+/** \addtogroup common
+@{
+*/
+
+namespace nvidia {
+namespace Common {
+
+struct DxDebugUtil
+{
+ /// Get the debug interface
+ static int getDebugInterface(IDXGIDebug** debugOut);
+};
+
+} // namespace Common
+} // namespace nvidia
+
+/** @} */
+
+#endif // NV_CO_DX12_DEBUG_UTIL_H
diff --git a/demo/d3d12/NvCoDxFormatUtil.cpp b/demo/d3d12/NvCoDxFormatUtil.cpp
new file mode 100644
index 0000000..7facf2e
--- /dev/null
+++ b/demo/d3d12/NvCoDxFormatUtil.cpp
@@ -0,0 +1,173 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+#include "NvCoDxFormatUtil.h"
+
+#include <stdio.h>
+
+namespace nvidia {
+namespace Common {
+
+/* static */DXGI_FORMAT DxFormatUtil::calcResourceFormat(UsageType usage, int usageFlags, DXGI_FORMAT format)
+{
+ (void)usage;
+ if (usageFlags)
+ {
+ switch (format)
+ {
+ case DXGI_FORMAT_R32_FLOAT:
+ case DXGI_FORMAT_D32_FLOAT: return DXGI_FORMAT_R32_TYPELESS;
+ case DXGI_FORMAT_D24_UNORM_S8_UINT: return DXGI_FORMAT_R24G8_TYPELESS;
+ default: break;
+ }
+ return format;
+ }
+ return format;
+}
+
+/* static */DXGI_FORMAT DxFormatUtil::calcFormat(UsageType usage, DXGI_FORMAT format)
+{
+ switch (usage)
+ {
+ case USAGE_COUNT_OF:
+ case USAGE_UNKNOWN:
+ {
+ return DXGI_FORMAT_UNKNOWN;
+ }
+ case USAGE_DEPTH_STENCIL:
+ {
+ switch (format)
+ {
+ case DXGI_FORMAT_D32_FLOAT:
+ case DXGI_FORMAT_R32_TYPELESS: return DXGI_FORMAT_D32_FLOAT;
+ case DXGI_FORMAT_R24_UNORM_X8_TYPELESS: return DXGI_FORMAT_D24_UNORM_S8_UINT;
+ case DXGI_FORMAT_R24G8_TYPELESS: return DXGI_FORMAT_D24_UNORM_S8_UINT;
+ default: break;
+ }
+ return format;
+ }
+ case USAGE_TARGET:
+ {
+ switch (format)
+ {
+ case DXGI_FORMAT_D32_FLOAT:
+ case DXGI_FORMAT_D24_UNORM_S8_UINT: return DXGI_FORMAT_UNKNOWN;
+ case DXGI_FORMAT_R32_TYPELESS: return DXGI_FORMAT_R32_FLOAT;
+ default: break;
+ }
+ return format;
+ }
+ case USAGE_SRV:
+ {
+ switch (format)
+ {
+ case DXGI_FORMAT_D32_FLOAT:
+ case DXGI_FORMAT_R32_TYPELESS: return DXGI_FORMAT_R32_FLOAT;
+ case DXGI_FORMAT_R24_UNORM_X8_TYPELESS: return DXGI_FORMAT_R24_UNORM_X8_TYPELESS;
+ default: break;
+ }
+
+ return format;
+ }
+ }
+
+ printf("Not reachable");
+ return DXGI_FORMAT_UNKNOWN;
+}
+
+bool DxFormatUtil::isTypeless(DXGI_FORMAT format)
+{
+ switch (format)
+ {
+ case DXGI_FORMAT_R32G32B32A32_TYPELESS:
+ case DXGI_FORMAT_R32G32B32_TYPELESS:
+ case DXGI_FORMAT_R16G16B16A16_TYPELESS:
+ case DXGI_FORMAT_R32G32_TYPELESS:
+ case DXGI_FORMAT_R32G8X24_TYPELESS:
+ case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS:
+ case DXGI_FORMAT_R10G10B10A2_TYPELESS:
+ case DXGI_FORMAT_R8G8B8A8_TYPELESS:
+ case DXGI_FORMAT_R16G16_TYPELESS:
+ case DXGI_FORMAT_R32_TYPELESS:
+ case DXGI_FORMAT_R24_UNORM_X8_TYPELESS:
+ case DXGI_FORMAT_R24G8_TYPELESS:
+ case DXGI_FORMAT_R8G8_TYPELESS:
+ case DXGI_FORMAT_R16_TYPELESS:
+ case DXGI_FORMAT_R8_TYPELESS:
+ case DXGI_FORMAT_BC1_TYPELESS:
+ case DXGI_FORMAT_BC2_TYPELESS:
+ case DXGI_FORMAT_BC3_TYPELESS:
+ case DXGI_FORMAT_BC4_TYPELESS:
+ case DXGI_FORMAT_BC5_TYPELESS:
+ case DXGI_FORMAT_B8G8R8A8_TYPELESS:
+ case DXGI_FORMAT_BC6H_TYPELESS:
+ case DXGI_FORMAT_BC7_TYPELESS:
+ {
+ return true;
+ }
+ default: break;
+ }
+ return false;
+}
+
+/* static */int DxFormatUtil::getNumColorChannelBits(DXGI_FORMAT fmt)
+{
+ switch (fmt)
+ {
+ case DXGI_FORMAT_R32G32B32A32_TYPELESS:
+ case DXGI_FORMAT_R32G32B32A32_FLOAT:
+ case DXGI_FORMAT_R32G32B32A32_UINT:
+ case DXGI_FORMAT_R32G32B32A32_SINT:
+ case DXGI_FORMAT_R32G32B32_TYPELESS:
+ case DXGI_FORMAT_R32G32B32_FLOAT:
+ case DXGI_FORMAT_R32G32B32_UINT:
+ case DXGI_FORMAT_R32G32B32_SINT:
+ return 32;
+
+ case DXGI_FORMAT_R16G16B16A16_TYPELESS:
+ case DXGI_FORMAT_R16G16B16A16_FLOAT:
+ case DXGI_FORMAT_R16G16B16A16_UNORM:
+ case DXGI_FORMAT_R16G16B16A16_UINT:
+ case DXGI_FORMAT_R16G16B16A16_SNORM:
+ case DXGI_FORMAT_R16G16B16A16_SINT:
+ return 16;
+
+ case DXGI_FORMAT_R10G10B10A2_TYPELESS:
+ case DXGI_FORMAT_R10G10B10A2_UNORM:
+ case DXGI_FORMAT_R10G10B10A2_UINT:
+ case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM:
+ return 10;
+
+ case DXGI_FORMAT_R8G8B8A8_TYPELESS:
+ case DXGI_FORMAT_R8G8B8A8_UNORM:
+ case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:
+ case DXGI_FORMAT_R8G8B8A8_UINT:
+ case DXGI_FORMAT_R8G8B8A8_SNORM:
+ case DXGI_FORMAT_R8G8B8A8_SINT:
+ case DXGI_FORMAT_B8G8R8A8_UNORM:
+ case DXGI_FORMAT_B8G8R8X8_UNORM:
+ case DXGI_FORMAT_B8G8R8A8_TYPELESS:
+ case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:
+ case DXGI_FORMAT_B8G8R8X8_TYPELESS:
+ case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:
+ return 8;
+
+ case DXGI_FORMAT_B5G6R5_UNORM:
+ case DXGI_FORMAT_B5G5R5A1_UNORM:
+ return 5;
+
+ case DXGI_FORMAT_B4G4R4A4_UNORM:
+ return 4;
+
+ default:
+ return 0;
+ }
+}
+
+
+} // namespace Common
+} // namespace nvidia
diff --git a/demo/d3d12/NvCoDxFormatUtil.h b/demo/d3d12/NvCoDxFormatUtil.h
new file mode 100644
index 0000000..e749ea8
--- /dev/null
+++ b/demo/d3d12/NvCoDxFormatUtil.h
@@ -0,0 +1,41 @@
+#ifndef NV_CO_DX_FORMAT_UTIL_H
+#define NV_CO_DX_FORMAT_UTIL_H
+
+#define NOMINMAX
+#include <dxgi.h>
+
+namespace nvidia {
+namespace Common {
+
+struct DxFormatUtil
+{
+ enum UsageType
+ {
+ USAGE_UNKNOWN, ///< Generally used to mark an error
+ USAGE_TARGET, ///< Format should be used when written as target
+ USAGE_DEPTH_STENCIL, ///< Format should be used when written as depth stencil
+ USAGE_SRV, ///< Format if being read as srv
+ USAGE_COUNT_OF,
+ };
+ enum UsageFlag
+ {
+ USAGE_FLAG_MULTI_SAMPLE = 0x1,
+ USAGE_FLAG_SRV = 0x2,
+ };
+
+ /// Given the usage, flags, and format will return the most suitable format. Will return DXGI_UNKNOWN if combination is not possible
+ static DXGI_FORMAT calcFormat(UsageType usage, DXGI_FORMAT format);
+ /// Calculate appropriate format for creating a buffer for usage and flags
+ static DXGI_FORMAT calcResourceFormat(UsageType usage, int usageFlags, DXGI_FORMAT format);
+ /// True if the type is 'typeless'
+ static bool isTypeless(DXGI_FORMAT format);
+
+ /// Returns number of bits used for color channel for format (for channels with multiple sizes, returns smallest ie RGB565 -> 5)
+ static int getNumColorChannelBits(DXGI_FORMAT fmt);
+
+};
+
+} // namespace Common
+} // namespace nvidia
+
+#endif // NV_CO_DX12_RESOURCE_H
diff --git a/demo/d3d12/NvCoFreeList.cpp b/demo/d3d12/NvCoFreeList.cpp
new file mode 100644
index 0000000..72b23b2
--- /dev/null
+++ b/demo/d3d12/NvCoFreeList.cpp
@@ -0,0 +1,232 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+#include "NvCoFreeList.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#define DEFAULT_ALIGNMENT 16
+
+namespace nvidia {
+namespace Common {
+
+FreeList::~FreeList()
+{
+ _deallocateBlocks(m_activeBlocks);
+ _deallocateBlocks(m_freeBlocks);
+}
+
+void FreeList::_init()
+{
+ m_top = nullptr;
+ m_end = nullptr;
+
+ m_activeBlocks = nullptr;
+ m_freeBlocks = nullptr;
+
+ m_freeElements = nullptr;
+
+ m_elementSize = 0;
+ m_alignment = 1;
+ m_blockSize = 0;
+ m_blockAllocationSize = 0;
+ //m_allocator = nullptr;
+}
+
+void FreeList::_init(size_t elementSize, size_t alignment, size_t elemsPerBlock)
+{
+ //allocator = allocator ? allocator : MemoryAllocator::getInstance();
+ //assert(allocator);
+ //m_allocator = allocator;
+
+ alignment = (alignment < sizeof(void*)) ? sizeof(void*) : alignment;
+
+ // Alignment must be a power of 2
+ assert(((alignment - 1) & alignment) == 0);
+
+ // The elementSize must at least be
+ elementSize = (elementSize >= alignment) ? elementSize : alignment;
+ m_blockSize = elementSize * elemsPerBlock;
+ m_elementSize = elementSize;
+ m_alignment = alignment;
+
+ // Calculate the block size neeed, correcting for alignment
+ const size_t alignedBlockSize = (alignment <= DEFAULT_ALIGNMENT) ?
+ _calcAlignedBlockSize(DEFAULT_ALIGNMENT) :
+ _calcAlignedBlockSize(alignment);
+
+ // Make the block struct size aligned
+ m_blockAllocationSize = m_blockSize + alignedBlockSize;
+
+ m_top = nullptr;
+ m_end = nullptr;
+
+ m_activeBlocks = nullptr;
+ m_freeBlocks = nullptr; ///< Blocks that there are no allocations in
+
+ m_freeElements = nullptr;
+}
+
+void FreeList::init(size_t elementSize, size_t alignment, size_t elemsPerBlock)
+{
+ _deallocateBlocks(m_activeBlocks);
+ _deallocateBlocks(m_freeBlocks);
+ _init(elementSize, alignment, elemsPerBlock);
+}
+
+void FreeList::_deallocateBlocks(Block* block)
+{
+ while (block)
+ {
+ Block* next = block->m_next;
+
+#ifdef NV_CO_FREE_LIST_INIT_MEM
+ Memory::set(block, 0xfd, m_blockAllocationSize);
+#endif
+
+ free(block);
+ block = next;
+ }
+}
+
+bool FreeList::isValidAllocation(const void* dataIn) const
+{
+ uint8_t* data = (uint8_t*)dataIn;
+
+ Block* block = m_activeBlocks;
+ while (block)
+ {
+ uint8_t* start = block->m_data;
+ uint8_t* end = start + m_blockSize;
+
+ if (data >= start && data < end)
+ {
+ // Check it's aligned correctly
+ if ((data - start) % m_elementSize)
+ {
+ return false;
+ }
+
+ // Non allocated data is between top and end
+ if (data >= m_top && data < m_end)
+ {
+ return false;
+ }
+
+ // It can't be in the free list
+ Element* ele = m_freeElements;
+ while (ele)
+ {
+ if (ele == (Element*)data)
+ {
+ return false;
+ }
+
+ ele = ele->m_next;
+ }
+ return true;
+ }
+
+ block = block->m_next;
+ }
+ // It's not in an active block -> it cannot be a valid allocation
+ return false;
+}
+
+void* FreeList::_allocate()
+{
+ Block* block = m_freeBlocks;
+ if (block)
+ {
+ /// Remove from the free blocks
+ m_freeBlocks = block->m_next;
+ }
+ else
+ {
+ block = (Block*)malloc(m_blockAllocationSize);
+ if (!block)
+ {
+ // Allocation failed... doh
+ return nullptr;
+ }
+ // Do the alignment
+ {
+ size_t fix = (size_t(block) + sizeof(Block) + m_alignment - 1) & ~(m_alignment - 1);
+ block->m_data = (uint8_t*)fix;
+ }
+ }
+
+ // Attach to the active blocks
+ block->m_next = m_activeBlocks;
+ m_activeBlocks = block;
+
+ // Set up top and end
+ m_end = block->m_data + m_blockSize;
+
+ // Return the first element
+ uint8_t* element = block->m_data;
+ m_top = element + m_elementSize;
+
+ NV_CO_FREE_LIST_INIT_ALLOCATE(element)
+
+ return element;
+}
+
+void FreeList::deallocateAll()
+{
+ Block* block = m_activeBlocks;
+ if (block)
+ {
+ // Find the end block
+ while (block->m_next)
+ {
+#ifdef NV_CO_FREE_LIST_INIT_MEM
+ Memory::set(block->m_data, 0xfd, m_blockSize);
+#endif
+ block = block->m_next;
+ }
+ // Attach to the freeblocks
+ block->m_next = m_freeBlocks;
+ // The list is now all freelists
+ m_freeBlocks = m_activeBlocks;
+ // There are no active blocks
+ m_activeBlocks = nullptr;
+ }
+
+ m_top = nullptr;
+ m_end = nullptr;
+}
+
+void FreeList::reset()
+{
+ _deallocateBlocks(m_activeBlocks);
+ _deallocateBlocks(m_freeBlocks);
+
+ m_top = nullptr;
+ m_end = nullptr;
+
+ m_activeBlocks = nullptr;
+ m_freeBlocks = nullptr;
+
+ m_freeElements = nullptr;
+}
+
+
+void FreeList::_initAllocate(void* mem)
+{
+ memset(mem, 0xcd, m_elementSize);
+}
+
+void FreeList::_initDeallocate(void* mem)
+{
+ memset(mem, 0xfd, m_elementSize);
+}
+
+} // namespace Common
+} // namespace nvidia
+
diff --git a/demo/d3d12/NvCoFreeList.h b/demo/d3d12/NvCoFreeList.h
new file mode 100644
index 0000000..2b71c62
--- /dev/null
+++ b/demo/d3d12/NvCoFreeList.h
@@ -0,0 +1,154 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+#ifndef NV_CO_FREELIST_H
+#define NV_CO_FREELIST_H
+
+#include <assert.h>
+#include <stdint.h>
+
+/** \addtogroup common
+@{
+*/
+
+namespace nvidia {
+namespace Common {
+
+#if NV_DEBUG
+# define NV_CO_FREE_LIST_INIT_MEM
+#endif
+
+#ifdef NV_CO_FREE_LIST_INIT_MEM
+# define NV_CO_FREE_LIST_INIT_ALLOCATE(ptr) _initAllocate(ptr);
+# define NV_CO_FREE_LIST_INIT_DEALLOCATE(ptr) _initDeallocate(ptr);
+#else
+# define NV_CO_FREE_LIST_INIT_ALLOCATE(ptr)
+# define NV_CO_FREE_LIST_INIT_DEALLOCATE(ptr)
+#endif
+
+
+/*! \brief A freelist is a simple and fast memory allocator that can allocate and free in any order identically sized blocks.
+
+\details A free list is a memory allocation system that performs allocations/deallocations very quickly for elements which are
+all the same size.
+In a freelist all elements are the same size, and elements can be allocated and freed in any order, as long as every deallocation
+matches every allocation. Both allocation and deallocation are O(1), and generally just a few instructions. The underlying
+memory allocator will allocate in large blocks, with multiple elements amortizing a more costly large allocation against lots
+of fast small element allocations. */
+class FreeList
+{
+ //NV_CO_DECLARE_CLASS_BASE(FreeList);
+public:
+ /// Free elements are held in a singly linked list. The minimum size of an element is therefore a pointer
+ struct Element
+ {
+ Element* m_next;
+ };
+ struct Block
+ {
+ Block* m_next; ///< The next block
+ uint8_t* m_data; ///< The list of the elements each m_elementSize in size
+ };
+
+ /// Allocate a single element
+ inline void* allocate();
+ /// Deallocate a block that was previously allocated with allocate
+ inline void deallocate(void* data);
+
+ /// Returns true if this is from a valid allocation
+ bool isValidAllocation(const void* dataIn) const;
+
+ /// Get the element size
+ inline size_t getElementSize() const { return m_elementSize; }
+ /// Get the total size of each individual block allocation in bytes
+ inline size_t getBlockSize() const { return m_blockSize; }
+
+ /// Deallocates all elements
+ void deallocateAll();
+ /// Deallocates all, and frees any backing memory (put in initial state)
+ void reset();
+
+ /// Initialize. If called on an already initialized heap, the heap will be deallocated.
+ void init(size_t elementSize, size_t alignment, size_t elemsPerBlock);
+
+ /// Default Ctor
+ FreeList() { _init(); }
+ /// Ctor
+ FreeList(size_t elementSize, size_t alignment, size_t elemsPerBlock) { _init(elementSize, alignment, elemsPerBlock); }
+ /// Dtor
+ ~FreeList();
+
+ protected:
+ /// Initializes assuming freelist is not constructed
+ void _init(size_t elementSize, size_t alignment, size_t elemsPerBlock);
+ void* _allocate();
+ void _deallocateBlocks(Block* block);
+ /// Initializes setting everything to empty (doesn't free anything if already allocated)
+ void _init();
+
+ inline static size_t _calcAlignedBlockSize(size_t align) { return (sizeof(Block) + align - 1) & ~(align - 1); }
+
+ void _initAllocate(void* mem);
+ void _initDeallocate(void* mem);
+
+ uint8_t* m_top; ///< The top position of the current block
+ uint8_t* m_end; ///< The end of the current block
+
+ Block* m_activeBlocks; ///< The blocks there are potentially allocations from
+ Block* m_freeBlocks; ///< Blocks that there are no allocations in
+
+ Element* m_freeElements; ///< A singly linked list of elements available
+
+ size_t m_elementSize;
+ size_t m_alignment;
+ size_t m_blockSize;
+ size_t m_blockAllocationSize; ///< The actual allocation size. Maybe bigger than m_blockSize if alignment requires it.
+ //MemoryAllocator* m_allocator;
+};
+
+// --------------------------------------------------------------------------
+inline void* FreeList::allocate()
+{
+ // First see if there are any freeElements ready to go
+ {
+ Element* element = m_freeElements;
+ if (element)
+ {
+ m_freeElements = element->m_next;
+ NV_CO_FREE_LIST_INIT_ALLOCATE(element)
+ return element;
+ }
+ }
+ if (m_top >= m_end)
+ {
+ return _allocate();
+ }
+ void* data = (void*)m_top;
+ NV_CO_FREE_LIST_INIT_ALLOCATE(data)
+
+ m_top += m_elementSize;
+ return data;
+}
+// --------------------------------------------------------------------------
+inline void FreeList::deallocate(void* data)
+{
+ assert(isValidAllocation(data));
+
+ NV_CO_FREE_LIST_INIT_DEALLOCATE(data)
+
+ // Put onto the singly linked free element list
+ Element* ele = (Element*)data;
+ ele->m_next = m_freeElements;
+ m_freeElements = ele;
+}
+
+} // namespace Common
+} // namespace nvidia
+
+/** @} */
+
+#endif // NV_CO_FREELIST_H \ No newline at end of file
diff --git a/demo/d3d12/NvResult.h b/demo/d3d12/NvResult.h
new file mode 100644
index 0000000..27cf936
--- /dev/null
+++ b/demo/d3d12/NvResult.h
@@ -0,0 +1,137 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+#ifndef NV_RESULT_H
+#define NV_RESULT_H
+
+#include <assert.h>
+
+/** \addtogroup core
+@{
+*/
+
+/*! Result is designed to be compatible with COM HRESULT.
+
+It's layout in bits is as follows
+
+Severity | Facility | Code
+---------|----------|-----
+31 | 30-16 | 15-0
+
+Severity - 1 fail, 0 is success.
+Facility is where the error originated from
+Code is the code specific to the facility.
+
+The layout is designed such that failure is a negative number, and success is positive due to Result
+being represented by an Int32.
+
+Result codes have the following style
+
+1. NV_name
+2. NV_s_f_name
+3. NV_s_name
+
+where s is severity as a single letter S - success, and E for error
+Style 1 is reserved for NV_OK and NV_FAIL as they are so common and not tied to a facility
+
+s is S for success, E for error
+f is the short version of the facility name
+
+For the common used NV_OK and NV_FAIL, the name prefix is dropped
+It is acceptable to expand 'f' to a longer name to differentiate a name
+ie for a facility 'DRIVER' it might make sense to have an error of the form NV_E_DRIVER_OUT_OF_MEMORY */
+typedef int NvResult;
+
+//! Make a result
+#define NV_MAKE_RESULT(sev, fac, code) ((((int)(sev))<<31) | (((int)(fac))<<16) | ((int)(code)))
+
+//! Will be 0 - for ok, 1 for failure
+#define NV_GET_RESULT_SEVERITY(r) ((int)(((NvUInt32)(r)) >> 31))
+//! Will be 0 - for ok, 1 for failure
+#define NV_GET_RESULT_FACILITY(r) ((int)(((r) >> 16) & 0x7fff))
+//! Get the result code
+#define NV_GET_RESULT_CODE(r) ((int)((r) & 0xffff))
+
+#define NV_SEVERITY_ERROR 1
+#define NV_SEVERITY_SUCCESS 0
+
+#define NV_MAKE_ERROR(fac, code) NV_MAKE_RESULT(NV_SEVERITY_ERROR, NV_FACILITY_##fac, code)
+#define NV_MAKE_SUCCESS(fac, code) NV_MAKE_RESULT(NV_SEVERITY_SUCCESS, NV_FACILITY_##fac, code)
+
+/*************************** Facilities ************************************/
+
+//! General - careful to make compatible with HRESULT
+#define NV_FACILITY_GENERAL 0
+
+//! Base facility -> so as to not clash with HRESULT values
+#define NV_FACILITY_BASE 0x100
+
+/*! Facilities numbers must be unique across a project to make the resulting result a unique number!
+It can be useful to have a consistent short name for a facility, as used in the name prefix */
+#define NV_FACILITY_DISK (NV_FACILITY_BASE + 1)
+#define NV_FACILITY_INTERFACE (NV_FACILITY_BASE + 2)
+#define NV_FACILITY_UNKNOWN (NV_FACILITY_BASE + 3)
+#define NV_FACILITY_MEMORY (NV_FACILITY_BASE + 4)
+#define NV_FACILITY_MISC (NV_FACILITY_BASE + 5)
+
+/// Base for external facilities. Facilities should be unique across modules.
+#define NV_FACILITY_EXTERNAL_BASE 0x200
+#define NV_FACILITY_HAIR (NV_FACILITY_EXTERNAL_BASE + 1)
+
+/* *************************** Codes **************************************/
+
+// Memory
+#define NV_E_MEM_OUT_OF_MEMORY NV_MAKE_ERROR(MEMORY, 1)
+#define NV_E_MEM_BUFFER_TOO_SMALL NV_MAKE_ERROR(MEMORY, 2)
+
+//! NV_OK indicates success, and is equivalent to NV_MAKE_RESULT(0, NV_FACILITY_GENERAL, 0)
+#define NV_OK 0
+//! NV_FAIL is the generic failure code - meaning a serious error occurred and the call couldn't complete
+#define NV_FAIL NV_MAKE_ERROR(GENERAL, 1)
+
+//! Used to identify a Result that has yet to be initialized.
+//! It defaults to failure such that if used incorrectly will fail, as similar in concept to using an uninitialized variable.
+#define NV_E_MISC_UNINITIALIZED NV_MAKE_ERROR(MISC, 2)
+//! Returned from an async method meaning the output is invalid (thus an error), but a result for the request is pending, and will be returned on a subsequent call with the async handle.
+#define NV_E_MISC_PENDING NV_MAKE_ERROR(MISC, 3)
+//! Indicates that a handle passed in as parameter to a method is invalid.
+#define NV_E_MISC_INVALID_HANDLE NV_MAKE_ERROR(MISC, 4)
+
+/*! Set NV_HANDLE_RESULT_FAIL(x) to code to be executed whenever an error occurs, and is detected by one of the macros */
+#ifndef NV_HANDLE_RESULT_FAIL
+# define NV_HANDLE_RESULT_FAIL(x)
+#endif
+
+/* !!!!!!!!!!!!!!!!!!!!!!!!! Checking codes !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+
+//! Use to test if a result was failure. Never use result != NV_OK to test for failure, as there may be successful codes != NV_OK.
+#define NV_FAILED(status) ((status) < 0)
+//! Use to test if a result succeeded. Never use result == NV_OK to test for success, as will detect other successful codes as a failure.
+#define NV_SUCCEEDED(status) ((status) >= 0)
+
+//! Helper macro, that makes it easy to add result checking to calls in functions/methods that themselves return Result.
+#define NV_RETURN_ON_FAIL(x) { NvResult _res = (x); if (NV_FAILED(_res)) { NV_HANDLE_RESULT_FAIL(_res); return _res; } }
+//! Helper macro that can be used to test the return value from a call, and will return in a void method/function
+#define NV_RETURN_VOID_ON_FAIL(x) { NvResult _res = (x); if (NV_FAILED(_res)) { NV_HANDLE_RESULT_FAIL(_res); return; } }
+//! Helper macro that will return false on failure.
+#define NV_RETURN_FALSE_ON_FAIL(x) { NvResult _res = (x); if (NV_FAILED(_res)) { NV_HANDLE_RESULT_FAIL(_res); return false; } }
+
+//! Helper macro that will assert if the return code from a call is failure, also returns the failure.
+#define NV_CORE_ASSERT_ON_FAIL(x) { NvResult _res = (x); if (NV_FAILED(_res)) { assert(false); return _res; } }
+//! Helper macro that will assert if the result from a call is a failure, also returns.
+#define NV_CORE_ASSERT_VOID_ON_FAIL(x) { NvResult _res = (x); if (NV_FAILED(_res)) { assert(false); return; } }
+
+
+#if __cplusplus
+namespace nvidia {
+typedef NvResult Result;
+} // namespace nvidia
+#endif
+
+/** @} */
+
+#endif
diff --git a/demo/d3d12/appD3D12Ctx.cpp b/demo/d3d12/appD3D12Ctx.cpp
new file mode 100644
index 0000000..944453a
--- /dev/null
+++ b/demo/d3d12/appD3D12Ctx.cpp
@@ -0,0 +1,1210 @@
+/*
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+//direct3d headers
+#define NOMINMAX
+#include <d3d12.h>
+#include <dxgi1_4.h>
+
+// include the Direct3D Library file
+#pragma comment (lib, "d3d12.lib")
+#pragma comment (lib, "DXGI.lib")
+
+#include "appD3D12Ctx.h"
+
+#include <stdio.h>
+
+#include <SDL.h>
+#include <SDL_video.h>
+#include <SDL_syswm.h>
+
+namespace
+{
+ // COM object release utilities
+ template <class T>
+ void inline COMRelease(T& t)
+ {
+ if (t) t->Release();
+ t = nullptr;
+ }
+
+ template <class T>
+ void inline COMRelease(T& t, UINT arraySize)
+ {
+ for (UINT i = 0; i < arraySize; i++)
+ {
+ if (t[i]) t[i]->Release();
+ t[i] = nullptr;
+ }
+ }
+}
+
+AppGraphProfilerD3D12* appGraphCreateProfilerD3D12(AppGraphCtx* ctx);
+void appGraphProfilerD3D12FrameBegin(AppGraphProfilerD3D12* profiler);
+void appGraphProfilerD3D12FrameEnd(AppGraphProfilerD3D12* profiler);
+void appGraphProfilerD3D12Enable(AppGraphProfilerD3D12* profiler, bool enabled);
+void appGraphProfilerD3D12Begin(AppGraphProfilerD3D12* profiler, const char* label);
+void appGraphProfilerD3D12End(AppGraphProfilerD3D12* profiler, const char* label);
+bool appGraphProfilerD3D12Get(AppGraphProfilerD3D12* profiler, const char** plabel, float* cpuTime, float* gpuTime, int index);
+void appGraphReleaseProfiler(AppGraphProfilerD3D12* profiler);
+
+AppGraphCtxD3D12::AppGraphCtxD3D12()
+{
+ m_profiler = appGraphCreateProfilerD3D12(cast_from_AppGraphCtxD3D12(this));
+
+ m_targetInfo.init();
+
+ memset(m_commandAllocators, 0, sizeof(m_commandAllocators));
+ memset(m_fenceValues, 0, sizeof(m_fenceValues));
+}
+
+AppGraphCtxD3D12::~AppGraphCtxD3D12()
+{
+ AppGraphCtxReleaseRenderTargetD3D12(cast_from_AppGraphCtxD3D12(this));
+
+ COMRelease(m_device);
+ COMRelease(m_commandQueue);
+ COMRelease(m_rtvHeap);
+ COMRelease(m_dsvHeap);
+ COMRelease(m_depthSrvHeap);
+ COMRelease(m_commandAllocators, m_frameCount);
+
+ COMRelease(m_fence);
+ CloseHandle(m_fenceEvent);
+
+ COMRelease(m_commandList);
+
+ m_dynamicHeapCbvSrvUav.release();
+
+ appGraphReleaseProfiler(m_profiler);
+ m_profiler = nullptr;
+}
+
+AppGraphCtx* AppGraphCtxCreateD3D12(int deviceID)
+{
+ AppGraphCtxD3D12* context = new AppGraphCtxD3D12;
+
+ HRESULT hr = S_OK;
+
+#if defined(_DEBUG)
+ // Enable the D3D12 debug layer.
+ {
+ ID3D12Debug* debugController;
+ if (SUCCEEDED(D3D12GetDebugInterface(IID_PPV_ARGS(&debugController))))
+ {
+ debugController->EnableDebugLayer();
+ }
+ COMRelease(debugController);
+ }
+#endif
+
+ UINT debugFlags = 0;
+#ifdef _DEBUG
+ debugFlags |= DXGI_CREATE_FACTORY_DEBUG;
+#endif
+
+ // enumerate devices
+ IDXGIFactory4* pFactory = NULL;
+ CreateDXGIFactory2(debugFlags, IID_PPV_ARGS(&pFactory));
+ IDXGIAdapter1* pAdapterTemp = NULL;
+ IDXGIAdapter1* pAdapter = NULL;
+ DXGI_ADAPTER_DESC1 adapterDesc;
+ int adapterIdx = 0;
+ while (S_OK == pFactory->EnumAdapters1(adapterIdx, &pAdapterTemp))
+ {
+ pAdapterTemp->GetDesc1(&adapterDesc);
+
+ context->m_dedicatedVideoMemory = (size_t)adapterDesc.DedicatedVideoMemory;
+
+ if (deviceID == adapterIdx)
+ {
+ pAdapter = pAdapterTemp;
+ break;
+ }
+ else
+ {
+ pAdapterTemp->Release();
+ }
+ adapterIdx++;
+ }
+
+ // create device
+ if (hr = D3D12CreateDevice(pAdapter, D3D_FEATURE_LEVEL_11_0, __uuidof(ID3D12Device), (void**)&context->m_device))
+ {
+ delete context;
+ return nullptr;
+ }
+
+ // to disable annoying warning
+#if 0
+ context->m_device->SetStablePowerState(TRUE);
+#endif
+
+ // create command queue
+ {
+ D3D12_COMMAND_QUEUE_DESC desc;
+ desc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT;
+ desc.Priority = D3D12_COMMAND_QUEUE_PRIORITY_NORMAL;
+ desc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE;
+ desc.NodeMask = 0;
+
+ if (hr = context->m_device->CreateCommandQueue(&desc, IID_PPV_ARGS(&context->m_commandQueue)))
+ {
+ delete context;
+ return nullptr;
+ }
+ }
+
+ // cleanup adapter and factory
+ COMRelease(pAdapter);
+ COMRelease(pFactory);
+
+ // create RTV descriptor heap
+ {
+ D3D12_DESCRIPTOR_HEAP_DESC desc = {};
+ desc.NumDescriptors = context->m_renderTargetCount;
+ desc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_RTV;
+ desc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE;
+ if (hr = context->m_device->CreateDescriptorHeap(&desc, IID_PPV_ARGS(&context->m_rtvHeap)))
+ {
+ delete context;
+ return nullptr;
+ }
+ context->m_rtvDescriptorSize = context->m_device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV);
+ }
+
+ // create DSV descriptor heap
+ {
+ D3D12_DESCRIPTOR_HEAP_DESC desc = {};
+ desc.NumDescriptors = 1;
+ desc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_DSV;
+ desc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE;
+ if (hr = context->m_device->CreateDescriptorHeap(&desc, IID_PPV_ARGS(&context->m_dsvHeap)))
+ {
+ delete context;
+ return nullptr;
+ }
+ }
+
+ // create depth SRV descriptor heap
+ {
+ D3D12_DESCRIPTOR_HEAP_DESC desc = {};
+ desc.NumDescriptors = 1;
+ desc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV;
+ desc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE;
+ if (hr = context->m_device->CreateDescriptorHeap(&desc, IID_PPV_ARGS(&context->m_depthSrvHeap)))
+ {
+ delete context;
+ return nullptr;
+ }
+ }
+
+ // Create per frame resources
+ {
+ for (UINT idx = 0; idx < context->m_frameCount; idx++)
+ {
+ if (hr = context->m_device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&context->m_commandAllocators[idx])))
+ {
+ delete context;
+ return nullptr;
+ }
+ }
+ }
+
+ // create dynamic heap
+ {
+ context->m_dynamicHeapCbvSrvUav.init(context->m_device, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, 256u * 1024u);
+ }
+
+ // Create command list and close it
+ {
+ if (hr = context->m_device->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT,
+ context->m_commandAllocators[context->m_frameIndex], nullptr, IID_PPV_ARGS(&context->m_commandList))
+ )
+ {
+ delete context;
+ return nullptr;
+ }
+ context->m_commandList->Close();
+ }
+
+ // create synchronization objects
+ {
+ if (hr = context->m_device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&context->m_fence)))
+ {
+ delete context;
+ return nullptr;
+ }
+
+ context->m_fenceEvent = CreateEvent(nullptr, FALSE, FALSE, nullptr);
+ if (context->m_fenceEvent == nullptr)
+ {
+ delete context;
+ return nullptr;
+ }
+ }
+
+ return cast_from_AppGraphCtxD3D12(context);
+}
+
+
+void AppGraphCtxInitRenderTargetD3D12(AppGraphCtx* contextIn, SDL_Window* window, bool fullscreen, int numMSAASamples)
+{
+ auto context = cast_to_AppGraphCtxD3D12(contextIn);
+
+ HWND hWnd = nullptr;
+ // get Windows handle to this SDL window
+ SDL_SysWMinfo winInfo;
+ SDL_VERSION(&winInfo.version);
+ if (SDL_GetWindowWMInfo(window, &winInfo))
+ {
+ if (winInfo.subsystem == SDL_SYSWM_WINDOWS)
+ {
+ hWnd = winInfo.info.win.window;
+ }
+ }
+ context->m_hWnd = hWnd;
+ context->m_fullscreen = fullscreen;
+
+ HRESULT hr = S_OK;
+
+ UINT debugFlags = 0;
+#ifdef _DEBUG
+ debugFlags |= DXGI_CREATE_FACTORY_DEBUG;
+#endif
+
+ // enumerate devices
+ IDXGIFactory4* pFactory = NULL;
+ CreateDXGIFactory2(debugFlags, IID_PPV_ARGS(&pFactory));
+
+ // create the swap chain
+ for (int i = 0; i < 2; i++)
+ {
+ DXGI_SWAP_CHAIN_DESC desc;
+ ZeroMemory(&desc, sizeof(desc));
+ desc.BufferCount = context->m_renderTargetCount;
+ desc.BufferDesc.Width = context->m_winW;
+ desc.BufferDesc.Height = context->m_winH;
+ desc.BufferDesc.Format = context->m_rtv_format; // DXGI_FORMAT_R8G8B8A8_UNORM;
+ desc.BufferDesc.RefreshRate.Numerator = 0;
+ desc.BufferDesc.RefreshRate.Denominator = 0;
+ desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
+ desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD;
+ desc.OutputWindow = context->m_hWnd;
+ desc.SampleDesc.Count = 1;
+ desc.SampleDesc.Quality = 0;
+ desc.Windowed = context->m_fullscreen ? FALSE : TRUE;
+ desc.Flags = context->m_fullscreen ? 0u : DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT;
+
+ context->m_current_rtvDesc.Format = context->m_rtv_format;
+ context->m_current_rtvDesc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2D;
+ context->m_current_rtvDesc.Texture2D.MipSlice = 0u;
+ context->m_current_rtvDesc.Texture2D.PlaneSlice = 0u;
+
+ hr = pFactory->CreateSwapChain(context->m_commandQueue, &desc, (IDXGISwapChain**)&context->m_swapChain);
+
+ if(hr != S_OK)
+ {
+ COMRelease(context->m_swapChain);
+ context->m_fullscreen = false;
+ continue;
+ }
+
+ if (!context->m_fullscreen)
+ {
+ context->m_swapChainWaitableObject = context->m_swapChain->GetFrameLatencyWaitableObject();
+ context->m_swapChain->SetMaximumFrameLatency(context->m_renderTargetCount - 2);
+ }
+ else
+ {
+ hr = context->m_swapChain->SetFullscreenState(true, nullptr);
+ if (hr != S_OK)
+ {
+ COMRelease(context->m_swapChain);
+ context->m_fullscreen = false;
+ continue;
+ }
+ DXGI_SWAP_CHAIN_DESC desc = {};
+ context->m_swapChain->GetDesc(&desc);
+
+ context->m_winW = desc.BufferDesc.Width;
+ context->m_winH = desc.BufferDesc.Height;
+ }
+
+ context->m_frameIndex = context->m_swapChain->GetCurrentBackBufferIndex();
+ break;
+ }
+
+ // configure scissor and viewport
+ {
+ context->m_viewport.Width = float(context->m_winW);
+ context->m_viewport.Height = float(context->m_winH);
+ context->m_viewport.MaxDepth = 1.f;
+
+ context->m_scissorRect.right = context->m_winW;
+ context->m_scissorRect.bottom = context->m_winH;
+ }
+
+ COMRelease(pFactory);
+
+ // create per render target resources
+ {
+ D3D12_CPU_DESCRIPTOR_HANDLE rtvHandle = context->m_rtvHeap->GetCPUDescriptorHandleForHeapStart();
+
+ for (UINT idx = 0; idx < context->m_renderTargetCount; idx++)
+ {
+ ComPtr<ID3D12Resource> backBuffer;
+ if (hr = context->m_swapChain->GetBuffer(idx, IID_PPV_ARGS(&backBuffer)))
+ {
+ return;
+ }
+ context->m_backBuffers[idx].setDebugName(L"Backbuffer");
+ context->m_backBuffers[idx].setResource(backBuffer.Get(), D3D12_RESOURCE_STATE_COMMON);
+ // Assume they are the same thing for now...
+ context->m_renderTargets[idx] = &context->m_backBuffers[idx];
+
+ // If we are multi-sampling - create a render target separate from the back buffer
+ if (context->m_numMsaaSamples > 1)
+ {
+ D3D12_HEAP_PROPERTIES heapProps = {};
+ heapProps.Type = D3D12_HEAP_TYPE_DEFAULT;
+ D3D12_RESOURCE_DESC desc = backBuffer->GetDesc();
+
+ DXGI_FORMAT resourceFormat;
+
+ if (desc.Format == DXGI_FORMAT_R32_FLOAT || desc.Format == DXGI_FORMAT_D32_FLOAT)
+ {
+ resourceFormat = DXGI_FORMAT_R32_TYPELESS;
+ }
+ else if (desc.Format == DXGI_FORMAT_D24_UNORM_S8_UINT)
+ {
+ resourceFormat = DXGI_FORMAT_R24G8_TYPELESS;
+ }
+ else
+ {
+ resourceFormat = desc.Format;
+ }
+
+ DXGI_FORMAT targetFormat = nvidia::Common::DxFormatUtil::calcFormat(nvidia::Common::DxFormatUtil::USAGE_TARGET, resourceFormat);
+
+ // Set the target format
+ context->m_targetInfo.m_renderTargetFormats[0] = targetFormat;
+
+ D3D12_CLEAR_VALUE clearValue = {};
+ clearValue.Format = targetFormat;
+
+ desc.Format = resourceFormat;
+ desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
+ desc.SampleDesc.Count = context->m_targetInfo.m_numSamples;
+ desc.SampleDesc.Quality = context->m_targetInfo.m_sampleQuality;
+ desc.Alignment = 0;
+
+ context->m_renderTargetResources[idx].initCommitted(context->m_device, heapProps, D3D12_HEAP_FLAG_NONE, desc, D3D12_RESOURCE_STATE_RENDER_TARGET, &clearValue);
+ context->m_renderTargets[idx] = &context->m_renderTargetResources[idx];
+
+ context->m_renderTargetResources[idx].setDebugName(L"Render Target");
+ }
+
+ context->m_device->CreateRenderTargetView(*context->m_renderTargets[idx], nullptr, rtvHandle);
+ rtvHandle.ptr += context->m_rtvDescriptorSize;
+ }
+ }
+
+ // create the depth stencil
+ {
+ D3D12_HEAP_PROPERTIES heapProps = {};
+ heapProps.Type = D3D12_HEAP_TYPE_DEFAULT;
+ heapProps.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
+ heapProps.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
+ heapProps.CreationNodeMask = 0u;
+ heapProps.VisibleNodeMask = 0u;
+
+ D3D12_RESOURCE_DESC texDesc = {};
+ texDesc.MipLevels = 1u;
+ texDesc.Format = context->m_depth_format; // DXGI_FORMAT_R32_TYPELESS; // DXGI_FORMAT_R24G8_TYPELESS
+ texDesc.Width = context->m_winW;
+ texDesc.Height = context->m_winH;
+ texDesc.Flags = D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL /*| D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE*/;
+ texDesc.DepthOrArraySize = 1u;
+ texDesc.SampleDesc.Count = context->m_targetInfo.m_numSamples;
+ texDesc.SampleDesc.Quality = context->m_targetInfo.m_sampleQuality;
+ texDesc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
+
+ D3D12_CLEAR_VALUE clearValue;
+ clearValue.Format = context->m_dsv_format; // DXGI_FORMAT_D32_FLOAT;
+ clearValue.DepthStencil.Depth = 1.f;
+ clearValue.DepthStencil.Stencil = 0;
+
+ if (hr = context->m_device->CreateCommittedResource(
+ &heapProps,
+ D3D12_HEAP_FLAG_NONE,
+ &texDesc,
+ D3D12_RESOURCE_STATE_DEPTH_WRITE,
+ &clearValue,
+ IID_PPV_ARGS(&context->m_depthStencil)
+ ))
+ {
+ return;
+ }
+
+ // create the depth stencil view
+ D3D12_DEPTH_STENCIL_VIEW_DESC viewDesc = {};
+ viewDesc.Format = context->m_dsv_format; // DXGI_FORMAT_D32_FLOAT;
+ viewDesc.ViewDimension = (context->m_numMsaaSamples>1) ? D3D12_DSV_DIMENSION_TEXTURE2DMS : D3D12_DSV_DIMENSION_TEXTURE2D;
+ viewDesc.Flags = D3D12_DSV_FLAG_NONE;
+ viewDesc.Texture2D.MipSlice = 0;
+
+ context->m_current_dsvDesc = viewDesc;
+
+ context->m_device->CreateDepthStencilView(context->m_depthStencil, &viewDesc, context->m_dsvHeap->GetCPUDescriptorHandleForHeapStart());
+
+ context->m_targetInfo.m_depthStencilFormat = context->m_dsv_format;
+ }
+}
+
+bool AppGraphCtxUpdateSizeD3D12(AppGraphCtx* contextIn, SDL_Window* window, bool fullscreen, int numMSAASamples)
+{
+ auto context = cast_to_AppGraphCtxD3D12(contextIn);
+
+ bool sizeChanged = false;
+
+ // sync with window
+ {
+ HWND hWnd = nullptr;
+ // get Windows handle to this SDL window
+ SDL_SysWMinfo winInfo;
+ SDL_VERSION(&winInfo.version);
+ if (SDL_GetWindowWMInfo(window, &winInfo))
+ {
+ if (winInfo.subsystem == SDL_SYSWM_WINDOWS)
+ {
+ hWnd = winInfo.info.win.window;
+ }
+ }
+ context->m_hWnd = hWnd;
+ context->m_fullscreen = fullscreen;
+
+ HRESULT hr = S_OK;
+
+ RECT rc;
+ GetClientRect(context->m_hWnd, &rc);
+ UINT width = rc.right - rc.left;
+ UINT height = rc.bottom - rc.top;
+
+ if (context->m_winW != width || context->m_winH != height)
+ {
+ context->m_winW = width;
+ context->m_winH = height;
+ sizeChanged = true;
+ context->m_valid = (context->m_winW != 0 && context->m_winH != 0);
+ }
+ }
+
+ context->m_numMsaaSamples = numMSAASamples;
+ context->m_targetInfo.m_numSamples = numMSAASamples;
+
+ if (sizeChanged)
+ {
+ AppGraphCtxReleaseRenderTargetD3D12(cast_from_AppGraphCtxD3D12(context));
+ }
+ if (sizeChanged && context->m_valid)
+ {
+ AppGraphCtxInitRenderTargetD3D12(cast_from_AppGraphCtxD3D12(context), window, fullscreen, numMSAASamples);
+ }
+
+ return context->m_valid;
+}
+
+void AppGraphCtxReleaseRenderTargetD3D12(AppGraphCtx* contextIn)
+{
+ auto context = cast_to_AppGraphCtxD3D12(contextIn);
+
+ if (context->m_swapChain == nullptr)
+ {
+ return;
+ }
+
+ // need to make sure the pipeline is flushed
+ for (UINT i = 0; i < context->m_frameCount; i++)
+ {
+ // check dependencies
+ UINT64 fenceCompleted = context->m_fence->GetCompletedValue();
+ if (fenceCompleted < context->m_fenceValues[i])
+ {
+ context->m_fence->SetEventOnCompletion(context->m_fenceValues[i], context->m_fenceEvent);
+ WaitForSingleObjectEx(context->m_fenceEvent, INFINITE, FALSE);
+ }
+ }
+
+ BOOL bFullscreen = FALSE;
+ context->m_swapChain->GetFullscreenState(&bFullscreen, nullptr);
+ if (bFullscreen == TRUE) context->m_swapChain->SetFullscreenState(FALSE, nullptr);
+
+ COMRelease(context->m_swapChain);
+ COMRelease(context->m_depthStencil);
+
+ for(int i=0;i!= context->m_renderTargetCount; i++)
+ context->m_renderTargets[i]->setResourceNull();
+
+ context->m_valid = false;
+ context->m_winW = 0u;
+ context->m_winH = 0u;
+}
+
+void AppGraphCtxReleaseD3D12(AppGraphCtx* context)
+{
+ if (context == nullptr) return;
+
+ delete cast_to_AppGraphCtxD3D12(context);
+}
+
+void AppGraphCtxFrameStartD3D12(AppGraphCtx* contextIn, AppGraphColor clearColor)
+{
+ auto context = cast_to_AppGraphCtxD3D12(contextIn);
+
+ // Get back render target index
+ context->m_renderTargetIndex = context->m_swapChain->GetCurrentBackBufferIndex();
+
+ // check dependencies
+ UINT64 fenceCompleted = context->m_fence->GetCompletedValue();
+ if (fenceCompleted < context->m_fenceValues[context->m_frameIndex])
+ {
+ context->m_fence->SetEventOnCompletion(context->m_fenceValues[context->m_frameIndex], context->m_fenceEvent);
+ WaitForSingleObjectEx(context->m_fenceEvent, INFINITE, FALSE);
+ }
+
+ // The fence ID associated with completion of this frame
+ context->m_thisFrameFenceID = context->m_frameID + 1;
+ context->m_lastFenceComplete = context->m_fence->GetCompletedValue();
+
+ // reset this frame's command allocator
+ context->m_commandAllocators[context->m_frameIndex]->Reset();
+
+ // reset command list with this frame's allocator
+ context->m_commandList->Reset(context->m_commandAllocators[context->m_frameIndex], nullptr);
+
+ appGraphProfilerD3D12FrameBegin(context->m_profiler);
+
+ context->m_commandList->RSSetViewports(1, &context->m_viewport);
+ context->m_commandList->RSSetScissorRects(1, &context->m_scissorRect);
+
+ {
+ nvidia::Common::Dx12BarrierSubmitter submitter(context->m_commandList);
+ context->m_renderTargets[context->m_renderTargetIndex]->transition(D3D12_RESOURCE_STATE_RENDER_TARGET, submitter);
+ }
+
+ D3D12_CPU_DESCRIPTOR_HANDLE rtvHandle = context->m_rtvHeap->GetCPUDescriptorHandleForHeapStart();
+ rtvHandle.ptr += context->m_renderTargetIndex * context->m_rtvDescriptorSize;
+
+ D3D12_CPU_DESCRIPTOR_HANDLE dsvHandle = context->m_dsvHeap->GetCPUDescriptorHandleForHeapStart();
+ context->m_commandList->OMSetRenderTargets(1, &rtvHandle, FALSE, &dsvHandle);
+
+ context->m_commandList->ClearRenderTargetView(rtvHandle, &clearColor.r, 0, nullptr);
+ context->m_commandList->ClearDepthStencilView(dsvHandle, D3D12_CLEAR_FLAG_DEPTH, 1.f, 0, 0, nullptr);
+
+ /// to simplify interop implementation
+ context->m_current_renderTarget = context->m_renderTargets[context->m_renderTargetIndex]->getResource();
+ context->m_current_rtvHandle = rtvHandle;
+ context->m_current_dsvHandle = dsvHandle;
+ context->m_current_depth_srvHandle = context->m_depthSrvHeap->GetCPUDescriptorHandleForHeapStart();
+}
+
+void AppGraphCtxFramePresentD3D12(AppGraphCtx* contextIn, bool fullsync)
+{
+ auto context = cast_to_AppGraphCtxD3D12(contextIn);
+
+ // check if now is good time to present
+ bool shouldPresent = context->m_fullscreen ? true : WaitForSingleObjectEx(context->m_swapChainWaitableObject, 0, TRUE) != WAIT_TIMEOUT;
+ if (shouldPresent)
+ {
+ context->m_swapChain->Present(fullsync, 0);
+ context->m_renderTargetID++;
+ }
+
+ appGraphProfilerD3D12FrameEnd(context->m_profiler);
+
+ // signal for this frame id
+ context->m_frameID++;
+ context->m_fenceValues[context->m_frameIndex] = context->m_frameID;
+ context->m_commandQueue->Signal(context->m_fence, context->m_frameID);
+
+ // increment frame index after signal
+ context->m_frameIndex = (context->m_frameIndex + 1) % context->m_frameCount;
+
+ if (fullsync)
+ {
+ // check dependencies
+ for (int frameIndex = 0; frameIndex < context->m_frameCount; frameIndex++)
+ {
+ UINT64 fenceCompleted = context->m_fence->GetCompletedValue();
+ if (fenceCompleted < context->m_fenceValues[frameIndex])
+ {
+ context->m_fence->SetEventOnCompletion(context->m_fenceValues[frameIndex], context->m_fenceEvent);
+ WaitForSingleObjectEx(context->m_fenceEvent, INFINITE, FALSE);
+ }
+ }
+ }
+}
+
+void AppGraphCtxWaitForFramesD3D12(AppGraphCtx* contextIn, unsigned int maxFramesInFlight)
+{
+ auto context = cast_to_AppGraphCtxD3D12(contextIn);
+
+ unsigned int framesActive = maxFramesInFlight;
+ while (framesActive >= maxFramesInFlight)
+ {
+ // reset count each cycle, and get latest fence value
+ framesActive = 0u;
+ UINT64 fenceCompleted = context->m_fence->GetCompletedValue();
+
+ // determine how many frames are in flight
+ for (int frameIndex = 0; frameIndex < context->m_frameCount; frameIndex++)
+ {
+ if (fenceCompleted < context->m_fenceValues[frameIndex])
+ {
+ framesActive++;
+ }
+ }
+
+ if (framesActive >= maxFramesInFlight)
+ {
+ // find the active frame with the lowest fence ID
+ UINT64 minFenceID = 0;
+ unsigned int minFrameIdx = 0;
+ for (int frameIndex = 0; frameIndex < context->m_frameCount; frameIndex++)
+ {
+ if (fenceCompleted < context->m_fenceValues[frameIndex])
+ {
+ if (minFenceID == 0)
+ {
+ minFenceID = context->m_fenceValues[frameIndex];
+ minFrameIdx = frameIndex;
+ }
+ else if (context->m_fenceValues[frameIndex] < minFenceID)
+ {
+ minFenceID = context->m_fenceValues[frameIndex];
+ minFrameIdx = frameIndex;
+ }
+ }
+ }
+ // Wait for min frame
+ {
+ unsigned int frameIndex = minFrameIdx;
+ fenceCompleted = context->m_fence->GetCompletedValue();
+ if (fenceCompleted < context->m_fenceValues[frameIndex])
+ {
+ context->m_fence->SetEventOnCompletion(context->m_fenceValues[frameIndex], context->m_fenceEvent);
+ WaitForSingleObjectEx(context->m_fenceEvent, INFINITE, FALSE);
+ }
+ }
+ }
+ }
+}
+
+void AppGraphCtxProfileEnableD3D12(AppGraphCtx* contextIn, bool enabled)
+{
+ auto context = cast_to_AppGraphCtxD3D12(contextIn);
+ appGraphProfilerD3D12Enable(context->m_profiler, enabled);
+}
+
+void AppGraphCtxProfileBeginD3D12(AppGraphCtx* contextIn, const char* label)
+{
+ auto context = cast_to_AppGraphCtxD3D12(contextIn);
+ appGraphProfilerD3D12Begin(context->m_profiler, label);
+}
+
+void AppGraphCtxProfileEndD3D12(AppGraphCtx* contextIn, const char* label)
+{
+ auto context = cast_to_AppGraphCtxD3D12(contextIn);
+ appGraphProfilerD3D12End(context->m_profiler, label);
+}
+
+bool AppGraphCtxProfileGetD3D12(AppGraphCtx* contextIn, const char** plabel, float* cpuTime, float* gpuTime, int index)
+{
+ auto context = cast_to_AppGraphCtxD3D12(contextIn);
+ return appGraphProfilerD3D12Get(context->m_profiler, plabel, cpuTime, gpuTime, index);
+}
+
+// ******************************* Dynamic descriptor heap ******************************
+
+void AppDynamicDescriptorHeapD3D12::init(ID3D12Device* device, D3D12_DESCRIPTOR_HEAP_TYPE heapType, UINT minHeapSize)
+{
+ m_device = device;
+ m_heapSize = minHeapSize;
+ m_startSlot = 0u;
+ m_descriptorSize = m_device->GetDescriptorHandleIncrementSize(heapType);
+
+ D3D12_DESCRIPTOR_HEAP_DESC desc = {};
+ desc.NumDescriptors = m_heapSize;
+ desc.Type = heapType;
+ desc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE;
+ m_device->CreateDescriptorHeap(&desc, IID_PPV_ARGS(&m_heap));
+}
+
+void AppDynamicDescriptorHeapD3D12::release()
+{
+ m_device = nullptr;
+ COMRelease(m_heap);
+ m_descriptorSize = 0u;
+ m_startSlot = 0u;
+ m_heapSize = 0u;
+}
+
+AppDescriptorReserveHandleD3D12 AppDynamicDescriptorHeapD3D12::reserveDescriptors(UINT numDescriptors, UINT64 lastFenceCompleted, UINT64 nextFenceValue)
+{
+ UINT endSlot = m_startSlot + numDescriptors;
+ if (endSlot >= m_heapSize)
+ {
+ m_startSlot = 0u;
+ endSlot = numDescriptors;
+ }
+ D3D12_CPU_DESCRIPTOR_HANDLE cpuHandle;
+ D3D12_GPU_DESCRIPTOR_HANDLE gpuHandle;
+ cpuHandle = m_heap->GetCPUDescriptorHandleForHeapStart();
+ cpuHandle.ptr += m_startSlot * m_descriptorSize;
+ gpuHandle = m_heap->GetGPUDescriptorHandleForHeapStart();
+ gpuHandle.ptr += m_startSlot * m_descriptorSize;
+
+ // advance start slot
+ m_startSlot = endSlot;
+
+ AppDescriptorReserveHandleD3D12 handle = {};
+ handle.heap = m_heap;
+ handle.descriptorSize = m_descriptorSize;
+ handle.cpuHandle = cpuHandle;
+ handle.gpuHandle = gpuHandle;
+ return handle;
+}
+
+// ******************************* Profiler *********************************
+
+namespace
+{
+ struct TimerCPU
+ {
+ LARGE_INTEGER oldCount;
+ LARGE_INTEGER count;
+ LARGE_INTEGER freq;
+ TimerCPU()
+ {
+ QueryPerformanceCounter(&count);
+ QueryPerformanceFrequency(&freq);
+ oldCount = count;
+ }
+ double getDeltaTime()
+ {
+ QueryPerformanceCounter(&count);
+ double dt = double(count.QuadPart - oldCount.QuadPart) / double(freq.QuadPart);
+ oldCount = count;
+ return dt;
+ }
+ };
+
+ struct TimerGPU
+ {
+ ID3D12QueryHeap* m_queryHeap = nullptr;
+ ID3D12Resource* m_queryReadback = nullptr;
+ UINT64 m_queryFrequency = 0;
+ UINT64 m_queryReadbackFenceVal = ~0llu;
+
+ TimerGPU() {}
+ ~TimerGPU()
+ {
+ COMRelease(m_queryHeap);
+ COMRelease(m_queryReadback);
+ }
+ };
+
+ struct Timer
+ {
+ TimerCPU m_cpu;
+ TimerGPU m_gpu;
+
+ const char* m_label = nullptr;
+ float m_cpuTime = 0.f;
+ float m_gpuTime = 0.f;
+
+ Timer() {}
+ ~Timer() {}
+ };
+
+ struct TimerValue
+ {
+ const char* m_label = nullptr;
+ float m_cpuTime = 0.f;
+ float m_gpuTime = 0.f;
+
+ struct Stat
+ {
+ float m_time = 0.f;
+ float m_maxTime = 0.f;
+ float m_maxTimeAge = 0.f;
+
+ float m_smoothTime = 0.f;
+ float m_smoothTimeSum = 0.f;
+ float m_smoothTimeCount = 0.f;
+
+ Stat() {}
+ void push(float time)
+ {
+ m_time = time;
+
+ if (m_time > m_maxTime)
+ {
+ m_maxTime = m_time;
+ m_maxTimeAge = 0.f;
+ }
+
+ if (fabsf(m_time - m_maxTime) < 0.25f * m_maxTime)
+ {
+ m_smoothTimeSum += m_time;
+ m_smoothTimeCount += 1.f;
+ m_smoothTimeSum *= 0.98f;
+ m_smoothTimeCount *= 0.98f;
+ m_smoothTime = m_smoothTimeSum / m_smoothTimeCount;
+ }
+ }
+
+ float pull(float frameTime)
+ {
+ m_maxTimeAge += frameTime;
+
+ if (m_maxTimeAge > 1.f)
+ {
+ m_maxTimeAge = 0.f;
+ m_maxTime = m_time;
+ m_smoothTimeSum = 0.f;
+ m_smoothTimeCount = 0.f;
+ }
+ return m_smoothTime;
+ }
+ };
+
+ Stat m_cpu;
+ Stat m_gpu;
+
+ void push(float cpuTime, float gpuTime)
+ {
+ m_cpu.push(cpuTime);
+ m_gpu.push(gpuTime);
+ }
+
+ void pull(float frameTime)
+ {
+ m_cpuTime = m_cpu.pull(frameTime);
+ m_gpuTime = m_gpu.pull(frameTime);
+ }
+ };
+
+ struct HeapPropsReadback : public D3D12_HEAP_PROPERTIES
+ {
+ HeapPropsReadback()
+ {
+ Type = D3D12_HEAP_TYPE_READBACK;
+ CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
+ MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
+ CreationNodeMask = 0u;
+ VisibleNodeMask = 0u;
+ }
+ };
+ struct ResourceDescBuffer : public D3D12_RESOURCE_DESC
+ {
+ ResourceDescBuffer(UINT64 size)
+ {
+ Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
+ Alignment = 0u;
+ Width = size;
+ Height = 1u;
+ DepthOrArraySize = 1u;
+ MipLevels = 1;
+ Format = DXGI_FORMAT_UNKNOWN;
+ SampleDesc.Count = 1u;
+ SampleDesc.Quality = 0u;
+ Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
+ Flags = D3D12_RESOURCE_FLAG_NONE;
+ }
+ };
+}
+
+struct AppGraphProfilerD3D12
+{
+ AppGraphCtxD3D12* m_context;
+
+ int m_state = 0;
+ bool m_enabled = false;
+
+ TimerCPU m_frameTimer;
+ float m_frameTime = 0.f;
+
+ static const int m_timersCap = 64;
+ Timer m_timers[m_timersCap];
+ int m_timersSize = 0;
+
+ TimerValue m_timerValues[m_timersCap];
+ int m_timerValuesSize = 0;
+
+ AppGraphProfilerD3D12(AppGraphCtx* context);
+ ~AppGraphProfilerD3D12();
+};
+
+AppGraphProfilerD3D12::AppGraphProfilerD3D12(AppGraphCtx* context) : m_context(cast_to_AppGraphCtxD3D12(context))
+{
+}
+
+AppGraphProfilerD3D12::~AppGraphProfilerD3D12()
+{
+}
+
+AppGraphProfilerD3D12* appGraphCreateProfilerD3D12(AppGraphCtx* ctx)
+{
+ return new AppGraphProfilerD3D12(ctx);
+}
+
+void appGraphReleaseProfiler(AppGraphProfilerD3D12* profiler)
+{
+ delete profiler;
+}
+
+void appGraphProfilerD3D12FrameBegin(AppGraphProfilerD3D12* p)
+{
+ p->m_frameTime = (float)p->m_frameTimer.getDeltaTime();
+
+ if (p->m_state == 0 && p->m_enabled)
+ {
+ p->m_timersSize = 0;
+
+ p->m_state = 1;
+ }
+}
+
+void appGraphProfilerD3D12FrameEnd(AppGraphProfilerD3D12* p)
+{
+ if (p->m_state == 1)
+ {
+ p->m_state = 2;
+ }
+}
+
+void appGraphProfilerD3D12Enable(AppGraphProfilerD3D12* p, bool enabled)
+{
+ p->m_enabled = enabled;
+}
+
+void appGraphProfilerD3D12Begin(AppGraphProfilerD3D12* p, const char* label)
+{
+ if (p->m_state == 1 && p->m_timersSize < p->m_timersCap)
+ {
+ auto& timer = p->m_timers[p->m_timersSize++];
+ timer.m_label = label;
+ timer.m_cpu.getDeltaTime();
+
+ auto device = p->m_context->m_device;
+
+ if (timer.m_gpu.m_queryHeap == nullptr)
+ {
+ D3D12_QUERY_HEAP_DESC queryDesc = {};
+ queryDesc.Type = D3D12_QUERY_HEAP_TYPE_TIMESTAMP;
+ queryDesc.Count = 2;
+ queryDesc.NodeMask = 0;
+
+ device->CreateQueryHeap(&queryDesc, IID_PPV_ARGS(&timer.m_gpu.m_queryHeap));
+
+ HeapPropsReadback readbackProps;
+ ResourceDescBuffer resDesc(2 * sizeof(UINT64));
+ resDesc.Flags = D3D12_RESOURCE_FLAG_NONE;
+
+ device->CreateCommittedResource(&readbackProps, D3D12_HEAP_FLAG_NONE,
+ &resDesc, D3D12_RESOURCE_STATE_COPY_DEST,
+ nullptr, IID_PPV_ARGS(&timer.m_gpu.m_queryReadback));
+ }
+
+ p->m_context->m_commandQueue->GetTimestampFrequency(&timer.m_gpu.m_queryFrequency);
+
+ p->m_context->m_commandList->EndQuery(timer.m_gpu.m_queryHeap, D3D12_QUERY_TYPE_TIMESTAMP, 0);
+ }
+}
+
+void appGraphProfilerD3D12End(AppGraphProfilerD3D12* p, const char* label)
+{
+ if (p->m_state == 1)
+ {
+ Timer* timer = nullptr;
+ for (int i = 0; i < p->m_timersSize; i++)
+ {
+ if (strcmp(p->m_timers[i].m_label, label) == 0)
+ {
+ timer = &p->m_timers[i];
+ break;
+ }
+ }
+ if (timer)
+ {
+ p->m_context->m_commandList->EndQuery(timer->m_gpu.m_queryHeap, D3D12_QUERY_TYPE_TIMESTAMP, 1);
+
+ p->m_context->m_commandList->ResolveQueryData(timer->m_gpu.m_queryHeap, D3D12_QUERY_TYPE_TIMESTAMP, 0, 2, timer->m_gpu.m_queryReadback, 0u);
+
+ timer->m_gpu.m_queryReadbackFenceVal = p->m_context->m_thisFrameFenceID;
+
+ timer->m_cpuTime = (float)timer->m_cpu.getDeltaTime();
+ }
+ }
+}
+
+bool appGraphProfilerD3D12Flush(AppGraphProfilerD3D12* p)
+{
+ if (p->m_state == 2)
+ {
+ for (int i = 0; i < p->m_timersSize; i++)
+ {
+ Timer& timer = p->m_timers[i];
+
+ if (timer.m_gpu.m_queryReadbackFenceVal > p->m_context->m_lastFenceComplete)
+ {
+ return false;
+ }
+
+ UINT64 tsBegin, tsEnd;
+ {
+ void* data;
+ // Read range is nullptr, meaning full read access
+ D3D12_RANGE readRange;
+ readRange.Begin = 0u;
+ readRange.End = 2 * sizeof(UINT64);
+ timer.m_gpu.m_queryReadback->Map(0u, &readRange, &data);
+ if (data)
+ {
+ auto mapped = (UINT64*)data;
+ tsBegin = mapped[0];
+ tsEnd = mapped[1];
+
+ D3D12_RANGE writeRange{};
+ timer.m_gpu.m_queryReadback->Unmap(0u, &writeRange);
+ }
+ }
+
+ timer.m_gpuTime = float(tsEnd - tsBegin) / float(timer.m_gpu.m_queryFrequency);
+
+ // update TimerValue
+ int j = 0;
+ for (; j < p->m_timerValuesSize; j++)
+ {
+ TimerValue& value = p->m_timerValues[j];
+ if (strcmp(value.m_label, timer.m_label) == 0)
+ {
+ value.push(timer.m_cpuTime, timer.m_gpuTime);
+ break;
+ }
+ }
+ if (j >= p->m_timerValuesSize && p->m_timerValuesSize < p->m_timersCap)
+ {
+ TimerValue& value = p->m_timerValues[p->m_timerValuesSize++];
+ value.m_label = timer.m_label;
+ value.push(timer.m_cpuTime, timer.m_gpuTime);
+ }
+ }
+
+ p->m_state = 0;
+ }
+ return false;
+}
+
+bool appGraphProfilerD3D12Get(AppGraphProfilerD3D12* p, const char** plabel, float* cpuTime, float* gpuTime, int index)
+{
+ appGraphProfilerD3D12Flush(p);
+ {
+ if (index < p->m_timerValuesSize)
+ {
+ TimerValue& timer = p->m_timerValues[index];
+
+ timer.pull(p->m_frameTime);
+
+ if (plabel) *plabel = timer.m_label;
+ if (cpuTime) *cpuTime = timer.m_cpuTime;
+ if (gpuTime) *gpuTime = timer.m_gpuTime;
+
+ return true;
+ }
+ }
+ return false;
+}
+
+size_t AppGraphCtxDedicatedVideoMemoryD3D12(AppGraphCtx* contextIn)
+{
+ auto context = cast_to_AppGraphCtxD3D12(contextIn);
+ return context->m_dedicatedVideoMemory;
+}
+
+void AppGraphCtxBeginGpuWork(AppGraphCtxD3D12* context)
+{
+ if (context->m_commandListOpenCount == 0)
+ {
+ // It's not open so open it
+ ID3D12GraphicsCommandList* commandList = context->m_commandList;
+
+ commandList->Reset(context->m_commandAllocators[context->m_frameIndex], nullptr);
+ }
+ context->m_commandListOpenCount++;
+}
+
+void AppGraphCtxEndGpuWork(AppGraphCtxD3D12* context)
+{
+ assert(context->m_commandListOpenCount);
+ ID3D12GraphicsCommandList* commandList = context->m_commandList;
+
+ NV_CORE_ASSERT_VOID_ON_FAIL(commandList->Close());
+ {
+ // Execute the command list.
+ ID3D12CommandList* commandLists[] = { commandList };
+ context->m_commandQueue->ExecuteCommandLists(_countof(commandLists), commandLists);
+ }
+
+ AppGraphCtxWaitForGPU(context);
+
+ // Dec the count. If >0 it needs to still be open
+ --context->m_commandListOpenCount;
+
+ // Reopen if needs to be open
+ if (context->m_commandListOpenCount)
+ {
+ // Reopen
+ context->m_commandList->Reset(context->m_commandAllocators[context->m_frameIndex], nullptr);
+ }
+}
+
+void AppGraphCtxPrepareRenderTarget(AppGraphCtxD3D12* context)
+{
+ D3D12_CPU_DESCRIPTOR_HANDLE rtvHandle = context->m_rtvHeap->GetCPUDescriptorHandleForHeapStart();
+ rtvHandle.ptr += context->m_renderTargetIndex * context->m_rtvDescriptorSize;
+
+ D3D12_CPU_DESCRIPTOR_HANDLE dsvHandle = context->m_dsvHeap->GetCPUDescriptorHandleForHeapStart();
+ context->m_commandList->OMSetRenderTargets(1, &rtvHandle, FALSE, &dsvHandle);
+
+ // Set necessary state.
+ context->m_commandList->RSSetViewports(1, &context->m_viewport);
+ context->m_commandList->RSSetScissorRects(1, &context->m_scissorRect);
+}
+
+void AppGraphCtxWaitForGPU(AppGraphCtxD3D12* context)
+{
+ context->m_frameID++;
+ context->m_fenceValues[context->m_frameIndex] = context->m_frameID;
+
+ context->m_commandQueue->Signal(context->m_fence, context->m_frameID);
+
+ for (int frameIndex = 0; frameIndex < context->m_frameCount; frameIndex++)
+ {
+ UINT64 fenceCompleted = context->m_fence->GetCompletedValue();
+ if (fenceCompleted < context->m_fenceValues[frameIndex])
+ {
+ context->m_fence->SetEventOnCompletion(context->m_fenceValues[frameIndex], context->m_fenceEvent);
+ WaitForSingleObjectEx(context->m_fenceEvent, INFINITE, FALSE);
+ }
+ }
+} \ No newline at end of file
diff --git a/demo/d3d12/appD3D12Ctx.h b/demo/d3d12/appD3D12Ctx.h
new file mode 100644
index 0000000..4f6ba77
--- /dev/null
+++ b/demo/d3d12/appD3D12Ctx.h
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+#ifndef APP_D3D12_CTX_H
+#define APP_D3D12_CTX_H
+
+#include "../d3d/appGraphCtx.h"
+#include "NvCoDx12Resource.h"
+#include "NvCoDx12Handle.h"
+
+struct IDXGISwapChain3;
+
+struct AppGraphProfilerD3D12;
+
+struct AppDescriptorReserveHandleD3D12
+{
+ ID3D12DescriptorHeap* heap;
+ UINT descriptorSize;
+ D3D12_CPU_DESCRIPTOR_HANDLE cpuHandle;
+ D3D12_GPU_DESCRIPTOR_HANDLE gpuHandle;
+};
+
+struct AppDynamicDescriptorHeapD3D12
+{
+ ID3D12Device* m_device = nullptr;
+ ID3D12DescriptorHeap* m_heap = nullptr;
+ UINT m_descriptorSize = 0u;
+ UINT m_startSlot = 0u;
+ UINT m_heapSize = 0u;
+
+ void init(ID3D12Device* device, D3D12_DESCRIPTOR_HEAP_TYPE heapType, UINT minHeapSize);
+ void release();
+ AppDescriptorReserveHandleD3D12 reserveDescriptors(UINT numDescriptors, UINT64 lastFenceCompleted, UINT64 nextFenceValue);
+
+ AppDynamicDescriptorHeapD3D12() {}
+ ~AppDynamicDescriptorHeapD3D12() { release(); }
+};
+
+struct AppGraphCtxD3D12
+{
+ HWND m_hWnd = nullptr;
+
+ int m_winW = 0;
+ int m_winH = 0;
+ bool m_fullscreen = false;
+ bool m_valid = false;
+
+ size_t m_dedicatedVideoMemory = 0u;
+
+ // D3D12 non-replicated objects
+ D3D12_VIEWPORT m_viewport = {};
+ D3D12_RECT m_scissorRect = {};
+ ID3D12Device* m_device = nullptr;
+ ID3D12CommandQueue* m_commandQueue = nullptr;
+
+ // D3D12 render target pipeline
+ static const UINT m_renderTargetCount = 6u;
+ UINT m_renderTargetIndex = 0u;
+ UINT64 m_renderTargetID = 0u;
+ IDXGISwapChain3* m_swapChain = nullptr;
+ HANDLE m_swapChainWaitableObject = nullptr;
+ ID3D12DescriptorHeap* m_rtvHeap = nullptr;
+ UINT m_rtvDescriptorSize = 0u;
+ nvidia::Common::Dx12Resource m_backBuffers[m_renderTargetCount];
+ nvidia::Common::Dx12Resource m_renderTargetResources[m_renderTargetCount];
+ nvidia::Common::Dx12Resource* m_renderTargets[m_renderTargetCount];
+
+ ID3D12Resource* m_depthStencil = nullptr;
+ ID3D12DescriptorHeap* m_dsvHeap = nullptr;
+ ID3D12DescriptorHeap* m_depthSrvHeap = nullptr;
+
+ // D3D12 frame pipeline objects
+ static const UINT m_frameCount = 8u;
+ UINT m_frameIndex = 0u;
+ UINT64 m_frameID = 0u;
+ ID3D12CommandAllocator* m_commandAllocators[m_frameCount];
+
+ // D3D12 synchronization objects
+ ID3D12Fence* m_fence = nullptr;
+ HANDLE m_fenceEvent = 0u;
+ UINT64 m_fenceValues[m_frameCount];
+
+ // fence values for library synchronization
+ UINT64 m_lastFenceComplete = 1u;
+ UINT64 m_thisFrameFenceID = 2u;
+
+ // D3D12 per asset objects
+ ID3D12GraphicsCommandList* m_commandList = nullptr;
+ UINT m_commandListOpenCount = 0;
+ ID3D12Resource* m_current_renderTarget = nullptr;
+ D3D12_CPU_DESCRIPTOR_HANDLE m_current_rtvHandle;
+ D3D12_RENDER_TARGET_VIEW_DESC m_current_rtvDesc;
+ D3D12_CPU_DESCRIPTOR_HANDLE m_current_dsvHandle;
+ D3D12_DEPTH_STENCIL_VIEW_DESC m_current_dsvDesc;
+ D3D12_CPU_DESCRIPTOR_HANDLE m_current_depth_srvHandle;
+ D3D12_SHADER_RESOURCE_VIEW_DESC m_current_depth_srvDesc;
+
+ DXGI_FORMAT m_rtv_format = DXGI_FORMAT_R8G8B8A8_UNORM;
+ DXGI_FORMAT m_dsv_format = DXGI_FORMAT_D32_FLOAT;
+ DXGI_FORMAT m_depth_srv_format = DXGI_FORMAT_R32_FLOAT;
+ DXGI_FORMAT m_depth_format = DXGI_FORMAT_R32_TYPELESS;
+
+ UINT m_numMsaaSamples = 1;
+
+ nvidia::Common::Dx12TargetInfo m_targetInfo;
+
+ AppDynamicDescriptorHeapD3D12 m_dynamicHeapCbvSrvUav;
+
+ AppGraphProfilerD3D12* m_profiler = nullptr;
+
+ AppGraphCtxD3D12();
+ ~AppGraphCtxD3D12();
+};
+
+inline AppGraphCtxD3D12* cast_to_AppGraphCtxD3D12(AppGraphCtx* appctx)
+{
+ return (AppGraphCtxD3D12*)(appctx);
+}
+
+inline AppGraphCtx* cast_from_AppGraphCtxD3D12(AppGraphCtxD3D12* appctx)
+{
+ return (AppGraphCtx*)(appctx);
+}
+
+APP_GRAPH_CTX_API AppGraphCtx* AppGraphCtxCreateD3D12(int deviceID);
+
+APP_GRAPH_CTX_API bool AppGraphCtxUpdateSizeD3D12(AppGraphCtx* context, SDL_Window* window, bool fullscreen, int numMSAASamples);
+
+APP_GRAPH_CTX_API void AppGraphCtxReleaseRenderTargetD3D12(AppGraphCtx* context);
+
+APP_GRAPH_CTX_API void AppGraphCtxReleaseD3D12(AppGraphCtx* context);
+
+APP_GRAPH_CTX_API void AppGraphCtxFrameStartD3D12(AppGraphCtx* context, AppGraphColor clearColor);
+
+APP_GRAPH_CTX_API void AppGraphCtxFramePresentD3D12(AppGraphCtx* context, bool fullsync);
+
+APP_GRAPH_CTX_API void AppGraphCtxWaitForFramesD3D12(AppGraphCtx* context, unsigned int maxFramesInFlight);
+
+APP_GRAPH_CTX_API void AppGraphCtxProfileEnableD3D12(AppGraphCtx* context, bool enabled);
+
+APP_GRAPH_CTX_API void AppGraphCtxProfileBeginD3D12(AppGraphCtx* context, const char* label);
+
+APP_GRAPH_CTX_API void AppGraphCtxProfileEndD3D12(AppGraphCtx* context, const char* label);
+
+APP_GRAPH_CTX_API bool AppGraphCtxProfileGetD3D12(AppGraphCtx* context, const char** plabel, float* cpuTime, float* gpuTime, int index);
+
+APP_GRAPH_CTX_API size_t AppGraphCtxDedicatedVideoMemoryD3D12(AppGraphCtx* context);
+
+APP_GRAPH_CTX_API void AppGraphCtxBeginGpuWork(AppGraphCtxD3D12* context);
+
+APP_GRAPH_CTX_API void AppGraphCtxEndGpuWork(AppGraphCtxD3D12* context);
+
+APP_GRAPH_CTX_API void AppGraphCtxPrepareRenderTarget(AppGraphCtxD3D12* context);
+
+APP_GRAPH_CTX_API void AppGraphCtxWaitForGPU(AppGraphCtxD3D12* context);
+
+/// ScopeGpuWork is used to handle gpu work that must be synchronized with the CPU.
+/// It is guaranteed when scope is released the CPU and GPU will sync. NOTE! This means
+/// you don't want to do this as part of render/update unless you have to because it will be slow.
+struct ScopeGpuWork
+{
+ inline ScopeGpuWork(AppGraphCtxD3D12* context) :
+ m_context(context)
+ {
+ AppGraphCtxBeginGpuWork(context);
+ }
+ inline ~ScopeGpuWork()
+ {
+ AppGraphCtxEndGpuWork(m_context);
+ }
+private:
+ AppGraphCtxD3D12* m_context;
+};
+#endif \ No newline at end of file
diff --git a/demo/d3d12/bufferD3D12.cpp b/demo/d3d12/bufferD3D12.cpp
new file mode 100644
index 0000000..b7954ea
--- /dev/null
+++ b/demo/d3d12/bufferD3D12.cpp
@@ -0,0 +1,118 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited. */
+
+
+#include <NvCoDx12HelperUtil.h>
+#include <external/D3D12/include/d3dx12.h>
+
+#include "bufferD3D12.h"
+
+#include <vector>
+
+namespace FlexSample {
+
+int IndexBufferD3D12::init(const RenderStateD3D12& state, int stride, ptrdiff_t numIndices, const void* sysMem)
+{
+ assert(sysMem);
+ assert(stride == 4);
+ const size_t bufferSize = stride * numIndices;
+
+ {
+ ComPtr<ID3D12Resource> resource;
+ CD3DX12_HEAP_PROPERTIES defaultHeapProps(D3D12_HEAP_TYPE_DEFAULT);
+ D3D12_RESOURCE_DESC resourceDesc(CD3DX12_RESOURCE_DESC::Buffer(bufferSize));
+ if (sysMem)
+ {
+ NV_RETURN_ON_FAIL(state.m_device->CreateCommittedResource(&defaultHeapProps, D3D12_HEAP_FLAG_NONE, &resourceDesc, D3D12_RESOURCE_STATE_COPY_DEST, nullptr,
+ IID_PPV_ARGS(&resource)));
+ NV_RETURN_ON_FAIL(state.m_scopeManager->upload(state.m_commandList, sysMem, resource.Get(), D3D12_RESOURCE_STATE_COMMON));
+ }
+ else
+ {
+ NV_RETURN_ON_FAIL(state.m_device->CreateCommittedResource(&defaultHeapProps, D3D12_HEAP_FLAG_NONE, &resourceDesc, D3D12_RESOURCE_STATE_COMMON, nullptr,
+ IID_PPV_ARGS(&resource)));
+ }
+ setResource(resource.Get(), D3D12_RESOURCE_STATE_COMMON);
+ }
+
+ memset(&m_indexBufferView, 0, sizeof(m_indexBufferView));
+ m_indexBufferView.BufferLocation = m_resource->GetGPUVirtualAddress();
+ m_indexBufferView.SizeInBytes = UINT(bufferSize);
+ m_indexBufferView.Format = DXGI_FORMAT_R32_UINT;
+ return NV_OK;
+}
+
+int VertexBufferD3D12::init(const RenderStateD3D12& state, int stride, ptrdiff_t numElements, const void* sysMem, D3D12_RESOURCE_FLAGS resourceFlags)
+{
+ if (!sysMem)
+ {
+ memset(&m_vertexBufferView, 0, sizeof(m_vertexBufferView));
+ return NV_OK;
+ }
+
+ size_t bufferSize = size_t(numElements * stride);
+
+ {
+ CD3DX12_HEAP_PROPERTIES defaultHeapProps(D3D12_HEAP_TYPE_DEFAULT);
+ D3D12_RESOURCE_DESC resourceDesc(CD3DX12_RESOURCE_DESC::Buffer(bufferSize, resourceFlags));
+ ComPtr<ID3D12Resource> resource;
+
+ if (sysMem)
+ {
+ NV_RETURN_ON_FAIL(state.m_device->CreateCommittedResource(&defaultHeapProps, D3D12_HEAP_FLAG_NONE, &resourceDesc, D3D12_RESOURCE_STATE_COPY_DEST, nullptr,
+ IID_PPV_ARGS(&resource)));
+ NV_RETURN_ON_FAIL(state.m_scopeManager->upload(state.m_commandList, sysMem, resource.Get(), D3D12_RESOURCE_STATE_COMMON));
+ }
+ else
+ {
+ NV_RETURN_ON_FAIL(state.m_device->CreateCommittedResource(&defaultHeapProps, D3D12_HEAP_FLAG_NONE, &resourceDesc, D3D12_RESOURCE_STATE_COMMON, nullptr,
+ IID_PPV_ARGS(&resource)));
+ }
+ setResource(resource.Get(), D3D12_RESOURCE_STATE_COMMON);
+ }
+
+ {
+ memset(&m_vertexBufferView, 0, sizeof(m_vertexBufferView));
+ m_vertexBufferView.BufferLocation = m_resource->GetGPUVirtualAddress();
+ m_vertexBufferView.SizeInBytes = UINT(bufferSize);
+ m_vertexBufferView.StrideInBytes = stride;
+ }
+
+ return NV_OK;
+}
+
+int VertexBufferD3D12::init(const RenderStateD3D12& state, int srcStride, int dstStride, ptrdiff_t numElements, const void* sysMem, D3D12_RESOURCE_FLAGS resourceFlags)
+{
+ if (srcStride == dstStride || sysMem == nullptr)
+ {
+ return init(state, dstStride, numElements, sysMem, resourceFlags);
+ }
+ else
+ {
+ if (srcStride == 4 * 4 && dstStride == 4 * 3)
+ {
+ std::vector<uint32_t> buf(numElements * 3);
+ uint32_t* dst = &buf.front();
+ const uint32_t* src = (const uint32_t*)sysMem;
+
+ for (ptrdiff_t i = 0; i < numElements; i++, dst += 3, src += 4)
+ {
+ dst[0] = src[0];
+ dst[1] = src[1];
+ dst[2] = src[2];
+ }
+
+ return init(state, dstStride, numElements, &buf.front(), resourceFlags);
+ }
+ }
+
+ assert(!"Unhandled conversion");
+ return NV_FAIL;
+}
+
+
+} // namespace FlexSample
diff --git a/demo/d3d12/bufferD3D12.h b/demo/d3d12/bufferD3D12.h
new file mode 100644
index 0000000..b2bd98a
--- /dev/null
+++ b/demo/d3d12/bufferD3D12.h
@@ -0,0 +1,38 @@
+#ifndef BUFFER_D3D12_H
+#define BUFFER_D3D12_H
+
+#include <NvCoDx12Resource.h>
+
+#include "renderStateD3D12.h"
+
+#define NOMINMAX
+#include <dxgi.h>
+#include <d3d12.h>
+
+namespace FlexSample {
+using namespace nvidia;
+
+struct IndexBufferD3D12: public NvCo::Dx12Resource
+{
+ int init(const RenderStateD3D12& state, int stride, ptrdiff_t numIndices, const void* sysMem);
+ /// Reset
+ void reset() { setResourceNull(); }
+
+ D3D12_INDEX_BUFFER_VIEW m_indexBufferView;
+};
+
+struct VertexBufferD3D12: public NvCo::Dx12Resource
+{
+ ///
+ int init(const RenderStateD3D12& state, int stride, ptrdiff_t numElements, const void* sysMem, D3D12_RESOURCE_FLAGS resourceFlags = D3D12_RESOURCE_FLAG_NONE);
+ int init(const RenderStateD3D12& state, int srcStride, int stride, ptrdiff_t numElements, const void* sysMem, D3D12_RESOURCE_FLAGS resourceFlags = D3D12_RESOURCE_FLAG_NONE);
+
+ /// Ctor
+ VertexBufferD3D12() {}
+
+ D3D12_VERTEX_BUFFER_VIEW m_vertexBufferView;
+};
+
+} // namespace FlexSample
+
+#endif // BUFFER_D3D12_H
diff --git a/demo/d3d12/demoContextD3D12.cpp b/demo/d3d12/demoContextD3D12.cpp
new file mode 100644
index 0000000..8a698f7
--- /dev/null
+++ b/demo/d3d12/demoContextD3D12.cpp
@@ -0,0 +1,1410 @@
+// to fix min max windows macros
+#define NOMINMAX
+
+#include "meshRendererD3D12.h"
+
+// Pipelines
+
+#include "meshRenderPipelineD3D12.h"
+#include "pointRenderPipelineD3D12.h"
+#include "fluidEllipsoidRenderPipelineD3D12.h"
+#include "fluidSmoothRenderPipelineD3D12.h"
+#include "fluidCompositeRenderPipelineD3D12.h"
+#include "diffusePointRenderPipelineD3D12.h"
+#include "lineRenderPipelineD3D12.h"
+
+#include "meshUtil.h"
+
+#include <NvCoDx12RenderTarget.h>
+
+// SDL
+#include <SDL_syswm.h>
+
+#include "d3d/shadersDemoContext.h"
+
+// Flex
+#include "core/maths.h"
+#include "core/extrude.h"
+
+#define NOMINMAX
+#include <d3d12.h>
+#include <d3dcompiler.h>
+
+#include "imguiGraphD3D12.h"
+
+#include "../d3d/loader.h"
+
+#include "demoContextD3D12.h"
+
+// include the Direct3D Library file
+#pragma comment (lib, "d3d12.lib")
+#pragma comment (lib, "DXGI.lib")
+
+using namespace DirectX;
+
+static float gSpotMin = 0.5f;
+static float gSpotMax = 1.0f;
+static float gShadowBias = 0.075f;
+static const int kShadowResolution = 2048;
+
+// Global externally
+extern Colour g_colors[];
+
+#define NV_PRINT_F_U64 "%I64u"
+
+DemoContext* CreateDemoContextD3D12()
+{
+ return new FlexSample::DemoContextD3D12;
+}
+
+namespace FlexSample {
+
+DemoContextD3D12::DemoContextD3D12()
+{
+ m_shadowMapLinearSamplerIndex = -1;
+ m_fluidPointDepthSrvIndex = -1;
+ m_currentShadowMap = nullptr;
+ m_targetShadowMap = nullptr;
+
+ m_inLineDraw = false;
+ memset(&m_meshDrawParams, 0, sizeof(m_meshDrawParams));
+
+ m_hwnd = nullptr;
+ m_window = nullptr;
+
+ // Allocate space for all debug vertices
+ m_debugLineVertices.resize(MAX_DEBUG_LINE_SIZE);
+}
+
+DemoContextD3D12::~DemoContextD3D12()
+{
+ imguiGraphDestroy();
+}
+
+bool DemoContextD3D12::initialize(const RenderInitOptions& options)
+{
+ // must always have at least one sample
+ m_msaaSamples = Max(1, options.numMsaaSamples);
+
+ {
+ // Load external modules
+ loadModules(APP_CONTEXT_D3D12);
+ }
+
+ m_appGraphCtx = AppGraphCtxCreate(0);
+ m_renderContext = cast_to_AppGraphCtxD3D12(m_appGraphCtx);
+
+ AppGraphCtxUpdateSize(m_appGraphCtx, options.window, options.fullscreen, m_msaaSamples);
+
+ using namespace NvCo;
+ // Get the hwnd
+ m_hwnd = nullptr;
+ m_window = options.window;
+ {
+ // get Windows handle to this SDL window
+ SDL_SysWMinfo winInfo;
+ SDL_VERSION(&winInfo.version);
+ if (SDL_GetWindowWMInfo(options.window, &winInfo))
+ {
+ if (winInfo.subsystem == SDL_SYSWM_WINDOWS)
+ {
+ m_hwnd = winInfo.info.win.window;
+ }
+ }
+ }
+
+ {
+ WCHAR buffer[_MAX_PATH];
+ DWORD size = GetModuleFileNameW(nullptr, buffer, _MAX_PATH);
+ if (size == 0 || size == _MAX_PATH)
+ {
+ // Method failed or path was truncated.
+ return false;
+ }
+ std::wstring path;
+ path += buffer;
+ const size_t lastSlash = path.find_last_of(L"\\");
+ if (lastSlash >= 0)
+ {
+ path.resize(lastSlash + 1);
+ }
+
+ m_executablePath.swap(path);
+ }
+
+ {
+ m_shadersPath = m_executablePath;
+ m_shadersPath += L"../../demo/d3d/shaders/";
+ }
+
+ int width, height;
+ SDL_GetWindowSize(m_window, &width, &height);
+
+ {
+ ScopeGpuWork scope(getRenderContext());
+ NV_RETURN_FALSE_ON_FAIL(_initRenderResources(options));
+
+ {
+ // create imgui, connect to app graph context
+ ImguiGraphDescD3D12 desc;
+ desc.device = m_renderContext->m_device;
+ desc.commandList = m_renderContext->m_commandList;
+ desc.lastFenceCompleted = 0;
+ desc.nextFenceValue = 1;
+ desc.winW = m_renderContext->m_winW;
+ desc.winW = m_renderContext->m_winH;
+ desc.numMSAASamples = options.numMsaaSamples;
+ desc.dynamicHeapCbvSrvUav.userdata = this;
+ desc.dynamicHeapCbvSrvUav.reserveDescriptors = NULL;
+
+ int defaultFontHeight = (options.defaultFontHeight <= 0) ? 13 : options.defaultFontHeight;
+
+ if (!imguiGraphInit("../../data/DroidSans.ttf", float(defaultFontHeight), (ImguiGraphDesc*)&desc))
+ {
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+int DemoContextD3D12::_initRenderResources(const RenderInitOptions& options)
+{
+ AppGraphCtxD3D12* renderContext = getRenderContext();
+ ID3D12Device* device = renderContext->m_device;
+
+ {
+ // https://msdn.microsoft.com/en-us/library/windows/desktop/dn859253(v=vs.85).aspx
+ // https://msdn.microsoft.com/en-us/library/windows/desktop/ff476876(v=vs.85).aspx#Overview
+ D3D12_FEATURE_DATA_D3D12_OPTIONS options;
+ device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS, &options, sizeof(options));
+ }
+
+ {
+ // Make enough space for largest _single_ dynamic buffer allocation
+ NV_RETURN_ON_FAIL(m_renderStateManager.initialize(renderContext, 16 * 1024 * 1024));
+ m_renderState = m_renderStateManager.getState();
+ }
+
+ // Create the renderer
+ {
+ std::unique_ptr<MeshRendererD3D12> renderer(new MeshRendererD3D12);
+ NV_RETURN_ON_FAIL(renderer->initialize(m_renderState));
+ m_meshRenderer = std::move(renderer);
+ }
+
+ {
+ // NOTE! Must be in this order, as compositePS expects s0, s1 = linear, shadow samplers, in that order
+ m_linearSamplerIndex = m_renderState.m_samplerDescriptorHeap->allocate();
+ m_shadowMapLinearSamplerIndex = m_renderState.m_samplerDescriptorHeap->allocate();
+
+ {
+ // linear sampler with comparator - used for shadow map sampling
+ D3D12_SAMPLER_DESC desc =
+ {
+ D3D12_FILTER_COMPARISON_MIN_MAG_MIP_POINT,
+ D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
+ D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
+ D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
+ 0.0f, 0, D3D12_COMPARISON_FUNC_LESS_EQUAL,
+ 0.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f,
+ };
+ device->CreateSampler(&desc, m_renderState.m_samplerDescriptorHeap->getCpuHandle(m_shadowMapLinearSamplerIndex));
+ }
+ {
+ // A regular linear sampler
+ D3D12_SAMPLER_DESC desc =
+ {
+ D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT,
+ D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
+ D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
+ D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
+ 0.0, 0, D3D12_COMPARISON_FUNC_NEVER,
+ 0.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f,
+ };
+ device->CreateSampler(&desc, m_renderState.m_samplerDescriptorHeap->getCpuHandle(m_linearSamplerIndex));
+ }
+ }
+
+ // Allocate the srvs used for fluid render targets
+ {
+ m_fluidPointDepthSrvIndex = m_renderState.m_srvCbvUavDescriptorHeap->allocate();
+ m_fluidCompositeSrvBaseIndex = m_renderState.m_srvCbvUavDescriptorHeap->allocate(NUM_COMPOSITE_SRVS);
+ }
+
+ // Create the shadow map
+ {
+ m_shadowMap = std::unique_ptr<NvCo::Dx12RenderTarget>(new NvCo::Dx12RenderTarget);
+
+ NvCo::Dx12RenderTarget::Desc desc;
+ desc.init(kShadowResolution, kShadowResolution);
+ desc.m_targetFormat = DXGI_FORMAT_UNKNOWN;
+ desc.m_depthStencilFormat = DXGI_FORMAT_R32_TYPELESS;
+
+ // Make a small shadow map so we can configure pipeline correctly
+ NV_RETURN_ON_FAIL(m_shadowMap->init(renderContext, desc));
+
+ m_shadowMap->setDebugName(L"ShadowMap");
+
+ if (m_shadowMap->allocateSrvView(NvCo::Dx12RenderTarget::BUFFER_DEPTH_STENCIL, device, *m_renderState.m_srvCbvUavDescriptorHeap) < 0)
+ {
+ printf("Unable to allocate shadow buffer srv index");
+
+ return NV_FAIL;
+ }
+ }
+
+ // Init fluid resources
+ NV_RETURN_ON_FAIL(_initFluidRenderTargets());
+
+ // Create pipelines
+ {
+
+ // Mesh
+ {
+ std::unique_ptr<MeshRenderPipelineD3D12> pipeline(new MeshRenderPipelineD3D12);
+ NV_RETURN_ON_FAIL(pipeline->initialize(m_renderState, m_shadersPath, FRONT_WINDING_COUNTER_CLOCKWISE, m_shadowMapLinearSamplerIndex, m_shadowMap.get(), options.asyncComputeBenchmark));
+ m_meshPipeline = std::move(pipeline);
+ }
+ // Point
+ {
+ std::unique_ptr<PointRenderPipelineD3D12> pipeline(new PointRenderPipelineD3D12);
+ NV_RETURN_ON_FAIL(pipeline->initialize(m_renderState, m_shadersPath, m_shadowMapLinearSamplerIndex, m_shadowMap.get()));
+ m_pointPipeline = std::move(pipeline);
+ }
+ // FluidPoint
+ {
+ std::unique_ptr<FluidEllipsoidRenderPipelineD3D12> pipeline(new FluidEllipsoidRenderPipelineD3D12);
+ NV_RETURN_ON_FAIL(pipeline->initialize(m_renderState, m_shadersPath, m_fluidPointRenderTarget.get()));
+ m_fluidPointPipeline = std::move(pipeline);
+ }
+ // FluidSmooth
+ {
+ std::unique_ptr<FluidSmoothRenderPipelineD3D12> pipeline(new FluidSmoothRenderPipelineD3D12(m_fluidPointDepthSrvIndex));
+ NV_RETURN_ON_FAIL(pipeline->initialize(m_renderState, m_shadersPath, m_fluidSmoothRenderTarget.get()));
+ m_fluidSmoothPipeline = std::move(pipeline);
+ }
+ // FluidComposite
+ {
+ std::unique_ptr<FluidCompositeRenderPipelineD3D12> pipeline(new FluidCompositeRenderPipelineD3D12);
+ NV_RETURN_ON_FAIL(pipeline->initialize(m_renderState, m_shadersPath));
+ m_fluidCompositePipeline = std::move(pipeline);
+ }
+ // DiffusePoint
+ {
+ std::unique_ptr<DiffusePointRenderPipelineD3D12> pipeline(new DiffusePointRenderPipelineD3D12);
+ NV_RETURN_ON_FAIL(pipeline->initialize(m_renderState, m_shadersPath, m_linearSamplerIndex, m_shadowMap.get()));
+ m_diffusePointPipeline = std::move(pipeline);
+ }
+ // Line
+ {
+ std::unique_ptr<LineRenderPipelineD3D12> pipeline(new LineRenderPipelineD3D12);
+ NV_RETURN_ON_FAIL(pipeline->initialize(m_renderState, m_shadersPath, m_shadowMap.get()));
+ m_linePipeline = std::move(pipeline);
+ }
+ }
+
+ {
+ // Create a passthru screen quad
+ uint32_t indices[] = { 0, 1, 2, 0, 2, 3 };
+ Vec3 pos[] = { { -1, -1, 0} , {1, -1, 0}, {1, 1, 0}, {-1, 1, 0} };
+ Vec2 uvs[] = { { 0, 0}, {1, 0}, {1, 1}, {0, 1} };
+
+ MeshData mesh;
+ mesh.init();
+
+ mesh.indices = indices;
+ mesh.positions = pos;
+ mesh.texcoords = uvs;
+ mesh.numFaces = _countof(indices) / 3;
+ mesh.numVertices = _countof(pos);
+
+ m_screenQuadMesh = std::unique_ptr<FlexSample::RenderMesh>(m_meshRenderer->createMesh(mesh));
+ }
+
+ // create synchronization objects
+ {
+ m_graphicsCompleteEvent = CreateEvent(nullptr, FALSE, FALSE, nullptr);
+ if (!m_graphicsCompleteEvent)
+ {
+ return E_FAIL;
+ }
+ NV_RETURN_ON_FAIL(device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&m_graphicsCompleteFence)));
+ m_graphicsCompleteFenceValue = 1;
+ }
+
+ {
+ // Query heap and results buffer
+
+ // Create timestamp query heap and results buffer
+ const int queryCount = 2;
+ D3D12_QUERY_HEAP_DESC queryHeapDesc = { D3D12_QUERY_HEAP_TYPE_TIMESTAMP, queryCount, 0 /* NodeMask */ };
+ NV_RETURN_ON_FAIL(device->CreateQueryHeap(&queryHeapDesc, IID_PPV_ARGS(&m_queryHeap)));
+
+ D3D12_HEAP_PROPERTIES heapProps =
+ {
+ D3D12_HEAP_TYPE_READBACK,
+ D3D12_CPU_PAGE_PROPERTY_UNKNOWN,
+ D3D12_MEMORY_POOL_UNKNOWN,
+ 0,
+ 0
+ };
+
+ D3D12_RESOURCE_DESC queryBufDesc =
+ {
+ D3D12_RESOURCE_DIMENSION_BUFFER,
+ 0u,
+ queryCount * sizeof(uint64_t),
+ 1u,
+ 1u,
+ 1,
+ DXGI_FORMAT_UNKNOWN,
+ { 1u, 0u },
+ D3D12_TEXTURE_LAYOUT_ROW_MAJOR,
+ D3D12_RESOURCE_FLAG_NONE
+ };
+
+ NV_RETURN_ON_FAIL(device->CreateCommittedResource(
+ &heapProps,
+ D3D12_HEAP_FLAG_NONE,
+ &queryBufDesc,
+ D3D12_RESOURCE_STATE_COPY_DEST,
+ nullptr,
+ IID_PPV_ARGS(&m_queryResults)));
+ }
+ return NV_OK;
+}
+
+int DemoContextD3D12::_initFluidRenderTargets()
+{
+ AppGraphCtxD3D12* renderContext = getRenderContext();
+ ID3D12Device* device = renderContext->m_device;
+
+ // Fluid point render target
+ {
+ {
+ std::unique_ptr<NvCo::Dx12RenderTarget> target(new NvCo::Dx12RenderTarget);
+ NvCo::Dx12RenderTarget::Desc desc;
+ desc.init(renderContext->m_winW, renderContext->m_winH, DXGI_FORMAT_R32_FLOAT, DXGI_FORMAT_R32_TYPELESS);
+ for(int i=0;i!=4;i++) desc.m_targetClearColor[i] = 0;
+
+ NV_RETURN_ON_FAIL(target->init(renderContext, desc));
+
+ target->setDebugName(L"Fluid Point");
+ m_fluidPointRenderTarget = std::move(target);
+ }
+
+ }
+
+ // Fluid smooth
+ {
+ std::unique_ptr<NvCo::Dx12RenderTarget> target(new NvCo::Dx12RenderTarget);
+ NvCo::Dx12RenderTarget::Desc desc;
+ desc.init(renderContext->m_winW, renderContext->m_winH, DXGI_FORMAT_R32_FLOAT, DXGI_FORMAT_UNKNOWN);
+ for (int i = 0; i != 4; i++) desc.m_targetClearColor[i] = 0;
+
+ NV_RETURN_ON_FAIL(target->init(renderContext, desc));
+
+ target->setDebugName(L"Fluid Smooth");
+ m_fluidSmoothRenderTarget = std::move(target);
+ }
+
+ // The resolved target for final compose
+ {
+ std::unique_ptr<NvCo::Dx12RenderTarget> target(new NvCo::Dx12RenderTarget);
+ NvCo::Dx12RenderTarget::Desc desc;
+ Vec4 clearColor = { 1, 0, 1, 1 };
+ desc.m_targetClearColor = clearColor;
+ desc.init(renderContext->m_winW, renderContext->m_winH, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_UNKNOWN);
+
+ NV_RETURN_ON_FAIL(target->init(renderContext, desc));
+
+ target->setDebugName(L"Fluid Resolved Target");
+ m_fluidResolvedTarget = std::move(target);
+ }
+
+ // Init all of the srvs!!!!
+
+ {
+ NvCo::Dx12DescriptorHeap& heap = *m_renderState.m_srvCbvUavDescriptorHeap;
+ // Set up the srv for accessing this buffer
+ {
+ m_fluidPointRenderTarget->createSrv(device, heap, NvCo::Dx12RenderTarget::BUFFER_TARGET, m_fluidPointDepthSrvIndex);
+ }
+
+ {
+ // 0 - is the depth texture m_fluidSmoothRenderTarget (target)
+ // 1 - is the 'composite' scene texture m_fluidResolvedTarget (target)
+ // 2 - shadow texture m_shadowMap (depth stencil)
+
+ m_fluidSmoothRenderTarget->createSrv(device, heap, NvCo::Dx12RenderTarget::BUFFER_TARGET, m_fluidCompositeSrvBaseIndex + 0);
+ m_fluidResolvedTarget->createSrv(device, heap, NvCo::Dx12RenderTarget::BUFFER_TARGET, m_fluidCompositeSrvBaseIndex + 1);
+ m_shadowMap->createSrv(device, heap, NvCo::Dx12RenderTarget::BUFFER_DEPTH_STENCIL, m_fluidCompositeSrvBaseIndex + 2);
+ }
+ }
+
+ return NV_OK;
+}
+
+void DemoContextD3D12::onSizeChanged(int width, int height, bool minimized)
+{
+ // Free any set render targets
+ m_fluidPointRenderTarget.reset();
+ m_fluidSmoothRenderTarget.reset();
+ m_fluidResolvedTarget.reset();
+
+ // Will need to create the render targets..
+ _initFluidRenderTargets();
+}
+
+void DemoContextD3D12::startFrame(FlexVec4 colorIn)
+{
+ AppGraphCtxD3D12* renderContext = getRenderContext();
+
+ // Work out what what can be recovered, as GPU no longer accessing
+ m_renderStateManager.updateCompleted();
+
+ AppGraphColor clearColor = { colorIn.x, colorIn.y, colorIn.z, colorIn.w };
+ AppGraphCtxFrameStart(cast_from_AppGraphCtxD3D12(renderContext), clearColor);
+
+ {
+ MeshDrawParamsD3D& params = m_meshDrawParams;
+ memset(&params, 0, sizeof(MeshDrawParamsD3D));
+ params.renderStage = MESH_DRAW_LIGHT;
+ params.renderMode = MESH_RENDER_SOLID;
+ params.cullMode = MESH_CULL_BACK;
+ params.projection = XMMatrixIdentity();
+ params.view = XMMatrixIdentity();
+ params.model = DirectX::XMMatrixMultiply(
+ DirectX::XMMatrixScaling(1.0f, 1.0f, 1.0f),
+ DirectX::XMMatrixTranslation(0.0f, 0.0f, 0.0f)
+ );
+ }
+}
+
+void DemoContextD3D12::endFrame()
+{
+ {
+ ImguiGraphDescD3D12 desc;
+ desc.device = m_renderContext->m_device;
+ desc.commandList = m_renderContext->m_commandList;
+ desc.winW = m_renderContext->m_winW;
+ desc.winH = m_renderContext->m_winH;
+
+ imguiGraphUpdate((ImguiGraphDesc*)&desc);
+ }
+
+ AppGraphCtxD3D12* renderContext = getRenderContext();
+
+ nvidia::Common::Dx12Resource& backBuffer = renderContext->m_backBuffers[renderContext->m_renderTargetIndex];
+ if (renderContext->m_numMsaaSamples > 1)
+ {
+ // MSAA resolve
+ nvidia::Common::Dx12Resource& renderTarget = *renderContext->m_renderTargets[renderContext->m_renderTargetIndex];
+ assert(&renderTarget != &backBuffer);
+ // Barriers to wait for the render target, and the backbuffer to be in correct state
+ {
+ nvidia::Common::Dx12BarrierSubmitter submitter(renderContext->m_commandList);
+ renderTarget.transition(D3D12_RESOURCE_STATE_RESOLVE_SOURCE, submitter);
+ backBuffer.transition(D3D12_RESOURCE_STATE_RESOLVE_DEST, submitter);
+ }
+ // Do the resolve...
+ renderContext->m_commandList->ResolveSubresource(backBuffer, 0, renderTarget, 0, renderContext->m_targetInfo.m_renderTargetFormats[0]);
+ }
+
+ {
+ nvidia::Common::Dx12BarrierSubmitter submitter(renderContext->m_commandList);
+ backBuffer.transition(D3D12_RESOURCE_STATE_PRESENT, submitter);
+ }
+
+ renderContext->m_commandList->Close();
+
+ // submit command list
+ ID3D12CommandList* cmdLists[] = { renderContext->m_commandList };
+ renderContext->m_commandQueue->ExecuteCommandLists(1, cmdLists);
+
+ renderContext->m_commandListOpenCount = 0;
+
+ // Inform the manager that the work has been submitted
+ m_renderStateManager.onGpuWorkSubmitted(renderContext->m_commandQueue);
+
+ HANDLE completeEvent = m_graphicsCompleteEvent;
+
+ renderContext->m_commandQueue->Signal(m_graphicsCompleteFence.Get(), m_graphicsCompleteFenceValue);
+}
+
+void DemoContextD3D12::getRenderDevice(void** device, void** context)
+{
+ *device = m_renderContext->m_device;
+ *context = m_renderContext->m_commandQueue;
+}
+
+void DemoContextD3D12::startGpuWork()
+{
+ AppGraphCtxBeginGpuWork(m_renderContext);
+}
+
+void DemoContextD3D12::endGpuWork()
+{
+ AppGraphCtxEndGpuWork(m_renderContext);
+}
+
+void DemoContextD3D12::presentFrame(bool fullsync)
+{
+ AppGraphCtxFramePresent(cast_from_AppGraphCtxD3D12(m_renderContext), fullsync);
+}
+
+void DemoContextD3D12::getViewRay(int x, int y, FlexVec3& origin, FlexVec3& dir)
+{
+ //using namespace DirectX;
+ AppGraphCtxD3D12* renderContext = getRenderContext();
+
+ int width = renderContext->m_winW;
+ int height = renderContext->m_winH;
+
+ XMVECTOR nearVector = XMVector3Unproject(XMVectorSet(float(x), float(height - y), 0.0f, 0.0f), 0.0f, 0.0f, (float)width, (float)height, 0.0f, 1.0f, (XMMATRIX)m_proj, XMMatrixIdentity(), (XMMATRIX)m_view);
+ XMVECTOR farVector = XMVector3Unproject(XMVectorSet(float(x), float(height - y), 1.0f, 0.0f), 0.0f, 0.0f, (float)width, (float)height, 0.0f, 1.0f, (XMMATRIX)m_proj, XMMatrixIdentity(), (XMMATRIX)m_view);
+
+ origin = FlexVec3(XMVectorGetX(nearVector), XMVectorGetY(nearVector), XMVectorGetZ(nearVector));
+ XMVECTOR tmp = farVector - nearVector;
+ dir = Normalize(FlexVec3(XMVectorGetX(tmp), XMVectorGetY(tmp), XMVectorGetZ(tmp)));
+}
+
+void DemoContextD3D12::setView(Matrix44 view, Matrix44 projection)
+{
+ Matrix44 vp = projection*view;
+ MeshDrawParamsD3D& params = m_meshDrawParams;
+
+ params.model = XMMatrixIdentity();
+ params.view = (XMMATRIX)view;
+ params.projection = (XMMATRIX)(RenderParamsUtilD3D::convertGLToD3DProjection(projection));
+
+ m_view = view;
+ m_proj = RenderParamsUtilD3D::convertGLToD3DProjection(projection);
+}
+
+void DemoContextD3D12::renderEllipsoids(FluidRenderer* renderer, FluidRenderBuffers* buffersIn, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, FlexVec3 lightPos, FlexVec3 lightTarget, Matrix44 lightTransform, ::ShadowMap* shadowMap, FlexVec4 color, float blur, float ior, bool debug)
+{
+ FluidRenderBuffersD3D12& buffers = *reinterpret_cast<FluidRenderBuffersD3D12*>(buffersIn);
+ if (n == 0)
+ return;
+
+ typedef PointRenderAllocationD3D12 Alloc;
+
+ Alloc alloc;
+ alloc.init(PRIMITIVE_POINT);
+
+ alloc.m_numPrimitives = buffers.m_numParticles;
+ alloc.m_numPositions = 0; ///? We don't know here yet...
+
+ alloc.m_indexBufferView = buffers.m_indicesView;
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_DENSITY] = buffers.m_densitiesView;
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_POSITION] = buffers.m_positionsView;
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_ANISOTROPY1] = buffers.m_anisotropiesViewArr[0];
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_ANISOTROPY2] = buffers.m_anisotropiesViewArr[1];
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_ANISOTROPY3] = buffers.m_anisotropiesViewArr[2];
+
+ AppGraphCtxD3D12* renderContext = getRenderContext();
+
+ FluidDrawParamsD3D params;
+
+ params.renderMode = FLUID_RENDER_SOLID;
+ params.cullMode = FLUID_CULL_BACK;
+ params.model = XMMatrixIdentity();
+ params.view = (XMMATRIX&)m_view;
+ params.projection = (XMMATRIX&)m_proj;
+
+ params.offset = offset;
+ params.n = n;
+ params.renderStage = FLUID_DRAW_LIGHT;
+
+ const float viewHeight = tanf(fov / 2.0f);
+ params.invViewport = Hlsl::float3(1.0f / screenWidth, screenAspect / screenWidth, 1.0f);
+ params.invProjection = Hlsl::float3(screenAspect * viewHeight, viewHeight, 1.0f);
+ params.debug = 0;
+
+ params.shadowMap = nullptr;
+
+ {
+ m_fluidPointRenderTarget->toWritable(renderContext);
+ m_fluidPointRenderTarget->bindAndClear(renderContext);
+
+ // Draw the ellipsoids
+ m_meshRenderer->drawTransitory(alloc, sizeof(Alloc), m_fluidPointPipeline.get(), &params);
+
+ m_fluidPointRenderTarget->toReadable(renderContext);
+ }
+
+ //---------------------------------------------------------------
+ // build smooth depth
+
+ {
+ m_fluidSmoothRenderTarget->toWritable(renderContext);
+ m_fluidSmoothRenderTarget->bind(renderContext);
+
+ params.blurRadiusWorld = radius * 0.5f;
+ params.blurScale = screenWidth / screenAspect * (1.0f / (tanf(fov * 0.5f)));
+ params.invTexScale = Hlsl::float4(1.0f / screenAspect, 1.0f, 0.0f, 0.0f);
+ params.blurFalloff = blur;
+ params.debug = debug;
+
+ m_meshRenderer->draw(m_screenQuadMesh.get(), m_fluidSmoothPipeline.get(), &params);
+
+ m_fluidSmoothRenderTarget->toReadable(renderContext);
+ }
+
+ // First lets resolve the render target
+ ID3D12GraphicsCommandList* commandList = m_renderContext->m_commandList;
+ {
+ // Lets take what's rendered so far and
+ NvCo::Dx12ResourceBase* targetResource = m_renderContext->m_renderTargets[m_renderContext->m_renderTargetIndex];
+ NvCo::Dx12ResourceBase& fluidResolvedTarget = m_fluidResolvedTarget->getResource(NvCo::Dx12RenderTarget::BUFFER_TARGET);
+
+ if (m_renderContext->m_numMsaaSamples > 1)
+ {
+ // If enabled can stop/reduce flickering issues on some GPUs related to a problem around ResolveSubresource/
+ //m_renderContext->submitGpuWork();
+
+ {
+ NvCo::Dx12BarrierSubmitter submitter(commandList);
+ targetResource->transition(D3D12_RESOURCE_STATE_RESOLVE_SOURCE, submitter);
+ fluidResolvedTarget.transition(D3D12_RESOURCE_STATE_RESOLVE_DEST, submitter);
+ }
+ // Do the resolve
+ const DXGI_FORMAT format = fluidResolvedTarget.getResource()->GetDesc().Format;
+ commandList->ResolveSubresource(fluidResolvedTarget, 0, *targetResource, 0, format);
+ {
+ NvCo::Dx12BarrierSubmitter submitter(commandList);
+ targetResource->transition(D3D12_RESOURCE_STATE_RENDER_TARGET, submitter);
+ fluidResolvedTarget.transition(D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE, submitter);
+ }
+ }
+ else
+ {
+ {
+ NvCo::Dx12BarrierSubmitter submitter(commandList);
+ targetResource->transition(D3D12_RESOURCE_STATE_COPY_SOURCE, submitter);
+ fluidResolvedTarget.transition(D3D12_RESOURCE_STATE_COPY_DEST, submitter);
+ }
+ commandList->CopyResource(fluidResolvedTarget, *targetResource);
+ }
+ }
+
+ //---------------------------------------------------------------
+ // composite
+
+ {
+ m_shadowMap->toReadable(renderContext);
+
+ AppGraphCtxPrepareRenderTarget(renderContext);
+
+ FlexVec4 aspectWork(1.0f / screenWidth, screenAspect / screenWidth, 0, 0);
+ params.invTexScale = (Hlsl::float4&)aspectWork;
+ FlexVec4 clipPosToEyeWork(tanf(fov*0.5f)*screenAspect, tanf(fov*0.5f), 0, 0);
+ params.clipPosToEye = (Hlsl::float4&)clipPosToEyeWork;
+ params.color = (Hlsl::float4&)color;
+ params.ior = ior;
+ params.spotMin = gSpotMin;
+ params.spotMax = gSpotMax;
+ params.debug = debug;
+
+ params.lightPos = (Hlsl::float3&)lightPos;
+ FlexVec3 lightDirWork = -Normalize(lightTarget - lightPos);
+ params.lightDir = (Hlsl::float3&)lightDirWork;
+ Matrix44 lightTransformWork = RenderParamsUtilD3D::convertGLToD3DProjection(lightTransform);
+ params.lightTransform = (XMMATRIX&)lightTransformWork;
+
+ params.m_srvDescriptorBase = m_fluidCompositeSrvBaseIndex;
+ params.m_sampleDescriptorBase = m_linearSamplerIndex;
+ params.shadowMap = (ShadowMapD3D*)m_currentShadowMap;
+
+ m_meshRenderer->draw(m_screenQuadMesh.get(), m_fluidCompositePipeline.get(), &params);
+ }
+}
+
+void DemoContextD3D12::updateFluidRenderBuffers(FluidRenderBuffers* buffersIn, FlexVec4* particles, float* densities, FlexVec4* anisotropy1, FlexVec4* anisotropy2, FlexVec4* anisotropy3, int numParticles, int* indices, int numIndices)
+{
+ FluidRenderBuffersD3D12& buffers = *reinterpret_cast<FluidRenderBuffersD3D12*>(buffersIn);
+
+ typedef PointRenderAllocationD3D12 Alloc;
+ Alloc alloc;
+
+ PointData pointData;
+
+ pointData.positions = (const Vec4*)particles;
+ pointData.density = densities;
+ pointData.phase = nullptr;
+ pointData.indices = (uint32_t*)indices;
+ pointData.numIndices = numIndices;
+ pointData.numPoints = numParticles;
+ pointData.anisotropy[0] = (const Vec4*)anisotropy1;
+ pointData.anisotropy[1] = (const Vec4*)anisotropy2;
+ pointData.anisotropy[2] = (const Vec4*)anisotropy3;
+
+ m_meshRenderer->allocateTransitory(pointData, alloc, sizeof(alloc));
+
+ buffers.m_positionsView = alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_POSITION];
+ buffers.m_densitiesView = alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_DENSITY];
+
+ buffers.m_anisotropiesViewArr[0] = alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_ANISOTROPY1];
+ buffers.m_anisotropiesViewArr[1] = alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_ANISOTROPY2];
+ buffers.m_anisotropiesViewArr[2] = alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_ANISOTROPY3];
+
+ buffers.m_indicesView = alloc.m_indexBufferView;
+
+ buffers.m_numParticles = numIndices;
+}
+
+void DemoContextD3D12::shadowBegin(::ShadowMap* map)
+{
+ assert(map);
+ assert(m_targetShadowMap == nullptr);
+
+ AppGraphCtxD3D12* renderContext = getRenderContext();
+ NvCo::Dx12RenderTarget* shadowMap = reinterpret_cast<NvCo::Dx12RenderTarget*>(map);
+
+ shadowMap->toWritable(renderContext);
+ shadowMap->bindAndClear(renderContext);
+
+ m_targetShadowMap = shadowMap;
+
+ m_meshDrawParams.renderStage = MESH_DRAW_SHADOW;
+}
+
+void DemoContextD3D12::shadowEnd()
+{
+ AppGraphCtxD3D12* renderContext = getRenderContext();
+ NvCo::Dx12RenderTarget* shadowMap = m_targetShadowMap;
+ shadowMap->toReadable(renderContext);
+ m_targetShadowMap = nullptr;
+
+ // Restore to regular render target
+ AppGraphCtxPrepareRenderTarget(renderContext);
+
+ m_meshDrawParams.renderStage = MESH_DRAW_NULL;
+}
+
+void DemoContextD3D12::drawMesh(const Mesh* m, FlexVec3 color)
+{
+ MeshDrawParamsD3D& params = m_meshDrawParams;
+
+ if (m)
+ {
+ MeshData meshData;
+
+ meshData.positions = (Vec3*)&m->m_positions[0];
+ meshData.normals = (Vec3*)&m->m_normals[0];
+ meshData.colors = nullptr;
+ meshData.texcoords = nullptr;
+ meshData.indices = (uint32_t*)&m->m_indices[0];
+ meshData.numFaces = m->GetNumFaces();
+ meshData.numVertices = m->GetNumVertices();
+
+ params.colorArray = 0;
+ if (m->m_colours.size())
+ {
+ params.colorArray = 1;
+ meshData.colors = (Vec4*)&m->m_colours[0];
+ }
+
+ params.color = Hlsl::float4(color.x, color.y, color.z, 1);
+ params.secondaryColor = params.color;
+ params.objectTransform = (Hlsl::float4x4&)Matrix44::kIdentity;
+ params.shadowMap = (ShadowMapD3D*)m_currentShadowMap;
+
+ m_meshRenderer->drawImmediate(meshData, m_meshPipeline.get(), &params);
+
+ if (m->m_colours.size())
+ {
+ params.colorArray = 0;
+ }
+ }
+}
+
+void DemoContextD3D12::drawCloth(const FlexVec4* positions, const FlexVec4* normals, const float* uvs, const int* indices, int numTris, int numPositions, int colorIndex, float expand, bool twosided, bool smooth)
+{
+ if (!numTris)
+ return;
+
+ MeshData2 meshData;
+
+ meshData.positions = (const Vec4*)positions;
+ meshData.normals = (const Vec4*)normals;
+ meshData.texcoords = nullptr; /* (const Vec2*)uvs; */
+ meshData.colors = nullptr;
+ meshData.numFaces = numTris;
+ meshData.indices = (const uint32_t*)indices;
+ meshData.numVertices = numPositions;
+
+ if (twosided)
+ SetCullMode(false);
+
+ MeshDrawParamsD3D& params = m_meshDrawParams;
+
+ params.bias = 0.0f;
+ params.expand = expand;
+
+ params.color = (Hlsl::float4&)(g_colors[colorIndex + 1] * 1.5f);
+ params.secondaryColor = (Hlsl::float4&)(g_colors[colorIndex] * 1.5f);
+ params.objectTransform = (Hlsl::float4x4&)Matrix44::kIdentity;
+ params.shadowMap = (ShadowMapD3D*)m_currentShadowMap;
+
+ m_meshRenderer->drawImmediate(meshData, m_meshPipeline.get(), &params);
+
+ if (twosided)
+ SetCullMode(true);
+
+ params.bias = gShadowBias;
+ params.expand = 0.0f;
+}
+
+void DemoContextD3D12::drawRope(FlexVec4* positions, int* indices, int numIndices, float radius, int color)
+{
+ if (numIndices < 2)
+ return;
+
+ std::vector<FlexVec3> vertices;
+ std::vector<FlexVec3> normals;
+ std::vector<int> triangles;
+
+ // flatten curve
+ std::vector<FlexVec3> curve(numIndices);
+ for (int i = 0; i < numIndices; ++i)
+ {
+ curve[i] = FlexVec3(positions[indices[i]]);
+ }
+
+ const int resolution = 8;
+ const int smoothing = 3;
+
+ vertices.reserve(resolution*numIndices*smoothing);
+ normals.reserve(resolution*numIndices*smoothing);
+ triangles.reserve(numIndices*resolution * 6 * smoothing);
+
+ Extrude(&curve[0], int(curve.size()), vertices, normals, triangles, radius, resolution, smoothing);
+
+ SetCullMode(false);
+
+ MeshDrawParamsD3D& params = m_meshDrawParams;
+
+ params.color = (Hlsl::float4&)(g_colors[color % 8] * 1.5f);
+ params.secondaryColor = (Hlsl::float4&)(g_colors[color % 8] * 1.5f);
+ params.shadowMap = (ShadowMapD3D*)m_currentShadowMap;
+
+ MeshData meshData;
+
+ meshData.positions = (const Vec3*)&vertices[0];
+ meshData.normals = (const Vec3*)&normals[0];
+ meshData.texcoords = nullptr;
+ meshData.colors = nullptr;
+ meshData.indices = (const uint32_t*)&triangles[0];
+ meshData.numFaces = int(triangles.size()) / 3;
+ meshData.numVertices = int(vertices.size());
+
+ m_meshRenderer->drawImmediate(meshData, m_meshPipeline.get(), &params);
+
+ SetCullMode(true);
+}
+
+void DemoContextD3D12::drawPlane(const FlexVec4& p, bool color)
+{
+ std::vector<FlexVec3> vertices;
+ std::vector<FlexVec3> normals;
+ std::vector<int> indices;
+
+ FlexVec3 u, v;
+ BasisFromVector(FlexVec3(p.x, p.y, p.z), &u, &v);
+
+ FlexVec3 c = FlexVec3(p.x, p.y, p.z)*-p.w;
+
+ MeshDrawParamsD3D& params = m_meshDrawParams;
+
+ params.shadowMap = (ShadowMapD3D*)m_currentShadowMap;
+
+ if (color)
+ params.color = (Hlsl::float4&)(p * 0.5f + FlexVec4(0.5f, 0.5f, 0.5f, 0.5f));
+
+ const float kSize = 200.0f;
+ const int kGrid = 3;
+
+ // draw a grid of quads, otherwise z precision suffers
+ for (int x = -kGrid; x <= kGrid; ++x)
+ {
+ for (int y = -kGrid; y <= kGrid; ++y)
+ {
+ FlexVec3 coff = c + u*float(x)*kSize*2.0f + v*float(y)*kSize*2.0f;
+
+ int indexStart = int(vertices.size());
+
+ vertices.push_back(FlexVec3(coff + u*kSize + v*kSize));
+ vertices.push_back(FlexVec3(coff - u*kSize + v*kSize));
+ vertices.push_back(FlexVec3(coff - u*kSize - v*kSize));
+ vertices.push_back(FlexVec3(coff + u*kSize - v*kSize));
+
+ normals.push_back(FlexVec3(p.x, p.y, p.z));
+ normals.push_back(FlexVec3(p.x, p.y, p.z));
+ normals.push_back(FlexVec3(p.x, p.y, p.z));
+ normals.push_back(FlexVec3(p.x, p.y, p.z));
+
+
+ indices.push_back(indexStart + 0);
+ indices.push_back(indexStart + 1);
+ indices.push_back(indexStart + 2);
+
+ indices.push_back(indexStart + 2);
+ indices.push_back(indexStart + 3);
+ indices.push_back(indexStart + 0);
+ }
+ }
+
+ MeshData meshData;
+ meshData.texcoords = nullptr;
+ meshData.colors = nullptr;
+ meshData.positions = (Vec3*)&vertices[0];
+ meshData.normals = (Vec3*)&normals[0];
+ meshData.indices = (uint32_t*)&indices[0];
+ meshData.numFaces = int(indices.size() / 3);
+ meshData.numVertices = int(vertices.size());
+
+ m_meshRenderer->drawImmediate(meshData, m_meshPipeline.get(), &params);
+}
+
+void DemoContextD3D12::drawPlanes(FlexVec4* planes, int n, float bias)
+{
+ MeshDrawParamsD3D& params = m_meshDrawParams;
+
+ params.color = (Hlsl::float4&)FlexVec4(0.9f, 0.9f, 0.9f, 1.0f);
+
+ params.bias = 0.0f;
+ params.grid = 1;
+ params.expand = 0;
+
+ for (int i = 0; i < n; ++i)
+ {
+ FlexVec4 p = planes[i];
+ p.w -= bias;
+
+ drawPlane(p, false);
+ }
+
+ params.grid = 0;
+ params.bias = gShadowBias;
+}
+
+void DemoContextD3D12::drawPoints(FluidRenderBuffers* buffersIn, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, FlexVec3 lightPos, FlexVec3 lightTarget, Matrix44 lightTransform, ::ShadowMap* shadowTex, bool showDensity)
+{
+ FluidRenderBuffersD3D12* buffers = reinterpret_cast<FluidRenderBuffersD3D12*>(buffersIn);
+ // Okay we can draw the particles here. The update can copy the point positions into the heap, so here we just draw them
+
+ if (n == 0)
+ return;
+
+ PointRenderAllocationD3D12 pointAlloc;
+ pointAlloc.init(PRIMITIVE_POINT);
+ pointAlloc.m_vertexBufferViews[PointRenderAllocationD3D12::VERTEX_VIEW_POSITION] = buffers->m_positionsView;
+ // It says 'color' as the parameter but actually its the 'density' parameter that is passed in here
+ pointAlloc.m_vertexBufferViews[PointRenderAllocationD3D12::VERTEX_VIEW_DENSITY] = buffers->m_densitiesView;
+ pointAlloc.m_indexBufferView = buffers->m_indicesView;
+ // TODO: JS - I don't know the amount of positions/colors... but the render call doesn't need to know. So just set to 0 for now
+ pointAlloc.m_numPositions = 0;
+ pointAlloc.m_numPrimitives = n;
+
+ PointDrawParamsD3D params;
+
+ params.renderMode = POINT_RENDER_SOLID;
+ params.cullMode = POINT_CULL_BACK;
+ params.model = XMMatrixIdentity();
+ params.view = (XMMATRIX&)m_view;
+ params.projection = (XMMATRIX&)m_proj;
+
+ params.pointRadius = radius;
+ params.pointScale = screenWidth / screenAspect * (1.0f / (tanf(fov * 0.5f)));
+ params.spotMin = gSpotMin;
+ params.spotMax = gSpotMax;
+
+ int mode = 0;
+ if (showDensity)
+ mode = 1;
+ if (shadowTex == 0)
+ mode = 2;
+ params.mode = mode;
+
+ for (int i = 0; i < 8; i++)
+ params.colors[i] = *((Hlsl::float4*)&g_colors[i].r);
+
+ // set shadow parameters
+ ShadowParamsD3D shadow;
+ RenderParamsUtilD3D::calcShadowParams(lightPos, lightTarget, lightTransform, gShadowBias, &shadow);
+ params.lightTransform = shadow.lightTransform;
+ params.lightDir = shadow.lightDir;
+ params.lightPos = shadow.lightPos;
+ memcpy(params.shadowTaps, shadow.shadowTaps, sizeof(shadow.shadowTaps));
+
+ if (m_meshDrawParams.renderStage == MESH_DRAW_SHADOW)
+ {
+ params.renderStage = POINT_DRAW_SHADOW;
+ params.mode = 2;
+ }
+ else
+ params.renderStage = POINT_DRAW_LIGHT;
+
+ params.shadowMap = (ShadowMapD3D*)m_currentShadowMap;
+
+ m_meshRenderer->drawTransitory(pointAlloc, sizeof(pointAlloc), m_pointPipeline.get(), &params);
+}
+
+void DemoContextD3D12::graphicsTimerBegin()
+{
+ ID3D12GraphicsCommandList* commandList = m_renderContext->m_commandList;
+
+ commandList->EndQuery(m_queryHeap.Get(), D3D12_QUERY_TYPE_TIMESTAMP, 0);
+}
+
+void DemoContextD3D12::graphicsTimerEnd()
+{
+ ID3D12GraphicsCommandList* commandList = m_renderContext->m_commandList;
+
+ commandList->EndQuery(m_queryHeap.Get(), D3D12_QUERY_TYPE_TIMESTAMP, 1);
+ commandList->ResolveQueryData(m_queryHeap.Get(), D3D12_QUERY_TYPE_TIMESTAMP, 0, 2, m_queryResults.Get(), 0);
+}
+
+float DemoContextD3D12::rendererGetDeviceTimestamps(unsigned long long* begin, unsigned long long* end, unsigned long long* freq)
+{
+ AppGraphCtxD3D12* renderContext = getRenderContext();
+ ID3D12CommandQueue* commandQueue = m_renderContext->m_commandQueue;
+
+ AppGraphCtxWaitForGPU(renderContext);
+
+ // Get timer frequency
+ static uint64_t frequency = 0;
+
+ if (frequency == 0)
+ {
+ commandQueue->GetTimestampFrequency(&frequency);
+ }
+
+ //Get render timestamps
+ uint64_t* times;
+ //m_queryResults->Map(0, nullptr, (void**)&times);
+ D3D12_RANGE readRange = { 0, 1 };
+ m_queryResults->Map(0, &readRange, (void**)&times);
+ uint64_t renderBegin = times[0];
+ uint64_t renderEnd = times[1];
+ D3D12_RANGE writtenRange = { 0, 0 }; // nothing was written
+ m_queryResults->Unmap(0, &writtenRange);
+
+ double renderTime = double(renderEnd - renderBegin) / double(frequency);
+
+ if (begin) *begin = renderBegin;
+ if (end) *end = renderEnd;
+ if (freq) *freq = frequency;
+
+ return float(renderTime);
+}
+
+void DemoContextD3D12::bindSolidShader(FlexVec3 lightPos, FlexVec3 lightTarget, Matrix44 lightTransform, ::ShadowMap* shadowMap, float bias, FlexVec4 fogColor)
+{
+ MeshDrawParamsD3D& params = m_meshDrawParams;
+
+ params.renderStage = MESH_DRAW_LIGHT;
+
+ params.grid = 0;
+ params.spotMin = gSpotMin;
+ params.spotMax = gSpotMax;
+ params.fogColor = (Hlsl::float4&)fogColor;
+
+ params.objectTransform = (Hlsl::float4x4&)Matrix44::kIdentity;
+
+ ShadowParamsD3D shadow;
+ RenderParamsUtilD3D::calcShadowParams(lightPos, lightTarget, lightTransform, gShadowBias, &shadow);
+ params.lightTransform = shadow.lightTransform;
+ params.lightDir = shadow.lightDir;
+ params.lightPos = shadow.lightPos;
+ params.bias = shadow.bias;
+ memcpy(params.shadowTaps, shadow.shadowTaps, sizeof(shadow.shadowTaps));
+
+ m_currentShadowMap = (NvCo::Dx12RenderTarget*)shadowMap;
+}
+
+void DemoContextD3D12::drawGpuMesh(GpuMesh* m, const Matrix44& xform, const FlexVec3& color)
+{
+ if (m)
+ {
+ MeshDrawParamsD3D params(m_meshDrawParams);
+
+ params.color = (Hlsl::float4&)color;
+ params.secondaryColor = (Hlsl::float4&)color;
+ params.objectTransform = (Hlsl::float4x4&)xform;
+ params.shadowMap = (ShadowMapD3D*)m_currentShadowMap;
+
+ RenderMesh* renderMesh = (RenderMesh*)m;
+
+ m_meshRenderer->draw(renderMesh, m_meshPipeline.get(), &params);
+ }
+}
+
+void DemoContextD3D12::drawGpuMeshInstances(GpuMesh* m, const Matrix44* xforms, int n, const FlexVec3& color)
+{
+ if (m)
+ {
+ MeshDrawParamsD3D& contextParams = m_meshDrawParams;
+
+ contextParams.color = (Hlsl::float4&)color;
+ contextParams.secondaryColor = (Hlsl::float4&)color;
+ contextParams.shadowMap = (ShadowMapD3D*)m_currentShadowMap;
+
+ // copy params
+ MeshDrawParamsD3D params(contextParams);
+
+ for (int i = 0; i < n; ++i)
+ {
+ params.objectTransform = (Hlsl::float4x4&)xforms[i];
+ RenderMesh* renderMesh = (RenderMesh*)m;
+ m_meshRenderer->draw(renderMesh, m_meshPipeline.get(), &params);
+ }
+ }
+}
+
+void DemoContextD3D12::drawDiffuse(FluidRenderer* render, const DiffuseRenderBuffers* buffersIn, int n, float radius, float screenWidth, float screenAspect, float fov, FlexVec4 color, FlexVec3 lightPos, FlexVec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowMap, float motionBlur, float inscatter, float outscatter, bool shadowEnabled, bool front)
+{
+ const DiffuseRenderBuffersD3D12& buffers = *reinterpret_cast<const DiffuseRenderBuffersD3D12*>(buffersIn);
+ if (n == 0)
+ return;
+
+ typedef PointRenderAllocationD3D12 Alloc;
+ Alloc alloc;
+ alloc.init(PRIMITIVE_POINT);
+
+ alloc.m_numPrimitives = buffers.m_numParticles;
+ alloc.m_numPositions = 0; // ! We don't know
+ alloc.m_indexBufferView = buffers.m_indicesView;
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_POSITION] = buffers.m_positionsView;
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_ANISOTROPY1] = buffers.m_velocitiesView; // Velocity stored in ANISO1
+
+ DiffuseDrawParamsD3D params;
+
+ params.model = XMMatrixIdentity();
+ params.view = (const XMMATRIX&)m_view;
+ params.projection = (const XMMATRIX&)m_proj;
+ params.diffuseRadius = screenWidth / screenAspect * (1.0f / (tanf(fov * 0.5f)));
+ params.diffuseScale = radius;
+ params.spotMin = gSpotMin;
+ params.spotMax = gSpotMax;
+ params.color = Hlsl::float4(1.0f, 1.0f, 1.0f, 1.0f);
+ params.motionScale = motionBlur;
+
+ // set shadow parameters
+ ShadowParamsD3D shadow;
+ RenderParamsUtilD3D::calcShadowParams(lightPos, lightTarget, lightTransform, gShadowBias, &shadow);
+ params.lightTransform = shadow.lightTransform;
+ params.lightDir = shadow.lightDir;
+ params.lightPos = shadow.lightPos;
+ params.shadowMap = (ShadowMapD3D*)m_currentShadowMap;
+
+ memcpy(params.shadowTaps, shadow.shadowTaps, sizeof(shadow.shadowTaps));
+
+ m_meshRenderer->drawTransitory(alloc, sizeof(alloc), m_diffusePointPipeline.get(), &params);
+}
+
+void DemoContextD3D12::beginLines()
+{
+ assert(!m_inLineDraw);
+ m_inLineDraw = true;
+ m_debugLineVertices.clear();
+}
+
+void DemoContextD3D12::drawLine(const Vec3& p, const Vec3& q, const Vec4& color)
+{
+ assert(m_inLineDraw);
+
+ if (m_debugLineVertices.size() + 2 > MAX_DEBUG_LINE_SIZE)
+ {
+ _flushDebugLines();
+ }
+
+ LineData::Vertex dst[2];
+ dst[0].position = (const Vec3&)p;
+ dst[0].color = (const Vec4&)color;
+ dst[1].position = (const Vec3&)q;
+ dst[1].color = (const Vec4&)color;
+
+ m_debugLineVertices.push_back(dst[0]);
+ m_debugLineVertices.push_back(dst[1]);
+}
+
+void DemoContextD3D12::_flushDebugLines()
+{
+ assert(m_inLineDraw);
+
+ if (m_debugLineVertices.size() > 0)
+ {
+ LineDrawParams params;
+
+ const Matrix44 modelWorldProjection = ((Matrix44&)(m_meshDrawParams.projection)) * ((Matrix44&)(m_meshDrawParams.view));
+ // draw
+ params.m_modelWorldProjection = (const Hlsl::float4x4&)modelWorldProjection;
+ params.m_drawStage = (m_targetShadowMap) ? LINE_DRAW_SHADOW : LINE_DRAW_NORMAL;
+
+ LineData lineData;
+ lineData.init();
+ lineData.vertices = &m_debugLineVertices.front();
+ lineData.numVertices = m_debugLineVertices.size();
+ lineData.numLines = lineData.numVertices / 2;
+
+ m_meshRenderer->drawImmediate(lineData, m_linePipeline.get(), &params);
+
+ m_debugLineVertices.clear();
+ }
+}
+
+void DemoContextD3D12::endLines()
+{
+ _flushDebugLines();
+ // No longer in line drawing
+ m_inLineDraw = false;
+}
+
+void DemoContextD3D12::flushGraphicsAndWait()
+{
+ AppGraphCtxWaitForGPU(getRenderContext());
+}
+
+FluidRenderer* DemoContextD3D12::createFluidRenderer(uint32_t width, uint32_t height)
+{
+ // It's always created.. so just return the context
+ return (FluidRenderer*)this;
+}
+
+void DemoContextD3D12::destroyFluidRenderer(FluidRenderer* renderer)
+{
+ /// Don't need to do anything, as will be destroyed with context
+}
+
+FluidRenderBuffers* DemoContextD3D12::createFluidRenderBuffers(int numParticles, bool enableInterop)
+{
+ return reinterpret_cast<FluidRenderBuffers*>(new FluidRenderBuffersD3D12(numParticles));
+}
+
+void DemoContextD3D12::updateFluidRenderBuffers(FluidRenderBuffers* buffers, NvFlexSolver* flex, bool anisotropy, bool density)
+{
+ printf("Not implemented");
+ assert(0);
+}
+
+void DemoContextD3D12::destroyFluidRenderBuffers(FluidRenderBuffers* buffers)
+{
+ delete reinterpret_cast<FluidRenderBuffersD3D12*>(buffers);
+}
+
+ShadowMap* DemoContextD3D12::shadowCreate()
+{
+ // Currently only allows single shadow map, which is pre created
+ return (::ShadowMap*)m_shadowMap.get();
+}
+
+void DemoContextD3D12::shadowDestroy(ShadowMap* map)
+{
+ assert(map);
+ assert(m_shadowMap.get() == (NvCo::Dx12RenderTarget*)map);
+}
+
+void DemoContextD3D12::unbindSolidShader()
+{
+ m_meshDrawParams.renderStage = MESH_DRAW_NULL;
+
+ // !!! Other code appears to assume that this will be set
+ //context->m_currentShadowMap = nullptr;
+}
+
+GpuMesh* DemoContextD3D12::createGpuMesh(const Mesh* m)
+{
+ if (m)
+ {
+ return (GpuMesh*)MeshUtil::createRenderMesh(m_meshRenderer.get(), *m);
+ }
+ return nullptr;
+}
+
+void DemoContextD3D12::destroyGpuMesh(GpuMesh* m)
+{
+ delete reinterpret_cast<RenderMesh*>(m);
+}
+
+
+DiffuseRenderBuffers* DemoContextD3D12::createDiffuseRenderBuffers(int numDiffuseParticles, bool& enableInterop)
+{
+ return reinterpret_cast<DiffuseRenderBuffers*>(new DiffuseRenderBuffersD3D12(numDiffuseParticles));
+}
+
+void DemoContextD3D12::destroyDiffuseRenderBuffers(DiffuseRenderBuffers* buffers)
+{
+ delete reinterpret_cast<DiffuseRenderBuffersD3D12*>(buffers);
+}
+
+int DemoContextD3D12::getNumDiffuseRenderParticles(DiffuseRenderBuffers* buffers)
+{
+ return reinterpret_cast<DiffuseRenderBuffersD3D12*>(buffers)->m_numParticles;
+}
+
+void DemoContextD3D12::updateDiffuseRenderBuffers(DiffuseRenderBuffers* buffersIn, Vec4* diffusePositions, Vec4* diffuseVelocities, int numDiffuseParticles)
+{
+ DiffuseRenderBuffersD3D12& buffers = *reinterpret_cast<DiffuseRenderBuffersD3D12*>(buffersIn);
+
+ typedef PointRenderAllocationD3D12 Alloc;
+
+ Alloc alloc;
+
+ PointData pointData;
+ pointData.init();
+ pointData.numIndices = numDiffuseParticles;
+ pointData.positions = (Vec4*)diffusePositions;
+ pointData.anisotropy[0] = (Vec4*)diffuseVelocities; // We'll store the velocities in the anisotropy buffer, cos it's the right size
+ pointData.numPoints = buffers.m_numParticles;
+
+ m_meshRenderer->allocateTransitory(pointData, alloc, sizeof(alloc));
+
+ buffers.m_indicesView = alloc.m_indexBufferView;
+ buffers.m_positionsView = alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_POSITION];
+ buffers.m_velocitiesView = alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_ANISOTROPY1]; // The velocity
+
+ buffers.m_numParticles = numDiffuseParticles;
+}
+
+void DemoContextD3D12::updateDiffuseRenderBuffers(DiffuseRenderBuffers* buffers, NvFlexSolver* solver)
+{
+ printf("Not implemented");
+ assert(0);
+}
+
+void* DemoContextD3D12::getGraphicsCommandQueue()
+{
+ return m_renderContext->m_commandQueue;
+}
+
+void DemoContextD3D12::setFillMode(bool wire)
+{
+ m_meshDrawParams.renderMode = wire ? MESH_RENDER_WIREFRAME : MESH_RENDER_SOLID;
+}
+
+void DemoContextD3D12::setCullMode(bool enabled)
+{
+ m_meshDrawParams.cullMode = enabled ? MESH_CULL_BACK : MESH_CULL_NONE;
+}
+
+void DemoContextD3D12::drawImguiGraph()
+{
+ imguiGraphDraw();
+ /*
+ const imguiGfxCmd* cmds = imguiGetRenderQueue();
+ int numCmds = imguiGetRenderQueueSize();
+ m_imguiGraphContext->draw(cmds, numCmds); */
+}
+
+
+} // namespace FlexSample
+
+
+
diff --git a/demo/d3d12/demoContextD3D12.h b/demo/d3d12/demoContextD3D12.h
new file mode 100644
index 0000000..5f43c31
--- /dev/null
+++ b/demo/d3d12/demoContextD3D12.h
@@ -0,0 +1,256 @@
+/*
+* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+#ifndef DEMO_CONTEXT_D3D12_H
+#define DEMO_CONTEXT_D3D12_H
+
+#include <memory>
+#include <NvCoDx12RenderTarget.h>
+
+#include "meshRenderer.h"
+#include "renderStateD3D12.h"
+#include "appD3D12Ctx.h"
+
+// SDL
+#include <SDL.h>
+#include <SDL_video.h>
+
+#include "shaders.h"
+#include "d3d/demoContext.h"
+
+#define NOMINMAX
+#include <d3d12.h>
+
+namespace FlexSample {
+
+struct FlexBuffer
+{
+ inline FlexBuffer():m_buffer(nullptr) {}
+ inline operator NvFlexBuffer* () const { return m_buffer; }
+ ~FlexBuffer() { if (m_buffer) { NvFlexUnregisterD3DBuffer(m_buffer); } }
+
+ NvFlexBuffer* m_buffer;
+};
+
+struct FluidRenderBuffersD3D12
+{
+ FluidRenderBuffersD3D12(int numParticles = 0)
+ {
+ m_numParticles = numParticles;
+ {
+ const D3D12_VERTEX_BUFFER_VIEW nullView = {};
+ m_positionsView = nullView;
+ m_densitiesView = nullView;
+ m_fluidView = nullView;
+ for (int i = 0; i < _countof(m_anisotropiesViewArr); i++)
+ {
+ m_anisotropiesViewArr[i] = nullView;
+ }
+ }
+ {
+ D3D12_INDEX_BUFFER_VIEW nullView = {};
+ m_indicesView = nullView;
+ }
+ }
+
+ int m_numParticles;
+
+ D3D12_VERTEX_BUFFER_VIEW m_positionsView;
+ D3D12_VERTEX_BUFFER_VIEW m_densitiesView;
+ D3D12_VERTEX_BUFFER_VIEW m_anisotropiesViewArr[3];
+ D3D12_INDEX_BUFFER_VIEW m_indicesView;
+
+ D3D12_VERTEX_BUFFER_VIEW m_fluidView; // to be removed
+
+ // wrapper buffers that allow Flex to write directly to VBOs
+ FlexBuffer m_positionsBuf;
+ FlexBuffer m_densitiesBuf;
+ FlexBuffer m_anisotropiesBufArr[3];
+ FlexBuffer m_indicesBuf;
+};
+
+// vertex buffers for diffuse particles
+struct DiffuseRenderBuffersD3D12
+{
+ DiffuseRenderBuffersD3D12(int numParticles = 0)
+ {
+ m_numParticles = numParticles;
+ {
+ const D3D12_VERTEX_BUFFER_VIEW nullView = {};
+ m_positionsView = nullView;
+ m_velocitiesView = nullView;
+ }
+ {
+ D3D12_INDEX_BUFFER_VIEW nullView = {};
+ m_indicesView = nullView;
+ }
+ }
+
+ int m_numParticles;
+
+ D3D12_VERTEX_BUFFER_VIEW m_positionsView;
+ D3D12_VERTEX_BUFFER_VIEW m_velocitiesView;
+ D3D12_INDEX_BUFFER_VIEW m_indicesView;
+
+ FlexBuffer m_indicesBuf;
+ FlexBuffer m_positionsBuf;
+ FlexBuffer m_velocitiesBuf;
+};
+
+struct DemoContextD3D12: public DemoContext
+{
+ //NV_CO_DECLARE_POLYMORPHIC_CLASS_BASE(DemoContextD3D12)
+public:
+ enum
+ {
+ NUM_COMPOSITE_SRVS = 3,
+ MAX_DEBUG_LINE_SIZE = 1024 * 4, // Will flush if exceeds this
+ };
+
+ // DemoContext Impl
+ virtual bool initialize(const RenderInitOptions& options) override;
+ virtual void startFrame(Vec4 colorIn) override;
+ virtual void endFrame() override;
+ virtual void presentFrame(bool fullsync) override;
+
+ virtual void getViewRay(int x, int y, Vec3& origin, Vec3& dir) override;
+ virtual void setView(Matrix44 view, Matrix44 projection) override;
+ virtual void renderEllipsoids(FluidRenderer* renderer, FluidRenderBuffers* buffers, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ::ShadowMap* shadowMap, Vec4 color, float blur, float ior, bool debug) override;
+
+ virtual void drawMesh(const Mesh* m, Vec3 color) override;
+ virtual void drawCloth(const Vec4* positions, const Vec4* normals, const float* uvs, const int* indices, int numTris, int numPositions, int colorIndex, float expand, bool twosided, bool smooth) override;
+ virtual void drawRope(Vec4* positions, int* indices, int numIndices, float radius, int color) override;
+ virtual void drawPlane(const Vec4& p, bool color) override;
+ virtual void drawPlanes(Vec4* planes, int n, float bias) override;
+ virtual void drawPoints(FluidRenderBuffers* buffers, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ::ShadowMap* shadowTex, bool showDensity) override;
+
+ virtual void graphicsTimerBegin() override;
+ virtual void graphicsTimerEnd() override;
+
+ virtual float rendererGetDeviceTimestamps(unsigned long long* begin, unsigned long long* end, unsigned long long* freq) override;
+
+ virtual void bindSolidShader(Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ::ShadowMap* shadowMap, float bias, Vec4 fogColor) override;
+ virtual void unbindSolidShader() override;
+
+ virtual ShadowMap* shadowCreate() override;
+ virtual void shadowDestroy(ShadowMap* map) override;
+ virtual void shadowBegin(ShadowMap* map) override;
+ virtual void shadowEnd() override;
+
+ virtual FluidRenderer* createFluidRenderer(uint32_t width, uint32_t height) override;
+ virtual void destroyFluidRenderer(FluidRenderer* renderer) override;
+
+ virtual FluidRenderBuffers* createFluidRenderBuffers(int numParticles, bool enableInterop) override;
+ virtual void updateFluidRenderBuffers(FluidRenderBuffers* buffers, NvFlexSolver* flex, bool anisotropy, bool density) override;
+ virtual void updateFluidRenderBuffers(FluidRenderBuffers* buffers, Vec4* particles, float* densities, Vec4* anisotropy1, Vec4* anisotropy2, Vec4* anisotropy3, int numParticles, int* indices, int numIndices) override;
+ virtual void destroyFluidRenderBuffers(FluidRenderBuffers* buffers) override;
+
+ virtual GpuMesh* createGpuMesh(const Mesh* m) override;
+ virtual void destroyGpuMesh(GpuMesh* mesh) override;
+ virtual void drawGpuMesh(GpuMesh* m, const Matrix44& xform, const Vec3& color) override;
+ virtual void drawGpuMeshInstances(GpuMesh* m, const Matrix44* xforms, int n, const Vec3& color) override;
+
+ virtual DiffuseRenderBuffers* createDiffuseRenderBuffers(int numDiffuseParticles, bool& enableInterop) override;
+ virtual void drawDiffuse(FluidRenderer* render, const DiffuseRenderBuffers* buffers, int n, float radius, float screenWidth, float screenAspect, float fov, Vec4 color, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ::ShadowMap* shadowMap, float motionBlur, float inscatter, float outscatter, bool shadowEnabled, bool front) override;
+ virtual void destroyDiffuseRenderBuffers(DiffuseRenderBuffers* buffers) override;
+ virtual void updateDiffuseRenderBuffers(DiffuseRenderBuffers* buffers, Vec4* diffusePositions, Vec4* diffuseVelocities, int numDiffuseParticles) override;
+ virtual void updateDiffuseRenderBuffers(DiffuseRenderBuffers* buffers, NvFlexSolver* solver) override;
+ virtual int getNumDiffuseRenderParticles(DiffuseRenderBuffers* buffers) override;
+
+ virtual void beginLines() override;
+ virtual void drawLine(const Vec3& p, const Vec3& q, const Vec4& color) override;
+ virtual void endLines() override;
+
+ virtual void onSizeChanged(int width, int height, bool minimized) override;
+
+ virtual void startGpuWork() override;
+ virtual void endGpuWork() override;
+ virtual void flushGraphicsAndWait() override;
+
+ virtual void setFillMode(bool wire) override;
+ virtual void setCullMode(bool enabled) override;
+
+ virtual void getRenderDevice(void** device, void** context) override;
+ virtual void drawImguiGraph() override;
+ virtual void* getGraphicsCommandQueue() override;
+
+ /// Get the render context
+ inline AppGraphCtxD3D12* getRenderContext() const { return m_renderContext; }
+
+ DemoContextD3D12();
+ ~DemoContextD3D12();
+
+ int _initRenderResources(const RenderInitOptions& options);
+ int _initFluidRenderTargets();
+
+ void _flushDebugLines();
+
+ MeshDrawParamsD3D m_meshDrawParams;
+
+ Matrix44 m_view;
+ Matrix44 m_proj;
+
+ // NOTE! These are allocated such that they are in order. This is required because on compositePS.hlsl, I need s0, and s1 to be linear, and then shadowMap samplers.
+ int m_linearSamplerIndex; ///< Index to a linear sample on the m_samplerDescriptorHeap
+ int m_shadowMapLinearSamplerIndex; ///< Index to shadow map depth comparator sampler descriptor in m_samplerDescriptorHeap
+
+ int m_fluidPointDepthSrvIndex; ///< Index into srv heap that holds srv for the m_flexMeshPipeline
+ int m_fluidCompositeSrvBaseIndex; ///< We have a set of NUM_COMPOSITE_SRVS for every back buffer there is
+
+ AppGraphCtx* m_appGraphCtx;
+ AppGraphCtxD3D12* m_renderContext;
+
+ std::unique_ptr<MeshRenderer> m_meshRenderer;
+
+ // Render pipelines
+ std::unique_ptr<RenderPipeline> m_meshPipeline;
+ std::unique_ptr<RenderPipeline> m_pointPipeline;
+ std::unique_ptr<RenderPipeline> m_fluidPointPipeline;
+ std::unique_ptr<RenderPipeline> m_fluidSmoothPipeline;
+ std::unique_ptr<RenderPipeline> m_fluidCompositePipeline;
+ std::unique_ptr<RenderPipeline> m_diffusePointPipeline;
+ std::unique_ptr<RenderPipeline> m_linePipeline;
+
+ std::unique_ptr<NvCo::Dx12RenderTarget> m_fluidPointRenderTarget;
+ std::unique_ptr<NvCo::Dx12RenderTarget> m_fluidSmoothRenderTarget;
+ std::unique_ptr<NvCo::Dx12RenderTarget> m_fluidResolvedTarget; ///< The main render target resolved, such that it can be sampled from
+
+ std::unique_ptr<RenderMesh> m_screenQuadMesh;
+
+ std::unique_ptr<NvCo::Dx12RenderTarget> m_shadowMap;
+
+ NvCo::Dx12RenderTarget* m_currentShadowMap; ///< The current read from shadow buffer
+ NvCo::Dx12RenderTarget* m_targetShadowMap; ///< The shadow map bound to render to (ie for write with Begin/EndShadow
+
+ std::wstring m_executablePath;
+ std::wstring m_shadersPath;
+
+ RenderStateManagerD3D12 m_renderStateManager;
+ RenderStateD3D12 m_renderState;
+
+ SDL_Window* m_window;
+ HWND m_hwnd;
+
+ int m_msaaSamples;
+
+ // Synchronization and timing for async compute benchmarking
+ ComPtr<ID3D12Fence> m_graphicsCompleteFence;
+ HANDLE m_graphicsCompleteEvent;
+ UINT64 m_graphicsCompleteFenceValue;
+ ComPtr<ID3D12QueryHeap> m_queryHeap;
+ ComPtr<ID3D12Resource> m_queryResults;
+
+ bool m_inLineDraw;
+ std::vector<LineData::Vertex> m_debugLineVertices;
+};
+
+} // namespace FlexSample
+
+#endif // DEMO_CONTEXT_D3D12_H \ No newline at end of file
diff --git a/demo/d3d12/diffusePointRenderPipelineD3D12.cpp b/demo/d3d12/diffusePointRenderPipelineD3D12.cpp
new file mode 100644
index 0000000..3641a36
--- /dev/null
+++ b/demo/d3d12/diffusePointRenderPipelineD3D12.cpp
@@ -0,0 +1,223 @@
+#define NOMINMAX
+
+#include <NvCoDx12HelperUtil.h>
+
+#include <external/D3D12/include/d3dx12.h>
+
+#include "pipelineUtilD3D12.h"
+#include "bufferD3D12.h"
+#include "meshRendererD3D12.h"
+#include "../d3d/shaderCommonD3D.h"
+
+// Shaders
+#include "../d3d/shaders/diffuseVS.hlsl.h"
+#include "../d3d/shaders/diffuseGS.hlsl.h"
+#include "../d3d/shaders/diffusePS.hlsl.h"
+
+// this
+#include "diffusePointRenderPipelineD3D12.h"
+
+namespace FlexSample {
+
+static const D3D12_INPUT_ELEMENT_DESC InputElementDescs[] =
+{
+ { "POSITION", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+ { "VELOCITY", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+};
+
+DiffusePointRenderPipelineD3D12::DiffusePointRenderPipelineD3D12():
+ Parent(PRIMITIVE_POINT),
+ m_shadowMapLinearSamplerIndex(-1)
+{
+}
+
+static D3D12_FILL_MODE _getFillMode(DiffusePointRenderPipelineD3D12::PipelineStateType type)
+{
+ return D3D12_FILL_MODE_SOLID;
+}
+
+static D3D12_CULL_MODE _getCullMode(DiffusePointRenderPipelineD3D12::PipelineStateType type)
+{
+ return D3D12_CULL_MODE_NONE;
+}
+
+static void _initRasterizerDesc(DiffusePointRenderPipelineD3D12::PipelineStateType type, D3D12_RASTERIZER_DESC& desc)
+{
+ PipelineUtilD3D::initRasterizerDesc(FRONT_WINDING_COUNTER_CLOCKWISE, desc);
+ desc.FillMode = _getFillMode(type);
+ desc.CullMode = _getCullMode(type);
+}
+
+static void _initPipelineStateDesc(DiffusePointRenderPipelineD3D12::PipelineStateType type, NvCo::Dx12RenderTarget* shadowMap, AppGraphCtxD3D12* renderContext, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc)
+{
+ PipelineUtilD3D::initTargetFormat(nullptr, renderContext, psoDesc);
+
+ // Z test, but don't write
+ {
+ D3D12_DEPTH_STENCIL_DESC& desc = psoDesc.DepthStencilState;
+ desc.DepthEnable = TRUE;
+ desc.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ZERO;
+ desc.DepthFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL;
+ }
+
+ psoDesc.InputLayout.NumElements = _countof(InputElementDescs);
+ psoDesc.InputLayout.pInputElementDescs = InputElementDescs;
+ psoDesc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT;
+}
+
+int DiffusePointRenderPipelineD3D12::initialize(const RenderStateD3D12& state, const std::wstring& shadersPath, int shadowMapLinearSamplerIndex, NvCo::Dx12RenderTarget* shadowMap)
+{
+ using namespace NvCo;
+ ID3D12Device* device = state.m_device;
+
+ m_shadowMapLinearSamplerIndex = shadowMapLinearSamplerIndex;
+
+ // create the pipeline state object
+ {
+ D3D12_GRAPHICS_PIPELINE_STATE_DESC psoDesc = {};
+ {
+ // create blend state
+ D3D12_BLEND_DESC& desc = psoDesc.BlendState;
+ desc.AlphaToCoverageEnable = FALSE;
+ desc.IndependentBlendEnable = FALSE;
+ {
+ const D3D12_RENDER_TARGET_BLEND_DESC defaultRenderTargetBlendDesc =
+ {
+ TRUE,FALSE,
+ D3D12_BLEND_ONE, D3D12_BLEND_INV_SRC_ALPHA, D3D12_BLEND_OP_ADD,
+ D3D12_BLEND_ONE, D3D12_BLEND_INV_SRC_ALPHA, D3D12_BLEND_OP_ADD,
+ D3D12_LOGIC_OP_NOOP,
+ D3D12_COLOR_WRITE_ENABLE_ALL,
+ };
+ for (UINT i = 0; i < D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i)
+ desc.RenderTarget[i] = defaultRenderTargetBlendDesc;
+ }
+ }
+
+
+ // create the root signature
+ ComPtr<ID3D12RootSignature> signiture;
+ {
+ CD3DX12_DESCRIPTOR_RANGE ranges[2];
+ CD3DX12_ROOT_PARAMETER params[3];
+
+ UINT rootIndex = 0;
+ {
+ D3D12_ROOT_PARAMETER& param = params[rootIndex++];
+ param.ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV;
+ param.Descriptor.ShaderRegister = 0u;
+ param.Descriptor.RegisterSpace = 0u;
+ param.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL;
+ }
+
+ D3D12_ROOT_SIGNATURE_DESC desc;
+ desc.NumParameters = rootIndex;
+ desc.pParameters = params;
+ desc.NumStaticSamplers = 0u;
+ desc.pStaticSamplers = nullptr;
+ desc.Flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT;
+
+ ComPtr<ID3DBlob> sigBlob;
+ NV_RETURN_ON_FAIL(Dx12HelperUtil::serializeRootSigniture(desc, D3D_ROOT_SIGNATURE_VERSION_1, sigBlob));
+ NV_RETURN_ON_FAIL(device->CreateRootSignature(0u, sigBlob->GetBufferPointer(), sigBlob->GetBufferSize(), IID_PPV_ARGS(&signiture)));
+ }
+
+ {
+ psoDesc.VS = Dx12Blob(g_diffuseVS);
+ psoDesc.GS = Dx12Blob(g_diffuseGS);
+ psoDesc.PS = Dx12Blob(g_diffusePS);
+
+ NV_RETURN_ON_FAIL(_initPipelineState(state, shadowMap, PIPELINE_STATE_LIGHT_SOLID, signiture.Get(), psoDesc));
+ }
+ }
+
+ return NV_OK;
+}
+
+int DiffusePointRenderPipelineD3D12::_initPipelineState(const RenderStateD3D12& state, NvCo::Dx12RenderTarget* shadowMap, PipelineStateType pipeType, ID3D12RootSignature* signiture, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc)
+{
+ ID3D12Device* device = state.m_device;
+
+ _initRasterizerDesc(pipeType, psoDesc.RasterizerState);
+ _initPipelineStateDesc(pipeType, shadowMap, state.m_renderContext, psoDesc);
+
+ psoDesc.pRootSignature = signiture;
+
+ PipelineStateD3D12& pipeState = m_states[pipeType];
+ pipeState.m_rootSignature = signiture;
+
+ NV_RETURN_ON_FAIL(device->CreateGraphicsPipelineState(&psoDesc, IID_PPV_ARGS(&pipeState.m_pipelineState)));
+ return NV_OK;
+}
+
+int DiffusePointRenderPipelineD3D12::bind(const void* paramsIn, const void* platformState)
+{
+ const RenderStateD3D12& state = *(RenderStateD3D12*)platformState;
+ const DiffuseDrawParamsD3D& params = *(DiffuseDrawParamsD3D*)paramsIn;
+
+ // Set up constant buffer
+ NvCo::Dx12CircularResourceHeap::Cursor cursor;
+ {
+ Hlsl::DiffuseShaderConst constBuf;
+ RenderParamsUtilD3D::calcDiffuseConstantBuffer(params, constBuf);
+ cursor = state.m_constantHeap->newConstantBuffer(constBuf);
+ if (!cursor.isValid())
+ {
+ return NV_FAIL;
+ }
+ }
+
+ const PipelineStateType pipeType = PIPELINE_STATE_LIGHT_SOLID;
+ PipelineStateD3D12& pipeState = m_states[pipeType];
+ if (!pipeState.isValid())
+ {
+ return NV_FAIL;
+ }
+
+ ID3D12GraphicsCommandList* commandList = state.m_commandList;
+ commandList->SetGraphicsRootSignature(pipeState.m_rootSignature.Get());
+ commandList->SetPipelineState(pipeState.m_pipelineState.Get());
+
+ D3D12_GPU_VIRTUAL_ADDRESS cbvHandle = state.m_constantHeap->getGpuHandle(cursor);
+ commandList->SetGraphicsRootConstantBufferView(0, cbvHandle);
+
+ {
+ ID3D12DescriptorHeap* heaps[] = { state.m_srvCbvUavDescriptorHeap->getHeap() };
+ commandList->SetDescriptorHeaps(_countof(heaps), heaps);
+ }
+ return NV_OK;
+}
+
+int DiffusePointRenderPipelineD3D12::draw(const RenderAllocation& allocIn, size_t sizeOfAlloc, const void* platformState)
+{
+ typedef PointRenderAllocationD3D12 Alloc;
+ const RenderStateD3D12& state = *(RenderStateD3D12*)platformState;
+
+ assert(sizeof(Alloc) == sizeOfAlloc);
+ const Alloc& alloc = static_cast<const Alloc&>(allocIn);
+
+ assert(alloc.m_numPrimitives >= 0);
+
+ ID3D12GraphicsCommandList* commandList = state.m_commandList;
+ D3D12_VERTEX_BUFFER_VIEW vertexBufferViews[] =
+ {
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_POSITION],
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_ANISOTROPY1], // Actually holds velocity
+ };
+
+ commandList->IASetVertexBuffers(0, _countof(vertexBufferViews), vertexBufferViews);
+ commandList->IASetIndexBuffer(&alloc.m_indexBufferView);
+ commandList->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_POINTLIST);
+
+ if (alloc.m_indexBufferView.SizeInBytes)
+ {
+ commandList->DrawIndexedInstanced((UINT)allocIn.m_numPrimitives, 1, 0, 0, 0);
+ }
+ else
+ {
+ commandList->DrawInstanced((UINT)allocIn.m_numPrimitives, 1, 0, 0);
+ }
+ return NV_OK;
+}
+
+} // namespace FlexSample \ No newline at end of file
diff --git a/demo/d3d12/diffusePointRenderPipelineD3D12.h b/demo/d3d12/diffusePointRenderPipelineD3D12.h
new file mode 100644
index 0000000..39f6292
--- /dev/null
+++ b/demo/d3d12/diffusePointRenderPipelineD3D12.h
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+#ifndef DIFFUSE_POINT_RENDER_PIPELINE_D3D12_H
+#define DIFFUSE_POINT_RENDER_PIPELINE_D3D12_H
+
+#include <DirectXMath.h>
+#include "../d3d/renderParamsD3D.h"
+#include "renderStateD3D12.h"
+#include "meshRenderer.h"
+
+#include <NvCoDx12RenderTarget.h>
+
+namespace FlexSample {
+using namespace nvidia;
+
+struct DiffusePointRenderPipelineD3D12: public RenderPipeline
+{
+ //NV_CO_DECLARE_POLYMORPHIC_CLASS(DiffusePointRenderPipelineD3D12, RenderPipeline);
+public:
+ typedef RenderPipeline Parent;
+
+ enum PipelineStateType
+ {
+ PIPELINE_STATE_LIGHT_SOLID,
+ PIPELINE_STATE_COUNT_OF,
+ };
+
+ DiffusePointRenderPipelineD3D12();
+
+ /// Initialize
+ int initialize(const RenderStateD3D12& state, const std::wstring& shadersDir, int shadowMapLinearSamplerIndex, NvCo::Dx12RenderTarget* shadowMap);
+ /// Do the binding
+ virtual int bind(const void* paramsIn, const void* platformState) override;
+ virtual int draw(const RenderAllocation& alloc, size_t sizeOfAlloc, const void* platformState) override;
+
+ protected:
+
+ int _initPipelineState(const RenderStateD3D12& state, NvCo::Dx12RenderTarget* shadowMap, PipelineStateType pipeType, ID3D12RootSignature* signiture, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc);
+
+ int m_shadowMapLinearSamplerIndex; //< The index to the linear sampler in the m_samplerHeap
+ PipelineStateD3D12 m_states[PIPELINE_STATE_COUNT_OF];
+};
+
+} // namespace FlexSample
+
+#endif // DIFFUSE_POINT_RENDER_PIPELINE_D3D12_H \ No newline at end of file
diff --git a/demo/d3d12/fluidCompositeRenderPipelineD3D12.cpp b/demo/d3d12/fluidCompositeRenderPipelineD3D12.cpp
new file mode 100644
index 0000000..87dafd2
--- /dev/null
+++ b/demo/d3d12/fluidCompositeRenderPipelineD3D12.cpp
@@ -0,0 +1,166 @@
+#define NOMINMAX
+
+#include <NvCoDx12HelperUtil.h>
+#include <external/D3D12/include/d3dx12.h>
+
+#include "pipelineUtilD3D12.h"
+#include "meshRenderer.h"
+#include "bufferD3D12.h"
+#include "meshRendererD3D12.h"
+#include "../d3d/shaderCommonD3D.h"
+
+// Shaders
+#include "../d3d/shaders/passThroughVS.hlsl.h"
+#include "../d3d/shaders/compositePS.hlsl.h"
+
+// this
+#include "fluidCompositeRenderPipelineD3D12.h"
+
+#define NOMINMAX
+#include <wrl.h>
+using namespace Microsoft::WRL;
+
+namespace FlexSample {
+
+FluidCompositeRenderPipelineD3D12::FluidCompositeRenderPipelineD3D12():
+ Parent(PRIMITIVE_TRIANGLE)
+{
+}
+
+static void _initPipelineStateDesc(FluidCompositeRenderPipelineD3D12::PipelineStateType type, AppGraphCtxD3D12* renderContext, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc)
+{
+ PipelineUtilD3D::initTargetFormat(nullptr, renderContext, psoDesc);
+
+ psoDesc.InputLayout.NumElements = _countof(MeshRendererD3D12::MeshInputElementDescs);
+ psoDesc.InputLayout.pInputElementDescs = MeshRendererD3D12::MeshInputElementDescs;
+ psoDesc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE;
+}
+
+int FluidCompositeRenderPipelineD3D12::initialize(const RenderStateD3D12& state, const std::wstring& shadersPath)
+{
+ using namespace NvCo;
+ ID3D12Device* device = state.m_device;
+
+ // create the pipeline state object
+ {
+ D3D12_GRAPHICS_PIPELINE_STATE_DESC psoDesc = {};
+ PipelineUtilD3D::initSolidBlendDesc(psoDesc.BlendState);
+
+ // create the root signature
+ ComPtr<ID3D12RootSignature> signiture;
+ {
+ CD3DX12_DESCRIPTOR_RANGE ranges[2];
+ CD3DX12_ROOT_PARAMETER params[10];
+
+ int rangeIndex = 0;
+ UINT rootIndex = 0;
+ {
+ D3D12_ROOT_PARAMETER& param = params[rootIndex++];
+ param.ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV;
+ param.Descriptor.ShaderRegister = 0u;
+ param.Descriptor.RegisterSpace = 0u;
+ param.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL;
+ }
+
+ // depthTex, sceneTex, shadowTex
+ const int numSrvs = 3;
+ if (numSrvs > 0)
+ {
+ ranges[0].Init(D3D12_DESCRIPTOR_RANGE_TYPE_SRV, numSrvs, 0);
+ params[rootIndex++].InitAsDescriptorTable(1, &ranges[rangeIndex], D3D12_SHADER_VISIBILITY_PIXEL);
+ rangeIndex++;
+ }
+
+ const int numSamplers = 2;
+ if (numSamplers > 1)
+ {
+ ranges[rangeIndex].Init(D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER, numSamplers, 0);
+ params[rootIndex++].InitAsDescriptorTable(1, &ranges[rangeIndex], D3D12_SHADER_VISIBILITY_PIXEL);
+ rangeIndex++;
+ }
+
+ D3D12_ROOT_SIGNATURE_DESC desc;
+ desc.NumParameters = rootIndex;
+ desc.pParameters = params;
+ desc.NumStaticSamplers = 0u;
+ desc.pStaticSamplers = nullptr;
+ desc.Flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT;
+
+ ComPtr<ID3DBlob> sigBlob;
+ NV_RETURN_ON_FAIL(Dx12HelperUtil::serializeRootSigniture(desc, D3D_ROOT_SIGNATURE_VERSION_1, sigBlob));
+ NV_RETURN_ON_FAIL(device->CreateRootSignature(0u, sigBlob->GetBufferPointer(), sigBlob->GetBufferSize(), IID_PPV_ARGS(&signiture)));
+ }
+
+ {
+ psoDesc.VS = Dx12Blob(g_passThroughVS);
+ psoDesc.PS = Dx12Blob(g_compositePS);
+
+ NV_RETURN_ON_FAIL(_initPipelineState(state, PIPELINE_STATE_NORMAL, signiture.Get(), psoDesc));
+ }
+ }
+
+ return NV_OK;
+}
+
+int FluidCompositeRenderPipelineD3D12::_initPipelineState(const RenderStateD3D12& state, PipelineStateType pipeType, ID3D12RootSignature* signiture, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc)
+{
+ ID3D12Device* device = state.m_device;
+
+ PipelineUtilD3D::initRasterizerDesc(FRONT_WINDING_CLOCKWISE, psoDesc.RasterizerState);
+ _initPipelineStateDesc(pipeType, state.m_renderContext, psoDesc);
+
+ psoDesc.pRootSignature = signiture;
+
+ PipelineStateD3D12& pipeState = m_states[pipeType];
+ pipeState.m_rootSignature = signiture;
+
+ NV_RETURN_ON_FAIL(device->CreateGraphicsPipelineState(&psoDesc, IID_PPV_ARGS(&pipeState.m_pipelineState)));
+ return NV_OK;
+}
+
+int FluidCompositeRenderPipelineD3D12::bind(const void* paramsIn, const void* platformState)
+{
+ const RenderStateD3D12& state = *(RenderStateD3D12*)platformState;
+ const FluidDrawParamsD3D& params = *(FluidDrawParamsD3D*)paramsIn;
+
+ PipelineStateD3D12& pipeState = m_states[PIPELINE_STATE_NORMAL];
+ if (!pipeState.isValid())
+ {
+ return NV_FAIL;
+ }
+
+ NvCo::Dx12CircularResourceHeap::Cursor cursor;
+ {
+ Hlsl::FluidShaderConst constBuf;
+ RenderParamsUtilD3D::calcFluidCompositeConstantBuffer(params, constBuf);
+ cursor = state.m_constantHeap->newConstantBuffer(constBuf);
+ if (!cursor.isValid())
+ {
+ return NV_FAIL;
+ }
+ }
+
+ ID3D12GraphicsCommandList* commandList = state.m_commandList;
+
+ commandList->SetGraphicsRootSignature(pipeState.m_rootSignature.Get());
+ commandList->SetPipelineState(pipeState.m_pipelineState.Get());
+
+ D3D12_GPU_VIRTUAL_ADDRESS cbvHandle = state.m_constantHeap->getGpuHandle(cursor);
+ commandList->SetGraphicsRootConstantBufferView(0, cbvHandle);
+
+ ID3D12DescriptorHeap* heaps[] = { state.m_srvCbvUavDescriptorHeap->getHeap(), state.m_samplerDescriptorHeap->getHeap() };
+ commandList->SetDescriptorHeaps(_countof(heaps), heaps);
+
+ // Bind the srvs
+ commandList->SetGraphicsRootDescriptorTable(1, state.m_srvCbvUavDescriptorHeap->getGpuHandle(params.m_srvDescriptorBase));
+ // Bind the samplers
+ commandList->SetGraphicsRootDescriptorTable(2, state.m_samplerDescriptorHeap->getGpuHandle(params.m_sampleDescriptorBase));
+ return NV_OK;
+}
+
+int FluidCompositeRenderPipelineD3D12::draw(const RenderAllocation& allocIn, size_t sizeOfAlloc, const void* platformState)
+{
+ return MeshRendererD3D12::defaultDraw(allocIn, sizeOfAlloc, platformState);
+}
+
+} // namespace FlexSample \ No newline at end of file
diff --git a/demo/d3d12/fluidCompositeRenderPipelineD3D12.h b/demo/d3d12/fluidCompositeRenderPipelineD3D12.h
new file mode 100644
index 0000000..509acea
--- /dev/null
+++ b/demo/d3d12/fluidCompositeRenderPipelineD3D12.h
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+#ifndef FLUID_COMPOSITE_RENDER_PIPELINE_D3D12_H
+#define FLUID_COMPOSITE_RENDER_PIPELINE_D3D12_H
+
+#include <DirectXMath.h>
+#include "../d3d/renderParamsD3D.h"
+#include "renderStateD3D12.h"
+#include "meshRenderer.h"
+
+#include <NvCoDx12RenderTarget.h>
+
+#include "fluidEllipsoidRenderPipelineD3D12.h"
+
+namespace FlexSample {
+
+struct FluidCompositeRenderPipelineD3D12: public RenderPipeline
+{
+ //NV_CO_DECLARE_POLYMORPHIC_CLASS(FluidCompositeRenderPipelineD3D12, RenderPipeline);
+public:
+ typedef RenderPipeline Parent;
+
+ enum PipelineStateType
+ {
+ PIPELINE_STATE_NORMAL,
+ PIPELINE_STATE_COUNT_OF,
+ };
+
+ FluidCompositeRenderPipelineD3D12();
+
+ /// Initialize
+ int initialize(const RenderStateD3D12& state, const std::wstring& shadersPath);
+ /// Do the binding
+ virtual int bind(const void* paramsIn, const void* platformState) override;
+ virtual int draw(const RenderAllocation& alloc, size_t sizeOfAlloc, const void* platformState) override;
+
+ protected:
+
+ int _initPipelineState(const RenderStateD3D12& state, PipelineStateType pipeType, ID3D12RootSignature* signiture, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc);
+
+ PipelineStateD3D12 m_states[PIPELINE_STATE_COUNT_OF];
+};
+
+} // namespace FlexSample
+
+#endif \ No newline at end of file
diff --git a/demo/d3d12/fluidEllipsoidRenderPipelineD3D12.cpp b/demo/d3d12/fluidEllipsoidRenderPipelineD3D12.cpp
new file mode 100644
index 0000000..1c7ff53
--- /dev/null
+++ b/demo/d3d12/fluidEllipsoidRenderPipelineD3D12.cpp
@@ -0,0 +1,176 @@
+#define NOMINMAX
+
+#include <NvCoDx12HelperUtil.h>
+
+#include <external/D3D12/include/d3dx12.h>
+
+#include "pipelineUtilD3D12.h"
+#include "meshRenderer.h"
+#include "bufferD3D12.h"
+#include "meshRendererD3D12.h"
+#include "../d3d/shaderCommonD3D.h"
+
+#include "../d3d/shaders/ellipsoidDepthVS.hlsl.h"
+#include "../d3d/shaders/ellipsoidDepthGS.hlsl.h"
+#include "../d3d/shaders/ellipsoidDepthPS.hlsl.h"
+
+// this
+#include "fluidEllipsoidRenderPipelineD3D12.h"
+
+namespace FlexSample {
+
+static const D3D12_INPUT_ELEMENT_DESC AnisotropicInputElementDescs[] =
+{
+ { "POSITION", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+ { "U", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+ { "V", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 2, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+ { "W", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 3, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+};
+
+FluidEllipsoidRenderPipelineD3D12::FluidEllipsoidRenderPipelineD3D12():
+ Parent(PRIMITIVE_POINT)
+{
+}
+
+static void _initPipelineStateDesc(FluidEllipsoidRenderPipelineD3D12::PipelineStateType type, NvCo::Dx12RenderTarget* renderTarget, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc)
+{
+ PipelineUtilD3D::initTargetFormat(renderTarget, nullptr, psoDesc);
+
+ psoDesc.InputLayout.NumElements = _countof(AnisotropicInputElementDescs);
+ psoDesc.InputLayout.pInputElementDescs = AnisotropicInputElementDescs;
+ psoDesc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT;
+}
+
+int FluidEllipsoidRenderPipelineD3D12::initialize(const RenderStateD3D12& state, const std::wstring& shadersPath, NvCo::Dx12RenderTarget* renderTarget)
+{
+ using namespace NvCo;
+ ID3D12Device* device = state.m_device;
+
+ // create the pipeline state object
+ {
+ D3D12_GRAPHICS_PIPELINE_STATE_DESC psoDesc = {};
+ PipelineUtilD3D::initSolidBlendDesc(psoDesc.BlendState);
+
+ // create the root signature
+ ComPtr<ID3D12RootSignature> signiture;
+ {
+ CD3DX12_DESCRIPTOR_RANGE ranges[2];
+ CD3DX12_ROOT_PARAMETER params[3];
+
+ UINT rootIndex = 0;
+ {
+ D3D12_ROOT_PARAMETER& param = params[rootIndex++];
+ param.ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV;
+ param.Descriptor.ShaderRegister = 0u;
+ param.Descriptor.RegisterSpace = 0u;
+ param.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL;
+ }
+
+ D3D12_ROOT_SIGNATURE_DESC desc;
+ desc.NumParameters = rootIndex;
+ desc.pParameters = params;
+ desc.NumStaticSamplers = 0u;
+ desc.pStaticSamplers = nullptr;
+ desc.Flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT;
+
+ ComPtr<ID3DBlob> sigBlob;
+ NV_RETURN_ON_FAIL(Dx12HelperUtil::serializeRootSigniture(desc, D3D_ROOT_SIGNATURE_VERSION_1, sigBlob));
+ NV_RETURN_ON_FAIL(device->CreateRootSignature(0u, sigBlob->GetBufferPointer(), sigBlob->GetBufferSize(), IID_PPV_ARGS(&signiture)));
+ }
+
+ {
+ psoDesc.VS = Dx12Blob(g_ellipsoidDepthVS);
+ psoDesc.GS = Dx12Blob(g_ellipsoidDepthGS);
+ psoDesc.PS = Dx12Blob(g_ellipsoidDepthPS);
+
+ NV_RETURN_ON_FAIL(_initPipelineState(state, FRONT_WINDING_COUNTER_CLOCKWISE, renderTarget, PIPELINE_NORMAL, signiture.Get(), psoDesc));
+ }
+ }
+
+ return NV_OK;
+}
+
+int FluidEllipsoidRenderPipelineD3D12::_initPipelineState(const RenderStateD3D12& state, FrontWindingType winding, NvCo::Dx12RenderTarget* renderTarget, PipelineStateType pipeType, ID3D12RootSignature* signiture, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc)
+{
+ ID3D12Device* device = state.m_device;
+
+ PipelineUtilD3D::initRasterizerDesc(winding, psoDesc.RasterizerState);
+
+ _initPipelineStateDesc(pipeType, renderTarget, psoDesc);
+
+ psoDesc.pRootSignature = signiture;
+
+ PipelineStateD3D12& pipeState = m_states[pipeType];
+ pipeState.m_rootSignature = signiture;
+
+ NV_RETURN_ON_FAIL(device->CreateGraphicsPipelineState(&psoDesc, IID_PPV_ARGS(&pipeState.m_pipelineState)));
+ return NV_OK;
+}
+
+int FluidEllipsoidRenderPipelineD3D12::bind(const void* paramsIn, const void* platformState)
+{
+ const RenderStateD3D12& state = *(RenderStateD3D12*)platformState;
+ const FluidDrawParamsD3D& params = *(FluidDrawParamsD3D*)paramsIn;
+
+ PipelineStateType pipeType = getPipelineStateType(params.renderStage, params.renderMode, params.cullMode);
+ PipelineStateD3D12& pipeState = m_states[pipeType];
+ if (!pipeState.isValid())
+ {
+ return NV_FAIL;
+ }
+
+ NvCo::Dx12CircularResourceHeap::Cursor cursor;
+ {
+ Hlsl::FluidShaderConst constBuf;
+ RenderParamsUtilD3D::calcFluidConstantBuffer(params, constBuf);
+ cursor = state.m_constantHeap->newConstantBuffer(constBuf);
+ if (!cursor.isValid())
+ {
+ return NV_FAIL;
+ }
+ }
+
+ ID3D12GraphicsCommandList* commandList = state.m_commandList;
+
+ commandList->SetGraphicsRootSignature(pipeState.m_rootSignature.Get());
+ commandList->SetPipelineState(pipeState.m_pipelineState.Get());
+
+ D3D12_GPU_VIRTUAL_ADDRESS cbvHandle = state.m_constantHeap->getGpuHandle(cursor);
+ commandList->SetGraphicsRootConstantBufferView(0, cbvHandle);
+
+ ID3D12DescriptorHeap* heaps[] = { nullptr };
+ commandList->SetDescriptorHeaps(0, heaps);
+
+ return NV_OK;
+}
+
+int FluidEllipsoidRenderPipelineD3D12::draw(const RenderAllocation& allocIn, size_t sizeOfAlloc, const void* platformState)
+{
+ typedef PointRenderAllocationD3D12 Alloc;
+ const RenderStateD3D12& state = *(RenderStateD3D12*)platformState;
+
+ assert(sizeof(Alloc) == sizeOfAlloc);
+ const Alloc& alloc = static_cast<const Alloc&>(allocIn);
+
+ assert(allocIn.m_numPrimitives >= 0);
+
+ ID3D12GraphicsCommandList* commandList = state.m_commandList;
+
+ D3D12_VERTEX_BUFFER_VIEW vertexBufferViews[4] =
+ {
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_POSITION],
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_ANISOTROPY1],
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_ANISOTROPY2],
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_ANISOTROPY3],
+ };
+
+ commandList->IASetVertexBuffers(0, _countof(vertexBufferViews), vertexBufferViews);
+ commandList->IASetIndexBuffer(&alloc.m_indexBufferView);
+
+ commandList->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_POINTLIST);
+
+ commandList->DrawIndexedInstanced((UINT)allocIn.m_numPrimitives, 1, 0, 0, 0);
+ return NV_OK;
+}
+
+} // namespace FlexSample \ No newline at end of file
diff --git a/demo/d3d12/fluidEllipsoidRenderPipelineD3D12.h b/demo/d3d12/fluidEllipsoidRenderPipelineD3D12.h
new file mode 100644
index 0000000..96d326b
--- /dev/null
+++ b/demo/d3d12/fluidEllipsoidRenderPipelineD3D12.h
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+#ifndef FLUID_ELLIPSOID_RENDER_PIPELINE_D3D12_H
+#define FLUID_ELLIPSOID_RENDER_PIPELINE_D3D12_H
+
+#include <DirectXMath.h>
+#include "RenderStateD3D12.h"
+#include "../d3d/renderParamsD3D.h"
+#include "meshRenderer.h"
+
+#include <NvCoDx12RenderTarget.h>
+
+namespace FlexHlsl {
+struct FluidShaderConst;
+} // namespace FlexHlsl
+
+namespace FlexSample {
+using namespace nvidia;
+
+struct FluidEllipsoidRenderPipelineD3D12: public RenderPipeline
+{
+ //NV_CO_DECLARE_POLYMORPHIC_CLASS(FluidEllipsoidRenderPipelineD3D12, RenderPipeline);
+public:
+ typedef RenderPipeline Parent;
+
+ enum PipelineStateType
+ {
+ PIPELINE_NORMAL,
+ PIPELINE_STATE_COUNT_OF,
+ };
+
+ FluidEllipsoidRenderPipelineD3D12();
+
+ /// Initialize
+ int initialize(const RenderStateD3D12& state, const std::wstring& shadersDir, NvCo::Dx12RenderTarget* renderTarget);
+ /// Do the binding
+ virtual int bind(const void* paramsIn, const void* platformState) override;
+ virtual int draw(const RenderAllocation& alloc, size_t sizeOfAlloc, const void* platformState) override;
+
+ /// Convert into a single pipeline state type
+ static PipelineStateType getPipelineStateType(FluidDrawStage stage, FluidRenderMode mode, FluidCullMode cull) { return PIPELINE_NORMAL; }
+
+ protected:
+
+ int _initPipelineState(const RenderStateD3D12& state, FrontWindingType winding, NvCo::Dx12RenderTarget* renderTarget, PipelineStateType pipeType, ID3D12RootSignature* signiture, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc);
+
+ PipelineStateD3D12 m_states[PIPELINE_STATE_COUNT_OF];
+};
+
+} // namespace FlexSample
+
+#endif \ No newline at end of file
diff --git a/demo/d3d12/fluidSmoothRenderPipelineD3D12.cpp b/demo/d3d12/fluidSmoothRenderPipelineD3D12.cpp
new file mode 100644
index 0000000..6d6c489
--- /dev/null
+++ b/demo/d3d12/fluidSmoothRenderPipelineD3D12.cpp
@@ -0,0 +1,158 @@
+#define NOMINMAX
+
+#include <NvCoDx12HelperUtil.h>
+#include <external/D3D12/include/d3dx12.h>
+
+#include "meshRenderer.h"
+#include "pipelineUtilD3D12.h"
+#include "bufferD3D12.h"
+#include "meshRendererD3D12.h"
+#include "../d3d/shaderCommonD3D.h"
+
+// this
+#include "fluidSmoothRenderPipelineD3D12.h"
+
+// Shaders
+#include "../d3d/shaders/passThroughVS.hlsl.h"
+#include "../d3d/shaders/blurDepthPS.hlsl.h"
+
+namespace FlexSample {
+
+FluidSmoothRenderPipelineD3D12::FluidSmoothRenderPipelineD3D12(int fluidPointDepthSrvIndex):
+ Parent(PRIMITIVE_TRIANGLE),
+ m_fluidPointDepthSrvIndex(fluidPointDepthSrvIndex)
+{
+}
+
+static void _initPipelineStateDesc(FluidSmoothRenderPipelineD3D12::PipelineStateType type, NvCo::Dx12RenderTarget* renderTarget, AppGraphCtxD3D12* renderContext, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc)
+{
+ PipelineUtilD3D::initTargetFormat(renderTarget, nullptr, psoDesc);
+
+ psoDesc.InputLayout.NumElements = _countof(MeshRendererD3D12::MeshInputElementDescs);
+ psoDesc.InputLayout.pInputElementDescs = MeshRendererD3D12::MeshInputElementDescs;
+ psoDesc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE;
+}
+
+int FluidSmoothRenderPipelineD3D12::initialize(const RenderStateD3D12& state, const std::wstring& shadersPath, NvCo::Dx12RenderTarget* renderTarget)
+{
+ using namespace NvCo;
+ ID3D12Device* device = state.m_device;
+
+ // create the pipeline state object
+ {
+ D3D12_GRAPHICS_PIPELINE_STATE_DESC psoDesc = {};
+ PipelineUtilD3D::initSolidBlendDesc(psoDesc.BlendState);
+
+ // create the root signature
+ ComPtr<ID3D12RootSignature> signiture;
+ {
+ CD3DX12_DESCRIPTOR_RANGE ranges[2];
+ CD3DX12_ROOT_PARAMETER params[3];
+
+ UINT rootIndex = 0;
+ {
+ D3D12_ROOT_PARAMETER& param = params[rootIndex++];
+ param.ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV;
+ param.Descriptor.ShaderRegister = 0u;
+ param.Descriptor.RegisterSpace = 0u;
+ param.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL;
+ }
+
+ const int numSrvs = 1;
+ if (numSrvs > 0)
+ {
+ ranges[0].Init(D3D12_DESCRIPTOR_RANGE_TYPE_SRV, numSrvs, 0);
+ params[rootIndex++].InitAsDescriptorTable(1, &ranges[0], D3D12_SHADER_VISIBILITY_PIXEL);
+ }
+ const int numSamplers = 0;
+ if (numSamplers > 0)
+ {
+ ranges[1].Init(D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER, numSamplers, 0);
+ params[rootIndex++].InitAsDescriptorTable(1, &ranges[1], D3D12_SHADER_VISIBILITY_PIXEL);
+ }
+
+ D3D12_ROOT_SIGNATURE_DESC desc;
+ desc.NumParameters = rootIndex;
+ desc.pParameters = params;
+ desc.NumStaticSamplers = 0u;
+ desc.pStaticSamplers = nullptr;
+ desc.Flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT;
+
+ ComPtr<ID3DBlob> sigBlob;
+ NV_RETURN_ON_FAIL(Dx12HelperUtil::serializeRootSigniture(desc, D3D_ROOT_SIGNATURE_VERSION_1, sigBlob));
+ NV_RETURN_ON_FAIL(device->CreateRootSignature(0u, sigBlob->GetBufferPointer(), sigBlob->GetBufferSize(), IID_PPV_ARGS(&signiture)));
+ }
+
+ {
+ psoDesc.VS = Dx12Blob(g_passThroughVS);
+ psoDesc.PS = Dx12Blob(g_blurDepthPS);
+
+ NV_RETURN_ON_FAIL(_initPipelineState(state, renderTarget, PIPELINE_STATE_NORMAL, signiture.Get(), psoDesc));
+ }
+ }
+
+ return NV_OK;
+}
+
+int FluidSmoothRenderPipelineD3D12::_initPipelineState(const RenderStateD3D12& state, NvCo::Dx12RenderTarget* renderTarget, PipelineStateType pipeType, ID3D12RootSignature* signiture, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc)
+{
+ ID3D12Device* device = state.m_device;
+
+ PipelineUtilD3D::initRasterizerDesc(FRONT_WINDING_CLOCKWISE, psoDesc.RasterizerState);
+ _initPipelineStateDesc(pipeType, renderTarget, state.m_renderContext, psoDesc);
+
+ psoDesc.pRootSignature = signiture;
+
+ PipelineStateD3D12& pipeState = m_states[pipeType];
+ pipeState.m_rootSignature = signiture;
+
+ NV_RETURN_ON_FAIL(device->CreateGraphicsPipelineState(&psoDesc, IID_PPV_ARGS(&pipeState.m_pipelineState)));
+ return NV_OK;
+}
+
+int FluidSmoothRenderPipelineD3D12::bind(const void* paramsIn, const void* platformState)
+{
+ const RenderStateD3D12& state = *(RenderStateD3D12*)platformState;
+ const FluidDrawParamsD3D& params = *(FluidDrawParamsD3D*)paramsIn;
+
+ PipelineStateD3D12& pipeState = m_states[PIPELINE_STATE_NORMAL];
+ if (!pipeState.isValid())
+ {
+ return NV_FAIL;
+ }
+
+ NvCo::Dx12CircularResourceHeap::Cursor cursor;
+ {
+ Hlsl::FluidShaderConst constBuf;
+ RenderParamsUtilD3D::calcFluidConstantBuffer(params, constBuf);
+ cursor = state.m_constantHeap->newConstantBuffer(constBuf);
+ if (!cursor.isValid())
+ {
+ return NV_FAIL;
+ }
+ }
+
+ ID3D12GraphicsCommandList* commandList = state.m_commandList;
+
+ commandList->SetGraphicsRootSignature(pipeState.m_rootSignature.Get());
+ commandList->SetPipelineState(pipeState.m_pipelineState.Get());
+
+ D3D12_GPU_VIRTUAL_ADDRESS cbvHandle = state.m_constantHeap->getGpuHandle(cursor);
+ commandList->SetGraphicsRootConstantBufferView(0, cbvHandle);
+
+ NvCo::Dx12RenderTarget* sourceMap = (NvCo::Dx12RenderTarget*)params.shadowMap;
+
+ ID3D12DescriptorHeap* heaps[] = { state.m_srvCbvUavDescriptorHeap->getHeap(), state.m_samplerDescriptorHeap->getHeap() };
+ commandList->SetDescriptorHeaps(_countof(heaps), heaps);
+
+ // Bind the srvs
+ commandList->SetGraphicsRootDescriptorTable(1, state.m_srvCbvUavDescriptorHeap->getGpuHandle(m_fluidPointDepthSrvIndex));
+ return NV_OK;
+}
+
+int FluidSmoothRenderPipelineD3D12::draw(const RenderAllocation& allocIn, size_t sizeOfAlloc, const void* platformState)
+{
+ return MeshRendererD3D12::defaultDraw(allocIn, sizeOfAlloc, platformState);
+}
+
+} // namespace FlexSample \ No newline at end of file
diff --git a/demo/d3d12/fluidSmoothRenderPipelineD3D12.h b/demo/d3d12/fluidSmoothRenderPipelineD3D12.h
new file mode 100644
index 0000000..fc08981
--- /dev/null
+++ b/demo/d3d12/fluidSmoothRenderPipelineD3D12.h
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+#ifndef FLUID_SMOOTH_RENDER_PIPELINE_D3D12_H
+#define FLUID_SMOOTH_RENDER_PIPELINE_D3D12_H
+
+#include <DirectXMath.h>
+#include "RenderStateD3D12.h"
+#include "MeshRenderer.h"
+
+#include <NvCoDx12RenderTarget.h>
+
+#include "FluidEllipsoidRenderPipelineD3D12.h"
+
+namespace FlexSample {
+
+struct FluidSmoothRenderPipelineD3D12: public RenderPipeline
+{
+ //NV_CO_DECLARE_POLYMORPHIC_CLASS(FluidSmoothRenderPipelineD3D12, RenderPipeline);
+public:
+ typedef RenderPipeline Parent;
+
+ enum PipelineStateType
+ {
+ PIPELINE_STATE_NORMAL,
+ PIPELINE_STATE_COUNT_OF,
+ };
+
+ FluidSmoothRenderPipelineD3D12(int fluidPointDepthSrvIndex);
+
+ /// Initialize
+ int initialize(const RenderStateD3D12& state, const std::wstring& shadersPath, NvCo::Dx12RenderTarget* renderTarget);
+ /// Do the binding
+ virtual int bind(const void* paramsIn, const void* platformState) override;
+ virtual int draw(const RenderAllocation& alloc, size_t sizeOfAlloc, const void* platformState) override;
+
+ protected:
+
+ int _initPipelineState(const RenderStateD3D12& state, NvCo::Dx12RenderTarget* renderTarget, PipelineStateType pipeType, ID3D12RootSignature* signiture, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc);
+
+ PipelineStateD3D12 m_states[PIPELINE_STATE_COUNT_OF];
+
+ int m_fluidPointDepthSrvIndex;
+};
+
+} // namespace FlexSample
+
+#endif \ No newline at end of file
diff --git a/demo/d3d12/imguiGraphD3D12.cpp b/demo/d3d12/imguiGraphD3D12.cpp
new file mode 100644
index 0000000..64c507d
--- /dev/null
+++ b/demo/d3d12/imguiGraphD3D12.cpp
@@ -0,0 +1,667 @@
+/*
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+//direct3d headers
+#define NOMINMAX
+#include <d3d12.h>
+
+#include "imguiGraphD3D12.h"
+
+#include "../d3d/shaders/imguiVS.hlsl.h"
+#include "../d3d/shaders/imguiPS.hlsl.h"
+
+namespace
+{
+ template <class T>
+ void inline COMRelease(T& t)
+ {
+ if (t) t->Release();
+ t = nullptr;
+ }
+}
+
+namespace
+{
+ ImguiGraphDescD3D12 m_desc = {};
+
+ struct Vertex
+ {
+ float x, y;
+ float u, v;
+ uint8_t rgba[4];
+ };
+
+ ID3D12RootSignature* m_rootSignature = nullptr;
+ ID3D12PipelineState* m_pipelineState = nullptr;
+ ID3D12Resource* m_constantBuffer = nullptr;
+ UINT8* m_constantBufferData = nullptr;
+ ID3D12Resource* m_vertexBuffer = nullptr;
+ Vertex* m_vertexBufferData = nullptr;
+ D3D12_VERTEX_BUFFER_VIEW m_vertexBufferView = {};
+
+ struct Scissor
+ {
+ int beginIdx;
+ int stopIdx;
+ int x;
+ int y;
+ int width;
+ int height;
+ };
+ Scissor m_stateScissor = {};
+
+ ID3D12Resource* m_textureUploadHeap = nullptr;
+ ID3D12Resource* m_texture = nullptr;
+
+ ID3D12DescriptorHeap* m_srvUavHeapCPU = nullptr;
+ ID3D12DescriptorHeap* m_srvUavHeapGPU = nullptr;
+
+ Vertex m_stateVert;
+ uint32_t m_stateVertIdx = 0u;
+
+ struct Params
+ {
+ float projection[16];
+
+ float padding[64 - 16];
+ };
+ static const int frameCount = 4;
+ int frameIndex = 0;
+}
+
+void imguiGraphContextInitD3D12(const ImguiGraphDesc* descIn)
+{
+ const auto desc = cast_to_imguiGraphDescD3D12(descIn);
+
+ m_desc = *desc;
+
+ // create the root signature
+ {
+ D3D12_DESCRIPTOR_RANGE ranges[1];
+ ranges[0].RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
+ ranges[0].NumDescriptors = 1u;
+ ranges[0].BaseShaderRegister = 0u;
+ ranges[0].RegisterSpace = 0u;
+ ranges[0].OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
+
+ D3D12_ROOT_PARAMETER params[2];
+ params[0].ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV;
+ params[0].Descriptor.ShaderRegister = 0u;
+ params[0].Descriptor.RegisterSpace = 0u;
+ params[0].ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL;
+ params[1].ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
+ params[1].DescriptorTable.NumDescriptorRanges = 1;
+ params[1].DescriptorTable.pDescriptorRanges = ranges;
+ params[1].ShaderVisibility = D3D12_SHADER_VISIBILITY_PIXEL;
+
+ D3D12_STATIC_SAMPLER_DESC sampler = {};
+ sampler.Filter = D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT;
+ sampler.AddressU = D3D12_TEXTURE_ADDRESS_MODE_BORDER;
+ sampler.AddressV = D3D12_TEXTURE_ADDRESS_MODE_BORDER;
+ sampler.AddressW = D3D12_TEXTURE_ADDRESS_MODE_BORDER;
+ sampler.MipLODBias = 0;
+ sampler.MaxAnisotropy = 0;
+ sampler.ComparisonFunc = D3D12_COMPARISON_FUNC_NEVER;
+ sampler.BorderColor = D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK;
+ sampler.MinLOD = 0.f;
+ sampler.MaxLOD = D3D12_FLOAT32_MAX;
+ sampler.ShaderRegister = 0;
+ sampler.RegisterSpace = 0;
+ sampler.ShaderVisibility = D3D12_SHADER_VISIBILITY_PIXEL;
+
+ D3D12_ROOT_SIGNATURE_DESC desc;
+ desc.NumParameters = 2;
+ desc.pParameters = params;
+ desc.NumStaticSamplers = 1u;
+ desc.pStaticSamplers = &sampler;
+ desc.Flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT;
+
+ ID3DBlob* signature = nullptr;
+ ID3DBlob* error = nullptr;
+ HRESULT hr = S_OK;
+ if (hr = D3D12SerializeRootSignature(&desc, D3D_ROOT_SIGNATURE_VERSION_1, &signature, &error))
+ {
+ return;
+ }
+ if (hr = m_desc.device->CreateRootSignature(0u, signature->GetBufferPointer(), signature->GetBufferSize(), IID_PPV_ARGS(&m_rootSignature)))
+ {
+ return;
+ }
+ COMRelease(signature);
+ COMRelease(error);
+ }
+
+ // create the pipeline state object
+ {
+ D3D12_INPUT_ELEMENT_DESC inputElementDescs[] =
+ {
+ { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+ { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, D3D12_APPEND_ALIGNED_ELEMENT, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+ { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, D3D12_APPEND_ALIGNED_ELEMENT, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+ };
+
+ const bool wireFrame = false;
+
+ D3D12_RASTERIZER_DESC rasterDesc;
+ if (wireFrame)
+ {
+ rasterDesc.FillMode = D3D12_FILL_MODE_WIREFRAME;
+ rasterDesc.CullMode = D3D12_CULL_MODE_NONE;
+ }
+ else
+ {
+ rasterDesc.FillMode = D3D12_FILL_MODE_SOLID;
+ rasterDesc.CullMode = D3D12_CULL_MODE_BACK;
+ }
+ rasterDesc.FrontCounterClockwise = TRUE; // FALSE;
+ rasterDesc.DepthBias = D3D12_DEFAULT_DEPTH_BIAS;
+ rasterDesc.DepthBiasClamp = D3D12_DEFAULT_DEPTH_BIAS_CLAMP;
+ rasterDesc.SlopeScaledDepthBias = D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS;
+ rasterDesc.DepthClipEnable = TRUE;
+ rasterDesc.MultisampleEnable = FALSE;
+ rasterDesc.AntialiasedLineEnable = FALSE;
+ rasterDesc.ForcedSampleCount = 0;
+ rasterDesc.ConservativeRaster = D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF;
+
+ D3D12_BLEND_DESC blendDesc;
+ blendDesc.AlphaToCoverageEnable = FALSE;
+ blendDesc.IndependentBlendEnable = FALSE;
+ {
+ const D3D12_RENDER_TARGET_BLEND_DESC defaultRenderTargetBlendDesc =
+ {
+ TRUE,FALSE,
+ D3D12_BLEND_SRC_ALPHA, D3D12_BLEND_INV_SRC_ALPHA, D3D12_BLEND_OP_ADD,
+ D3D12_BLEND_SRC_ALPHA, D3D12_BLEND_INV_SRC_ALPHA, D3D12_BLEND_OP_ADD,
+ D3D12_LOGIC_OP_NOOP,
+ D3D12_COLOR_WRITE_ENABLE_ALL,
+ };
+ for (UINT i = 0; i < D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i)
+ blendDesc.RenderTarget[i] = defaultRenderTargetBlendDesc;
+ }
+
+ D3D12_GRAPHICS_PIPELINE_STATE_DESC psoDesc = {};
+ psoDesc.InputLayout.NumElements = 3;
+ psoDesc.InputLayout.pInputElementDescs = inputElementDescs;
+ psoDesc.pRootSignature = m_rootSignature;
+ psoDesc.VS.pShaderBytecode = g_imguiVS;
+ psoDesc.VS.BytecodeLength = sizeof(g_imguiVS);
+ psoDesc.PS.pShaderBytecode = g_imguiPS;
+ psoDesc.PS.BytecodeLength = sizeof(g_imguiPS);
+ psoDesc.RasterizerState = rasterDesc;
+ psoDesc.BlendState = blendDesc;
+ psoDesc.DepthStencilState.DepthEnable = FALSE;
+ psoDesc.DepthStencilState.StencilEnable = FALSE;
+ psoDesc.SampleMask = UINT_MAX;
+ psoDesc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE;
+ psoDesc.NumRenderTargets = 1;
+ psoDesc.RTVFormats[0] = DXGI_FORMAT_R8G8B8A8_UNORM;
+ psoDesc.SampleDesc.Count = desc->numMSAASamples;
+ HRESULT hr = S_OK;
+ if (hr = m_desc.device->CreateGraphicsPipelineState(&psoDesc, IID_PPV_ARGS(&m_pipelineState)))
+ {
+ return;
+ }
+ }
+
+ // create a constant buffer
+ {
+ Params params = {
+ 1.f, 0.f, 0.f, 0.f,
+ 0.f, 1.f, 0.f, 0.f,
+ 0.f, 0.f, 1.f, 0.f,
+ 0.f, 0.f, 0.f, 1.f
+ };
+
+ HRESULT hr = S_OK;
+
+ D3D12_HEAP_PROPERTIES heapProps = {};
+ heapProps.Type = D3D12_HEAP_TYPE_UPLOAD;
+ heapProps.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
+ heapProps.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
+ heapProps.CreationNodeMask = 0u;
+ heapProps.VisibleNodeMask = 0u;
+
+ D3D12_RESOURCE_DESC desc = {};
+ desc.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
+ desc.Alignment = 0u;
+ desc.Width = frameCount*sizeof(params);
+ desc.Height = 1u;
+ desc.DepthOrArraySize = 1u;
+ desc.MipLevels = 1;
+ desc.Format = DXGI_FORMAT_UNKNOWN;
+ desc.SampleDesc.Count = 1u;
+ desc.SampleDesc.Quality = 0u;
+ desc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
+ desc.Flags = D3D12_RESOURCE_FLAG_NONE;
+
+ if (hr = m_desc.device->CreateCommittedResource(&heapProps, D3D12_HEAP_FLAG_NONE, &desc, D3D12_RESOURCE_STATE_GENERIC_READ,
+ nullptr, IID_PPV_ARGS(&m_constantBuffer)))
+ {
+ return;
+ }
+
+ UINT8* pdata;
+ D3D12_RANGE readRange = {};
+ if (hr = m_constantBuffer->Map(0, &readRange, (void**)&pdata))
+ {
+ return;
+ }
+ else
+ {
+ memcpy(pdata, &params, sizeof(params));
+ m_constantBufferData = pdata;
+ //m_constantBuffer->Unmap(0, nullptr); // leave mapped
+ }
+ }
+
+ // create a vertex buffer
+ {
+ HRESULT hr = S_OK;
+
+ UINT bufferSize = (UINT)(m_desc.maxVertices * frameCount) * sizeof(Vertex);
+
+ D3D12_HEAP_PROPERTIES heapProps = {};
+ heapProps.Type = D3D12_HEAP_TYPE_UPLOAD;
+ heapProps.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
+ heapProps.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
+ heapProps.CreationNodeMask = 0u;
+ heapProps.VisibleNodeMask = 0u;
+
+ D3D12_RESOURCE_DESC desc = {};
+ desc.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
+ desc.Alignment = 0u;
+ desc.Width = bufferSize;
+ desc.Height = 1u;
+ desc.DepthOrArraySize = 1u;
+ desc.MipLevels = 1;
+ desc.Format = DXGI_FORMAT_UNKNOWN;
+ desc.SampleDesc.Count = 1u;
+ desc.SampleDesc.Quality = 0u;
+ desc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
+ desc.Flags = D3D12_RESOURCE_FLAG_NONE;
+
+ if (hr = m_desc.device->CreateCommittedResource(&heapProps, D3D12_HEAP_FLAG_NONE, &desc, D3D12_RESOURCE_STATE_GENERIC_READ,
+ nullptr, IID_PPV_ARGS(&m_vertexBuffer)))
+ {
+ return;
+ }
+
+ UINT8* pdata;
+ D3D12_RANGE readRange = {};
+ if (hr = m_vertexBuffer->Map(0, &readRange, (void**)&pdata))
+ {
+ return;
+ }
+ else
+ {
+ m_vertexBufferData = (Vertex*)pdata;
+ //m_vertexBufferUpload->Unmap(0, nullptr);
+ }
+
+ m_vertexBufferView.BufferLocation = m_vertexBuffer->GetGPUVirtualAddress();
+ m_vertexBufferView.StrideInBytes = sizeof(Vertex);
+ m_vertexBufferView.SizeInBytes = bufferSize;
+ }
+}
+
+void imguiGraphContextUpdateD3D12(const ImguiGraphDesc* descIn)
+{
+ const auto desc = cast_to_imguiGraphDescD3D12(descIn);
+
+ m_desc = *desc;
+}
+
+void imguiGraphContextDestroyD3D12()
+{
+ COMRelease(m_rootSignature);
+ COMRelease(m_pipelineState);
+ COMRelease(m_constantBuffer);
+ COMRelease(m_vertexBuffer);
+}
+
+void imguiGraphRecordBeginD3D12()
+{
+ frameIndex = (frameIndex + 1) % frameCount;
+
+ Params params = {
+ 2.f / float(m_desc.winW), 0.f, 0.f, -1.f,
+ 0.f, 2.f / float(m_desc.winH), 0.f, -1.f,
+ 0.f, 0.f, 1.f, 0.f,
+ 0.f, 0.f, 0.f, 1.f
+ };
+
+ memcpy(m_constantBufferData + frameIndex*sizeof(Params), &params, sizeof(Params));
+
+ // clear state
+ m_stateVert = Vertex{ 0.f, 0.f, -1.f, -1.f, 0,0,0,0 };
+ m_stateVertIdx = 0u;
+
+ m_stateScissor = Scissor { 0, 0, 0, 0, m_desc.winW, m_desc.winH };
+
+ // configure for triangle renderering
+ ID3D12GraphicsCommandList* commandList = m_desc.commandList;
+
+ D3D12_CPU_DESCRIPTOR_HANDLE srvHandleCPU;
+ D3D12_GPU_DESCRIPTOR_HANDLE srvHandleGPU;
+ ID3D12DescriptorHeap* heap = nullptr;
+ if (m_desc.dynamicHeapCbvSrvUav.reserveDescriptors)
+ {
+ auto handle = m_desc.dynamicHeapCbvSrvUav.reserveDescriptors(m_desc.dynamicHeapCbvSrvUav.userdata,
+ 1u, m_desc.lastFenceCompleted, m_desc.nextFenceValue);
+ heap = handle.heap;
+ srvHandleCPU = handle.cpuHandle;
+ srvHandleGPU = handle.gpuHandle;
+ }
+ else
+ {
+ if (m_srvUavHeapGPU == nullptr)
+ {
+ D3D12_DESCRIPTOR_HEAP_DESC srvHeapDesc = {};
+ srvHeapDesc.NumDescriptors = 1;
+ srvHeapDesc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV;
+ srvHeapDesc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE;
+ m_desc.device->CreateDescriptorHeap(&srvHeapDesc, IID_PPV_ARGS(&m_srvUavHeapGPU));
+ }
+ heap = m_srvUavHeapGPU;
+ srvHandleCPU = m_srvUavHeapGPU->GetCPUDescriptorHandleForHeapStart();
+ srvHandleGPU = m_srvUavHeapGPU->GetGPUDescriptorHandleForHeapStart();
+ }
+
+ commandList->SetDescriptorHeaps(1, &heap);
+
+ m_desc.device->CopyDescriptorsSimple(1u, srvHandleCPU, m_srvUavHeapCPU->GetCPUDescriptorHandleForHeapStart(), D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV);
+
+ commandList->SetGraphicsRootSignature(m_rootSignature);
+ commandList->SetPipelineState(m_pipelineState);
+
+ D3D12_GPU_VIRTUAL_ADDRESS cbvHandle = m_constantBuffer->GetGPUVirtualAddress();
+ commandList->SetGraphicsRootConstantBufferView(0, cbvHandle + frameIndex * sizeof(Params));
+
+ commandList->SetGraphicsRootDescriptorTable(1, srvHandleGPU);
+
+ commandList->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
+ commandList->IASetVertexBuffers(0, 1, &m_vertexBufferView);
+}
+
+static void imguiGraphFlush()
+{
+ ID3D12GraphicsCommandList* commandList = m_desc.commandList;
+
+ Scissor& p = m_stateScissor;
+ if (p.beginIdx < p.stopIdx)
+ {
+ int winH = m_desc.winH;
+ D3D12_RECT rect;
+ rect.left = p.x;
+ rect.right = p.x + p.width;
+ rect.top = (winH) - (p.y + p.height);
+ rect.bottom = (winH) - (p.y);
+ commandList->RSSetScissorRects(1, &rect);
+
+ UINT vertexCount = (p.stopIdx - p.beginIdx);
+ UINT startIndex = p.beginIdx + frameIndex * m_desc.maxVertices;
+ commandList->DrawInstanced(vertexCount, 1, startIndex, 0);
+ }
+}
+
+void imguiGraphRecordEndD3D12()
+{
+ ID3D12GraphicsCommandList* commandList = m_desc.commandList;
+
+ // no need to hold onto this
+ COMRelease(m_textureUploadHeap);
+
+ // restore scissor
+ Scissor& p = m_stateScissor;
+ int winH = m_desc.winH;
+ D3D12_RECT rect;
+ rect.left = p.x;
+ rect.right = p.x + p.width;
+ rect.top = (winH) - (p.y + p.height);
+ rect.bottom = (winH) - (p.y);
+ commandList->RSSetScissorRects(1, &rect);
+}
+
+void imguiGraphEnableScissorD3D12(int x, int y, int width, int height)
+{
+ // mark end of last region
+ m_stateScissor.stopIdx = m_stateVertIdx;
+
+ imguiGraphFlush();
+
+ m_stateScissor.beginIdx = m_stateVertIdx;
+ m_stateScissor.stopIdx = m_stateVertIdx;
+ m_stateScissor.x = x;
+ m_stateScissor.y = y;
+ m_stateScissor.width = width;
+ m_stateScissor.height = height;
+}
+
+void imguiGraphDisableScissorD3D12()
+{
+ if (m_stateVertIdx == 0) return;
+
+ // mark end of last region
+ m_stateScissor.stopIdx = m_stateVertIdx;
+
+ imguiGraphFlush();
+
+ m_stateScissor.beginIdx = m_stateVertIdx;
+ m_stateScissor.stopIdx = m_stateVertIdx;
+ m_stateScissor.x = 0;
+ m_stateScissor.y = 0;
+ m_stateScissor.width = m_desc.winW;
+ m_stateScissor.height = m_desc.winH;
+}
+
+void imguiGraphVertex2fD3D12(float x, float y)
+{
+ float v[2] = { x,y };
+ imguiGraphVertex2fvD3D12(v);
+}
+
+void imguiGraphVertex2fvD3D12(const float* v)
+{
+ // update state
+ m_stateVert.x = v[0];
+ m_stateVert.y = v[1];
+
+ Vertex* vdata = &m_vertexBufferData[frameIndex * m_desc.maxVertices];
+
+ // push vertex
+ if ((m_stateVertIdx) < m_desc.maxVertices)
+ {
+ vdata[m_stateVertIdx++] = m_stateVert;
+ }
+}
+
+void imguiGraphTexCoord2fD3D12(float u, float v)
+{
+ m_stateVert.u = u;
+ m_stateVert.v = v;
+}
+
+void imguiGraphColor4ubD3D12(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha)
+{
+ m_stateVert.rgba[0] = red;
+ m_stateVert.rgba[1] = green;
+ m_stateVert.rgba[2] = blue;
+ m_stateVert.rgba[3] = alpha;
+}
+
+void imguiGraphColor4ubvD3D12(const uint8_t* v)
+{
+ m_stateVert.rgba[0] = v[0];
+ m_stateVert.rgba[1] = v[1];
+ m_stateVert.rgba[2] = v[2];
+ m_stateVert.rgba[3] = v[3];
+}
+
+void imguiGraphFontTextureEnableD3D12()
+{
+
+}
+
+void imguiGraphFontTextureDisableD3D12()
+{
+ m_stateVert.u = -1.f;
+ m_stateVert.v = -1.f;
+}
+
+void imguiGraphFontTextureInitD3D12(unsigned char* data)
+{
+ ID3D12GraphicsCommandList* commandList = m_desc.commandList;
+
+ // Create the texture
+ {
+ UINT width = 512;
+ UINT height = 512;
+
+ D3D12_HEAP_PROPERTIES heapProps = {};
+ heapProps.Type = D3D12_HEAP_TYPE_DEFAULT;
+ heapProps.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
+ heapProps.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
+ heapProps.CreationNodeMask = 0u;
+ heapProps.VisibleNodeMask = 0u;
+
+ D3D12_RESOURCE_DESC texDesc = {};
+ texDesc.MipLevels = 1u;
+ texDesc.Format = DXGI_FORMAT_R8_UNORM;
+ texDesc.Width = width;
+ texDesc.Height = height;
+ texDesc.Flags = D3D12_RESOURCE_FLAG_NONE;
+ texDesc.DepthOrArraySize = 1u;
+ texDesc.SampleDesc.Count = 1u;
+ texDesc.SampleDesc.Quality = 0u;
+ texDesc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
+
+ if (m_desc.device->CreateCommittedResource(
+ &heapProps,
+ D3D12_HEAP_FLAG_NONE,
+ &texDesc,
+ D3D12_RESOURCE_STATE_COPY_DEST,
+ nullptr,
+ IID_PPV_ARGS(&m_texture)
+ ))
+ {
+ return;
+ }
+
+ // get footprint information
+ D3D12_PLACED_SUBRESOURCE_FOOTPRINT footprint = {};
+ UINT64 uploadHeapSize = 0u;
+ m_desc.device->GetCopyableFootprints(&texDesc, 0u, 1u, 0u, &footprint, nullptr, nullptr, &uploadHeapSize);
+
+ heapProps.Type = D3D12_HEAP_TYPE_UPLOAD;
+ D3D12_RESOURCE_DESC bufferDesc = texDesc;
+ bufferDesc.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
+ bufferDesc.Alignment = 0u;
+ bufferDesc.Width = uploadHeapSize;
+ bufferDesc.Height = 1u;
+ bufferDesc.DepthOrArraySize = 1u;
+ bufferDesc.MipLevels = 1;
+ bufferDesc.Format = DXGI_FORMAT_UNKNOWN;
+ bufferDesc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
+ bufferDesc.Flags = D3D12_RESOURCE_FLAG_NONE;
+
+ if (m_desc.device->CreateCommittedResource(
+ &heapProps,
+ D3D12_HEAP_FLAG_NONE,
+ &bufferDesc,
+ D3D12_RESOURCE_STATE_GENERIC_READ,
+ nullptr,
+ IID_PPV_ARGS(&m_textureUploadHeap)
+ ))
+ {
+ return;
+ }
+
+ // map upload heap, and convert rgb bitmap to rgba
+ UINT8* pdata;
+ D3D12_RANGE readRange = {};
+ if (m_textureUploadHeap->Map(0, &readRange, (void**)&pdata))
+ {
+ return;
+ }
+ else
+ {
+ UINT8* dst = pdata;
+ UINT elements = width*height;
+ UINT8* src = data;
+ for (UINT j = 0; j < height; j++)
+ {
+ for (UINT i = 0; i < width; i++)
+ {
+ UINT idx = j * (footprint.Footprint.RowPitch) + i;
+
+ UINT8 a = src[j * width + i];
+ dst[idx] = a;
+ }
+ }
+
+ m_textureUploadHeap->Unmap(0, nullptr);
+ }
+
+ // add copy from upload heap to default heap to command list
+ D3D12_TEXTURE_COPY_LOCATION dstCopy = {};
+ D3D12_TEXTURE_COPY_LOCATION srcCopy = {};
+ dstCopy.pResource = m_texture;
+ dstCopy.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;
+ dstCopy.SubresourceIndex = 0u;
+ srcCopy.pResource = m_textureUploadHeap;
+ srcCopy.Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT;
+ srcCopy.PlacedFootprint = footprint;
+ commandList->CopyTextureRegion(&dstCopy, 0, 0, 0, &srcCopy, nullptr);
+
+ D3D12_RESOURCE_BARRIER barrier[1] = {};
+ auto textureBarrier = [&barrier](UINT idx, ID3D12Resource* texture)
+ {
+ barrier[idx].Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
+ barrier[idx].Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
+ barrier[idx].Transition.pResource = texture;
+ barrier[idx].Transition.Subresource = 0u;
+ barrier[idx].Transition.StateBefore = D3D12_RESOURCE_STATE_COPY_DEST;
+ barrier[idx].Transition.StateAfter = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE;
+ };
+ textureBarrier(0, m_texture);
+ commandList->ResourceBarrier(1, barrier);
+
+ // create an SRV heap and descriptor for the texture
+ D3D12_DESCRIPTOR_HEAP_DESC srvHeapDesc = {};
+ srvHeapDesc.NumDescriptors = 1;
+ srvHeapDesc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV;
+ srvHeapDesc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE;
+ if (m_desc.device->CreateDescriptorHeap(&srvHeapDesc, IID_PPV_ARGS(&m_srvUavHeapCPU)))
+ {
+ return;
+ }
+
+ D3D12_CPU_DESCRIPTOR_HANDLE srvUavHandle = m_srvUavHeapCPU->GetCPUDescriptorHandleForHeapStart();
+
+ D3D12_SHADER_RESOURCE_VIEW_DESC srvDesc = {};
+ srvDesc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D;
+ srvDesc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
+ srvDesc.Format = texDesc.Format;
+ srvDesc.Texture2D.MipLevels = 1;
+ srvDesc.Texture2D.MostDetailedMip = 0;
+ srvDesc.Texture2D.ResourceMinLODClamp = 0.f;
+
+ m_desc.device->CreateShaderResourceView(m_texture, &srvDesc, srvUavHandle);
+ }
+
+}
+
+void imguiGraphFontTextureReleaseD3D12()
+{
+ COMRelease(m_texture);
+ COMRelease(m_textureUploadHeap);
+ COMRelease(m_srvUavHeapCPU);
+ COMRelease(m_srvUavHeapGPU);
+} \ No newline at end of file
diff --git a/demo/d3d12/imguiGraphD3D12.h b/demo/d3d12/imguiGraphD3D12.h
new file mode 100644
index 0000000..fc2e67e
--- /dev/null
+++ b/demo/d3d12/imguiGraphD3D12.h
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+#ifndef IMGUI_GRAPH_D3D12_H
+#define IMGUI_GRAPH_D3D12_H
+
+#include <stdint.h>
+
+#include "../d3d/imguiGraph.h"
+
+struct ImguiDescriptorReserveHandleD3D12
+{
+ ID3D12DescriptorHeap* heap;
+ UINT descriptorSize;
+ D3D12_CPU_DESCRIPTOR_HANDLE cpuHandle;
+ D3D12_GPU_DESCRIPTOR_HANDLE gpuHandle;
+};
+
+struct ImguiDynamicDescriptorHeapD3D12
+{
+ void* userdata;
+ ImguiDescriptorReserveHandleD3D12(*reserveDescriptors)(void* userdata, UINT numDescriptors, UINT64 lastFenceCompleted, UINT64 nextFenceValue);
+};
+
+struct ImguiGraphDescD3D12
+{
+ ID3D12Device* device = nullptr;
+ ID3D12GraphicsCommandList* commandList = nullptr;
+ UINT64 lastFenceCompleted;
+ UINT64 nextFenceValue;
+ int winW;
+ int winH;
+ int numMSAASamples = 1;
+
+ uint32_t maxVertices = 64 * 4096u;
+
+ ImguiDynamicDescriptorHeapD3D12 dynamicHeapCbvSrvUav = {};
+
+ ImguiGraphDescD3D12() {}
+};
+
+inline const ImguiGraphDescD3D12* cast_to_imguiGraphDescD3D12(const ImguiGraphDesc* desc)
+{
+ return (const ImguiGraphDescD3D12*)(desc);
+}
+
+inline ImguiGraphDesc* cast_from_imguiGraphDescD3D12(ImguiGraphDescD3D12* desc)
+{
+ return (ImguiGraphDesc*)(desc);
+}
+
+IMGUI_GRAPH_API void imguiGraphContextInitD3D12(const ImguiGraphDesc* desc);
+
+IMGUI_GRAPH_API void imguiGraphContextUpdateD3D12(const ImguiGraphDesc* desc);
+
+IMGUI_GRAPH_API void imguiGraphContextDestroyD3D12();
+
+IMGUI_GRAPH_API void imguiGraphRecordBeginD3D12();
+
+IMGUI_GRAPH_API void imguiGraphRecordEndD3D12();
+
+IMGUI_GRAPH_API void imguiGraphVertex2fD3D12(float x, float y);
+
+IMGUI_GRAPH_API void imguiGraphVertex2fvD3D12(const float* v);
+
+IMGUI_GRAPH_API void imguiGraphTexCoord2fD3D12(float u, float v);
+
+IMGUI_GRAPH_API void imguiGraphColor4ubD3D12(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha);
+
+IMGUI_GRAPH_API void imguiGraphColor4ubvD3D12(const uint8_t* v);
+
+IMGUI_GRAPH_API void imguiGraphFontTextureEnableD3D12();
+
+IMGUI_GRAPH_API void imguiGraphFontTextureDisableD3D12();
+
+IMGUI_GRAPH_API void imguiGraphEnableScissorD3D12(int x, int y, int width, int height);
+
+IMGUI_GRAPH_API void imguiGraphDisableScissorD3D12();
+
+IMGUI_GRAPH_API void imguiGraphFontTextureInitD3D12(unsigned char* data);
+
+IMGUI_GRAPH_API void imguiGraphFontTextureReleaseD3D12();
+
+#endif \ No newline at end of file
diff --git a/demo/d3d12/imguiInteropD3D12.cpp b/demo/d3d12/imguiInteropD3D12.cpp
new file mode 100644
index 0000000..23d7422
--- /dev/null
+++ b/demo/d3d12/imguiInteropD3D12.cpp
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+ //direct3d headers
+#define NOMINMAX
+#include <d3d12.h>
+
+// include the Direct3D Library file
+#pragma comment (lib, "d3d12.lib")
+
+#include "imguiGraphD3D12.h"
+
+#include "appD3D12Ctx.h"
+
+struct AppGraphCtx;
+
+namespace NvCo = nvidia::Common;
+
+inline void imguiInteropUpdateDesc(ImguiGraphDescD3D12& desc, AppGraphCtx* appctxIn)
+{
+ auto context = cast_to_AppGraphCtxD3D12(appctxIn);
+
+ desc.device = context->m_device;
+ desc.commandList = context->m_commandList;
+
+ desc.lastFenceCompleted = 0;
+ desc.nextFenceValue = 1;
+
+ desc.winW = context->m_winW;
+ desc.winH = context->m_winH;
+ desc.numMSAASamples = context->m_numMsaaSamples;
+ desc.dynamicHeapCbvSrvUav.userdata = context;
+ desc.dynamicHeapCbvSrvUav.reserveDescriptors = nullptr;
+}
+
+IMGUI_GRAPH_API bool imguiInteropGraphInitD3D12(imguiGraphInit_t func, const char* fontpath, AppGraphCtx* appctx);
+
+IMGUI_GRAPH_API void imguiInteropGraphUpdateD3D12(imguiGraphUpdate_t func, AppGraphCtx* appctx);
+
+bool imguiInteropGraphInitD3D12(imguiGraphInit_t func, const char* fontpath, AppGraphCtx* appctx)
+{
+ ImguiGraphDescD3D12 desc;
+ imguiInteropUpdateDesc(desc, appctx);
+
+ return func(fontpath, cast_from_imguiGraphDescD3D12(&desc));
+}
+
+void imguiInteropGraphUpdateD3D12(imguiGraphUpdate_t func, AppGraphCtx* appctx)
+{
+ ImguiGraphDescD3D12 desc;
+ imguiInteropUpdateDesc(desc, appctx);
+
+ return func(cast_from_imguiGraphDescD3D12(&desc));
+} \ No newline at end of file
diff --git a/demo/d3d12/lineRenderPipelineD3D12.cpp b/demo/d3d12/lineRenderPipelineD3D12.cpp
new file mode 100644
index 0000000..e6d75a1
--- /dev/null
+++ b/demo/d3d12/lineRenderPipelineD3D12.cpp
@@ -0,0 +1,140 @@
+#define NOMINMAX
+
+#include <NvCoDx12HelperUtil.h>
+#include <external/D3D12/include/d3dx12.h>
+
+#include "pipelineUtilD3D12.h"
+#include "bufferD3D12.h"
+#include "meshRendererD3D12.h"
+#include "../d3d/shaderCommonD3D.h"
+
+// this
+#include "lineRenderPipelineD3D12.h"
+
+// Shaders
+#include "../d3d/shaders/debugLineVS.hlsl.h"
+#include "../d3d/shaders/debugLinePS.hlsl.h"
+
+namespace FlexSample {
+
+static const D3D12_INPUT_ELEMENT_DESC InputElementDescs[] =
+{
+ { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+ { "COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, sizeof(Vec3), D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+};
+
+LineRenderPipelineD3D12::LineRenderPipelineD3D12():
+ Parent(PRIMITIVE_LINE)
+{
+}
+
+int LineRenderPipelineD3D12::initialize(const RenderStateD3D12& state, const std::wstring& shadersPath, NvCo::Dx12RenderTarget* shadowMap)
+{
+ using namespace NvCo;
+ ID3D12Device* device = state.m_device;
+
+ // create the pipeline state object
+ {
+ D3D12_GRAPHICS_PIPELINE_STATE_DESC psoDesc = {};
+ PipelineUtilD3D::initSolidBlendDesc(psoDesc.BlendState);
+ PipelineUtilD3D::initRasterizerDesc(FRONT_WINDING_CLOCKWISE, psoDesc.RasterizerState);
+
+ {
+ PipelineUtilD3D::initTargetFormat(nullptr, state.m_renderContext, psoDesc);
+
+ psoDesc.InputLayout.NumElements = _countof(InputElementDescs);
+ psoDesc.InputLayout.pInputElementDescs = InputElementDescs;
+ psoDesc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE;
+ }
+
+ //psoDesc.RasterizerState.MultisampleEnable = TRUE;
+ psoDesc.RasterizerState.FrontCounterClockwise = TRUE;
+
+ // create the root signature
+ ComPtr<ID3D12RootSignature> signiture;
+ {
+ CD3DX12_DESCRIPTOR_RANGE ranges[2];
+ CD3DX12_ROOT_PARAMETER params[3];
+
+ UINT rootIndex = 0;
+ {
+ D3D12_ROOT_PARAMETER& param = params[rootIndex++];
+ param.ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV;
+ param.Descriptor.ShaderRegister = 0u;
+ param.Descriptor.RegisterSpace = 0u;
+ param.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL;
+ }
+
+ D3D12_ROOT_SIGNATURE_DESC desc;
+ desc.NumParameters = rootIndex;
+ desc.pParameters = params;
+ desc.NumStaticSamplers = 0u;
+ desc.pStaticSamplers = nullptr;
+ desc.Flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT;
+
+ ComPtr<ID3DBlob> sigBlob;
+ NV_RETURN_ON_FAIL(Dx12HelperUtil::serializeRootSigniture(desc, D3D_ROOT_SIGNATURE_VERSION_1, sigBlob));
+ NV_RETURN_ON_FAIL(device->CreateRootSignature(0u, sigBlob->GetBufferPointer(), sigBlob->GetBufferSize(), IID_PPV_ARGS(&signiture)));
+ }
+
+ psoDesc.VS = Dx12Blob(g_debugLineVS);
+ psoDesc.PS = Dx12Blob(g_debugLinePS);
+ psoDesc.pRootSignature = signiture.Get();
+
+ {
+ PipelineStateD3D12& pipeState = m_states[PIPELINE_STATE_NORMAL];
+ pipeState.m_rootSignature = signiture.Get();
+ NV_RETURN_ON_FAIL(device->CreateGraphicsPipelineState(&psoDesc, IID_PPV_ARGS(&pipeState.m_pipelineState)));
+ }
+ {
+ // Setup for shadow
+ PipelineUtilD3D::initTargetFormat(shadowMap, nullptr, psoDesc);
+
+ PipelineStateD3D12& pipeState = m_states[PIPELINE_STATE_SHADOW];
+ pipeState.m_rootSignature = signiture.Get();
+ NV_RETURN_ON_FAIL(device->CreateGraphicsPipelineState(&psoDesc, IID_PPV_ARGS(&pipeState.m_pipelineState)));
+ }
+ }
+
+ return NV_OK;
+}
+
+int LineRenderPipelineD3D12::bind(const void* paramsIn, const void* platformState)
+{
+ const RenderStateD3D12& state = *(RenderStateD3D12*)platformState;
+ LineDrawParams& params = *(LineDrawParams*)paramsIn;
+
+ // Set up constant buffer
+ NvCo::Dx12CircularResourceHeap::Cursor cursor = state.m_constantHeap->newConstantBuffer(params);
+ if (!cursor.isValid())
+ {
+ return NV_FAIL;
+ }
+
+ PipelineStateD3D12& pipeState = (params.m_drawStage == LINE_DRAW_NORMAL) ? m_states[PIPELINE_STATE_NORMAL] : m_states[PIPELINE_STATE_SHADOW];
+ if (!pipeState.isValid())
+ {
+ return NV_FAIL;
+ }
+
+ ID3D12GraphicsCommandList* commandList = state.m_commandList;
+ commandList->SetGraphicsRootSignature(pipeState.m_rootSignature.Get());
+ commandList->SetPipelineState(pipeState.m_pipelineState.Get());
+
+ D3D12_GPU_VIRTUAL_ADDRESS cbvHandle = state.m_constantHeap->getGpuHandle(cursor);
+ commandList->SetGraphicsRootConstantBufferView(0, cbvHandle);
+
+ {
+ ID3D12DescriptorHeap* heaps[] = { state.m_srvCbvUavDescriptorHeap->getHeap() };
+ commandList->SetDescriptorHeaps(_countof(heaps), heaps);
+ }
+
+ return NV_OK;
+}
+
+int LineRenderPipelineD3D12::draw(const RenderAllocation& allocIn, size_t sizeOfAlloc, const void* platformState)
+{
+ return MeshRendererD3D12::defaultDraw(allocIn, sizeOfAlloc, platformState);
+}
+
+} // namespace FlexSample \ No newline at end of file
diff --git a/demo/d3d12/lineRenderPipelineD3D12.h b/demo/d3d12/lineRenderPipelineD3D12.h
new file mode 100644
index 0000000..ce3db58
--- /dev/null
+++ b/demo/d3d12/lineRenderPipelineD3D12.h
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+#ifndef LINE_RENDER_PIPELINE_D3D12_H
+#define LINE_RENDER_PIPELINE_D3D12_H
+
+#include <DirectXMath.h>
+#include "renderStateD3D12.h"
+#include "meshRenderer.h"
+
+#include <NvCoDx12RenderTarget.h>
+
+#include <string>
+
+namespace FlexSample {
+using namespace nvidia;
+
+enum LineDrawStage
+{
+ LINE_DRAW_NORMAL,
+ LINE_DRAW_SHADOW,
+};
+
+struct LineDrawParams
+{
+ Hlsl::float4x4 m_modelWorldProjection; /// Transforms point from world-space to clip space
+ LineDrawStage m_drawStage;
+};
+
+struct LineRenderPipelineD3D12: public RenderPipeline
+{
+ //NV_CO_DECLARE_POLYMORPHIC_CLASS(LineRenderPipelineD3D12, RenderPipeline);
+public:
+ typedef RenderPipeline Parent;
+
+ enum PipelineStateType
+ {
+ PIPELINE_STATE_NORMAL,
+ PIPELINE_STATE_SHADOW,
+ PIPELINE_STATE_COUNT_OF,
+ };
+
+ LineRenderPipelineD3D12();
+
+ /// Initialize
+ int initialize(const RenderStateD3D12& state, const std::wstring& shadersDir, NvCo::Dx12RenderTarget* shadowMap);
+ /// Do the binding
+ virtual int bind(const void* paramsIn, const void* platformState) override;
+ virtual int draw(const RenderAllocation& alloc, size_t sizeOfAlloc, const void* platformState) override;
+
+ protected:
+
+ PipelineStateD3D12 m_states[PIPELINE_STATE_COUNT_OF];
+};
+
+} // namespace FlexSample
+
+#endif \ No newline at end of file
diff --git a/demo/d3d12/meshRenderPipelineD3D12.cpp b/demo/d3d12/meshRenderPipelineD3D12.cpp
new file mode 100644
index 0000000..167a032
--- /dev/null
+++ b/demo/d3d12/meshRenderPipelineD3D12.cpp
@@ -0,0 +1,284 @@
+#define NOMINMAX
+
+#include <NvCoDx12HelperUtil.h>
+#include <external/D3D12/include/d3dx12.h>
+
+#include "pipelineUtilD3D12.h"
+#include "meshRenderer.h"
+#include "bufferD3D12.h"
+#include "meshRendererD3D12.h"
+#include "../d3d/shaderCommonD3D.h"
+
+// this
+#include "meshRenderPipelineD3D12.h"
+
+// Shaders
+#include "../d3d/shaders/meshVS.hlsl.h"
+#include "../d3d/shaders/meshPS.hlsl.h"
+#include "../d3d/shaders/meshShadowPS.hlsl.h"
+
+namespace FlexSample {
+
+// Make async compute benchmark shader have a unique name
+namespace AsyncComputeBench
+{
+#include "../d3d/shaders/meshAsyncComputeBenchPS.hlsl.h"
+}
+
+MeshRenderPipelineD3D12::MeshRenderPipelineD3D12():
+ Parent(PRIMITIVE_TRIANGLE),
+ m_shadowMapLinearSamplerIndex(-1)
+{
+}
+
+/* static */MeshRenderPipelineD3D12::PipelineStateType MeshRenderPipelineD3D12::getPipelineStateType(MeshDrawStage stage, MeshRenderMode mode, MeshCullMode cull)
+{
+ switch (stage)
+ {
+ case MESH_DRAW_NULL:
+ case MESH_DRAW_REFLECTION:
+ case MESH_DRAW_LIGHT:
+ {
+ if (mode == MESH_RENDER_WIREFRAME)
+ {
+ return PIPELINE_STATE_LIGHT_WIREFRAME;
+ }
+
+ switch (cull)
+ {
+ case MESH_CULL_BACK: return PIPELINE_STATE_LIGHT_SOLID_CULL_BACK;
+ case MESH_CULL_FRONT: return PIPELINE_STATE_LIGHT_SOLID_CULL_FRONT;
+ default:
+ case MESH_CULL_NONE: return PIPELINE_STATE_LIGHT_SOLID_CULL_NONE;
+ }
+ }
+ case MESH_DRAW_SHADOW:
+ {
+ switch (cull)
+ {
+ case MESH_CULL_BACK: return PIPELINE_STATE_SHADOW_CULL_BACK;
+ default:
+ case MESH_CULL_NONE: return PIPELINE_STATE_SHADOW_CULL_NONE;
+ }
+ }
+ }
+
+ printf("Unhandled option!");
+ return PIPELINE_STATE_LIGHT_SOLID_CULL_BACK;
+}
+
+static D3D12_FILL_MODE _getFillMode(MeshRenderPipelineD3D12::PipelineStateType type)
+{
+ switch (type)
+ {
+ default: return D3D12_FILL_MODE_SOLID;
+ case MeshRenderPipelineD3D12::PIPELINE_STATE_LIGHT_WIREFRAME: return D3D12_FILL_MODE_WIREFRAME;
+ }
+}
+
+static D3D12_CULL_MODE _getCullMode(MeshRenderPipelineD3D12::PipelineStateType type)
+{
+ switch (type)
+ {
+ case MeshRenderPipelineD3D12::PIPELINE_STATE_COUNT_OF: break;
+
+ case MeshRenderPipelineD3D12::PIPELINE_STATE_SHADOW_CULL_BACK: return D3D12_CULL_MODE_BACK;
+
+ case MeshRenderPipelineD3D12::PIPELINE_STATE_LIGHT_SOLID_CULL_FRONT: return D3D12_CULL_MODE_FRONT;
+ case MeshRenderPipelineD3D12::PIPELINE_STATE_LIGHT_SOLID_CULL_BACK: return D3D12_CULL_MODE_BACK;
+
+ case MeshRenderPipelineD3D12::PIPELINE_STATE_SHADOW_CULL_NONE:
+ case MeshRenderPipelineD3D12::PIPELINE_STATE_LIGHT_WIREFRAME:
+ case MeshRenderPipelineD3D12::PIPELINE_STATE_LIGHT_SOLID_CULL_NONE: return D3D12_CULL_MODE_NONE;
+ }
+
+ printf("Unhandled option!");
+ return D3D12_CULL_MODE_NONE;
+}
+
+static void _initRasterizerDesc(MeshRenderPipelineD3D12::PipelineStateType type, FrontWindingType winding, D3D12_RASTERIZER_DESC& desc)
+{
+ PipelineUtilD3D::initRasterizerDesc(winding, desc);
+
+ desc.FillMode = _getFillMode(type);
+ desc.CullMode = _getCullMode(type);
+}
+
+static void _initPipelineStateDesc(MeshRenderPipelineD3D12::PipelineStateType type, NvCo::Dx12RenderTarget* shadowMap, AppGraphCtxD3D12* renderContext, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc)
+{
+ PipelineUtilD3D::initTargetFormat((shadowMap && MeshRenderPipelineD3D12::isShadow(type)) ? shadowMap : nullptr, renderContext, psoDesc);
+
+ psoDesc.InputLayout.NumElements = _countof(MeshRendererD3D12::MeshInputElementDescs);
+ psoDesc.InputLayout.pInputElementDescs = MeshRendererD3D12::MeshInputElementDescs;
+ psoDesc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE;
+}
+
+int MeshRenderPipelineD3D12::initialize(const RenderStateD3D12& state, const std::wstring& shadersPath, FrontWindingType winding, int shadowMapLinearSamplerIndex, NvCo::Dx12RenderTarget* shadowMap, bool asyncComputeBenchmark)
+{
+ using namespace NvCo;
+ ID3D12Device* device = state.m_device;
+
+ m_shadowMapLinearSamplerIndex = shadowMapLinearSamplerIndex;
+
+ // create the pipeline state object
+ {
+ D3D12_GRAPHICS_PIPELINE_STATE_DESC psoDesc = {};
+ PipelineUtilD3D::initSolidBlendDesc(psoDesc.BlendState);
+
+ // create the root signature
+ ComPtr<ID3D12RootSignature> signiture;
+ {
+ CD3DX12_DESCRIPTOR_RANGE ranges[2];
+ CD3DX12_ROOT_PARAMETER params[3];
+
+ UINT rootIndex = 0;
+ {
+ D3D12_ROOT_PARAMETER& param = params[rootIndex++];
+ param.ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV;
+ param.Descriptor.ShaderRegister = 0u;
+ param.Descriptor.RegisterSpace = 0u;
+ param.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL;
+ }
+
+ const int numSrvs = 1;
+ if (numSrvs > 0)
+ {
+ ranges[0].Init(D3D12_DESCRIPTOR_RANGE_TYPE_SRV, numSrvs, 0);
+ params[rootIndex++].InitAsDescriptorTable(1, &ranges[0], D3D12_SHADER_VISIBILITY_PIXEL);
+ }
+ const int numSamplers = 1;
+ if (numSamplers > 0)
+ {
+ ranges[1].Init(D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER, numSamplers, 0);
+ params[rootIndex++].InitAsDescriptorTable(1, &ranges[1], D3D12_SHADER_VISIBILITY_PIXEL);
+ }
+
+ D3D12_ROOT_SIGNATURE_DESC desc;
+ desc.NumParameters = rootIndex;
+ desc.pParameters = params;
+ desc.NumStaticSamplers = 0;
+ desc.pStaticSamplers = nullptr;
+ desc.Flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT;
+
+ ComPtr<ID3DBlob> sigBlob;
+ NV_RETURN_ON_FAIL(Dx12HelperUtil::serializeRootSigniture(desc, D3D_ROOT_SIGNATURE_VERSION_1, sigBlob));
+ NV_RETURN_ON_FAIL(device->CreateRootSignature(0u, sigBlob->GetBufferPointer(), sigBlob->GetBufferSize(), IID_PPV_ARGS(&signiture)));
+ }
+
+ {
+ psoDesc.VS = Dx12Blob(g_meshVS);
+ psoDesc.PS = asyncComputeBenchmark ? Dx12Blob(AsyncComputeBench::g_meshPS) : Dx12Blob(g_meshPS);;
+
+ NV_RETURN_ON_FAIL(_initPipelineState(state, winding, shadowMap, PIPELINE_STATE_LIGHT_SOLID_CULL_FRONT, signiture.Get(), psoDesc));
+ NV_RETURN_ON_FAIL(_initPipelineState(state, winding, shadowMap, PIPELINE_STATE_LIGHT_SOLID_CULL_BACK, signiture.Get(), psoDesc));
+ NV_RETURN_ON_FAIL(_initPipelineState(state, winding, shadowMap, PIPELINE_STATE_LIGHT_SOLID_CULL_NONE, signiture.Get(), psoDesc));
+ NV_RETURN_ON_FAIL(_initPipelineState(state, winding, shadowMap, PIPELINE_STATE_LIGHT_WIREFRAME, signiture.Get(), psoDesc));
+ }
+
+ // Shadow rendering
+
+ {
+ D3D12_ROOT_PARAMETER params[1];
+ params[0].ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV;
+ params[0].Descriptor.ShaderRegister = 0u;
+ params[0].Descriptor.RegisterSpace = 0u;
+ params[0].ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL;
+
+ D3D12_ROOT_SIGNATURE_DESC desc;
+ desc.NumParameters = 1;
+ desc.pParameters = params;
+ desc.NumStaticSamplers = 0;
+ desc.pStaticSamplers = nullptr;
+ desc.Flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT;
+
+ ComPtr<ID3DBlob> sigBlob;
+ NV_RETURN_ON_FAIL(Dx12HelperUtil::serializeRootSigniture(desc, D3D_ROOT_SIGNATURE_VERSION_1, sigBlob));
+ NV_RETURN_ON_FAIL(device->CreateRootSignature(0u, sigBlob->GetBufferPointer(), sigBlob->GetBufferSize(), IID_PPV_ARGS(&signiture)));
+ }
+
+ {
+ psoDesc.VS = Dx12Blob(g_meshVS);
+ psoDesc.PS = Dx12Blob(g_meshPS_Shadow);
+
+ NV_RETURN_ON_FAIL(_initPipelineState(state, winding, shadowMap, PIPELINE_STATE_SHADOW_CULL_BACK, signiture.Get(), psoDesc));
+ NV_RETURN_ON_FAIL(_initPipelineState(state, winding, shadowMap, PIPELINE_STATE_SHADOW_CULL_NONE, signiture.Get(), psoDesc));
+ }
+ }
+
+ return NV_OK;
+}
+
+int MeshRenderPipelineD3D12::_initPipelineState(const RenderStateD3D12& state, FrontWindingType winding, NvCo::Dx12RenderTarget* shadowMap, PipelineStateType pipeType, ID3D12RootSignature* signiture, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc)
+{
+ ID3D12Device* device = state.m_device;
+
+ _initRasterizerDesc(pipeType, winding, psoDesc.RasterizerState);
+ _initPipelineStateDesc(pipeType, shadowMap, state.m_renderContext, psoDesc);
+
+ psoDesc.pRootSignature = signiture;
+
+ PipelineStateD3D12& pipeState = m_states[pipeType];
+ pipeState.m_rootSignature = signiture;
+
+ NV_RETURN_ON_FAIL(device->CreateGraphicsPipelineState(&psoDesc, IID_PPV_ARGS(&pipeState.m_pipelineState)));
+ return NV_OK;
+}
+
+int MeshRenderPipelineD3D12::bind(const void* paramsIn, const void* platformState)
+{
+ const RenderStateD3D12& state = *(RenderStateD3D12*)platformState;
+ const MeshDrawParamsD3D& params = *(MeshDrawParamsD3D*)paramsIn;
+
+ NvCo::Dx12CircularResourceHeap::Cursor cursor;
+ {
+ Hlsl::MeshShaderConst constBuf;
+ RenderParamsUtilD3D::calcMeshConstantBuffer(params, constBuf);
+ cursor = state.m_constantHeap->newConstantBuffer(constBuf);
+ if (!cursor.isValid())
+ {
+ return NV_FAIL;
+ }
+ }
+
+ const PipelineStateType pipeType = getPipelineStateType(params.renderStage, params.renderMode, params.cullMode);
+ PipelineStateD3D12& pipeState = m_states[pipeType];
+ if (!pipeState.isValid())
+ {
+ return NV_FAIL;
+ }
+
+ ID3D12GraphicsCommandList* commandList = state.m_commandList;
+
+ commandList->SetGraphicsRootSignature(pipeState.m_rootSignature.Get());
+ commandList->SetPipelineState(pipeState.m_pipelineState.Get());
+
+ D3D12_GPU_VIRTUAL_ADDRESS cbvHandle = state.m_constantHeap->getGpuHandle(cursor);
+ commandList->SetGraphicsRootConstantBufferView(0, cbvHandle);
+
+ if (isShadow(pipeType))
+ {
+ ID3D12DescriptorHeap* heaps[] = { nullptr };
+ commandList->SetDescriptorHeaps(0, heaps);
+ }
+ else
+ {
+ NvCo::Dx12RenderTarget* shadowMap = (NvCo::Dx12RenderTarget*)params.shadowMap;
+
+ ID3D12DescriptorHeap* heaps[] = { state.m_srvCbvUavDescriptorHeap->getHeap(), state.m_samplerDescriptorHeap->getHeap() };
+ commandList->SetDescriptorHeaps(_countof(heaps), heaps);
+
+ // Bind the srvs
+ commandList->SetGraphicsRootDescriptorTable(1, state.m_srvCbvUavDescriptorHeap->getGpuHandle(shadowMap->getSrvHeapIndex(shadowMap->getPrimaryBufferType())));
+ // Bind the samplers
+ commandList->SetGraphicsRootDescriptorTable(2, state.m_samplerDescriptorHeap->getGpuHandle(m_shadowMapLinearSamplerIndex));
+ }
+
+ return NV_OK;
+}
+
+int MeshRenderPipelineD3D12::draw(const RenderAllocation& allocIn, size_t sizeOfAlloc, const void* platformState)
+{
+ return MeshRendererD3D12::defaultDraw(allocIn, sizeOfAlloc, platformState);
+}
+
+} // namespace FlexSample \ No newline at end of file
diff --git a/demo/d3d12/meshRenderPipelineD3D12.h b/demo/d3d12/meshRenderPipelineD3D12.h
new file mode 100644
index 0000000..be2511f
--- /dev/null
+++ b/demo/d3d12/meshRenderPipelineD3D12.h
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+#ifndef MESH_RENDER_PIPELINE_D3D12_H
+#define MESH_RENDER_PIPELINE_D3D12_H
+
+#include <DirectXMath.h>
+#include "renderStateD3D12.h"
+#include "../d3d/shaderCommonD3D.h"
+#include "meshRenderer.h"
+#include "../d3d/renderParamsD3D.h"
+
+#include <NvCoDx12RenderTarget.h>
+
+namespace FlexSample {
+using namespace nvidia;
+
+struct MeshRenderPipelineD3D12: public RenderPipeline
+{
+ //NV_CO_DECLARE_POLYMORPHIC_CLASS(MeshRenderPipelineD3D12, RenderPipeline);
+public:
+ typedef RenderPipeline Parent;
+
+ enum PipelineStateType
+ {
+ PIPELINE_STATE_SHADOW_CULL_BACK, // Is cull back
+ PIPELINE_STATE_SHADOW_CULL_NONE,
+ PIPELINE_STATE_LIGHT_WIREFRAME, // No culling
+ PIPELINE_STATE_LIGHT_SOLID_CULL_FRONT,
+ PIPELINE_STATE_LIGHT_SOLID_CULL_BACK,
+ PIPELINE_STATE_LIGHT_SOLID_CULL_NONE,
+ PIPELINE_STATE_COUNT_OF,
+ };
+
+ MeshRenderPipelineD3D12();
+
+ /// Initialize
+ int initialize(const RenderStateD3D12& state, const std::wstring& shadersDir, FrontWindingType winding, int shadowMapLinearSamplerIndex, NvCo::Dx12RenderTarget* shadowMap, bool asyncComputeBenchmark);
+ /// Do the binding
+ virtual int bind(const void* paramsIn, const void* platformState) override;
+ virtual int draw(const RenderAllocation& alloc, size_t sizeOfAlloc, const void* platformState) override;
+
+ /// Convert into a single pipeline state type
+ static PipelineStateType getPipelineStateType(MeshDrawStage stage, MeshRenderMode mode, MeshCullMode cull);
+ /// true if it's a shadowing type
+ static bool isShadow(PipelineStateType type) { return type == PIPELINE_STATE_SHADOW_CULL_BACK || type == PIPELINE_STATE_SHADOW_CULL_NONE; }
+
+ protected:
+
+ int _initPipelineState(const RenderStateD3D12& state, FrontWindingType winding, NvCo::Dx12RenderTarget* shadowMap, PipelineStateType pipeType, ID3D12RootSignature* signiture, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc);
+
+ int m_shadowMapLinearSamplerIndex; //< The index to the linear sampler in the m_samplerHeap
+
+ PipelineStateD3D12 m_states[PIPELINE_STATE_COUNT_OF];
+};
+
+} // namespace FlexSample
+
+#endif \ No newline at end of file
diff --git a/demo/d3d12/meshRenderer.cpp b/demo/d3d12/meshRenderer.cpp
new file mode 100644
index 0000000..5b8a41e
--- /dev/null
+++ b/demo/d3d12/meshRenderer.cpp
@@ -0,0 +1,15 @@
+/*
+* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+#include "meshRenderer.h"
+
+namespace FlexSample {
+
+} // namespace FlexSample \ No newline at end of file
diff --git a/demo/d3d12/meshRenderer.h b/demo/d3d12/meshRenderer.h
new file mode 100644
index 0000000..5acc701
--- /dev/null
+++ b/demo/d3d12/meshRenderer.h
@@ -0,0 +1,194 @@
+
+#ifndef MESH_RENDERER_H
+#define MESH_RENDERER_H
+
+#include "core/maths.h"
+
+namespace FlexSample {
+
+enum FrontWindingType
+{
+ FRONT_WINDING_CLOCKWISE,
+ FRONT_WINDING_COUNTER_CLOCKWISE,
+};
+
+struct RenderAllocation;
+
+enum PrimitiveType
+{
+ PRIMITIVE_UNKNOWN,
+ PRIMITIVE_POINT,
+ PRIMITIVE_LINE,
+ PRIMITIVE_TRIANGLE,
+};
+
+/* Abstraction for how something is rendered. A pipeline indicates what kind of rendering it can be used with via the usage type */
+struct RenderPipeline
+{
+ //NV_CO_DECLARE_POLYMORPHIC_CLASS_BASE(RenderPipeline);
+public:
+ /// Bind with platform specific state
+ virtual int bind(const void* paramsIn, const void* platformState) = 0;
+ virtual int draw(const RenderAllocation& pointAlloc, size_t sizeOfAlloc, const void* platformState) = 0;
+
+ /// Get the usage type
+ inline PrimitiveType getPrimitiveType() const { return m_primitiveType; }
+
+ /// Ctor
+ RenderPipeline(PrimitiveType primitiveType): m_primitiveType(primitiveType) {}
+
+ virtual ~RenderPipeline() {}
+ private:
+ PrimitiveType m_primitiveType;
+};
+
+struct MeshData
+{
+ void init()
+ {
+ positions = nullptr;
+ normals = nullptr;
+ texcoords = nullptr;
+ colors = nullptr;
+ indices = nullptr;
+ numFaces = 0;
+ numVertices = 0;
+ }
+
+ const Vec3* positions;
+ const Vec3* normals;
+ const Vec2* texcoords;
+ const Vec4* colors;
+ const uint32_t* indices;
+ int numVertices;
+ int numFaces;
+};
+
+struct MeshData2
+{
+ void init()
+ {
+ positions = nullptr;
+ normals = nullptr;
+ texcoords = nullptr;
+ colors = nullptr;
+ indices = nullptr;
+ numFaces = 0;
+ numVertices = 0;
+ }
+
+ const Vec4* positions;
+ const Vec4* normals;
+ const Vec2* texcoords;
+ const Vec4* colors;
+ const uint32_t* indices;
+ ptrdiff_t numVertices;
+ ptrdiff_t numFaces;
+};
+
+
+struct LineData
+{
+ struct Vertex
+ {
+ Vec3 position;
+ Vec4 color;
+ };
+ void init()
+ {
+ vertices = nullptr;
+ indices = nullptr;
+ numLines = 0;
+ numVertices = 0;
+ }
+ const Vertex* vertices; ///< Must be set, and holds numPositions. If indices is nullptr, must hold at least numLines * 2
+ const uint32_t* indices; ///< If not nullptr holds 2 * numLines
+ ptrdiff_t numVertices; ///< The total amount of positions
+ ptrdiff_t numLines; ///< The total number of lines
+};
+
+struct PointData
+{
+ void init()
+ {
+ positions = nullptr;
+ density = nullptr;
+ phase = nullptr;
+ numPoints = 0;
+ for (int i = 0; i < 3; i++)
+ {
+ anisotropy[i] = nullptr;
+ }
+ indices = nullptr;
+ numIndices = 0;
+ }
+
+ const Vec4* positions;
+ const float* density;
+ const int* phase;
+ ptrdiff_t numPoints; //< The number of values in position, density and phase. It must be +1 the maximum particle indexed
+
+ const Vec4* anisotropy[3]; // Holds anisotropy or can be nullptr if not used
+
+ const uint32_t* indices; //< The indices to used particles
+ ptrdiff_t numIndices;
+};
+
+struct RenderMesh
+{
+ //NV_CO_DECLARE_POLYMORPHIC_CLASS_BASE(RenderMesh);
+public:
+ virtual ~RenderMesh() {};
+};
+
+struct RenderAllocation
+{
+ void init(PrimitiveType primType)
+ {
+ m_numPositions = -1;
+ m_numPrimitives = -1;
+ m_primitiveType = primType;
+ }
+
+ PrimitiveType m_primitiveType; ///< The primitive type to draw
+ ptrdiff_t m_numPositions; ///< The total number of positions
+ ptrdiff_t m_numPrimitives; ///< The total number of primitives
+};
+
+struct MeshRenderer
+{
+ //NV_CO_DECLARE_POLYMORPHIC_CLASS_BASE(MeshRenderer);
+public:
+ /// Draw a pre-created mesh
+ virtual int draw(RenderMesh* mesh, RenderPipeline* pipeline, const void* params) = 0;
+
+ /// Do an immediate mode draw
+ virtual int drawImmediate(const MeshData& meshData, RenderPipeline* pipeline, const void* params) = 0;
+ /// Do an immediate mode draw
+ virtual int drawImmediate(const MeshData2& meshData, RenderPipeline* pipeline, const void* params) = 0;
+ /// Draw particles immediately
+ virtual int drawImmediate(const PointData& pointData, RenderPipeline* pipeline, const void* params) = 0;
+ /// Draw lines immediately
+ virtual int drawImmediate(const LineData& lineData, RenderPipeline* pipeline, const void* params) = 0;
+
+ /// Render immediately using a previously transitory allocation
+ virtual int drawTransitory(RenderAllocation& allocation, size_t sizeOfAlloc, RenderPipeline* pipeline, const void* params) = 0;
+
+ /// Allocate rendering data temporarily in gpu accessible memory. Render with drawTransitory.
+ /// A transitory allocations lifetime is dependent on rendering API, but typically stays in scope for a frame, so multiple
+ /// draw Transitory allocation can be done for a single allocation - but only in drawing a single frame.
+ /// NOTE! The PointAllocation/MeshAllocation structures must be the derived type for the API being used (say Dx12PointAllocation)
+ /// this is verified by the sizeOfAlloc being that size.
+ virtual int allocateTransitory(const PointData& pointData, RenderAllocation& allocation, size_t sizeOfAlloc) = 0;
+ virtual int allocateTransitory(const MeshData& meshData, RenderAllocation& allocation, size_t sizeOfAlloc) = 0;
+ virtual int allocateTransitory(const MeshData2& meshData, RenderAllocation& allocation, size_t sizeOfAlloc) = 0;
+ virtual int allocateTransitory(const LineData& lineData, RenderAllocation& allocation, size_t sizeOfAlloc) = 0;
+
+ /// Create a render mesh from mesh data
+ virtual RenderMesh* createMesh(const MeshData& meshData) = 0;
+ virtual RenderMesh* createMesh(const MeshData2& meshData) = 0;
+};
+
+} // namespace FlexSample
+
+#endif \ No newline at end of file
diff --git a/demo/d3d12/meshRendererD3D12.cpp b/demo/d3d12/meshRendererD3D12.cpp
new file mode 100644
index 0000000..3ea4012
--- /dev/null
+++ b/demo/d3d12/meshRendererD3D12.cpp
@@ -0,0 +1,419 @@
+
+// this
+#include "meshRendererD3D12.h"
+
+namespace FlexSample {
+
+/* static */ const D3D12_INPUT_ELEMENT_DESC MeshRendererD3D12::MeshInputElementDescs[4] =
+{
+ { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+ { "NORMAL", 0, DXGI_FORMAT_R32G32B32_FLOAT, 1, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+ { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 2, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+ { "COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 3, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }
+};
+
+/* static */ const D3D12_INPUT_ELEMENT_DESC MeshRendererD3D12::PointInputElementDescs[3] =
+{
+ { "POSITION", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+ { "DENSITY", 0, DXGI_FORMAT_R32_FLOAT, 1, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+ { "PHASE", 0, DXGI_FORMAT_R32_SINT, 2, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+};
+
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Dx12RenderMesh !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+
+RenderMeshD3D12::RenderMeshD3D12()
+{
+ m_numVertices = 0;
+ m_numFaces = 0;
+}
+
+int RenderMeshD3D12::initialize(const RenderStateD3D12& state, const MeshData& meshData)
+{
+ NV_RETURN_ON_FAIL(m_positionBuffer.init(state, sizeof(Vec3), meshData.numVertices, meshData.positions));
+ NV_RETURN_ON_FAIL(m_normalBuffer.init(state, sizeof(Vec3), meshData.numVertices, meshData.normals));
+ NV_RETURN_ON_FAIL(m_texcoordBuffer.init(state, sizeof(Vec2), meshData.numVertices, meshData.texcoords));
+ NV_RETURN_ON_FAIL(m_colorBuffer.init(state, sizeof(Vec4), meshData.numVertices, meshData.colors));
+ NV_RETURN_ON_FAIL(m_indexBuffer.init(state, sizeof(uint32_t), meshData.numFaces * 3, meshData.indices));
+
+ m_numVertices = meshData.numVertices;
+ m_numFaces = meshData.numFaces;
+
+ _setBufferNames();
+ return NV_OK;
+}
+
+int RenderMeshD3D12::initialize(const RenderStateD3D12& state, const MeshData2& meshData)
+{
+ NV_RETURN_ON_FAIL(m_positionBuffer.init(state, sizeof(Vec4), sizeof(Vec3), meshData.numVertices, meshData.positions));
+ NV_RETURN_ON_FAIL(m_normalBuffer.init(state, sizeof(Vec4), sizeof(Vec3), meshData.numVertices, meshData.normals));
+ NV_RETURN_ON_FAIL(m_texcoordBuffer.init(state, sizeof(Vec2), meshData.numVertices, meshData.texcoords));
+ NV_RETURN_ON_FAIL(m_colorBuffer.init(state, sizeof(Vec4), meshData.numVertices, meshData.colors));
+ NV_RETURN_ON_FAIL(m_indexBuffer.init(state, sizeof(uint32_t), meshData.numFaces * 3, meshData.indices));
+
+ m_numVertices = meshData.numVertices;
+ m_numFaces = meshData.numFaces;
+
+ _setBufferNames();
+ return NV_OK;
+}
+
+void RenderMeshD3D12::_setBufferNames()
+{
+ m_positionBuffer.setDebugName(L"positions");
+ m_normalBuffer.setDebugName(L"normals");
+ m_texcoordBuffer.setDebugName(L"texcoords");
+ m_colorBuffer.setDebugName(L"colors");
+ m_indexBuffer.setDebugName(L"indices");
+}
+
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Dx12MeshRenderer !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+
+
+MeshRendererD3D12::MeshRendererD3D12()
+{
+}
+
+int MeshRendererD3D12::initialize(const RenderStateD3D12& state)
+{
+ m_renderState = state;
+ return NV_OK;
+}
+
+D3D12_VERTEX_BUFFER_VIEW MeshRendererD3D12::_newImmediateVertexBuffer(const void* data, int stride, ptrdiff_t numVertices)
+{
+ D3D12_VERTEX_BUFFER_VIEW view = {};
+ if (data)
+ {
+ const size_t bufferSize = stride * numVertices;
+ NvCo::Dx12CircularResourceHeap::Cursor cursor = m_renderState.m_constantHeap->allocateVertexBuffer(bufferSize);
+
+ memcpy(cursor.m_position, data, bufferSize);
+
+ view.BufferLocation = m_renderState.m_constantHeap->getGpuHandle(cursor);
+ view.SizeInBytes = UINT(bufferSize);
+ view.StrideInBytes = stride;
+ }
+ return view;
+}
+
+D3D12_VERTEX_BUFFER_VIEW MeshRendererD3D12::_newStridedImmediateVertexBuffer(const void* data, int srcStride, int dstStride, ptrdiff_t numElements)
+{
+ if (srcStride == dstStride)
+ {
+ return _newImmediateVertexBuffer(data, srcStride, numElements);
+ }
+
+ D3D12_VERTEX_BUFFER_VIEW view = {};
+ if (srcStride == 4 * 4 && dstStride == 4 * 3)
+ {
+ const size_t bufferSize = dstStride * numElements;
+ NvCo::Dx12CircularResourceHeap::Cursor cursor = m_renderState.m_constantHeap->allocateVertexBuffer(bufferSize);
+
+ uint32_t* dst = (uint32_t*)cursor.m_position;
+ const uint32_t* src = (const uint32_t*)data;
+
+ // Copy taking into account stride difference
+ for (ptrdiff_t i = 0; i < numElements; i++, dst += 3, src += 4)
+ {
+ dst[0] = src[0];
+ dst[1] = src[1];
+ dst[2] = src[2];
+ }
+
+ view.BufferLocation = m_renderState.m_constantHeap->getGpuHandle(cursor);
+ view.SizeInBytes = UINT(bufferSize);
+ view.StrideInBytes = dstStride;
+
+ return view;
+ }
+
+ printf("Unhandled conversion");
+ return view;
+}
+
+D3D12_INDEX_BUFFER_VIEW MeshRendererD3D12::_newImmediateIndexBuffer(const void* data, int stride, ptrdiff_t numIndices)
+{
+ assert(stride == sizeof(uint32_t));
+ D3D12_INDEX_BUFFER_VIEW view = {};
+
+ if (data)
+ {
+ const size_t bufferSize = stride * numIndices;
+ NvCo::Dx12CircularResourceHeap::Cursor cursor = m_renderState.m_constantHeap->allocateVertexBuffer(bufferSize);
+
+ memcpy(cursor.m_position, data, bufferSize);
+
+ view.BufferLocation = m_renderState.m_constantHeap->getGpuHandle(cursor);
+ view.SizeInBytes = UINT(bufferSize);
+ view.Format = DXGI_FORMAT_R32_UINT;
+ }
+
+ return view;
+}
+
+int MeshRendererD3D12::draw(RenderMesh* meshIn, RenderPipeline* pipeline, const void* params)
+{
+ RenderMeshD3D12* mesh = static_cast<RenderMeshD3D12*>(meshIn);
+
+ // Set up the allocation block
+ MeshRenderAllocationD3D12 alloc;
+ alloc.init(PRIMITIVE_TRIANGLE);
+
+ alloc.m_vertexBufferViews[0] = mesh->m_positionBuffer.m_vertexBufferView;
+ alloc.m_vertexBufferViews[1] = mesh->m_normalBuffer.m_vertexBufferView;
+ alloc.m_vertexBufferViews[2] = mesh->m_texcoordBuffer.m_vertexBufferView;
+ alloc.m_vertexBufferViews[3] = mesh->m_colorBuffer.m_vertexBufferView;
+
+ alloc.m_indexBufferView = mesh->m_indexBuffer.m_indexBufferView;
+ alloc.m_numPrimitives = mesh->m_numFaces;
+ alloc.m_numPositions = mesh->m_numVertices;
+
+ return drawTransitory(alloc, sizeof(MeshRenderAllocationD3D12), pipeline, params);
+}
+
+int MeshRendererD3D12::drawImmediate(const MeshData& mesh, RenderPipeline* pipeline, const void* params)
+{
+ MeshRenderAllocationD3D12 alloc;
+ allocateTransitory(mesh, alloc, sizeof(alloc));
+ return drawTransitory(alloc, sizeof(alloc), pipeline, params);
+}
+
+int MeshRendererD3D12::drawImmediate(const MeshData2& mesh, RenderPipeline* pipeline, const void* params)
+{
+ MeshRenderAllocationD3D12 alloc;
+ allocateTransitory(mesh, alloc, sizeof(alloc));
+ return drawTransitory(alloc, sizeof(alloc), pipeline, params);
+}
+
+int MeshRendererD3D12::drawImmediate(const LineData& lineData, RenderPipeline* pipeline, const void* params)
+{
+ LineRenderAllocationD3D12 alloc;
+ allocateTransitory(lineData, alloc, sizeof(alloc));
+ return drawTransitory(alloc, sizeof(alloc), pipeline, params);
+}
+
+int MeshRendererD3D12::drawImmediate(const PointData& pointData, RenderPipeline* pipeline, const void* params)
+{
+ PointRenderAllocationD3D12 alloc;
+ allocateTransitory(pointData, alloc, sizeof(alloc));
+ return drawTransitory(alloc, sizeof(alloc), pipeline, params);
+}
+
+int MeshRendererD3D12::allocateTransitory(const PointData& pointData, RenderAllocation& allocIn, size_t sizeOfAlloc)
+{
+ typedef PointRenderAllocationD3D12 Alloc;
+
+ assert(sizeof(Alloc) == sizeOfAlloc);
+
+ Alloc& alloc = static_cast<Alloc&>(allocIn);
+ alloc.init(PRIMITIVE_POINT);
+
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_POSITION] = _newImmediateVertexBuffer(pointData.positions, sizeof(Vec4), pointData.numPoints);
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_DENSITY] = _newImmediateVertexBuffer(pointData.density, sizeof(float), pointData.numPoints);
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_PHASE] = _newImmediateVertexBuffer(pointData.phase, sizeof(int), pointData.numPoints);
+
+ if (pointData.anisotropy[0])
+ {
+ for (int i = 0; i < 3; i++)
+ {
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_ANISOTROPY1 + i] = _newImmediateVertexBuffer(pointData.anisotropy[i], sizeof(Vec4), pointData.numPoints);
+ }
+ }
+
+ alloc.m_indexBufferView = _newImmediateIndexBuffer(pointData.indices, sizeof(uint32_t), pointData.numIndices);
+
+ alloc.m_numPrimitives = pointData.numIndices;
+ alloc.m_numPositions = pointData.numPoints;
+ return NV_OK;
+}
+
+int MeshRendererD3D12::allocateTransitory(const MeshData2& mesh, RenderAllocation& allocIn, size_t sizeOfAlloc)
+{
+ typedef MeshRenderAllocationD3D12 Alloc;
+ assert(sizeof(Alloc) == sizeOfAlloc);
+
+ Alloc& alloc = static_cast<Alloc&>(allocIn);
+ alloc.init(PRIMITIVE_TRIANGLE);
+
+ const int numIndices = int(mesh.numFaces * 3);
+ alloc.m_indexBufferView = _newImmediateIndexBuffer(mesh.indices, sizeof(uint32_t), numIndices);
+
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_POSITION] = _newStridedImmediateVertexBuffer(mesh.positions, sizeof(Vec4), sizeof(Vec3), mesh.numVertices);
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_NORMAL] = _newStridedImmediateVertexBuffer(mesh.normals, sizeof(Vec4), sizeof(Vec3), mesh.numVertices);
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_TEX_COORDS] = _newImmediateVertexBuffer(mesh.texcoords, sizeof(Vec2), mesh.numVertices);
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_COLOR] = _newImmediateVertexBuffer(mesh.colors, sizeof(Vec4), mesh.numVertices);
+
+ alloc.m_numPrimitives = mesh.numFaces;
+ alloc.m_numPositions = mesh.numVertices;
+ return NV_OK;
+}
+
+int MeshRendererD3D12::allocateTransitory(const LineData& lineData, RenderAllocation& allocIn, size_t sizeOfAlloc)
+{
+ typedef LineRenderAllocationD3D12 Alloc;
+ assert(sizeof(Alloc) == sizeOfAlloc);
+
+ Alloc& alloc = static_cast<Alloc&>(allocIn);
+ alloc.init(PRIMITIVE_LINE);
+
+ alloc.m_vertexBufferView = _newImmediateVertexBuffer(lineData.vertices, sizeof(LineData::Vertex), lineData.numVertices);
+ alloc.m_indexBufferView = _newImmediateIndexBuffer(lineData.indices, sizeof(uint32_t), lineData.numLines * 2);
+
+ alloc.m_numPrimitives = lineData.numLines;
+ alloc.m_numPositions = lineData.numVertices;
+ return NV_OK;
+}
+
+int MeshRendererD3D12::allocateTransitory(const MeshData& mesh, RenderAllocation& allocIn, size_t sizeOfAlloc)
+{
+ typedef MeshRenderAllocationD3D12 Alloc;
+ assert(sizeof(Alloc) == sizeOfAlloc);
+
+ Alloc& alloc = static_cast<Alloc&>(allocIn);
+
+ alloc.init(PRIMITIVE_TRIANGLE);
+
+ const int numIndices = int(mesh.numFaces * 3);
+ alloc.m_indexBufferView = _newImmediateIndexBuffer(mesh.indices, sizeof(uint32_t), numIndices);
+
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_POSITION] = _newImmediateVertexBuffer(mesh.positions, sizeof(Vec3), mesh.numVertices);
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_NORMAL] = _newImmediateVertexBuffer(mesh.normals, sizeof(Vec3), mesh.numVertices);
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_TEX_COORDS] = _newImmediateVertexBuffer(mesh.texcoords, sizeof(Vec2), mesh.numVertices);
+ alloc.m_vertexBufferViews[Alloc::VERTEX_VIEW_COLOR] = _newImmediateVertexBuffer(mesh.colors, sizeof(Vec4), mesh.numVertices);
+
+ alloc.m_numPrimitives = mesh.numFaces;
+ alloc.m_numPositions = mesh.numVertices;
+
+ return NV_OK;
+}
+
+int MeshRendererD3D12::drawTransitory(RenderAllocation& allocIn, size_t sizeOfAlloc, RenderPipeline* pipeline, const void* params)
+{
+ if (allocIn.m_primitiveType == PRIMITIVE_UNKNOWN)
+ {
+ return NV_OK;
+ }
+ if (allocIn.m_primitiveType != pipeline->getPrimitiveType())
+ {
+ printf("Wrong pipeline primitive type");
+ return NV_FAIL;
+ }
+
+ NV_RETURN_ON_FAIL(pipeline->bind(params, &m_renderState));
+ NV_RETURN_ON_FAIL(pipeline->draw(allocIn, sizeOfAlloc, &m_renderState));
+ return NV_OK;
+}
+
+RenderMesh* MeshRendererD3D12::createMesh(const MeshData& meshData)
+{
+ RenderMeshD3D12* mesh = new RenderMeshD3D12;
+ if (NV_FAILED(mesh->initialize(m_renderState, meshData)))
+ {
+ delete mesh;
+ return nullptr;
+ }
+ return mesh;
+}
+
+RenderMesh* MeshRendererD3D12::createMesh(const MeshData2& meshData)
+{
+ RenderMeshD3D12* mesh = new RenderMeshD3D12;
+ if (NV_FAILED(mesh->initialize(m_renderState, meshData)))
+ {
+ delete mesh;
+ return nullptr;
+ }
+ return mesh;
+}
+
+
+/* static */int MeshRendererD3D12::defaultDraw(const RenderAllocation& allocIn, size_t sizeOfAlloc, const void* platformState)
+{
+ const RenderStateD3D12& state = *(RenderStateD3D12*)platformState;
+ ID3D12GraphicsCommandList* commandList = state.m_commandList;
+
+ switch (allocIn.m_primitiveType)
+ {
+ case PRIMITIVE_POINT:
+ {
+ typedef PointRenderAllocationD3D12 Alloc;
+ const RenderStateD3D12& state = *(RenderStateD3D12*)platformState;
+
+ assert(sizeof(Alloc) == sizeOfAlloc);
+ const Alloc& alloc = static_cast<const Alloc&>(allocIn);
+
+ assert(allocIn.m_numPrimitives >= 0);
+
+ ID3D12GraphicsCommandList* commandList = state.m_commandList;
+
+ commandList->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_POINTLIST);
+ commandList->IASetVertexBuffers(0, Alloc::NUM_DEFAULT_VERTEX_VIEWS, alloc.m_vertexBufferViews);
+ commandList->IASetIndexBuffer(&alloc.m_indexBufferView);
+
+ if (alloc.m_indexBufferView.SizeInBytes)
+ {
+ commandList->DrawIndexedInstanced((UINT)allocIn.m_numPrimitives, 1, 0, 0, 0);
+ }
+ else
+ {
+ commandList->DrawInstanced((UINT)allocIn.m_numPrimitives, 1, 0, 0);
+ }
+ break;
+ }
+ case PRIMITIVE_LINE:
+ {
+ typedef LineRenderAllocationD3D12 Alloc;
+ assert(sizeof(Alloc) == sizeOfAlloc);
+ const Alloc& alloc = static_cast<const Alloc&>(allocIn);
+
+ assert(alloc.m_numPrimitives >= 0);
+
+ const int numIndices = int(alloc.m_numPrimitives * 2);
+
+ commandList->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_LINELIST);
+ commandList->IASetVertexBuffers(0, 1, &alloc.m_vertexBufferView);
+
+ if (alloc.m_indexBufferView.SizeInBytes)
+ {
+ commandList->IASetIndexBuffer(nullptr);
+ commandList->DrawIndexedInstanced((UINT)numIndices, 1, 0, 0, 0);
+ }
+ else
+ {
+ commandList->IASetIndexBuffer(&alloc.m_indexBufferView);
+ commandList->DrawInstanced((UINT)numIndices, 1, 0, 0);
+ }
+ break;
+ }
+ case PRIMITIVE_TRIANGLE:
+ {
+ typedef MeshRenderAllocationD3D12 Alloc;
+ assert(sizeof(Alloc) == sizeOfAlloc);
+ const Alloc& alloc = static_cast<const Alloc&>(allocIn);
+
+ const int numIndices = int(alloc.m_numPrimitives * 3);
+
+ commandList->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
+ commandList->IASetVertexBuffers(0, _countof(alloc.m_vertexBufferViews), alloc.m_vertexBufferViews);
+ commandList->IASetIndexBuffer(&alloc.m_indexBufferView);
+
+ if (alloc.m_indexBufferView.SizeInBytes)
+ {
+ commandList->DrawIndexedInstanced((UINT)numIndices, 1, 0, 0, 0);
+ }
+ else
+ {
+ commandList->DrawInstanced((UINT)numIndices, 1, 0, 0);
+ }
+ break;
+ }
+ default:
+ {
+ printf("Unhandled primitive type");
+ }
+ }
+
+ return NV_OK;
+}
+
+} // namespace FlexSample \ No newline at end of file
diff --git a/demo/d3d12/meshRendererD3D12.h b/demo/d3d12/meshRendererD3D12.h
new file mode 100644
index 0000000..1afb6b3
--- /dev/null
+++ b/demo/d3d12/meshRendererD3D12.h
@@ -0,0 +1,175 @@
+#ifndef MESH_RENDERER_D3D12_H
+#define MESH_RENDERER_D3D12_H
+
+#include "bufferD3D12.h"
+
+#include "renderStateD3D12.h"
+#include "meshRenderer.h"
+
+// Predeclare so all use the same
+struct ShadowMap;
+
+namespace FlexSample {
+using namespace nvidia;
+
+struct MeshRendererD3D12;
+struct RenderMeshD3D12: public RenderMesh
+{
+ //NV_CO_DECLARE_POLYMORPHIC_CLASS(RenderMeshD3D12, RenderMesh);
+public:
+ typedef RenderMesh Parent;
+
+ friend struct MeshRendererD3D12;
+
+ RenderMeshD3D12();
+ int initialize(const RenderStateD3D12& state, const MeshData& meshData);
+ int initialize(const RenderStateD3D12& state, const MeshData2& meshData);
+
+ protected:
+ void _setBufferNames();
+
+ VertexBufferD3D12 m_positionBuffer;
+ VertexBufferD3D12 m_normalBuffer;
+ VertexBufferD3D12 m_texcoordBuffer;
+ VertexBufferD3D12 m_colorBuffer;
+ IndexBufferD3D12 m_indexBuffer;
+
+ ptrdiff_t m_numVertices;
+ ptrdiff_t m_numFaces;
+};
+
+struct PointRenderAllocationD3D12: public RenderAllocation
+{
+ typedef RenderAllocation Parent;
+ enum VertexViewType
+ {
+ // NOTE! Do not change order without fixing pipelines that use it!
+ VERTEX_VIEW_POSITION,
+ VERTEX_VIEW_DENSITY,
+ VERTEX_VIEW_PHASE,
+
+ VERTEX_VIEW_ANISOTROPY1,
+ VERTEX_VIEW_ANISOTROPY2,
+ VERTEX_VIEW_ANISOTROPY3,
+
+ VERTEX_VIEW_COUNT_OF,
+ };
+ enum
+ {
+ // For typical point rendering we don't need anisotropy, so typically just bind the first 3
+ NUM_DEFAULT_VERTEX_VIEWS = VERTEX_VIEW_PHASE + 1
+ };
+
+ /// Initialize state
+ void init(PrimitiveType primitiveType)
+ {
+ Parent::init(primitiveType);
+ D3D12_VERTEX_BUFFER_VIEW nullView = {};
+ for (int i = 0; i < _countof(m_vertexBufferViews); i++)
+ {
+ m_vertexBufferViews[i] = nullView;
+ }
+ D3D12_INDEX_BUFFER_VIEW nullIndexView = {};
+ m_indexBufferView = nullIndexView;
+ }
+
+ D3D12_VERTEX_BUFFER_VIEW m_vertexBufferViews[VERTEX_VIEW_COUNT_OF];
+ D3D12_INDEX_BUFFER_VIEW m_indexBufferView;
+};
+
+struct MeshRenderAllocationD3D12:public RenderAllocation
+{
+ typedef RenderAllocation Parent;
+
+ // Vertex buffer viewer are in the order to be set
+ enum VertexViewType
+ {
+ // NOTE! Do not change order without fixing pipelines that use it!
+ VERTEX_VIEW_POSITION,
+ VERTEX_VIEW_NORMAL,
+ VERTEX_VIEW_TEX_COORDS,
+ VERTEX_VIEW_COLOR,
+
+ VERTEX_VIEW_COUNT_OF,
+ };
+
+ void init(PrimitiveType primType)
+ {
+ Parent::init(primType);
+ D3D12_VERTEX_BUFFER_VIEW nullView = {};
+ for (int i = 0; i < _countof(m_vertexBufferViews); i++)
+ {
+ m_vertexBufferViews[i] = nullView;
+ }
+ D3D12_INDEX_BUFFER_VIEW nullIndexView = {};
+ m_indexBufferView = nullIndexView;
+ }
+
+ D3D12_VERTEX_BUFFER_VIEW m_vertexBufferViews[VERTEX_VIEW_COUNT_OF];
+ D3D12_INDEX_BUFFER_VIEW m_indexBufferView;
+};
+
+struct LineRenderAllocationD3D12 :public RenderAllocation
+{
+ typedef RenderAllocation Parent;
+
+ void init(PrimitiveType primType)
+ {
+ Parent::init(primType);
+ const D3D12_VERTEX_BUFFER_VIEW nullView = {};
+ m_vertexBufferView = nullView;
+ const D3D12_INDEX_BUFFER_VIEW nullIndexView = {};
+ m_indexBufferView = nullIndexView;
+ }
+
+ D3D12_VERTEX_BUFFER_VIEW m_vertexBufferView;
+ D3D12_INDEX_BUFFER_VIEW m_indexBufferView;
+};
+
+struct MeshRendererD3D12: public MeshRenderer
+{
+ //NV_CO_DECLARE_POLYMORPHIC_CLASS(MeshRendererD3D12, MeshRenderer);
+public:
+ typedef MeshRenderer Parent;
+
+ /// MeshRenderer
+ virtual int draw(RenderMesh* mesh, RenderPipeline* pipeline, const void* params) override;
+ virtual int drawImmediate(const MeshData& mesh, RenderPipeline* pipeline, const void* params) override;
+ virtual int drawImmediate(const MeshData2& meshData, RenderPipeline* pipeline, const void* params) override;
+ virtual int drawImmediate(const PointData& pointData, RenderPipeline* pipeline, const void* params) override;
+ virtual int drawImmediate(const LineData& lineData, RenderPipeline* pipeline, const void* params) override;
+
+ virtual RenderMesh* createMesh(const MeshData& meshData) override;
+ virtual RenderMesh* createMesh(const MeshData2& meshData) override;
+
+ virtual int allocateTransitory(const PointData& pointData, RenderAllocation& allocation, size_t sizeOfAlloc) override;
+ virtual int allocateTransitory(const MeshData& meshData, RenderAllocation& allocIn, size_t sizeofAlloc) override;
+ virtual int allocateTransitory(const MeshData2& meshData, RenderAllocation& allocation, size_t sizeofAlloc) override;
+ virtual int allocateTransitory(const LineData& lineData, RenderAllocation& allocation, size_t sizeOfAlloc) override;
+
+ virtual int drawTransitory(RenderAllocation& allocation, size_t sizeOfAlloc, RenderPipeline* pipeline, const void* params) override;
+
+ int initialize(const RenderStateD3D12& state);
+
+ MeshRendererD3D12();
+
+ /// Default drawing impls, can be used in pipelines
+ static int defaultDraw(const RenderAllocation& allocIn, size_t sizeOfAlloc, const void* platformState);
+
+ /// The input desc layout used
+ static const D3D12_INPUT_ELEMENT_DESC MeshInputElementDescs[4];
+ /// Layout for points
+ static const D3D12_INPUT_ELEMENT_DESC PointInputElementDescs[3];
+
+ protected:
+
+ D3D12_VERTEX_BUFFER_VIEW _newImmediateVertexBuffer(const void* data, int stride, ptrdiff_t numVertices);
+ D3D12_VERTEX_BUFFER_VIEW _newStridedImmediateVertexBuffer(const void* data, int srcStride, int dstStride, ptrdiff_t numElements);
+ D3D12_INDEX_BUFFER_VIEW _newImmediateIndexBuffer(const void* data, int stride, ptrdiff_t numIndices);
+
+ RenderStateD3D12 m_renderState;
+};
+
+} // namespace FlexSample
+
+#endif \ No newline at end of file
diff --git a/demo/d3d12/meshUtil.cpp b/demo/d3d12/meshUtil.cpp
new file mode 100644
index 0000000..b83a3f4
--- /dev/null
+++ b/demo/d3d12/meshUtil.cpp
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+#include "meshUtil.h"
+
+namespace FlexSample {
+
+/* static */RenderMesh* MeshUtil::createRenderMesh(MeshRenderer* renderer, const Mesh& mesh)
+{
+ int numFaces = mesh.GetNumFaces();
+ int numVertices = mesh.GetNumVertices();
+
+ MeshData data;
+ data.colors = (mesh.m_colours.size() > 0) ? (const Vec4*)&mesh.m_colours[0] : nullptr;
+ data.positions = (mesh.m_positions.size() > 0) ? (const Vec3*)&mesh.m_positions[0] : nullptr;
+ data.normals = (mesh.m_normals.size() > 0) ? (const Vec3*)&mesh.m_normals[0] : nullptr;
+ data.indices = (mesh.m_indices.size() > 0) ? (const uint32_t*)&mesh.m_indices[0] : nullptr;
+ data.texcoords = (mesh.m_texcoords[0].size() > 0) ? (const Vec2*)&mesh.m_texcoords[0] : nullptr;
+
+ data.numFaces = numFaces;
+ data.numVertices = numVertices;
+
+ return renderer->createMesh(data);
+}
+
+} // namespace FlexSample \ No newline at end of file
diff --git a/demo/d3d12/meshUtil.h b/demo/d3d12/meshUtil.h
new file mode 100644
index 0000000..a9070b7
--- /dev/null
+++ b/demo/d3d12/meshUtil.h
@@ -0,0 +1,26 @@
+#ifndef MESH_UTIL_H
+#define MESH_UTIL_H
+
+// Needed for mesh.h
+#pragma warning( disable : 4458 )
+
+#include "meshRenderer.h"
+
+#include <core/mesh.h>
+
+typedef ::Vec4 FlexVec4;
+typedef ::Vec3 FlexVec3;
+typedef ::Vec2 FlexVec2;
+
+namespace FlexSample {
+//using namespace nvidia;
+
+/* Tools/types to implify use of the flex 'Mesh' types */
+struct MeshUtil
+{
+ static RenderMesh* createRenderMesh(MeshRenderer* renderer, const Mesh& mesh);
+};
+
+} // namespace FlexSample
+
+#endif \ No newline at end of file
diff --git a/demo/d3d12/pipelineUtilD3D12.cpp b/demo/d3d12/pipelineUtilD3D12.cpp
new file mode 100644
index 0000000..81e2581
--- /dev/null
+++ b/demo/d3d12/pipelineUtilD3D12.cpp
@@ -0,0 +1,78 @@
+
+// this
+#include "pipelineUtilD3D12.h"
+
+namespace NvCo = nvidia::Common;
+
+namespace FlexSample {
+
+/* static */void PipelineUtilD3D::initRasterizerDesc(FrontWindingType winding, D3D12_RASTERIZER_DESC& desc)
+{
+ desc.FillMode = D3D12_FILL_MODE_SOLID;
+ desc.CullMode = D3D12_CULL_MODE_NONE;
+
+ desc.FrontCounterClockwise = (winding == FRONT_WINDING_COUNTER_CLOCKWISE);
+
+ desc.DepthBias = D3D12_DEFAULT_DEPTH_BIAS;
+ desc.DepthBiasClamp = D3D12_DEFAULT_DEPTH_BIAS_CLAMP;
+ desc.SlopeScaledDepthBias = D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS;
+ desc.DepthClipEnable = TRUE;
+ desc.MultisampleEnable = FALSE;
+ desc.AntialiasedLineEnable = FALSE;
+ desc.ForcedSampleCount = 0;
+ desc.ConservativeRaster = D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF;
+}
+
+/* static */void PipelineUtilD3D::initSolidBlendDesc(D3D12_BLEND_DESC& desc)
+{
+ desc.AlphaToCoverageEnable = FALSE;
+ desc.IndependentBlendEnable = FALSE;
+ {
+ const D3D12_RENDER_TARGET_BLEND_DESC defaultRenderTargetBlendDesc =
+ {
+ FALSE,FALSE,
+ D3D12_BLEND_ONE, D3D12_BLEND_ZERO, D3D12_BLEND_OP_ADD,
+ D3D12_BLEND_ONE, D3D12_BLEND_ZERO, D3D12_BLEND_OP_ADD,
+ D3D12_LOGIC_OP_NOOP,
+ D3D12_COLOR_WRITE_ENABLE_ALL,
+ };
+ for (UINT i = 0; i < D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i)
+ desc.RenderTarget[i] = defaultRenderTargetBlendDesc;
+ }
+}
+
+/* static */void PipelineUtilD3D::initTargetFormat(NvCo::Dx12RenderTarget* renderTarget, AppGraphCtxD3D12* renderContext, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc)
+{
+ psoDesc.DepthStencilState.DepthEnable = TRUE;
+ psoDesc.DepthStencilState.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL;
+ psoDesc.DepthStencilState.DepthFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL;
+ psoDesc.DepthStencilState.StencilEnable = FALSE;
+ psoDesc.SampleMask = UINT_MAX;
+
+ // Normally single render target
+ psoDesc.NumRenderTargets = 1;
+
+ if (renderTarget)
+ {
+ psoDesc.RTVFormats[0] = renderTarget->getTargetFormat(NvCo::Dx12RenderTarget::BUFFER_TARGET);
+ psoDesc.DSVFormat = renderTarget->getTargetFormat(NvCo::Dx12RenderTarget::BUFFER_DEPTH_STENCIL);
+ psoDesc.NumRenderTargets = renderTarget->getNumRenderTargets();
+ psoDesc.SampleDesc.Count = 1;
+ }
+ else
+ {
+ const NvCo::Dx12TargetInfo& targetInfo = renderContext->m_targetInfo;
+
+ psoDesc.RTVFormats[0] = targetInfo.m_renderTargetFormats[0];
+ psoDesc.DSVFormat = targetInfo.m_depthStencilFormat;
+ psoDesc.SampleDesc.Count = targetInfo.m_numSamples;
+ }
+
+ // If no depth buffer, disable
+ if (psoDesc.DSVFormat == DXGI_FORMAT_UNKNOWN)
+ {
+ psoDesc.DepthStencilState.DepthEnable = FALSE;
+ }
+}
+
+} // namespace FlexSample \ No newline at end of file
diff --git a/demo/d3d12/pipelineUtilD3D12.h b/demo/d3d12/pipelineUtilD3D12.h
new file mode 100644
index 0000000..2949bd3
--- /dev/null
+++ b/demo/d3d12/pipelineUtilD3D12.h
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+#ifndef PIPELINE_UTIL_D3D12_H
+#define PIPELINE_UTIL_D3D12_H
+
+#define NOMINMAX
+#include <dxgi.h>
+#include <d3d12.h>
+
+#include "meshRenderer.h"
+#include <NvCoDx12RenderTarget.h>
+
+namespace FlexSample {
+using namespace nvidia;
+
+struct PipelineUtilD3D
+{
+ /// Default initializes rasterizer
+ static void initRasterizerDesc(FrontWindingType winding, D3D12_RASTERIZER_DESC& desc);
+ /// Initialize default blend desc for solid rendering
+ static void initSolidBlendDesc(D3D12_BLEND_DESC& desc);
+ /// Set on psoDesc the format/samples and set up other default state.
+ /// If renderTarget is NV_NULL then the format that's set on the Dx12RenderInterface/RenderContext is used
+ static void initTargetFormat(Common::Dx12RenderTarget* renderTarget, AppGraphCtxD3D12* renderContext, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc);
+};
+
+} // namespace FlexSample
+
+#endif \ No newline at end of file
diff --git a/demo/d3d12/pointRenderPipelineD3D12.cpp b/demo/d3d12/pointRenderPipelineD3D12.cpp
new file mode 100644
index 0000000..7650c49
--- /dev/null
+++ b/demo/d3d12/pointRenderPipelineD3D12.cpp
@@ -0,0 +1,227 @@
+#define NOMINMAX
+
+#include <NvCoDx12HelperUtil.h>
+#include <external/D3D12/include/d3dx12.h>
+
+#include "pipelineUtilD3D12.h"
+#include "bufferD3D12.h"
+#include "meshRendererD3D12.h"
+#include "../d3d/shaderCommonD3D.h"
+
+// this
+#include "pointRenderPipelineD3D12.h"
+
+// Shaders
+#include "../d3d/shaders/pointVS.hlsl.h"
+#include "../d3d/shaders/pointGS.hlsl.h"
+#include "../d3d/shaders/pointPS.hlsl.h"
+#include "../d3d/shaders/pointShadowPS.hlsl.h"
+
+namespace FlexSample {
+
+PointRenderPipelineD3D12::PointRenderPipelineD3D12():
+ Parent(PRIMITIVE_POINT),
+ m_shadowMapLinearSamplerIndex(-1)
+{
+}
+
+/* static */PointRenderPipelineD3D12::PipelineStateType PointRenderPipelineD3D12::getPipelineStateType(PointDrawStage stage, PointRenderMode mode, PointCullMode cull)
+{
+ switch (stage)
+ {
+ case POINT_DRAW_SHADOW: return PIPELINE_STATE_SHADOW;
+ default: return PIPELINE_STATE_LIGHT_SOLID;
+ }
+}
+
+static D3D12_FILL_MODE _getFillMode(PointRenderPipelineD3D12::PipelineStateType type)
+{
+ return D3D12_FILL_MODE_SOLID;
+}
+
+static D3D12_CULL_MODE _getCullMode(PointRenderPipelineD3D12::PipelineStateType type)
+{
+ return D3D12_CULL_MODE_NONE;
+}
+
+static void _initRasterizerDesc(PointRenderPipelineD3D12::PipelineStateType type, D3D12_RASTERIZER_DESC& desc)
+{
+ PipelineUtilD3D::initRasterizerDesc(FRONT_WINDING_COUNTER_CLOCKWISE, desc);
+ desc.FillMode = _getFillMode(type);
+ desc.CullMode = _getCullMode(type);
+}
+
+static void _initPipelineStateDesc(PointRenderPipelineD3D12::PipelineStateType type, NvCo::Dx12RenderTarget* shadowMap, AppGraphCtxD3D12* renderContext, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc)
+{
+ PipelineUtilD3D::initTargetFormat((shadowMap && type == PointRenderPipelineD3D12::PIPELINE_STATE_SHADOW) ? shadowMap : nullptr, renderContext, psoDesc);
+
+ psoDesc.InputLayout.NumElements = _countof(MeshRendererD3D12::PointInputElementDescs);
+ psoDesc.InputLayout.pInputElementDescs = MeshRendererD3D12::PointInputElementDescs;
+ psoDesc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT;
+}
+
+int PointRenderPipelineD3D12::initialize(const RenderStateD3D12& state, const std::wstring& shadersPath, int shadowMapLinearSamplerIndex, NvCo::Dx12RenderTarget* shadowMap)
+{
+ using namespace NvCo;
+ ID3D12Device* device = state.m_device;
+
+ m_shadowMapLinearSamplerIndex = shadowMapLinearSamplerIndex;
+
+ // create the pipeline state object
+ {
+ D3D12_GRAPHICS_PIPELINE_STATE_DESC psoDesc = {};
+ PipelineUtilD3D::initSolidBlendDesc(psoDesc.BlendState);
+
+ // create the root signature
+ ComPtr<ID3D12RootSignature> signiture;
+ {
+ CD3DX12_DESCRIPTOR_RANGE ranges[2];
+ CD3DX12_ROOT_PARAMETER params[3];
+
+ UINT rootIndex = 0;
+ {
+ D3D12_ROOT_PARAMETER& param = params[rootIndex++];
+ param.ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV;
+ param.Descriptor.ShaderRegister = 0u;
+ param.Descriptor.RegisterSpace = 0u;
+ param.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL;
+ }
+
+ const int numSrvs = 1;
+ if (numSrvs > 0)
+ {
+ ranges[0].Init(D3D12_DESCRIPTOR_RANGE_TYPE_SRV, numSrvs, 0);
+ params[rootIndex++].InitAsDescriptorTable(1, &ranges[0], D3D12_SHADER_VISIBILITY_PIXEL);
+ }
+ const int numSamplers = 1;
+ if (numSamplers > 0)
+ {
+ ranges[1].Init(D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER, numSamplers, 0);
+ params[rootIndex++].InitAsDescriptorTable(1, &ranges[1], D3D12_SHADER_VISIBILITY_PIXEL);
+ }
+
+ D3D12_ROOT_SIGNATURE_DESC desc;
+ desc.NumParameters = rootIndex;
+ desc.pParameters = params;
+ desc.NumStaticSamplers = 0;
+ desc.pStaticSamplers = nullptr;
+ desc.Flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT;
+
+ ComPtr<ID3DBlob> sigBlob;
+ NV_RETURN_ON_FAIL(Dx12HelperUtil::serializeRootSigniture(desc, D3D_ROOT_SIGNATURE_VERSION_1, sigBlob));
+ NV_RETURN_ON_FAIL(device->CreateRootSignature(0u, sigBlob->GetBufferPointer(), sigBlob->GetBufferSize(), IID_PPV_ARGS(&signiture)));
+ }
+
+ {
+ psoDesc.VS = Dx12Blob(g_pointVS);
+ psoDesc.GS = Dx12Blob(g_pointGS);
+ psoDesc.PS = Dx12Blob(g_pointPS);
+
+ NV_RETURN_ON_FAIL(_initPipelineState(state, shadowMap, PIPELINE_STATE_LIGHT_SOLID, signiture.Get(), psoDesc));
+ }
+
+ // Shadow rendering
+ {
+ D3D12_ROOT_PARAMETER params[1];
+ params[0].ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV;
+ params[0].Descriptor.ShaderRegister = 0u;
+ params[0].Descriptor.RegisterSpace = 0u;
+ params[0].ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL;
+
+ D3D12_ROOT_SIGNATURE_DESC desc;
+ desc.NumParameters = 1;
+ desc.pParameters = params;
+ desc.NumStaticSamplers = 0u;
+ desc.pStaticSamplers = nullptr;
+ desc.Flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT;
+
+ ComPtr<ID3DBlob> sigBlob;
+ NV_RETURN_ON_FAIL(Dx12HelperUtil::serializeRootSigniture(desc, D3D_ROOT_SIGNATURE_VERSION_1, sigBlob));
+ NV_RETURN_ON_FAIL(device->CreateRootSignature(0u, sigBlob->GetBufferPointer(), sigBlob->GetBufferSize(), IID_PPV_ARGS(&signiture)));
+ }
+
+ {
+ psoDesc.VS = Dx12Blob(g_pointVS);
+ psoDesc.GS = Dx12Blob(g_pointGS);
+ psoDesc.PS = Dx12Blob(g_pointShadowPS);
+
+ NV_RETURN_ON_FAIL(_initPipelineState(state, shadowMap, PIPELINE_STATE_SHADOW, signiture.Get(), psoDesc));
+ }
+ }
+
+ return NV_OK;
+}
+
+int PointRenderPipelineD3D12::_initPipelineState(const RenderStateD3D12& state, NvCo::Dx12RenderTarget* shadowMap, PipelineStateType pipeType, ID3D12RootSignature* signiture, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc)
+{
+ ID3D12Device* device = state.m_device;
+
+ _initRasterizerDesc(pipeType, psoDesc.RasterizerState);
+ _initPipelineStateDesc(pipeType, shadowMap, state.m_renderContext, psoDesc);
+
+ psoDesc.pRootSignature = signiture;
+
+ PipelineStateD3D12& pipeState = m_states[pipeType];
+ pipeState.m_rootSignature = signiture;
+
+ NV_RETURN_ON_FAIL(device->CreateGraphicsPipelineState(&psoDesc, IID_PPV_ARGS(&pipeState.m_pipelineState)));
+ return NV_OK;
+}
+
+int PointRenderPipelineD3D12::bind(const void* paramsIn, const void* platformState)
+{
+ const RenderStateD3D12& state = *(RenderStateD3D12*)platformState;
+ const PointDrawParamsD3D& params = *(PointDrawParamsD3D*)paramsIn;
+
+ // Set up constant buffer
+ NvCo::Dx12CircularResourceHeap::Cursor cursor;
+ {
+ Hlsl::PointShaderConst constBuf;
+ RenderParamsUtilD3D::calcPointConstantBuffer(params, constBuf);
+ cursor = state.m_constantHeap->newConstantBuffer(constBuf);
+ if (!cursor.isValid())
+ {
+ return NV_FAIL;
+ }
+ }
+
+ const PipelineStateType pipeType = getPipelineStateType(params.renderStage, params.renderMode, params.cullMode);
+ PipelineStateD3D12& pipeState = m_states[pipeType];
+ if (!pipeState.isValid())
+ {
+ return NV_FAIL;
+ }
+
+ ID3D12GraphicsCommandList* commandList = state.m_commandList;
+ commandList->SetGraphicsRootSignature(pipeState.m_rootSignature.Get());
+ commandList->SetPipelineState(pipeState.m_pipelineState.Get());
+
+ D3D12_GPU_VIRTUAL_ADDRESS cbvHandle = state.m_constantHeap->getGpuHandle(cursor);
+ commandList->SetGraphicsRootConstantBufferView(0, cbvHandle);
+
+ if (pipeType == PIPELINE_STATE_SHADOW)
+ {
+ ID3D12DescriptorHeap* heaps[] = { nullptr };
+ commandList->SetDescriptorHeaps(0, heaps);
+ }
+ else
+ {
+ NvCo::Dx12RenderTarget* shadowMap = (NvCo::Dx12RenderTarget*)params.shadowMap;
+
+ ID3D12DescriptorHeap* heaps[] = { state.m_srvCbvUavDescriptorHeap->getHeap(), state.m_samplerDescriptorHeap->getHeap() };
+ commandList->SetDescriptorHeaps(_countof(heaps), heaps);
+ // Bind the srvs
+ commandList->SetGraphicsRootDescriptorTable(1, state.m_srvCbvUavDescriptorHeap->getGpuHandle(shadowMap->getSrvHeapIndex(shadowMap->getPrimaryBufferType())));
+ // Bind the samplers
+ commandList->SetGraphicsRootDescriptorTable(2, state.m_samplerDescriptorHeap->getGpuHandle(m_shadowMapLinearSamplerIndex));
+ }
+
+ return NV_OK;
+}
+
+int PointRenderPipelineD3D12::draw(const RenderAllocation& allocIn, size_t sizeOfAlloc, const void* platformState)
+{
+ return MeshRendererD3D12::defaultDraw(allocIn, sizeOfAlloc, platformState);
+}
+
+} // namespace FlexSample \ No newline at end of file
diff --git a/demo/d3d12/pointRenderPipelineD3D12.h b/demo/d3d12/pointRenderPipelineD3D12.h
new file mode 100644
index 0000000..cdd03bc
--- /dev/null
+++ b/demo/d3d12/pointRenderPipelineD3D12.h
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+#ifndef POINT_RENDER_PIPELINE_D3D12_H
+#define POINT_RENDER_PIPELINE_D3D12_H
+
+#include <DirectXMath.h>
+#include "renderStateD3D12.h"
+#include "meshRenderer.h"
+
+#include <NvCoDx12RenderTarget.h>
+
+#include "../d3d/renderParamsD3D.h"
+
+namespace FlexSample {
+using namespace nvidia;
+
+struct PointRenderPipelineD3D12: public RenderPipeline
+{
+ //NV_CO_DECLARE_POLYMORPHIC_CLASS(PointRenderPipelineD3D12, RenderPipeline);
+public:
+ typedef RenderPipeline Parent;
+
+ enum PipelineStateType
+ {
+ PIPELINE_STATE_SHADOW,
+ PIPELINE_STATE_LIGHT_SOLID,
+ PIPELINE_STATE_COUNT_OF,
+ };
+
+ PointRenderPipelineD3D12();
+
+ /// Initialize
+ int initialize(const RenderStateD3D12& state, const std::wstring& shadersDir, int shadowMapLinearSamplerIndex, NvCo::Dx12RenderTarget* shadowMap);
+ /// Do the binding
+ virtual int bind(const void* paramsIn, const void* platformState) override;
+ virtual int draw(const RenderAllocation& alloc, size_t sizeOfAlloc, const void* platformState) override;
+
+ /// Convert into a single pipeline state type
+ static PipelineStateType getPipelineStateType(PointDrawStage stage, PointRenderMode mode, PointCullMode cull);
+
+ protected:
+
+ int _initPipelineState(const RenderStateD3D12& state, NvCo::Dx12RenderTarget* shadowMap, PipelineStateType pipeType, ID3D12RootSignature* signiture, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc);
+
+ int m_shadowMapLinearSamplerIndex; //< The index to the linear sampler in the m_samplerHeap
+
+ PipelineStateD3D12 m_states[PIPELINE_STATE_COUNT_OF];
+};
+
+} // namespace FlexSample
+
+#endif \ No newline at end of file
diff --git a/demo/d3d12/renderStateD3D12.cpp b/demo/d3d12/renderStateD3D12.cpp
new file mode 100644
index 0000000..28a69f4
--- /dev/null
+++ b/demo/d3d12/renderStateD3D12.cpp
@@ -0,0 +1,67 @@
+
+#include "renderStateD3D12.h"
+
+namespace FlexSample {
+
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Dx12RenderStateManager !!!!!!!!!!!!!!!!!!!!!!!!!! */
+
+int RenderStateManagerD3D12::initialize(AppGraphCtxD3D12* renderContext, size_t maxHeapAlloc)
+{
+ m_renderContext = renderContext;
+ m_device = renderContext->m_device;
+
+ m_fence.init(m_device);
+ m_scopeManager.init(m_device, &m_fence);
+ m_srvCbvUavDescriptorHeap.init(m_device, 256, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE);
+ m_samplerDescriptorHeap.init(m_device, 64, D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER, D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE);
+
+ {
+ NvCo::Dx12CircularResourceHeap::Desc desc;
+ desc.init();
+ desc.m_blockSize = maxHeapAlloc;
+ m_constantHeap.init(m_device, desc, &m_fence);
+ }
+
+ return NV_OK;
+}
+
+void RenderStateManagerD3D12::updateCompleted()
+{
+ m_scopeManager.updateCompleted();
+ m_constantHeap.updateCompleted();
+}
+
+void RenderStateManagerD3D12::onGpuWorkSubmitted(ID3D12CommandQueue* commandQueue)
+{
+ assert(commandQueue);
+ if (!commandQueue)
+ {
+ printf("Must pass a ID3D12CommandQueue to onGpuWorkSubmitted");
+ return;
+ }
+
+ const uint64_t signalValue = m_fence.nextSignal(commandQueue);
+
+ m_scopeManager.addSync(signalValue);
+ m_constantHeap.addSync(signalValue);
+}
+
+RenderStateD3D12 RenderStateManagerD3D12::getState()
+{
+ RenderStateD3D12 state;
+
+ state.m_renderContext = m_renderContext;
+ state.m_commandList = m_renderContext->m_commandList;
+ state.m_device = m_device;
+
+ state.m_constantHeap = &m_constantHeap;
+ state.m_srvCbvUavDescriptorHeap = &m_srvCbvUavDescriptorHeap;
+ state.m_fence = &m_fence;
+ state.m_scopeManager = &m_scopeManager;
+ state.m_samplerDescriptorHeap = &m_samplerDescriptorHeap;
+
+ return state;
+}
+
+
+} // namespace FlexSample \ No newline at end of file
diff --git a/demo/d3d12/renderStateD3D12.h b/demo/d3d12/renderStateD3D12.h
new file mode 100644
index 0000000..1fb1f7d
--- /dev/null
+++ b/demo/d3d12/renderStateD3D12.h
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+#ifndef RENDER_STATE_D3D12_H
+#define RENDER_STATE_D3D12_H
+
+#include <NvCoDx12ResourceScopeManager.h>
+#include <NvCoDx12CircularResourceHeap.h>
+#include <NvCoDx12DescriptorHeap.h>
+#include "appD3D12Ctx.h"
+
+namespace NvCo = nvidia::Common;
+
+namespace FlexSample {
+using namespace nvidia;
+
+struct PipelineStateD3D12
+{
+ /// True if contents is all set and therefore 'valid'
+ inline bool isValid() const { return m_rootSignature && m_pipelineState; }
+
+ ComPtr<ID3D12RootSignature> m_rootSignature;
+ ComPtr<ID3D12PipelineState> m_pipelineState;
+};
+
+struct RenderStateD3D12
+{
+ AppGraphCtxD3D12* m_renderContext;
+
+ ID3D12Device* m_device;
+ ID3D12GraphicsCommandList* m_commandList;
+
+ NvCo::Dx12ResourceScopeManager* m_scopeManager; ///< Holds resources in scope
+ NvCo::Dx12DescriptorHeap* m_srvCbvUavDescriptorHeap; ///< Can hold cbv, srv, uavs
+ NvCo::Dx12DescriptorHeap* m_samplerDescriptorHeap; ///< Descriptor heap
+ NvCo::Dx12CircularResourceHeap* m_constantHeap; ///< Can hold transitory constant buffers, and vertex buffers
+ NvCo::Dx12CounterFence* m_fence; ///< Main fence to track lifetimes
+};
+
+struct RenderStateManagerD3D12
+{
+ RenderStateManagerD3D12():
+ m_renderContext(nullptr),
+ m_device(nullptr)
+ {}
+
+ int initialize(AppGraphCtxD3D12* renderContext, size_t maxHeapAlloc);
+
+ void onGpuWorkSubmitted(ID3D12CommandQueue* handle);
+ void updateCompleted();
+
+ /// Get the render state
+ RenderStateD3D12 getState();
+
+ AppGraphCtxD3D12* m_renderContext;
+ ID3D12Device* m_device;
+
+ NvCo::Dx12ResourceScopeManager m_scopeManager; ///< Holds resources in scope
+ NvCo::Dx12DescriptorHeap m_srvCbvUavDescriptorHeap; ///< Can hold cbv, srv, uavs
+ NvCo::Dx12DescriptorHeap m_samplerDescriptorHeap; ///< Holds sampler descriptions
+ NvCo::Dx12CircularResourceHeap m_constantHeap; ///< Can hold transitory constant buffers, and vertex buffers
+ NvCo::Dx12CounterFence m_fence; ///< Main fence to track lifetimes
+};
+
+} // namespace FlexSample
+
+#endif \ No newline at end of file
diff --git a/demo/helpers.h b/demo/helpers.h
index 5aec028..adc9af5 100644
--- a/demo/helpers.h
+++ b/demo/helpers.h
@@ -214,7 +214,7 @@ void CreateParticleShape(const Mesh* srcMesh, Vec3 lower, Vec3 scale, float rota
meshLower -= meshOffset;
//Voxelize(*mesh, dx, dy, dz, &voxels[0], meshLower - Vec3(spacing*0.05f) , meshLower + Vec3(maxDim*spacing) + Vec3(spacing*0.05f));
- Voxelize((const float*)&mesh.m_positions[0], mesh.m_positions.size(), (const int*)&mesh.m_indices[0], mesh.m_indices.size(), maxDim, maxDim, maxDim, &voxels[0], meshLower, meshLower + Vec3(maxDim*spacing));
+ Voxelize((const Vec3*)&mesh.m_positions[0], mesh.m_positions.size(), (const int*)&mesh.m_indices[0], mesh.m_indices.size(), maxDim, maxDim, maxDim, &voxels[0], meshLower, meshLower + Vec3(maxDim*spacing));
vector<int> indices(maxDim*maxDim*maxDim);
vector<float> sdf(maxDim*maxDim*maxDim);
@@ -330,7 +330,7 @@ void CreateParticleShape(const Mesh* srcMesh, Vec3 lower, Vec3 scale, float rota
float distances[g_numSkinWeights] = {FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX };
if (LengthSq(color) == 0.0f)
- g_mesh->m_colours[i] = 1.25f*colors[phase%7];
+ g_mesh->m_colours[i] = 1.25f*colors[((unsigned int)(phase))%7];
else
g_mesh->m_colours[i] = Colour(color);
@@ -439,7 +439,7 @@ void SkinMesh()
}
}
-void AddBox(Vec3 halfEdge = Vec3(2.0f), Vec3 center=Vec3(0.0f), Quat quat=Quat(), bool dynamic=false)
+void AddBox(Vec3 halfEdge = Vec3(2.0f), Vec3 center=Vec3(0.0f), Quat quat=Quat(), bool dynamic=false, int channels=eNvFlexPhaseShapeChannelMask)
{
// transform
g_buffers->shapePositions.push_back(Vec4(center.x, center.y, center.z, 0.0f));
@@ -454,7 +454,7 @@ void AddBox(Vec3 halfEdge = Vec3(2.0f), Vec3 center=Vec3(0.0f), Quat quat=Quat()
geo.box.halfExtents[2] = halfEdge.z;
g_buffers->shapeGeometry.push_back(geo);
- g_buffers->shapeFlags.push_back(NvFlexMakeShapeFlags(eNvFlexShapeBox, dynamic));
+ g_buffers->shapeFlags.push_back(NvFlexMakeShapeFlagsWithChannels(eNvFlexShapeBox, dynamic, channels));
}
// helper that creates a plinth whose center matches the particle bounds
@@ -513,7 +513,7 @@ void CreateSDF(const Mesh* mesh, uint32_t dim, Vec3 lower, Vec3 upper, float* sd
double startVoxelize = GetSeconds();
uint32_t* volume = new uint32_t[dim*dim*dim];
- Voxelize((const float*)&mesh->m_positions[0], mesh->m_positions.size(), (const int*)&mesh->m_indices[0], mesh->m_indices.size(), dim, dim, dim, volume, lower, upper);
+ Voxelize((const Vec3*)&mesh->m_positions[0], mesh->m_positions.size(), (const int*)&mesh->m_indices[0], mesh->m_indices.size(), dim, dim, dim, volume, lower, upper);
printf("End mesh voxelization (%.2fs)\n", (GetSeconds()-startVoxelize));
@@ -1161,14 +1161,11 @@ int PickParticle(Vec3 origin, Vec3 dir, Vec4* particles, int* phases, int n, flo
return minIndex;
}
-// calculates local space positions given a set of particles and rigid indices
-void CalculateRigidLocalPositions(const Vec4* restPositions, int numRestPositions, const int* offsets, const int* indices, int numRigids, Vec3* localPositions)
+// calculates the center of mass of every rigid given a set of particle positions and rigid indices
+void CalculateRigidCentersOfMass(const Vec4* restPositions, int numRestPositions, const int* offsets, Vec3* translations, const int* indices, int numRigids)
{
-
- // To improve the accuracy of the result, first transform the restPositions to relative coordinates (by finding the mean and subtracting that from all points)
+ // To improve the accuracy of the result, first transform the restPositions to relative coordinates (by finding the mean and subtracting that from all positions)
// Note: If this is not done, one might see ghost forces if the mean of the restPositions is far from the origin.
-
- // Calculate mean
Vec3 shapeOffset(0.0f);
for (int i = 0; i < numRestPositions; i++)
@@ -1178,12 +1175,10 @@ void CalculateRigidLocalPositions(const Vec4* restPositions, int numRestPosition
shapeOffset /= float(numRestPositions);
- int count = 0;
-
- for (int r=0; r < numRigids; ++r)
+ for (int i=0; i < numRigids; ++i)
{
- const int startIndex = offsets[r];
- const int endIndex = offsets[r+1];
+ const int startIndex = offsets[i];
+ const int endIndex = offsets[i+1];
const int n = endIndex-startIndex;
@@ -1191,22 +1186,41 @@ void CalculateRigidLocalPositions(const Vec4* restPositions, int numRestPosition
Vec3 com;
- for (int i=startIndex; i < endIndex; ++i)
+ for (int j=startIndex; j < endIndex; ++j)
{
- const int r = indices[i];
+ const int r = indices[j];
- // By substracting meshOffset the calculation is done in relative coordinates
+ // By subtracting shapeOffset the calculation is done in relative coordinates
com += Vec3(restPositions[r]) - shapeOffset;
}
com /= float(n);
- for (int i=startIndex; i < endIndex; ++i)
+ // Add the shapeOffset to switch back to absolute coordinates
+ com += shapeOffset;
+
+ translations[i] = com;
+
+ }
+}
+
+// calculates local space positions given a set of particle positions, rigid indices and centers of mass of the rigids
+void CalculateRigidLocalPositions(const Vec4* restPositions, const int* offsets, const Vec3* translations, const int* indices, int numRigids, Vec3* localPositions)
+{
+ int count = 0;
+
+ for (int i=0; i < numRigids; ++i)
+ {
+ const int startIndex = offsets[i];
+ const int endIndex = offsets[i+1];
+
+ assert(endIndex-startIndex);
+
+ for (int j=startIndex; j < endIndex; ++j)
{
- const int r = indices[i];
+ const int r = indices[j];
- // By substracting meshOffset the calculation is done in relative coordinates
- localPositions[count++] = (Vec3(restPositions[r]) - shapeOffset) - com;
+ localPositions[count++] = Vec3(restPositions[r]) - translations[i];
}
}
}
@@ -1224,6 +1238,48 @@ void DrawImguiString(int x, int y, Vec3 color, int align, const char* s, ...)
imguiDrawText(x, y, align, buf, imguiRGBA((unsigned char)(color.x*255), (unsigned char)(color.y*255), (unsigned char)(color.z*255)));
}
+enum
+{
+ HELPERS_SHADOW_OFFSET = 1,
+};
+
+void DrawShadowedText(int x, int y, Vec3 color, int align, const char* s, ...)
+{
+ char buf[2048];
+
+ va_list args;
+
+ va_start(args, s);
+ vsnprintf(buf, 2048, s, args);
+ va_end(args);
+
+
+ imguiDrawText(x + HELPERS_SHADOW_OFFSET, y - HELPERS_SHADOW_OFFSET, align, buf, imguiRGBA(0, 0, 0));
+ imguiDrawText(x, y, align, buf, imguiRGBA((unsigned char)(color.x * 255), (unsigned char)(color.y * 255), (unsigned char)(color.z * 255)));
+}
+
+void DrawRect(float x, float y, float w, float h, Vec3 color)
+{
+ imguiDrawRect(x, y, w, h, imguiRGBA((unsigned char)(color.x * 255), (unsigned char)(color.y * 255), (unsigned char)(color.z * 255)));
+}
+
+void DrawShadowedRect(float x, float y, float w, float h, Vec3 color)
+{
+ imguiDrawRect(x + HELPERS_SHADOW_OFFSET, y - HELPERS_SHADOW_OFFSET, w, h, imguiRGBA(0, 0, 0));
+ imguiDrawRect(x, y, w, h, imguiRGBA((unsigned char)(color.x * 255), (unsigned char)(color.y * 255), (unsigned char)(color.z * 255)));
+}
+
+void DrawLine(float x0, float y0, float x1, float y1, float r, Vec3 color)
+{
+ imguiDrawLine(x0, y0, x1, y1, r, imguiRGBA((unsigned char)(color.x * 255), (unsigned char)(color.y * 255), (unsigned char)(color.z * 255)));
+}
+
+void DrawShadowedLine(float x0, float y0, float x1, float y1, float r, Vec3 color)
+{
+ imguiDrawLine(x0 + HELPERS_SHADOW_OFFSET, y0 - HELPERS_SHADOW_OFFSET, x1 + HELPERS_SHADOW_OFFSET, y1 - HELPERS_SHADOW_OFFSET, r, imguiRGBA(0, 0, 0));
+ imguiDrawLine(x0, y0, x1, y1, r, imguiRGBA((unsigned char)(color.x * 255), (unsigned char)(color.y * 255), (unsigned char)(color.z * 255)));
+}
+
// Soft body support functions
Vec3 CalculateMean(const Vec3* particles, const int* indices, int numIndices)
@@ -1545,7 +1601,7 @@ void SampleMesh(Mesh* mesh, Vec3 lower, Vec3 scale, float rotation, float radius
meshLower -= meshOffset;
//Voxelize(*mesh, dx, dy, dz, &voxels[0], meshLower - Vec3(spacing*0.05f) , meshLower + Vec3(maxDim*spacing) + Vec3(spacing*0.05f));
- Voxelize((const float*)&mesh->m_positions[0], mesh->m_positions.size(), (const int*)&mesh->m_indices[0], mesh->m_indices.size(), maxDim, maxDim, maxDim, &voxels[0], meshLower, meshLower + Vec3(maxDim*spacing));
+ Voxelize((const Vec3*)&mesh->m_positions[0], mesh->m_positions.size(), (const int*)&mesh->m_indices[0], mesh->m_indices.size(), maxDim, maxDim, maxDim, &voxels[0], meshLower, meshLower + Vec3(maxDim*spacing));
// sample interior
for (int x = 0; x < maxDim; ++x)
diff --git a/demo/imgui.cpp b/demo/imgui.cpp
index bc42082..cccaf3f 100644
--- a/demo/imgui.cpp
+++ b/demo/imgui.cpp
@@ -33,10 +33,10 @@ static char g_textPool[TEXT_POOL_SIZE];
static unsigned g_textPoolSize = 0;
static const char* allocText(const char* text)
{
- int len = (int)(strlen(text)+1);
+ int len = (int)(strlen(text) + 1);
if (g_textPoolSize + len >= TEXT_POOL_SIZE)
return 0;
- char* dst = &g_textPool[g_textPoolSize];
+ char* dst = &g_textPool[g_textPoolSize];
memcpy(dst, text, len);
g_textPoolSize += len;
return dst;
@@ -147,13 +147,13 @@ struct GuiState
mx(-1), my(-1), scroll(0),
active(0), hot(0), hotToBe(0), isHot(false), isActive(false), wentActive(false),
dragX(0), dragY(0), dragOrig(0), widgetX(0), widgetY(0), widgetW(100),
- insideCurrentScroll(false), areaId(0), widgetId(0)
+ insideCurrentScroll(false), areaId(0), widgetId(0)
{
}
bool left;
bool leftPressed, leftReleased;
- int mx,my;
+ int mx, my;
int scroll;
unsigned int active;
unsigned int hot;
@@ -165,7 +165,7 @@ struct GuiState
float dragOrig;
int widgetX, widgetY, widgetW;
bool insideCurrentScroll;
-
+
unsigned int areaId;
unsigned int widgetId;
};
@@ -198,7 +198,7 @@ inline bool isHot(unsigned int id)
inline bool inRect(int x, int y, int w, int h, bool checkScroll = true)
{
- return (!checkScroll || g_state.insideCurrentScroll) && g_state.mx >= x && g_state.mx <= x+w && g_state.my >= y && g_state.my <= y+h;
+ return (!checkScroll || g_state.insideCurrentScroll) && g_state.mx >= x && g_state.mx <= x + w && g_state.my >= y && g_state.my <= y + h;
}
inline void clearInput()
@@ -223,12 +223,12 @@ inline void setActive(unsigned int id)
inline void setHot(unsigned int id)
{
- g_state.hotToBe = id;
-// Begin Add Android Support
+ g_state.hotToBe = id;
+ // Begin Add Android Support
#ifdef ANDROID
- g_state.hot = id;
+ g_state.hot = id;
#endif
-// End Add Android Support
+ // End Add Android Support
}
@@ -240,7 +240,7 @@ static bool buttonLogic(unsigned int id, bool over)
{
if (over)
setHot(id);
-// Begin Add Android Support
+ // Begin Add Android Support
#ifdef ANDROID
if (isHot(id) && g_state.leftPressed && over)
setActive(id);
@@ -248,7 +248,7 @@ static bool buttonLogic(unsigned int id, bool over)
if (isHot(id) && g_state.leftPressed)
setActive(id);
#endif
-// End Add Android Support
+ // End Add Android Support
}
// if button is active, then react on left up
@@ -286,7 +286,7 @@ static void updateInput(int mx, int my, unsigned char mbut, int scroll)
void imguiBeginFrame(int mx, int my, unsigned char mbut, int scroll)
{
- updateInput(mx,my,mbut,scroll);
+ updateInput(mx, my, mbut, scroll);
g_state.hot = g_state.hotToBe;
g_state.hotToBe = 0;
@@ -346,29 +346,29 @@ bool imguiBeginScrollArea(const char* name, int x, int y, int w, int h, int* scr
{
g_state.areaId++;
g_state.widgetId = 0;
- g_scrollId = (g_state.areaId<<16) | g_state.widgetId;
+ g_scrollId = (g_state.areaId << 16) | g_state.widgetId;
g_state.widgetX = x + SCROLL_AREA_PADDING;
- g_state.widgetY = y+h-AREA_HEADER + (*scroll);
- g_state.widgetW = w - SCROLL_AREA_PADDING*4;
- g_scrollTop = y-AREA_HEADER+h;
- g_scrollBottom = y+SCROLL_AREA_PADDING;
- g_scrollRight = x+w - SCROLL_AREA_PADDING*3;
+ g_state.widgetY = y + h - AREA_HEADER + (*scroll);
+ g_state.widgetW = w - SCROLL_AREA_PADDING * 4;
+ g_scrollTop = y - AREA_HEADER + h;
+ g_scrollBottom = y + SCROLL_AREA_PADDING;
+ g_scrollRight = x + w - SCROLL_AREA_PADDING * 3;
g_scrollVal = scroll;
g_scrollAreaTop = g_state.widgetY;
- g_focusTop = y-AREA_HEADER;
- g_focusBottom = y-AREA_HEADER+h;
+ g_focusTop = y - AREA_HEADER;
+ g_focusBottom = y - AREA_HEADER + h;
g_insideScrollArea = inRect(x, y, w, h, false);
g_state.insideCurrentScroll = g_insideScrollArea;
- addGfxCmdRoundedRect((float)x, (float)y, (float)w, (float)h, 6, imguiRGBA(0,0,0,192));
+ addGfxCmdRoundedRect((float)x, (float)y, (float)w, (float)h, 6, imguiRGBA(0, 0, 0, 192));
- addGfxCmdText(x+AREA_HEADER/2, y+h-AREA_HEADER/2-TEXT_HEIGHT/2, IMGUI_ALIGN_LEFT, name, imguiRGBA(255,255,255,128));
+ addGfxCmdText(x + AREA_HEADER / 2, y + h - AREA_HEADER / 2 - TEXT_HEIGHT / 2, IMGUI_ALIGN_LEFT, name, imguiRGBA(255, 255, 255, 128));
- addGfxCmdScissor(x+SCROLL_AREA_PADDING, y+SCROLL_AREA_PADDING, w-SCROLL_AREA_PADDING*4, h-AREA_HEADER-SCROLL_AREA_PADDING);
+ addGfxCmdScissor(x + SCROLL_AREA_PADDING, y + SCROLL_AREA_PADDING, w - SCROLL_AREA_PADDING * 4, h - AREA_HEADER - SCROLL_AREA_PADDING);
return g_insideScrollArea;
}
@@ -376,39 +376,39 @@ bool imguiBeginScrollArea(const char* name, int x, int y, int w, int h, int* scr
void imguiEndScrollArea()
{
// Disable scissoring.
- addGfxCmdScissor(-1,-1,-1,-1);
+ addGfxCmdScissor(-1, -1, -1, -1);
// Draw scroll bar
- int x = g_scrollRight+SCROLL_AREA_PADDING/2;
+ int x = g_scrollRight + SCROLL_AREA_PADDING / 2;
int y = g_scrollBottom;
- int w = SCROLL_AREA_PADDING*2;
+ int w = SCROLL_AREA_PADDING * 2;
int h = g_scrollTop - g_scrollBottom;
int stop = g_scrollAreaTop;
int sbot = g_state.widgetY;
int sh = stop - sbot; // The scrollable area height.
- float barHeight = (float)h/(float)sh;
-
+ float barHeight = (float)h / (float)sh;
+
if (barHeight < 1)
{
- float barY = (float)(y - sbot)/(float)sh;
+ float barY = (float)(y - sbot) / (float)sh;
if (barY < 0) barY = 0;
if (barY > 1) barY = 1;
-
+
// Handle scroll bar logic.
unsigned int hid = g_scrollId;
int hx = x;
int hy = y + (int)(barY*h);
int hw = w;
int hh = (int)(barHeight*h);
-
- const int range = h - (hh-1);
+
+ const int range = h - (hh - 1);
bool over = inRect(hx, hy, hw, hh);
buttonLogic(hid, over);
if (isActive(hid))
{
- float u = (float)(hy-y) / (float)range;
+ float u = (float)(hy - y) / (float)range;
if (g_state.wentActive)
{
g_state.dragY = g_state.my;
@@ -419,26 +419,26 @@ void imguiEndScrollArea()
u = g_state.dragOrig + (g_state.my - g_state.dragY) / (float)range;
if (u < 0) u = 0;
if (u > 1) u = 1;
- *g_scrollVal = (int)((1-u) * (sh - h));
+ *g_scrollVal = (int)((1 - u) * (sh - h));
}
}
-
+
// BG
- addGfxCmdRoundedRect((float)x, (float)y, (float)w, (float)h, (float)w/2-1, imguiRGBA(0,0,0,196));
+ addGfxCmdRoundedRect((float)x, (float)y, (float)w, (float)h, (float)w / 2 - 1, imguiRGBA(0, 0, 0, 196));
// Bar
if (isActive(hid))
- addGfxCmdRoundedRect((float)hx, (float)hy, (float)hw, (float)hh, (float)w/2-1, imguiRGBA(255,196,0,196));
+ addGfxCmdRoundedRect((float)hx, (float)hy, (float)hw, (float)hh, (float)w / 2 - 1, imguiRGBA(255, 196, 0, 196));
else
- addGfxCmdRoundedRect((float)hx, (float)hy, (float)hw, (float)hh, (float)w/2-1, isHot(hid) ? imguiRGBA(255,196,0,96) : imguiRGBA(255,255,255,64));
+ addGfxCmdRoundedRect((float)hx, (float)hy, (float)hw, (float)hh, (float)w / 2 - 1, isHot(hid) ? imguiRGBA(255, 196, 0, 96) : imguiRGBA(255, 255, 255, 64));
// Handle mouse scrolling.
if (g_insideScrollArea) // && !anyActive())
{
if (g_state.scroll)
{
- *g_scrollVal += 20*g_state.scroll;
+ *g_scrollVal += 20 * g_state.scroll;
if (*g_scrollVal < 0) *g_scrollVal = 0;
- if (*g_scrollVal > (sh - h)) *g_scrollVal = (sh - h);
+ if (*g_scrollVal >(sh - h)) *g_scrollVal = (sh - h);
}
}
}
@@ -448,8 +448,8 @@ void imguiEndScrollArea()
bool imguiButton(const char* text, bool enabled)
{
g_state.widgetId++;
- unsigned int id = (g_state.areaId<<16) | g_state.widgetId;
-
+ unsigned int id = (g_state.areaId << 16) | g_state.widgetId;
+
int x = g_state.widgetX;
int y = g_state.widgetY - BUTTON_HEIGHT;
int w = g_state.widgetW;
@@ -459,16 +459,16 @@ bool imguiButton(const char* text, bool enabled)
bool over = enabled && inRect(x, y, w, h);
bool res = buttonLogic(id, over);
- addGfxCmdRoundedRect((float)x, (float)y, (float)w, (float)h, (float)BUTTON_HEIGHT/2-1, imguiRGBA(128,128,128, isActive(id)?196:96));
+ addGfxCmdRoundedRect((float)x, (float)y, (float)w, (float)h, (float)BUTTON_HEIGHT / 2 - 1, imguiRGBA(128, 128, 128, isActive(id) ? 196 : 96));
if (enabled)
- addGfxCmdText(x+BUTTON_HEIGHT/2, y+BUTTON_HEIGHT/2-TEXT_HEIGHT/2, IMGUI_ALIGN_LEFT, text, isHot(id) ? imguiRGBA(255,196,0,255) : imguiRGBA(255,255,255,200));
+ addGfxCmdText(x + BUTTON_HEIGHT / 2, y + BUTTON_HEIGHT / 2 - TEXT_HEIGHT / 2, IMGUI_ALIGN_LEFT, text, isHot(id) ? imguiRGBA(255, 196, 0, 255) : imguiRGBA(255, 255, 255, 200));
else
- addGfxCmdText(x+BUTTON_HEIGHT/2, y+BUTTON_HEIGHT/2-TEXT_HEIGHT/2, IMGUI_ALIGN_LEFT, text, imguiRGBA(128,128,128,200));
+ addGfxCmdText(x + BUTTON_HEIGHT / 2, y + BUTTON_HEIGHT / 2 - TEXT_HEIGHT / 2, IMGUI_ALIGN_LEFT, text, imguiRGBA(128, 128, 128, 200));
return res;
}
-bool imguiItem(const char* text, bool enabled, unsigned int color, bool forceHot)
+bool imguiItem(const char* text, bool enabled, unsigned int color)
{
g_state.widgetId++;
unsigned int id = (g_state.areaId << 16) | g_state.widgetId;
@@ -484,8 +484,6 @@ bool imguiItem(const char* text, bool enabled, unsigned int color, bool forceHot
if (isHot(id))
addGfxCmdRoundedRect((float)x, (float)y, (float)w, (float)h, 2.0f, imguiRGBA(255, 196, 0, isActive(id) ? 196 : 96));
- else if (forceHot)
- addGfxCmdRoundedRect((float)x, (float)y, (float)w, (float)h, 2.0f, imguiRGBA(128, 128, 128, 96));
if (enabled)
addGfxCmdText(x + BUTTON_HEIGHT / 2, y + BUTTON_HEIGHT / 2 - TEXT_HEIGHT / 2, IMGUI_ALIGN_LEFT, text, color);
@@ -498,8 +496,8 @@ bool imguiItem(const char* text, bool enabled, unsigned int color, bool forceHot
bool imguiCheck(const char* text, bool checked, bool enabled)
{
g_state.widgetId++;
- unsigned int id = (g_state.areaId<<16) | g_state.widgetId;
-
+ unsigned int id = (g_state.areaId << 16) | g_state.widgetId;
+
int x = g_state.widgetX;
int y = g_state.widgetY - BUTTON_HEIGHT;
int w = g_state.widgetW;
@@ -508,22 +506,22 @@ bool imguiCheck(const char* text, bool checked, bool enabled)
bool over = enabled && inRect(x, y, w, h);
bool res = buttonLogic(id, over);
-
- const int cx = x+BUTTON_HEIGHT/2-CHECK_SIZE/2;
- const int cy = y+BUTTON_HEIGHT/2-CHECK_SIZE/2;
- addGfxCmdRoundedRect((float)cx-3, (float)cy-3, (float)CHECK_SIZE+6, (float)CHECK_SIZE+6, 4, imguiRGBA(128,128,128, isActive(id)?196:96));
+
+ const int cx = x + BUTTON_HEIGHT / 2 - CHECK_SIZE / 2;
+ const int cy = y + BUTTON_HEIGHT / 2 - CHECK_SIZE / 2;
+ addGfxCmdRoundedRect((float)cx - 3, (float)cy - 3, (float)CHECK_SIZE + 6, (float)CHECK_SIZE + 6, 4, imguiRGBA(128, 128, 128, isActive(id) ? 196 : 96));
if (checked)
{
if (enabled)
- addGfxCmdRoundedRect((float)cx, (float)cy, (float)CHECK_SIZE, (float)CHECK_SIZE, (float)CHECK_SIZE/2-1, imguiRGBA(255,255,255,isActive(id)?255:200));
+ addGfxCmdRoundedRect((float)cx, (float)cy, (float)CHECK_SIZE, (float)CHECK_SIZE, (float)CHECK_SIZE / 2 - 1, imguiRGBA(255, 255, 255, isActive(id) ? 255 : 200));
else
- addGfxCmdRoundedRect((float)cx, (float)cy, (float)CHECK_SIZE, (float)CHECK_SIZE, (float)CHECK_SIZE/2-1, imguiRGBA(128,128,128,200));
+ addGfxCmdRoundedRect((float)cx, (float)cy, (float)CHECK_SIZE, (float)CHECK_SIZE, (float)CHECK_SIZE / 2 - 1, imguiRGBA(128, 128, 128, 200));
}
if (enabled)
- addGfxCmdText(x+BUTTON_HEIGHT, y+BUTTON_HEIGHT/2-TEXT_HEIGHT/2, IMGUI_ALIGN_LEFT, text, isHot(id) ? imguiRGBA(255,196,0,255) : imguiRGBA(255,255,255,200));
+ addGfxCmdText(x + BUTTON_HEIGHT, y + BUTTON_HEIGHT / 2 - TEXT_HEIGHT / 2, IMGUI_ALIGN_LEFT, text, isHot(id) ? imguiRGBA(255, 196, 0, 255) : imguiRGBA(255, 255, 255, 200));
else
- addGfxCmdText(x+BUTTON_HEIGHT, y+BUTTON_HEIGHT/2-TEXT_HEIGHT/2, IMGUI_ALIGN_LEFT, text, imguiRGBA(128,128,128,200));
+ addGfxCmdText(x + BUTTON_HEIGHT, y + BUTTON_HEIGHT / 2 - TEXT_HEIGHT / 2, IMGUI_ALIGN_LEFT, text, imguiRGBA(128, 128, 128, 200));
return res;
}
@@ -531,33 +529,33 @@ bool imguiCheck(const char* text, bool checked, bool enabled)
bool imguiCollapse(const char* text, const char* subtext, bool checked, bool enabled)
{
g_state.widgetId++;
- unsigned int id = (g_state.areaId<<16) | g_state.widgetId;
-
+ unsigned int id = (g_state.areaId << 16) | g_state.widgetId;
+
int x = g_state.widgetX;
int y = g_state.widgetY - BUTTON_HEIGHT;
int w = g_state.widgetW;
int h = BUTTON_HEIGHT;
g_state.widgetY -= BUTTON_HEIGHT; // + DEFAULT_SPACING;
- const int cx = x+BUTTON_HEIGHT/2-CHECK_SIZE/2;
- const int cy = y+BUTTON_HEIGHT/2-CHECK_SIZE/2;
+ const int cx = x + BUTTON_HEIGHT / 2 - CHECK_SIZE / 2;
+ const int cy = y + BUTTON_HEIGHT / 2 - CHECK_SIZE / 2;
bool over = enabled && inRect(x, y, w, h);
bool res = buttonLogic(id, over);
-
+
if (checked)
- addGfxCmdTriangle(cx, cy, CHECK_SIZE, CHECK_SIZE, 2, imguiRGBA(255,255,255,isActive(id)?255:200));
+ addGfxCmdTriangle(cx, cy, CHECK_SIZE, CHECK_SIZE, 2, imguiRGBA(255, 255, 255, isActive(id) ? 255 : 200));
else
- addGfxCmdTriangle(cx, cy, CHECK_SIZE, CHECK_SIZE, 1, imguiRGBA(255,255,255,isActive(id)?255:200));
+ addGfxCmdTriangle(cx, cy, CHECK_SIZE, CHECK_SIZE, 1, imguiRGBA(255, 255, 255, isActive(id) ? 255 : 200));
if (enabled)
- addGfxCmdText(x+BUTTON_HEIGHT, y+BUTTON_HEIGHT/2-TEXT_HEIGHT/2, IMGUI_ALIGN_LEFT, text, isHot(id) ? imguiRGBA(255,196,0,255) : imguiRGBA(255,255,255,200));
+ addGfxCmdText(x + BUTTON_HEIGHT, y + BUTTON_HEIGHT / 2 - TEXT_HEIGHT / 2, IMGUI_ALIGN_LEFT, text, isHot(id) ? imguiRGBA(255, 196, 0, 255) : imguiRGBA(255, 255, 255, 200));
else
- addGfxCmdText(x+BUTTON_HEIGHT, y+BUTTON_HEIGHT/2-TEXT_HEIGHT/2, IMGUI_ALIGN_LEFT, text, imguiRGBA(128,128,128,200));
+ addGfxCmdText(x + BUTTON_HEIGHT, y + BUTTON_HEIGHT / 2 - TEXT_HEIGHT / 2, IMGUI_ALIGN_LEFT, text, imguiRGBA(128, 128, 128, 200));
if (subtext)
- addGfxCmdText(x+w-BUTTON_HEIGHT/2, y+BUTTON_HEIGHT/2-TEXT_HEIGHT/2, IMGUI_ALIGN_RIGHT, subtext, imguiRGBA(255,255,255,128));
-
+ addGfxCmdText(x + w - BUTTON_HEIGHT / 2, y + BUTTON_HEIGHT / 2 - TEXT_HEIGHT / 2, IMGUI_ALIGN_RIGHT, subtext, imguiRGBA(255, 255, 255, 128));
+
return res;
}
@@ -566,7 +564,7 @@ void imguiLabel(const char* text)
int x = g_state.widgetX;
int y = g_state.widgetY - BUTTON_HEIGHT;
g_state.widgetY -= BUTTON_HEIGHT;
- addGfxCmdText(x, y+BUTTON_HEIGHT/2-TEXT_HEIGHT/2, IMGUI_ALIGN_LEFT, text, imguiRGBA(255,255,255,255));
+ addGfxCmdText(x, y + BUTTON_HEIGHT / 2 - TEXT_HEIGHT / 2, IMGUI_ALIGN_LEFT, text, imguiRGBA(255, 255, 255, 255));
}
void imguiValue(const char* text)
@@ -575,31 +573,31 @@ void imguiValue(const char* text)
const int y = g_state.widgetY - BUTTON_HEIGHT;
const int w = g_state.widgetW;
g_state.widgetY -= BUTTON_HEIGHT;
-
- addGfxCmdText(x+w-BUTTON_HEIGHT/2, y+BUTTON_HEIGHT/2-TEXT_HEIGHT/2, IMGUI_ALIGN_RIGHT, text, imguiRGBA(255,255,255,200));
+
+ addGfxCmdText(x + w - BUTTON_HEIGHT / 2, y + BUTTON_HEIGHT / 2 - TEXT_HEIGHT / 2, IMGUI_ALIGN_RIGHT, text, imguiRGBA(255, 255, 255, 200));
}
bool imguiSlider(const char* text, float* val, float vmin, float vmax, float vinc, bool enabled)
{
g_state.widgetId++;
- unsigned int id = (g_state.areaId<<16) | g_state.widgetId;
-
+ unsigned int id = (g_state.areaId << 16) | g_state.widgetId;
+
int x = g_state.widgetX;
int y = g_state.widgetY - BUTTON_HEIGHT;
int w = g_state.widgetW;
int h = SLIDER_HEIGHT;
g_state.widgetY -= SLIDER_HEIGHT + DEFAULT_SPACING;
- addGfxCmdRoundedRect((float)x, (float)y, (float)w, (float)h, 4.0f, imguiRGBA(0,0,0,128));
+ addGfxCmdRoundedRect((float)x, (float)y, (float)w, (float)h, 4.0f, imguiRGBA(0, 0, 0, 128));
const int range = w - SLIDER_MARKER_WIDTH;
- float u = (*val - vmin) / (vmax-vmin);
+ float u = (*val - vmin) / (vmax - vmin);
if (u < 0) u = 0;
if (u > 1) u = 1;
int m = (int)(u * range);
- bool over = enabled && inRect(x+m, y, SLIDER_MARKER_WIDTH, SLIDER_HEIGHT);
+ bool over = enabled && inRect(x + m, y, SLIDER_MARKER_WIDTH, SLIDER_HEIGHT);
bool res = buttonLogic(id, over);
bool valChanged = false;
@@ -615,17 +613,17 @@ bool imguiSlider(const char* text, float* val, float vmin, float vmax, float vin
u = g_state.dragOrig + (float)(g_state.mx - g_state.dragX) / (float)range;
if (u < 0) u = 0;
if (u > 1) u = 1;
- *val = vmin + u*(vmax-vmin);
- *val = floorf(*val/vinc+0.5f)*vinc; // Snap to vinc
+ *val = vmin + u*(vmax - vmin);
+ *val = floorf(*val / vinc + 0.5f)*vinc; // Snap to vinc
m = (int)(u * range);
valChanged = true;
}
}
if (isActive(id))
- addGfxCmdRoundedRect((float)(x+m), (float)y, (float)SLIDER_MARKER_WIDTH, (float)SLIDER_HEIGHT, 4.0f, imguiRGBA(255,255,255,255));
+ addGfxCmdRoundedRect((float)(x + m), (float)y, (float)SLIDER_MARKER_WIDTH, (float)SLIDER_HEIGHT, 4.0f, imguiRGBA(255, 255, 255, 255));
else
- addGfxCmdRoundedRect((float)(x+m), (float)y, (float)SLIDER_MARKER_WIDTH, (float)SLIDER_HEIGHT, 4.0f, isHot(id) ? imguiRGBA(255,196,0,128) : imguiRGBA(255,255,255,64));
+ addGfxCmdRoundedRect((float)(x + m), (float)y, (float)SLIDER_MARKER_WIDTH, (float)SLIDER_HEIGHT, 4.0f, isHot(id) ? imguiRGBA(255, 196, 0, 128) : imguiRGBA(255, 255, 255, 64));
// TODO: fix this, take a look at 'nicenum'.
int digits = (int)(ceilf(log10f(vinc)));
@@ -633,16 +631,16 @@ bool imguiSlider(const char* text, float* val, float vmin, float vmax, float vin
snprintf(fmt, 16, "%%.%df", digits >= 0 ? 0 : -digits);
char msg[128];
snprintf(msg, 128, fmt, *val);
-
+
if (enabled)
{
- addGfxCmdText(x+SLIDER_HEIGHT/2, y+SLIDER_HEIGHT/2-TEXT_HEIGHT/2, IMGUI_ALIGN_LEFT, text, isHot(id) ? imguiRGBA(255,196,0,255) : imguiRGBA(255,255,255,200));
- addGfxCmdText(x+w-SLIDER_HEIGHT/2, y+SLIDER_HEIGHT/2-TEXT_HEIGHT/2, IMGUI_ALIGN_RIGHT, msg, isHot(id) ? imguiRGBA(255,196,0,255) : imguiRGBA(255,255,255,200));
+ addGfxCmdText(x + SLIDER_HEIGHT / 2, y + SLIDER_HEIGHT / 2 - TEXT_HEIGHT / 2, IMGUI_ALIGN_LEFT, text, isHot(id) ? imguiRGBA(255, 196, 0, 255) : imguiRGBA(255, 255, 255, 200));
+ addGfxCmdText(x + w - SLIDER_HEIGHT / 2, y + SLIDER_HEIGHT / 2 - TEXT_HEIGHT / 2, IMGUI_ALIGN_RIGHT, msg, isHot(id) ? imguiRGBA(255, 196, 0, 255) : imguiRGBA(255, 255, 255, 200));
}
else
{
- addGfxCmdText(x+SLIDER_HEIGHT/2, y+SLIDER_HEIGHT/2-TEXT_HEIGHT/2, IMGUI_ALIGN_LEFT, text, imguiRGBA(128,128,128,200));
- addGfxCmdText(x+w-SLIDER_HEIGHT/2, y+SLIDER_HEIGHT/2-TEXT_HEIGHT/2, IMGUI_ALIGN_RIGHT, msg, imguiRGBA(128,128,128,200));
+ addGfxCmdText(x + SLIDER_HEIGHT / 2, y + SLIDER_HEIGHT / 2 - TEXT_HEIGHT / 2, IMGUI_ALIGN_LEFT, text, imguiRGBA(128, 128, 128, 200));
+ addGfxCmdText(x + w - SLIDER_HEIGHT / 2, y + SLIDER_HEIGHT / 2 - TEXT_HEIGHT / 2, IMGUI_ALIGN_RIGHT, msg, imguiRGBA(128, 128, 128, 200));
}
return res || valChanged;
@@ -663,18 +661,18 @@ void imguiUnindent()
void imguiSeparator()
{
- g_state.widgetY -= DEFAULT_SPACING*3;
+ g_state.widgetY -= DEFAULT_SPACING * 3;
}
void imguiSeparatorLine()
{
int x = g_state.widgetX;
- int y = g_state.widgetY - DEFAULT_SPACING*2;
+ int y = g_state.widgetY - DEFAULT_SPACING * 2;
int w = g_state.widgetW;
int h = 1;
- g_state.widgetY -= DEFAULT_SPACING*4;
+ g_state.widgetY -= DEFAULT_SPACING * 4;
- addGfxCmdRect((float)x, (float)y, (float)w, (float)h, imguiRGBA(255,255,255,32));
+ addGfxCmdRect((float)x, (float)y, (float)w, (float)h, imguiRGBA(255, 255, 255, 32));
}
void imguiDrawText(int x, int y, int align, const char* text, unsigned int color)
diff --git a/demo/imgui.h b/demo/imgui.h
index 10ff3ab..e01f374 100644
--- a/demo/imgui.h
+++ b/demo/imgui.h
@@ -21,8 +21,8 @@
enum imguiMouseButton
{
- IMGUI_MBUT_LEFT = 0x01,
- IMGUI_MBUT_RIGHT = 0x02,
+ IMGUI_MBUT_LEFT = 0x01,
+ IMGUI_MBUT_RIGHT = 0x02,
};
enum imguiTextAlign
@@ -32,13 +32,11 @@ enum imguiTextAlign
IMGUI_ALIGN_RIGHT,
};
-inline unsigned int imguiRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a=255)
+inline unsigned int imguiRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a = 255)
{
return (r) | (g << 8) | (b << 16) | (a << 24);
}
-struct imguiGfxRect;
-
void imguiBeginFrame(int mx, int my, unsigned char mbut, int scroll);
void imguiEndFrame();
@@ -51,7 +49,7 @@ void imguiSeparator();
void imguiSeparatorLine();
bool imguiButton(const char* text, bool enabled = true);
-bool imguiItem(const char* text, bool enabled = true, unsigned int color = imguiRGBA(255, 255, 255, 200), bool forceHot = false);
+bool imguiItem(const char* text, bool enabled = true, unsigned int color = imguiRGBA(255, 255, 255, 200));
bool imguiCheck(const char* text, bool checked, bool enabled = true);
bool imguiCollapse(const char* text, const char* subtext, bool checked, bool enabled = true);
void imguiLabel(const char* text);
@@ -75,18 +73,18 @@ enum imguiGfxCmdType
struct imguiGfxRect
{
- short x,y,w,h,r;
+ short x, y, w, h, r;
};
struct imguiGfxText
{
- short x,y,align;
+ short x, y, align;
const char* text;
};
struct imguiGfxLine
{
- short x0,y0,x1,y1,r;
+ short x0, y0, x1, y1, r;
};
struct imguiGfxCmd
@@ -107,4 +105,4 @@ const imguiGfxCmd* imguiGetRenderQueue();
int imguiGetRenderQueueSize();
-#endif // IMGUI_H
+#endif // IMGUI_H \ No newline at end of file
diff --git a/demo/main.cpp b/demo/main.cpp
index 1ee4049..df05ef7 100644
--- a/demo/main.cpp
+++ b/demo/main.cpp
@@ -49,6 +49,13 @@
#include "shaders.h"
#include "imgui.h"
+#if FLEX_DX
+#include "d3d/shadersDemoContext.h"
+class DemoContext;
+extern DemoContext* CreateDemoContextD3D12();
+extern DemoContext* CreateDemoContextD3D11();
+#endif // FLEX_DX
+
SDL_Window* g_window; // window handle
unsigned int g_windowId; // window id
@@ -116,12 +123,15 @@ bool g_extensions = true;
bool g_teamCity = false;
bool g_interop = true;
bool g_d3d12 = false;
+bool g_useAsyncCompute = true;
+bool g_increaseGfxLoadForAsyncComputeTesting = false;
FluidRenderer* g_fluidRenderer;
-FluidRenderBuffers g_fluidRenderBuffers;
-DiffuseRenderBuffers g_diffuseRenderBuffers;
+FluidRenderBuffers* g_fluidRenderBuffers;
+DiffuseRenderBuffers* g_diffuseRenderBuffers;
-NvFlexSolver* g_flex;
+NvFlexSolver* g_solver;
+NvFlexSolverDesc g_solverDesc;
NvFlexLibrary* g_flexLib;
NvFlexParams g_params;
NvFlexTimers g_timers;
@@ -148,6 +158,19 @@ std::map<NvFlexDistanceFieldId, GpuMesh*> g_fields;
// flag to request collision shapes be updated
bool g_shapesChanged = false;
+/* Note that this array of colors is altered by demo code, and is also read from global by graphics API impls */
+Colour g_colors[] =
+{
+ Colour(0.0f, 0.5f, 1.0f),
+ Colour(0.797f, 0.354f, 0.000f),
+ Colour(0.092f, 0.465f, 0.820f),
+ Colour(0.000f, 0.349f, 0.173f),
+ Colour(0.875f, 0.782f, 0.051f),
+ Colour(0.000f, 0.170f, 0.453f),
+ Colour(0.673f, 0.111f, 0.000f),
+ Colour(0.612f, 0.194f, 0.394f)
+};
+
struct SimBuffers
{
NvFlexVector<Vec4> positions;
@@ -162,7 +185,8 @@ struct SimBuffers
NvFlexVector<Vec4> smoothPositions;
NvFlexVector<Vec4> diffusePositions;
NvFlexVector<Vec4> diffuseVelocities;
- NvFlexVector<int> diffuseIndices;
+ NvFlexVector<int> diffuseCount;
+
NvFlexVector<int> activeIndices;
// convexes
@@ -178,6 +202,8 @@ struct SimBuffers
NvFlexVector<int> rigidIndices;
NvFlexVector<int> rigidMeshSize;
NvFlexVector<float> rigidCoefficients;
+ NvFlexVector<float> rigidPlasticThresholds;
+ NvFlexVector<float> rigidPlasticCreeps;
NvFlexVector<Quat> rigidRotations;
NvFlexVector<Vec3> rigidTranslations;
NvFlexVector<Vec3> rigidLocalPositions;
@@ -202,10 +228,10 @@ struct SimBuffers
SimBuffers(NvFlexLibrary* l) :
positions(l), restPositions(l), velocities(l), phases(l), densities(l),
anisotropy1(l), anisotropy2(l), anisotropy3(l), normals(l), smoothPositions(l),
- diffusePositions(l), diffuseVelocities(l), diffuseIndices(l), activeIndices(l),
+ diffusePositions(l), diffuseVelocities(l), diffuseCount(l), activeIndices(l),
shapeGeometry(l), shapePositions(l), shapeRotations(l), shapePrevPositions(l),
shapePrevRotations(l), shapeFlags(l), rigidOffsets(l), rigidIndices(l), rigidMeshSize(l),
- rigidCoefficients(l), rigidRotations(l), rigidTranslations(l),
+ rigidCoefficients(l), rigidPlasticThresholds(l), rigidPlasticCreeps(l), rigidRotations(l), rigidTranslations(l),
rigidLocalPositions(l), rigidLocalNormals(l), inflatableTriOffsets(l),
inflatableTriCounts(l), inflatableVolumes(l), inflatableCoefficients(l),
inflatablePressures(l), springIndices(l), springLengths(l),
@@ -228,7 +254,7 @@ void MapBuffers(SimBuffers* buffers)
buffers->normals.map();
buffers->diffusePositions.map();
buffers->diffuseVelocities.map();
- buffers->diffuseIndices.map();
+ buffers->diffuseCount.map();
buffers->smoothPositions.map();
buffers->activeIndices.map();
@@ -244,6 +270,8 @@ void MapBuffers(SimBuffers* buffers)
buffers->rigidIndices.map();
buffers->rigidMeshSize.map();
buffers->rigidCoefficients.map();
+ buffers->rigidPlasticThresholds.map();
+ buffers->rigidPlasticCreeps.map();
buffers->rigidRotations.map();
buffers->rigidTranslations.map();
buffers->rigidLocalPositions.map();
@@ -279,7 +307,7 @@ void UnmapBuffers(SimBuffers* buffers)
buffers->normals.unmap();
buffers->diffusePositions.unmap();
buffers->diffuseVelocities.unmap();
- buffers->diffuseIndices.unmap();
+ buffers->diffuseCount.unmap();
buffers->smoothPositions.unmap();
buffers->activeIndices.unmap();
@@ -296,6 +324,8 @@ void UnmapBuffers(SimBuffers* buffers)
buffers->rigidIndices.unmap();
buffers->rigidMeshSize.unmap();
buffers->rigidCoefficients.unmap();
+ buffers->rigidPlasticThresholds.unmap();
+ buffers->rigidPlasticCreeps.unmap();
buffers->rigidRotations.unmap();
buffers->rigidTranslations.unmap();
buffers->rigidLocalPositions.unmap();
@@ -339,7 +369,7 @@ void DestroyBuffers(SimBuffers* buffers)
buffers->normals.destroy();
buffers->diffusePositions.destroy();
buffers->diffuseVelocities.destroy();
- buffers->diffuseIndices.destroy();
+ buffers->diffuseCount.destroy();
buffers->smoothPositions.destroy();
buffers->activeIndices.destroy();
@@ -356,6 +386,8 @@ void DestroyBuffers(SimBuffers* buffers)
buffers->rigidIndices.destroy();
buffers->rigidMeshSize.destroy();
buffers->rigidCoefficients.destroy();
+ buffers->rigidPlasticThresholds.destroy();
+ buffers->rigidPlasticCreeps.destroy();
buffers->rigidRotations.destroy();
buffers->rigidTranslations.destroy();
buffers->rigidLocalPositions.destroy();
@@ -476,6 +508,8 @@ int g_lasty;
int g_lastb = -1;
bool g_profile = false;
+bool g_outputAllFrameTimes = false;
+bool g_asyncComputeBenchmark = false;
ShadowMap* g_shadowMap;
@@ -525,7 +559,7 @@ void Init(int scene, bool centerCamera = true)
{
RandInit();
- if (g_flex)
+ if (g_solver)
{
if (g_buffers)
DestroyBuffers(g_buffers);
@@ -556,8 +590,8 @@ void Init(int scene, bool centerCamera = true)
g_meshes.clear();
g_convexes.clear();
- NvFlexDestroySolver(g_flex);
- g_flex = NULL;
+ NvFlexDestroySolver(g_solver);
+ g_solver = NULL;
}
// alloc buffers
@@ -576,6 +610,8 @@ void Init(int scene, bool centerCamera = true)
g_buffers->rigidRotations.resize(0);
g_buffers->rigidTranslations.resize(0);
g_buffers->rigidCoefficients.resize(0);
+ g_buffers->rigidPlasticThresholds.resize(0);
+ g_buffers->rigidPlasticCreeps.resize(0);
g_buffers->rigidLocalPositions.resize(0);
g_buffers->rigidLocalNormals.resize(0);
@@ -592,6 +628,8 @@ void Init(int scene, bool centerCamera = true)
g_emitters.resize(1);
g_emitters[0].mEnabled = false;
g_emitters[0].mSpeed = 1.0f;
+ g_emitters[0].mLeftOver = 0.0f;
+ g_emitters[0].mWidth = 8;
g_buffers->shapeGeometry.resize(0);
g_buffers->shapePositions.resize(0);
@@ -670,9 +708,6 @@ void Init(int scene, bool centerCamera = true)
g_params.particleCollisionMargin = 0.0f;
g_params.shapeCollisionMargin = 0.0f;
g_params.collisionDistance = 0.0f;
- g_params.plasticThreshold = 0.0f;
- g_params.plasticCreep = 0.0f;
- g_params.fluid = false;
g_params.sleepThreshold = 0.0f;
g_params.shockPropagation = 0.0f;
g_params.restitution = 0.0f;
@@ -692,9 +727,6 @@ void Init(int scene, bool centerCamera = true)
g_params.diffuseBuoyancy = 1.0f;
g_params.diffuseDrag = 0.8f;
g_params.diffuseBallistic = 16;
- g_params.diffuseSortAxis[0] = 0.0f;
- g_params.diffuseSortAxis[1] = 0.0f;
- g_params.diffuseSortAxis[2] = 0.0f;
g_params.diffuseLifetime = 2.0f;
g_numSubsteps = 2;
@@ -710,8 +742,7 @@ void Init(int scene, bool centerCamera = true)
g_diffuseOutscatter = 0.53f;
// reset phase 0 particle color to blue
- extern Colour gColors[];
- gColors[0] = Colour(0.0f, 0.5f, 1.0f);
+ g_colors[0] = Colour(0.0f, 0.5f, 1.0f);
g_numSolidParticles = 0;
@@ -730,26 +761,27 @@ void Init(int scene, bool centerCamera = true)
g_sceneLower = FLT_MAX;
g_sceneUpper = -FLT_MAX;
+ // initialize solver desc
+ NvFlexSetSolverDescDefaults(&g_solverDesc);
+
// create scene
+ StartGpuWork();
g_scenes[g_scene]->Initialize();
+ EndGpuWork();
uint32_t numParticles = g_buffers->positions.size();
uint32_t maxParticles = numParticles + g_numExtraParticles*g_numExtraMultiplier;
+
+ if (g_params.solidRestDistance == 0.0f)
+ g_params.solidRestDistance = g_params.radius;
- // by default solid particles use the maximum radius
- if (g_params.fluid && g_params.solidRestDistance == 0.0f)
+ // if fluid present then we assume solid particles have the same radius
+ if (g_params.fluidRestDistance > 0.0f)
g_params.solidRestDistance = g_params.fluidRestDistance;
- else
- g_params.solidRestDistance = g_params.radius;
- // collision distance with shapes half the radius
+ // set collision distance automatically based on rest distance if not alraedy set
if (g_params.collisionDistance == 0.0f)
- {
- g_params.collisionDistance = g_params.radius*0.5f;
-
- if (g_params.fluid)
- g_params.collisionDistance = g_params.fluidRestDistance*0.5f;
- }
+ g_params.collisionDistance = Max(g_params.solidRestDistance, g_params.fluidRestDistance)*0.5f;
// default particle friction to 10% of shape friction
if (g_params.particleFriction == 0.0f)
@@ -788,7 +820,7 @@ void Init(int scene, bool centerCamera = true)
g_buffers->diffusePositions.resize(g_maxDiffuseParticles);
g_buffers->diffuseVelocities.resize(g_maxDiffuseParticles);
- g_buffers->diffuseIndices.resize(g_maxDiffuseParticles);
+ g_buffers->diffuseCount.resize(1, 0);
// for fluid rendering these are the Laplacian smoothed positions
g_buffers->smoothPositions.resize(maxParticles);
@@ -825,8 +857,12 @@ void Init(int scene, bool centerCamera = true)
g_meshRestPositions.resize(0);
}
+ g_solverDesc.maxParticles = maxParticles;
+ g_solverDesc.maxDiffuseParticles = g_maxDiffuseParticles;
+ g_solverDesc.maxNeighborsPerParticle = g_maxNeighborsPerParticle;
+
// main create method for the Flex solver
- g_flex = NvFlexCreateSolver(g_flexLib, maxParticles, g_maxDiffuseParticles, g_maxNeighborsPerParticle);
+ g_solver = NvFlexCreateSolver(g_flexLib, &g_solverDesc);
// give scene a chance to do some post solver initialization
g_scenes[g_scene]->PostInitialize();
@@ -868,13 +904,20 @@ void Init(int scene, bool centerCamera = true)
const int numRigids = g_buffers->rigidOffsets.size() - 1;
+ // If the centers of mass for the rigids are not yet computed, this is done here
+ // (If the CreateParticleShape method is used instead of the NvFlexExt methods, the centers of mass will be calculated here)
+ if (g_buffers->rigidTranslations.size() == 0)
+ {
+ g_buffers->rigidTranslations.resize(g_buffers->rigidOffsets.size() - 1, Vec3());
+ CalculateRigidCentersOfMass(&g_buffers->positions[0], g_buffers->positions.size(), &g_buffers->rigidOffsets[0], &g_buffers->rigidTranslations[0], &g_buffers->rigidIndices[0], numRigids);
+ }
+
// calculate local rest space positions
g_buffers->rigidLocalPositions.resize(g_buffers->rigidOffsets.back());
- CalculateRigidLocalPositions(&g_buffers->positions[0], g_buffers->positions.size(), &g_buffers->rigidOffsets[0], &g_buffers->rigidIndices[0], numRigids, &g_buffers->rigidLocalPositions[0]);
+ CalculateRigidLocalPositions(&g_buffers->positions[0], &g_buffers->rigidOffsets[0], &g_buffers->rigidTranslations[0], &g_buffers->rigidIndices[0], numRigids, &g_buffers->rigidLocalPositions[0]);
+ // set rigidRotations to correct length, probably NULL up until here
g_buffers->rigidRotations.resize(g_buffers->rigidOffsets.size() - 1, Quat());
- g_buffers->rigidTranslations.resize(g_buffers->rigidOffsets.size() - 1, Vec3());
-
}
// unmap so we can start transferring data to GPU
@@ -883,47 +926,53 @@ void Init(int scene, bool centerCamera = true)
//-----------------------------
// Send data to Flex
- NvFlexSetParams(g_flex, &g_params);
- NvFlexSetParticles(g_flex, g_buffers->positions.buffer, numParticles);
- NvFlexSetVelocities(g_flex, g_buffers->velocities.buffer, numParticles);
- NvFlexSetNormals(g_flex, g_buffers->normals.buffer, numParticles);
- NvFlexSetPhases(g_flex, g_buffers->phases.buffer, g_buffers->phases.size());
- NvFlexSetRestParticles(g_flex, g_buffers->restPositions.buffer, g_buffers->restPositions.size());
+ NvFlexCopyDesc copyDesc;
+ copyDesc.dstOffset = 0;
+ copyDesc.srcOffset = 0;
+ copyDesc.elementCount = numParticles;
- NvFlexSetActive(g_flex, g_buffers->activeIndices.buffer, numParticles);
+ NvFlexSetParams(g_solver, &g_params);
+ NvFlexSetParticles(g_solver, g_buffers->positions.buffer, &copyDesc);
+ NvFlexSetVelocities(g_solver, g_buffers->velocities.buffer, &copyDesc);
+ NvFlexSetNormals(g_solver, g_buffers->normals.buffer, &copyDesc);
+ NvFlexSetPhases(g_solver, g_buffers->phases.buffer, &copyDesc);
+ NvFlexSetRestParticles(g_solver, g_buffers->restPositions.buffer, &copyDesc);
+ NvFlexSetActive(g_solver, g_buffers->activeIndices.buffer, &copyDesc);
+ NvFlexSetActiveCount(g_solver, numParticles);
+
// springs
if (g_buffers->springIndices.size())
{
assert((g_buffers->springIndices.size() & 1) == 0);
assert((g_buffers->springIndices.size() / 2) == g_buffers->springLengths.size());
- NvFlexSetSprings(g_flex, g_buffers->springIndices.buffer, g_buffers->springLengths.buffer, g_buffers->springStiffness.buffer, g_buffers->springLengths.size());
+ NvFlexSetSprings(g_solver, g_buffers->springIndices.buffer, g_buffers->springLengths.buffer, g_buffers->springStiffness.buffer, g_buffers->springLengths.size());
}
// rigids
if (g_buffers->rigidOffsets.size())
{
- NvFlexSetRigids(g_flex, g_buffers->rigidOffsets.buffer, g_buffers->rigidIndices.buffer, g_buffers->rigidLocalPositions.buffer, g_buffers->rigidLocalNormals.buffer, g_buffers->rigidCoefficients.buffer, g_buffers->rigidRotations.buffer, g_buffers->rigidTranslations.buffer, g_buffers->rigidOffsets.size() - 1, g_buffers->rigidIndices.size());
+ NvFlexSetRigids(g_solver, g_buffers->rigidOffsets.buffer, g_buffers->rigidIndices.buffer, g_buffers->rigidLocalPositions.buffer, g_buffers->rigidLocalNormals.buffer, g_buffers->rigidCoefficients.buffer, g_buffers->rigidPlasticThresholds.buffer, g_buffers->rigidPlasticCreeps.buffer, g_buffers->rigidRotations.buffer, g_buffers->rigidTranslations.buffer, g_buffers->rigidOffsets.size() - 1, g_buffers->rigidIndices.size());
}
// inflatables
if (g_buffers->inflatableTriOffsets.size())
{
- NvFlexSetInflatables(g_flex, g_buffers->inflatableTriOffsets.buffer, g_buffers->inflatableTriCounts.buffer, g_buffers->inflatableVolumes.buffer, g_buffers->inflatablePressures.buffer, g_buffers->inflatableCoefficients.buffer, g_buffers->inflatableTriOffsets.size());
+ NvFlexSetInflatables(g_solver, g_buffers->inflatableTriOffsets.buffer, g_buffers->inflatableTriCounts.buffer, g_buffers->inflatableVolumes.buffer, g_buffers->inflatablePressures.buffer, g_buffers->inflatableCoefficients.buffer, g_buffers->inflatableTriOffsets.size());
}
// dynamic triangles
if (g_buffers->triangles.size())
{
- NvFlexSetDynamicTriangles(g_flex, g_buffers->triangles.buffer, g_buffers->triangleNormals.buffer, g_buffers->triangles.size() / 3);
+ NvFlexSetDynamicTriangles(g_solver, g_buffers->triangles.buffer, g_buffers->triangleNormals.buffer, g_buffers->triangles.size() / 3);
}
// collision shapes
if (g_buffers->shapeFlags.size())
{
NvFlexSetShapes(
- g_flex,
+ g_solver,
g_buffers->shapeGeometry.buffer,
g_buffers->shapePositions.buffer,
g_buffers->shapeRotations.buffer,
@@ -946,20 +995,20 @@ void Init(int scene, bool centerCamera = true)
NvFlexParams copy = g_params;
copy.numIterations = 4;
- NvFlexSetParams(g_flex, &copy);
+ NvFlexSetParams(g_solver, &copy);
const int kWarmupIterations = 100;
for (int i = 0; i < kWarmupIterations; ++i)
{
- NvFlexUpdateSolver(g_flex, 0.0001f, 1, false);
- NvFlexSetVelocities(g_flex, g_buffers->velocities.buffer, maxParticles);
+ NvFlexUpdateSolver(g_solver, 0.0001f, 1, false);
+ NvFlexSetVelocities(g_solver, g_buffers->velocities.buffer, NULL);
}
// udpate host copy
- NvFlexGetParticles(g_flex, g_buffers->positions.buffer, g_buffers->positions.size());
- NvFlexGetSmoothParticles(g_flex, g_buffers->smoothPositions.buffer, g_buffers->smoothPositions.size());
- NvFlexGetAnisotropy(g_flex, g_buffers->anisotropy1.buffer, g_buffers->anisotropy2.buffer, g_buffers->anisotropy3.buffer);
+ NvFlexGetParticles(g_solver, g_buffers->positions.buffer, NULL);
+ NvFlexGetSmoothParticles(g_solver, g_buffers->smoothPositions.buffer, NULL);
+ NvFlexGetAnisotropy(g_solver, g_buffers->anisotropy1.buffer, g_buffers->anisotropy2.buffer, g_buffers->anisotropy3.buffer, NULL);
printf("Finished warm up.\n");
}
@@ -996,7 +1045,7 @@ void Shutdown()
g_fields.clear();
g_meshes.clear();
- NvFlexDestroySolver(g_flex);
+ NvFlexDestroySolver(g_solver);
NvFlexShutdown(g_flexLib);
#if _WIN32
@@ -1019,7 +1068,7 @@ void UpdateEmitters()
// process emitters
if (g_emit)
{
- int activeCount = NvFlexGetActiveCount(g_flex);
+ int activeCount = NvFlexGetActiveCount(g_solver);
size_t e = 0;
@@ -1036,19 +1085,9 @@ void UpdateEmitters()
Vec3 emitterRight = g_emitters[e].mRight;
Vec3 emitterPos = g_emitters[e].mPos;
- float r;
- int phase;
- if (g_params.fluid)
- {
- r = g_params.fluidRestDistance;
- phase = NvFlexMakePhase(0, eNvFlexPhaseSelfCollide | eNvFlexPhaseFluid);
- }
- else
- {
- r = g_params.solidRestDistance;
- phase = NvFlexMakePhase(0, eNvFlexPhaseSelfCollide);
- }
+ float r = g_params.fluidRestDistance;
+ int phase = NvFlexMakePhase(0, eNvFlexPhaseSelfCollide | eNvFlexPhaseFluid);
float numParticles = (g_emitters[e].mSpeed / r)*g_dt;
@@ -1124,7 +1163,7 @@ void UpdateMouse()
Vec3 origin, dir;
GetViewRay(g_lastx, g_screenHeight - g_lasty, origin, dir);
- const int numActive = NvFlexGetActiveCount(g_flex);
+ const int numActive = NvFlexGetActiveCount(g_solver);
g_mouseParticle = PickParticle(origin, dir, &g_buffers->positions[0], &g_buffers->phases[0], numActive, g_params.radius*0.8f, g_mouseT);
@@ -1190,8 +1229,8 @@ void UpdateScene()
void RenderScene()
{
- const int numParticles = NvFlexGetActiveCount(g_flex);
- const int numDiffuse = NvFlexGetDiffuseParticles(g_flex, NULL, NULL, NULL);
+ const int numParticles = NvFlexGetActiveCount(g_solver);
+ const int numDiffuse = g_buffers->diffuseCount[0];
//---------------------------------------------------
// use VBO buffer wrappers to allow Flex to write directly to the OpenGL buffers
@@ -1203,7 +1242,7 @@ void RenderScene()
if (g_interop)
{
// copy data directly from solver to the renderer buffers
- UpdateFluidRenderBuffers(g_fluidRenderBuffers, g_flex, g_drawEllipsoids, g_drawDensity);
+ UpdateFluidRenderBuffers(g_fluidRenderBuffers, g_solver, g_drawEllipsoids, g_drawDensity);
}
else
{
@@ -1235,13 +1274,16 @@ void RenderScene()
}
}
}
+
+ // GPU Render time doesn't include CPU->GPU copy time
+ GraphicsTimerBegin();
if (numDiffuse)
{
if (g_interop)
{
// copy data directly from solver to the renderer buffers
- UpdateDiffuseRenderBuffers(g_diffuseRenderBuffers, g_flex);
+ UpdateDiffuseRenderBuffers(g_diffuseRenderBuffers, g_solver);
}
else
{
@@ -1249,7 +1291,6 @@ void RenderScene()
UpdateDiffuseRenderBuffers(g_diffuseRenderBuffers,
&g_buffers->diffusePositions[0],
&g_buffers->diffuseVelocities[0],
- &g_buffers->diffuseIndices[0],
numDiffuse);
}
}
@@ -1287,15 +1328,8 @@ void RenderScene()
Matrix44 lightView = LookAtMatrix(Point3(g_lightPos), Point3(g_lightTarget));
Matrix44 lightTransform = lightPerspective*lightView;
- // non-fluid particles maintain radius distance (not 2.0f*radius) so multiply by a half
- float radius = g_params.solidRestDistance;
-
- // fluid particles overlap twice as much again, so half the radius again
- if (g_params.fluid)
- radius = g_params.fluidRestDistance;
-
- radius *= 0.5f;
- radius *= g_pointScale;
+ // radius used for drawing
+ float radius = Max(g_params.solidRestDistance, g_params.fluidRestDistance)*0.5f*g_pointScale;
//-------------------------------------
// shadowing pass
@@ -1335,7 +1369,7 @@ void RenderScene()
{
shadowParticles = 0;
- if (g_drawEllipsoids && g_params.fluid)
+ if (g_drawEllipsoids)
{
shadowParticles = numParticles - g_numSolidParticles;
shadowParticlesOffset = g_numSolidParticles;
@@ -1350,7 +1384,7 @@ void RenderScene()
}
if (g_buffers->activeIndices.size())
- DrawPoints(g_fluidRenderBuffers.mPositionVBO, g_fluidRenderBuffers.mDensityVBO, g_fluidRenderBuffers.mIndices, shadowParticles, shadowParticlesOffset, radius, 2048, 1.0f, lightFov, g_lightPos, g_lightTarget, lightTransform, g_shadowMap, g_drawDensity);
+ DrawPoints(g_fluidRenderBuffers, shadowParticles, shadowParticlesOffset, radius, 2048, 1.0f, lightFov, g_lightPos, g_lightTarget, lightTransform, g_shadowMap, g_drawDensity);
ShadowEnd();
@@ -1362,26 +1396,33 @@ void RenderScene()
SetView(view, proj);
SetCullMode(true);
- DrawPlanes((Vec4*)g_params.planes, g_params.numPlanes, g_drawPlaneBias);
+ // When the benchmark measures async compute, we need a graphics workload that runs for a whole frame.
+ // We do this by rerendering our simple graphics many times.
+ int passes = g_increaseGfxLoadForAsyncComputeTesting ? 50 : 1;
- if (g_drawMesh)
- DrawMesh(g_mesh, g_meshColor);
+ for (int i = 0; i != passes; i++)
+ {
+ DrawPlanes((Vec4*)g_params.planes, g_params.numPlanes, g_drawPlaneBias);
- DrawShapes();
+ if (g_drawMesh)
+ DrawMesh(g_mesh, g_meshColor);
- if (g_drawCloth && g_buffers->triangles.size())
- DrawCloth(&g_buffers->positions[0], &g_buffers->normals[0], g_buffers->uvs.size() ? &g_buffers->uvs[0].x : NULL, &g_buffers->triangles[0], g_buffers->triangles.size() / 3, g_buffers->positions.size(), 3, g_expandCloth);
- if (g_drawRopes)
- {
- for (size_t i = 0; i < g_ropes.size(); ++i)
- DrawRope(&g_buffers->positions[0], &g_ropes[i].mIndices[0], g_ropes[i].mIndices.size(), g_params.radius*0.5f*g_ropeScale, i);
- }
+ DrawShapes();
- // give scene a chance to do custom drawing
- g_scenes[g_scene]->Draw(0);
+ if (g_drawCloth && g_buffers->triangles.size())
+ DrawCloth(&g_buffers->positions[0], &g_buffers->normals[0], g_buffers->uvs.size() ? &g_buffers->uvs[0].x : NULL, &g_buffers->triangles[0], g_buffers->triangles.size() / 3, g_buffers->positions.size(), 3, g_expandCloth);
+
+ if (g_drawRopes)
+ {
+ for (size_t i = 0; i < g_ropes.size(); ++i)
+ DrawRope(&g_buffers->positions[0], &g_ropes[i].mIndices[0], g_ropes[i].mIndices.size(), g_params.radius*0.5f*g_ropeScale, i);
+ }
+ // give scene a chance to do custom drawing
+ g_scenes[g_scene]->Draw(0);
+ }
UnbindSolidShader();
@@ -1389,11 +1430,11 @@ void RenderScene()
if (g_drawDiffuse)
RenderDiffuse(g_fluidRenderer, g_diffuseRenderBuffers, numDiffuse, radius*g_diffuseScale, float(g_screenWidth), aspect, fov, g_diffuseColor, g_lightPos, g_lightTarget, lightTransform, g_shadowMap, g_diffuseMotionScale, g_diffuseInscatter, g_diffuseOutscatter, g_diffuseShadow, false);
- if (g_drawEllipsoids && g_params.fluid)
+ if (g_drawEllipsoids)
{
// draw solid particles separately
if (g_numSolidParticles && g_drawPoints)
- DrawPoints(g_fluidRenderBuffers.mPositionVBO, g_fluidRenderBuffers.mDensityVBO, g_fluidRenderBuffers.mIndices, g_numSolidParticles, 0, radius, float(g_screenWidth), aspect, fov, g_lightPos, g_lightTarget, lightTransform, g_shadowMap, g_drawDensity);
+ DrawPoints(g_fluidRenderBuffers, g_numSolidParticles, 0, radius, float(g_screenWidth), aspect, fov, g_lightPos, g_lightTarget, lightTransform, g_shadowMap, g_drawDensity);
// render fluid surface
RenderEllipsoids(g_fluidRenderer, g_fluidRenderBuffers, numParticles - g_numSolidParticles, g_numSolidParticles, radius, float(g_screenWidth), aspect, fov, g_lightPos, g_lightTarget, lightTransform, g_shadowMap, g_fluidColor, g_blur, g_ior, g_drawOpaque);
@@ -1410,10 +1451,11 @@ void RenderScene()
int offset = g_drawMesh ? g_numSolidParticles : 0;
if (g_buffers->activeIndices.size())
- DrawPoints(g_fluidRenderBuffers.mPositionVBO, g_fluidRenderBuffers.mDensityVBO, g_fluidRenderBuffers.mIndices, numParticles - offset, offset, radius, float(g_screenWidth), aspect, fov, g_lightPos, g_lightTarget, lightTransform, g_shadowMap, g_drawDensity);
+ DrawPoints(g_fluidRenderBuffers, numParticles - offset, offset, radius, float(g_screenWidth), aspect, fov, g_lightPos, g_lightTarget, lightTransform, g_shadowMap, g_drawDensity);
}
}
+ GraphicsTimerEnd();
}
void RenderDebug()
@@ -1472,7 +1514,7 @@ void RenderDebug()
NvFlexVector<int> contactIndices(g_flexLib, g_buffers->positions.size());
NvFlexVector<unsigned int> contactCounts(g_flexLib, g_buffers->positions.size());
- NvFlexGetContacts(g_flex, contactPlanes.buffer, contactVelocities.buffer, contactIndices.buffer, contactCounts.buffer);
+ NvFlexGetContacts(g_solver, contactPlanes.buffer, contactVelocities.buffer, contactIndices.buffer, contactCounts.buffer);
// ensure transfers have finished
contactPlanes.map();
@@ -1528,7 +1570,7 @@ void RenderDebug()
if (g_drawNormals)
{
- NvFlexGetNormals(g_flex, g_buffers->normals.buffer, g_buffers->normals.size());
+ NvFlexGetNormals(g_solver, g_buffers->normals.buffer, NULL);
BeginLines();
@@ -1655,8 +1697,8 @@ int DoUI()
if (g_showHelp)
{
- const int numParticles = NvFlexGetActiveCount(g_flex);
- const int numDiffuse = NvFlexGetDiffuseParticles(g_flex, NULL, NULL, NULL);
+ const int numParticles = NvFlexGetActiveCount(g_solver);
+ const int numDiffuse = g_buffers->diffuseCount[0];
int x = g_screenWidth - 200;
int y = g_screenHeight - 23;
@@ -1687,6 +1729,8 @@ int DoUI()
{
DrawImguiString(x, y, Vec3(1.0f), IMGUI_ALIGN_RIGHT, "Sim Time (CPU): %.2fms", g_updateTime*1000.0f); y -= fontHeight;
DrawImguiString(x, y, Vec3(0.97f, 0.59f, 0.27f), IMGUI_ALIGN_RIGHT, "Sim Latency (GPU): %.2fms", g_simLatency); y -= fontHeight * 2;
+
+ BenchmarkUpdateGraph();
}
else
{
@@ -1750,7 +1794,7 @@ int DoUI()
for (int i = 0; i < int(g_scenes.size()); ++i)
{
unsigned int color = g_scene == i ? imguiRGBA(255, 151, 61, 255) : imguiRGBA(255, 255, 255, 200);
- if (imguiItem(g_scenes[i]->GetName(), true, color, i == g_selectedScene))
+ if (imguiItem(g_scenes[i]->GetName(), true, color)) // , i == g_selectedScene))
{
newScene = i;
}
@@ -1842,11 +1886,6 @@ int DoUI()
imguiSlider("Collision Distance", &g_params.collisionDistance, 0.0f, 0.5f, 0.001f);
imguiSlider("Collision Margin", &g_params.shapeCollisionMargin, 0.0f, 5.0f, 0.01f);
- // rigid params
- imguiSeparatorLine();
- imguiSlider("Plastic Creep", &g_params.plasticCreep, 0.0f, 1.0f, 0.001f);
- imguiSlider("Plastic Threshold", &g_params.plasticThreshold, 0.0f, 0.5f, 0.001f);
-
// cloth params
imguiSeparatorLine();
imguiSlider("Wind", &g_windStrength, -1.0f, 1.0f, 0.01f);
@@ -1855,9 +1894,6 @@ int DoUI()
imguiSeparatorLine();
// fluid params
- if (imguiCheck("Fluid", g_params.fluid))
- g_params.fluid = !g_params.fluid;
-
imguiSlider("Adhesion", &g_params.adhesion, 0.0f, 10.0f, 0.01f);
imguiSlider("Cohesion", &g_params.cohesion, 0.0f, 0.2f, 0.0001f);
imguiSlider("Surface Tension", &g_params.surfaceTension, 0.0f, 50.0f, 0.01f);
@@ -1891,13 +1927,9 @@ int DoUI()
imguiEndFrame();
// kick render commands
- imguiGraphDraw();
+ DrawImguiGraph();
}
- // update benchmark and change scene if one is requested
- if (g_benchmark)
- newScene = BenchmarkUpdate();
-
return newScene;
}
@@ -2003,6 +2035,11 @@ void UpdateFrame()
double waitEndTime = GetSeconds();
+ // Getting timers causes CPU/GPU sync, so we do it after a map
+ float newSimLatency = NvFlexGetDeviceLatency(g_solver, &g_GpuTimers.computeBegin, &g_GpuTimers.computeEnd, &g_GpuTimers.computeFreq);
+ float newGfxLatency = RendererGetDeviceTimestamps(&g_GpuTimers.renderBegin, &g_GpuTimers.renderEnd,&g_GpuTimers.renderFreq);
+ (void)newGfxLatency;
+
UpdateCamera();
if (!g_pause || g_step)
@@ -2018,27 +2055,33 @@ void UpdateFrame()
double renderBeginTime = GetSeconds();
- if (g_profile && (!g_pause || g_step)) {
- if (g_benchmark) {
- g_numDetailTimers = NvFlexGetDetailTimers(g_flex, &g_detailTimers);
+ if (g_profile && (!g_pause || g_step))
+ {
+ if (g_benchmark)
+ {
+ g_numDetailTimers = NvFlexGetDetailTimers(g_solver, &g_detailTimers);
}
- else {
+ else
+ {
memset(&g_timers, 0, sizeof(g_timers));
- NvFlexGetTimers(g_flex, &g_timers);
+ NvFlexGetTimers(g_solver, &g_timers);
}
}
- float newSimLatency = NvFlexGetDeviceLatency(g_flex);
-
StartFrame(Vec4(g_clearColor, 1.0f));
// main scene render
RenderScene();
RenderDebug();
+ int newScene = DoUI();
+
EndFrame();
- const int newScene = DoUI();
+ // If user has disabled async compute, ensure that no compute can overlap
+ // graphics by placing a sync between them
+ if (!g_useAsyncCompute)
+ NvFlexComputeWaitForGraphics(g_flexLib);
UnmapBuffers(g_buffers);
@@ -2074,26 +2117,18 @@ void UpdateFrame()
g_resetScene = false;
}
- // if gui requested a scene change process it now
- if (newScene != -1)
- {
- g_scene = newScene;
- Init(g_scene);
- return;
- }
-
-
-
//-------------------------------------------------------------------
// Flex Update
double updateBeginTime = GetSeconds();
// send any particle updates to the solver
- NvFlexSetParticles(g_flex, g_buffers->positions.buffer, g_buffers->positions.size());
- NvFlexSetVelocities(g_flex, g_buffers->velocities.buffer, g_buffers->velocities.size());
- NvFlexSetPhases(g_flex, g_buffers->phases.buffer, g_buffers->phases.size());
- NvFlexSetActive(g_flex, g_buffers->activeIndices.buffer, g_buffers->activeIndices.size());
+ NvFlexSetParticles(g_solver, g_buffers->positions.buffer, NULL);
+ NvFlexSetVelocities(g_solver, g_buffers->velocities.buffer, NULL);
+ NvFlexSetPhases(g_solver, g_buffers->phases.buffer, NULL);
+ NvFlexSetActive(g_solver, g_buffers->activeIndices.buffer, NULL);
+
+ NvFlexSetActiveCount(g_solver, g_buffers->activeIndices.size());
// allow scene to update constraints etc
SyncScene();
@@ -2101,7 +2136,7 @@ void UpdateFrame()
if (g_shapesChanged)
{
NvFlexSetShapes(
- g_flex,
+ g_solver,
g_buffers->shapeGeometry.buffer,
g_buffers->shapePositions.buffer,
g_buffers->shapeRotations.buffer,
@@ -2116,8 +2151,8 @@ void UpdateFrame()
if (!g_pause || g_step)
{
// tick solver
- NvFlexSetParams(g_flex, &g_params);
- NvFlexUpdateSolver(g_flex, g_dt, g_numSubsteps, g_profile);
+ NvFlexSetParams(g_solver, &g_params);
+ NvFlexUpdateSolver(g_solver, g_dt, g_numSubsteps, g_profile);
g_frame++;
g_step = false;
@@ -2128,36 +2163,42 @@ void UpdateFrame()
// to be executed later.
// When we're ready to read the fetched buffers we'll Map them, and that's when
// the CPU will wait for the GPU flex update and GPU copy to finish.
- NvFlexGetParticles(g_flex, g_buffers->positions.buffer, g_buffers->positions.size());
- NvFlexGetVelocities(g_flex, g_buffers->velocities.buffer, g_buffers->velocities.size());
- NvFlexGetNormals(g_flex, g_buffers->normals.buffer, g_buffers->normals.size());
+ NvFlexGetParticles(g_solver, g_buffers->positions.buffer, NULL);
+ NvFlexGetVelocities(g_solver, g_buffers->velocities.buffer, NULL);
+ NvFlexGetNormals(g_solver, g_buffers->normals.buffer, NULL);
// readback triangle normals
if (g_buffers->triangles.size())
- NvFlexGetDynamicTriangles(g_flex, g_buffers->triangles.buffer, g_buffers->triangleNormals.buffer, g_buffers->triangles.size() / 3);
+ NvFlexGetDynamicTriangles(g_solver, g_buffers->triangles.buffer, g_buffers->triangleNormals.buffer, g_buffers->triangles.size() / 3);
// readback rigid transforms
if (g_buffers->rigidOffsets.size())
- NvFlexGetRigidTransforms(g_flex, g_buffers->rigidRotations.buffer, g_buffers->rigidTranslations.buffer);
+ NvFlexGetRigids(g_solver, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_buffers->rigidRotations.buffer, g_buffers->rigidTranslations.buffer);
if (!g_interop)
{
// if not using interop then we read back fluid data to host
if (g_drawEllipsoids)
{
- NvFlexGetSmoothParticles(g_flex, g_buffers->smoothPositions.buffer, g_buffers->smoothPositions.size());
- NvFlexGetAnisotropy(g_flex, g_buffers->anisotropy1.buffer, g_buffers->anisotropy2.buffer, g_buffers->anisotropy3.buffer);
+ NvFlexGetSmoothParticles(g_solver, g_buffers->smoothPositions.buffer, NULL);
+ NvFlexGetAnisotropy(g_solver, g_buffers->anisotropy1.buffer, g_buffers->anisotropy2.buffer, g_buffers->anisotropy3.buffer, NULL);
}
// read back diffuse data to host
if (g_drawDensity)
- NvFlexGetDensities(g_flex, g_buffers->densities.buffer, g_buffers->positions.size());
+ NvFlexGetDensities(g_solver, g_buffers->densities.buffer, NULL);
- if (g_diffuseRenderBuffers.mNumDiffuseParticles)
+ if (GetNumDiffuseRenderParticles(g_diffuseRenderBuffers))
{
- NvFlexGetDiffuseParticles(g_flex, g_buffers->diffusePositions.buffer, g_buffers->diffuseVelocities.buffer, g_buffers->diffuseIndices.buffer);
+ NvFlexGetDiffuseParticles(g_solver, g_buffers->diffusePositions.buffer, g_buffers->diffuseVelocities.buffer, g_buffers->diffuseCount.buffer);
}
}
+ else
+ {
+ // read back just the new diffuse particle count, render buffers will be updated during rendering
+ NvFlexGetDiffuseParticles(g_solver, NULL, NULL, g_buffers->diffuseCount.buffer);
+ }
+
double updateEndTime = GetSeconds();
@@ -2176,6 +2217,15 @@ void UpdateFrame()
g_waitTime = (g_waitTime == 0.0f) ? newWaitTime : Lerp(g_waitTime, newWaitTime, timerSmoothing);
g_simLatency = (g_simLatency == 0.0f) ? newSimLatency : Lerp(g_simLatency, newSimLatency, timerSmoothing);
+ if(g_benchmark) newScene = BenchmarkUpdate();
+
+ // if gui or benchmark requested a scene change process it now
+ if (newScene != -1)
+ {
+ g_scene = newScene;
+ Init(g_scene);
+ }
+
PresentFrame(g_vsync);
}
@@ -2548,10 +2598,10 @@ void MouseMotionFunc(unsigned state, int x, int y)
bool g_Error = false;
-void ErrorCallback(NvFlexErrorSeverity, const char* msg, const char* file, int line)
+void ErrorCallback(NvFlexErrorSeverity severity, const char* msg, const char* file, int line)
{
printf("Flex: %s - %s:%d\n", msg, file, line);
- g_Error = true;
+ g_Error = (severity == eNvFlexLogError);
//assert(0); asserts are bad for TeamCity
}
@@ -2606,9 +2656,14 @@ void SDLInit(const char* title)
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER) < 0) // Initialize SDL's Video subsystem and game controllers
printf("Unable to initialize SDL");
- // Create our window centered
+#if FLEX_DX
+ unsigned int flags = SDL_WINDOW_RESIZABLE;
+#else
+ unsigned int flags = SDL_WINDOW_RESIZABLE | SDL_WINDOW_OPENGL;
+#endif
+
g_window = SDL_CreateWindow(title, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
- g_screenWidth, g_screenHeight, SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE);
+ g_screenWidth, g_screenHeight, flags);
g_windowId = SDL_GetWindowID(g_window);
}
@@ -2692,17 +2747,32 @@ int main(int argc, char* argv[])
if (sscanf(argv[i], "-extensions=%d", &d))
g_extensions = d != 0;
- if (strstr(argv[i], "-benchmark"))
+ if (strcmp(argv[i], "-benchmark") == 0)
{
g_benchmark = true;
g_profile = true;
+ g_outputAllFrameTimes = false;
+ g_vsync = false;
+ g_fullscreen = true;
}
- if (strstr(argv[i], "-d3d12"))
+ if (strcmp(argv[i], "-d3d12") == 0)
+ {
g_d3d12 = true;
+ // Currently interop doesn't work on d3d12
+ g_interop = false;
+ }
+
+ if (strcmp(argv[i], "-benchmarkAllFrameTimes") == 0)
+ {
+ g_benchmark = true;
+ g_outputAllFrameTimes = true;
+ }
- if (strstr(argv[i], "-tc"))
+ if (strcmp(argv[i], "-tc") == 0)
+ {
g_teamCity = true;
+ }
if (sscanf(argv[i], "-msaa=%d", &d))
g_msaaSamples = d;
@@ -2715,13 +2785,26 @@ int main(int argc, char* argv[])
g_screenHeight = h;
g_fullscreen = true;
}
- else if (strstr(argv[i], "-fullscreen"))
+ else if (strcmp(argv[i], "-fullscreen") == 0)
{
g_screenWidth = w;
g_screenHeight = h;
g_fullscreen = true;
}
+ if (sscanf(argv[i], "-windowed=%dx%d", &w, &h) == 2)
+ {
+ g_screenWidth = w;
+ g_screenHeight = h;
+ g_fullscreen = false;
+ }
+ else if (strstr(argv[i], "-windowed"))
+ {
+ g_screenWidth = w;
+ g_screenHeight = h;
+ g_fullscreen = false;
+ }
+
if (sscanf(argv[i], "-vsync=%d", &d))
g_vsync = d != 0;
@@ -2730,100 +2813,174 @@ int main(int argc, char* argv[])
g_numExtraMultiplier = d;
}
- if (strstr(argv[i], "-disabletweak"))
+ if (strcmp(argv[i], "-disabletweak") == 0)
{
g_tweakPanel = false;
}
- if (strstr(argv[i], "-disableinterop"))
+ if (strcmp(argv[i], "-disableinterop") == 0)
{
g_interop = false;
}
+ if (sscanf(argv[i], "-asynccompute=%d", &d) == 1)
+ {
+ g_useAsyncCompute = (d != 0);
+ }
}
// opening scene
g_scenes.push_back(new PotPourri("Pot Pourri"));
-
// soft body scenes
- SoftBody* softOctopus = new SoftBody("Soft Octopus", "../../data/softs/octopus.obj");
- softOctopus->mScale = Vec3(32.0f);
- softOctopus->mClusterSpacing = 2.75f;
- softOctopus->mClusterRadius = 3.0f;
- softOctopus->mClusterStiffness = 0.15f;
- softOctopus->mSurfaceSampling = 1.0f;
- softOctopus->mStack[1] = 3;
-
- SoftBody* softRope = new SoftBody("Soft Rope", "../../data/rope.obj");
- softRope->mScale = Vec3(50.0f);
- softRope->mClusterSpacing = 1.5f;
- softRope->mClusterRadius = 0.0f;
- softRope->mClusterStiffness = 0.55f;
-
- SoftBody* softBowl = new SoftBody("Soft Bowl", "../../data/bowl_high.ply");
- softBowl->mScale = Vec3(10.0f);
- softBowl->mClusterSpacing = 2.0f;
- softBowl->mClusterRadius = 2.0f;
- softBowl->mClusterStiffness = 0.55f;
-
- SoftBody* softCloth = new SoftBody("Soft Cloth", "../../data/box_ultra_high.ply");
- softCloth->mScale = Vec3(20.0f, 0.2f, 20.0f);
- softCloth->mRadius = 0.05f;
- softCloth->mClusterSpacing = 1.0f;
- softCloth->mClusterRadius = 2.0f;
- softCloth->mClusterStiffness = 0.2f;
- softCloth->mLinkRadius = 2.0f;
- softCloth->mLinkStiffness = 1.0f;
- softCloth->mSkinningFalloff = 1.0f;
- softCloth->mSkinningMaxDistance = 100.f;
-
- SoftBodyFixed* softRod = new SoftBodyFixed("Soft Rod", "../../data/box_very_high.ply");
- softRod->mScale = Vec3(20.0f, 2.0f, 2.0f);
- softRod->mOffset = Vec3(-0.3f, 1.0f, 0.0f);
- softRod->mClusterSpacing = 2.0f;
- softRod->mClusterRadius = 2.0f;
- softRod->mClusterStiffness = 0.225f;
- softRod->mStack[2] = 3;
-
- SoftBody* softTeapot = new SoftBody("Soft Teapot", "../../data/teapot.ply");
- softTeapot->mScale = Vec3(25.0f);
- softTeapot->mClusterSpacing = 3.0f;
- softTeapot->mClusterRadius = 0.0f;
- softTeapot->mClusterStiffness = 0.1f;
-
- SoftBody* softArmadillo = new SoftBody("Soft Armadillo", "../../data/armadillo.ply");
- softArmadillo->mScale = Vec3(25.0f);
- softArmadillo->mClusterSpacing = 3.0f;
- softArmadillo->mClusterRadius = 0.0f;
-
- SoftBody* softBunny = new SoftBody("Soft Bunny", "../../data/bunny.ply");
- softBunny->mScale = Vec3(20.0f);
- softBunny->mClusterSpacing = 3.5f;
- softBunny->mClusterRadius = 0.0f;
- softBunny->mClusterStiffness = 0.2f;
-
- SoftBody* plasticBunnies = new SoftBody("Plastic Bunnies", "../../data/bunny.ply");
- plasticBunnies->mScale = Vec3(10.0f);
- plasticBunnies->mClusterSpacing = 1.0f;
- plasticBunnies->mClusterRadius = 0.0f;
- plasticBunnies->mClusterStiffness = 0.0f;
- plasticBunnies->mGlobalStiffness = 1.0f;
- plasticBunnies->mPlasticThreshold = 0.0015f;
- plasticBunnies->mPlasticCreep = 0.15f;
- plasticBunnies->mRelaxationFactor = 1.0f;
- plasticBunnies->mOffset[1] = 5.0f;
- plasticBunnies->mStack[1] = 10;
- plasticBunnies->mPlinth = true;
-
- g_scenes.push_back(softOctopus);
- g_scenes.push_back(softTeapot);
- g_scenes.push_back(softRope);
- g_scenes.push_back(softCloth);
- g_scenes.push_back(softBowl);
- g_scenes.push_back(softRod);
- g_scenes.push_back(softArmadillo);
- g_scenes.push_back(softBunny);
- g_scenes.push_back(plasticBunnies);
+ SoftBody::Instance octopus("../../data/softs/octopus.obj");
+ octopus.mScale = Vec3(32.0f);
+ octopus.mClusterSpacing = 2.75f;
+ octopus.mClusterRadius = 3.0f;
+ octopus.mClusterStiffness = 0.15f;
+ octopus.mSurfaceSampling = 1.0f;
+ SoftBody* softOctopusSceneNew = new SoftBody("Soft Octopus");
+ softOctopusSceneNew->AddStack(octopus, 1, 3, 1);
+
+ SoftBody::Instance rope("../../data/rope.obj");
+ rope.mScale = Vec3(50.0f);
+ rope.mClusterSpacing = 1.5f;
+ rope.mClusterRadius = 0.0f;
+ rope.mClusterStiffness = 0.55f;
+ SoftBody* softRopeSceneNew = new SoftBody("Soft Rope");
+ softRopeSceneNew->AddInstance(rope);
+
+ SoftBody::Instance bowl("../../data/bowl_high.ply");
+ bowl.mScale = Vec3(10.0f);
+ bowl.mClusterSpacing = 2.0f;
+ bowl.mClusterRadius = 2.0f;
+ bowl.mClusterStiffness = 0.55f;
+ SoftBody* softBowlSceneNew = new SoftBody("Soft Bowl");
+ softBowlSceneNew->AddInstance(bowl);
+
+ SoftBody::Instance cloth("../../data/box_ultra_high.ply");
+ cloth.mScale = Vec3(20.0f, 0.2f, 20.0f);
+ cloth.mClusterSpacing = 1.0f;
+ cloth.mClusterRadius = 2.0f;
+ cloth.mClusterStiffness = 0.2f;
+ cloth.mLinkRadius = 2.0f;
+ cloth.mLinkStiffness = 1.0f;
+ cloth.mSkinningFalloff = 1.0f;
+ cloth.mSkinningMaxDistance = 100.f;
+ SoftBody* softClothSceneNew = new SoftBody("Soft Cloth");
+ softClothSceneNew->mRadius = 0.05f;
+ softClothSceneNew->AddInstance(cloth);
+
+ SoftBody::Instance rod("../../data/box_very_high.ply");
+ rod.mScale = Vec3(20.0f, 2.0f, 2.0f);
+ rod.mTranslation = Vec3(-0.3f, 1.0f, 0.0f);
+ rod.mClusterSpacing = 2.0f;
+ rod.mClusterRadius = 2.0f;
+ rod.mClusterStiffness = 0.225f;
+ SoftBodyFixed* softRodSceneNew = new SoftBodyFixed("Soft Rod");
+ softRodSceneNew->AddStack(rod, 3);
+
+ SoftBody::Instance teapot("../../data/teapot.ply");
+ teapot.mScale = Vec3(25.0f);
+ teapot.mClusterSpacing = 3.0f;
+ teapot.mClusterRadius = 0.0f;
+ teapot.mClusterStiffness = 0.1f;
+ SoftBody* softTeapotSceneNew = new SoftBody("Soft Teapot");
+ softTeapotSceneNew->AddInstance(teapot);
+
+ SoftBody::Instance armadillo("../../data/armadillo.ply");
+ armadillo.mScale = Vec3(25.0f);
+ armadillo.mClusterSpacing = 3.0f;
+ armadillo.mClusterRadius = 0.0f;
+ SoftBody* softArmadilloSceneNew = new SoftBody("Soft Armadillo");
+ softArmadilloSceneNew->AddInstance(armadillo);
+
+ SoftBody::Instance softbunny("../../data/bunny.ply");
+ softbunny.mScale = Vec3(20.0f);
+ softbunny.mClusterSpacing = 3.5f;
+ softbunny.mClusterRadius = 0.0f;
+ softbunny.mClusterStiffness = 0.2f;
+ SoftBody* softBunnySceneNew = new SoftBody("Soft Bunny");
+ softBunnySceneNew->AddInstance(softbunny);
+
+ // plastic scenes
+ SoftBody::Instance plasticbunny("../../data/bunny.ply");
+ plasticbunny.mScale = Vec3(10.0f);
+ plasticbunny.mClusterSpacing = 1.0f;
+ plasticbunny.mClusterRadius = 0.0f;
+ plasticbunny.mClusterStiffness = 0.0f;
+ plasticbunny.mGlobalStiffness = 1.0f;
+ plasticbunny.mClusterPlasticThreshold = 0.0015f;
+ plasticbunny.mClusterPlasticCreep = 0.15f;
+ plasticbunny.mTranslation[1] = 5.0f;
+ SoftBody* plasticBunniesSceneNew = new SoftBody("Plastic Bunnies");
+ plasticBunniesSceneNew->mPlinth = true;
+ plasticBunniesSceneNew->AddStack(plasticbunny, 1, 10, 1, true);
+
+ SoftBody::Instance bunny1("../../data/bunny.ply");
+ bunny1.mScale = Vec3(10.0f);
+ bunny1.mClusterSpacing = 1.0f;
+ bunny1.mClusterRadius = 0.0f;
+ bunny1.mClusterStiffness = 0.0f;
+ bunny1.mGlobalStiffness = 1.0f;
+ bunny1.mClusterPlasticThreshold = 0.0015f;
+ bunny1.mClusterPlasticCreep = 0.15f;
+ bunny1.mTranslation[1] = 5.0f;
+ SoftBody::Instance bunny2("../../data/bunny.ply");
+ bunny2.mScale = Vec3(10.0f);
+ bunny2.mClusterSpacing = 1.0f;
+ bunny2.mClusterRadius = 0.0f;
+ bunny2.mClusterStiffness = 0.0f;
+ bunny2.mGlobalStiffness = 1.0f;
+ bunny2.mClusterPlasticThreshold = 0.0015f;
+ bunny2.mClusterPlasticCreep = 0.30f;
+ bunny2.mTranslation[1] = 5.0f;
+ bunny2.mTranslation[0] = 2.0f;
+ SoftBody* plasticComparisonScene = new SoftBody("Plastic Comparison");
+ plasticComparisonScene->AddInstance(bunny1);
+ plasticComparisonScene->AddInstance(bunny2);
+ plasticComparisonScene->mPlinth = true;
+
+ SoftBody::Instance stackBox("../../data/box_high.ply");
+ stackBox.mScale = Vec3(10.0f);
+ stackBox.mClusterSpacing = 1.5f;
+ stackBox.mClusterRadius = 0.0f;
+ stackBox.mClusterStiffness = 0.0f;
+ stackBox.mGlobalStiffness = 1.0f;
+ stackBox.mClusterPlasticThreshold = 0.0015f;
+ stackBox.mClusterPlasticCreep = 0.25f;
+ stackBox.mTranslation[1] = 1.0f;
+ SoftBody::Instance stackSphere("../../data/sphere.ply");
+ stackSphere.mScale = Vec3(10.0f);
+ stackSphere.mClusterSpacing = 1.5f;
+ stackSphere.mClusterRadius = 0.0f;
+ stackSphere.mClusterStiffness = 0.0f;
+ stackSphere.mGlobalStiffness = 1.0f;
+ stackSphere.mClusterPlasticThreshold = 0.0015f;
+ stackSphere.mClusterPlasticCreep = 0.25f;
+ stackSphere.mTranslation[1] = 2.0f;
+ SoftBody* plasticStackScene = new SoftBody("Plastic Stack");
+ plasticStackScene->AddInstance(stackBox);
+ plasticStackScene->AddInstance(stackSphere);
+ for (int i = 0; i < 3; i++) {
+ stackBox.mTranslation[1] += 2.0f;
+ stackSphere.mTranslation[1] += 2.0f;
+ plasticStackScene->AddInstance(stackBox);
+ plasticStackScene->AddInstance(stackSphere);
+ }
+
+
+ g_scenes.push_back(softOctopusSceneNew);
+ g_scenes.push_back(softTeapotSceneNew);
+ g_scenes.push_back(softRopeSceneNew);
+ g_scenes.push_back(softClothSceneNew);
+ g_scenes.push_back(softBowlSceneNew);
+ g_scenes.push_back(softRodSceneNew);
+ g_scenes.push_back(softArmadilloSceneNew);
+ g_scenes.push_back(softBunnySceneNew);
+
+ g_scenes.push_back(plasticBunniesSceneNew);
+ g_scenes.push_back(plasticComparisonScene);
+ g_scenes.push_back(plasticStackScene);
// collision scenes
@@ -2832,6 +2989,7 @@ int main(int argc, char* argv[])
g_scenes.push_back(new FrictionMovingShape("Friction Moving Sphere", 1));
g_scenes.push_back(new FrictionMovingShape("Friction Moving Capsule", 2));
g_scenes.push_back(new ShapeCollision("Shape Collision"));
+ g_scenes.push_back(new ShapeChannels("Shape Channels"));
g_scenes.push_back(new TriangleCollision("Triangle Collision"));
g_scenes.push_back(new LocalSpaceFluid("Local Space Fluid"));
g_scenes.push_back(new LocalSpaceCloth("Local Space Cloth"));
@@ -2886,7 +3044,6 @@ int main(int argc, char* argv[])
g_scenes.push_back(new RigidPile("Rigid8", 12));
g_scenes.push_back(new BananaPile("Bananas"));
g_scenes.push_back(new LowDimensionalShapes("Low Dimensional Shapes"));
- g_scenes.push_back(new PlasticStack("Plastic Stack"));
// granular scenes
g_scenes.push_back(new GranularPile("Granular Pile"));
@@ -2911,7 +3068,34 @@ int main(int argc, char* argv[])
SDLInit(title);
- InitRender(g_window, g_fullscreen, g_msaaSamples);
+ RenderInitOptions options;
+ options.window = g_window;
+ options.numMsaaSamples = g_msaaSamples;
+ options.asyncComputeBenchmark = g_asyncComputeBenchmark;
+ options.defaultFontHeight = -1;
+ options.fullscreen = g_fullscreen;
+
+#if FLEX_DX
+ {
+ DemoContext* demoContext = nullptr;
+
+ if (g_d3d12)
+ {
+ // workaround for a driver issue with D3D12 with msaa, force it to off
+ options.numMsaaSamples = 1;
+
+ demoContext = CreateDemoContextD3D12();
+ }
+ else
+ {
+ demoContext = CreateDemoContextD3D11();
+ }
+ // Set the demo context
+ SetDemoContext(demoContext);
+ }
+#endif
+
+ InitRender(options);
if (g_fullscreen)
SDL_SetWindowFullscreen(g_window, SDL_WINDOW_FULLSCREEN_DESKTOP);
@@ -2922,16 +3106,16 @@ int main(int argc, char* argv[])
#if !FLEX_DX
- // use the PhysX GPU selected from the NVIDIA control panel
+ // use the PhysX GPU selected from the NVIDIA control panel
if (g_device == -1)
g_device = NvFlexDeviceGetSuggestedOrdinal();
-
+
// Create an optimized CUDA context for Flex and set it on the
// calling thread. This is an optional call, it is fine to use
// a regular CUDA context, although creating one through this API
// is recommended for best performance.
bool success = NvFlexDeviceCreateCudaContext(g_device);
-
+
if (!success)
{
printf("Error creating CUDA context.\n");
@@ -2945,6 +3129,7 @@ int main(int argc, char* argv[])
desc.enableExtensions = g_extensions;
desc.renderDevice = 0;
desc.renderContext = 0;
+ desc.computeContext = 0;
desc.computeType = eNvFlexCUDA;
#if FLEX_DX
@@ -2954,18 +3139,36 @@ int main(int argc, char* argv[])
else
desc.computeType = eNvFlexD3D11;
- if (g_device == -1 && !g_d3d12)
+ bool userSpecifiedGpuToUseForFlex = (g_device != -1);
+
+ if (userSpecifiedGpuToUseForFlex)
{
- // use the renderer device
- GetRenderDevice((ID3D11Device**)&desc.renderDevice,
- (ID3D11DeviceContext**)&desc.renderContext);
- }
+ // Flex doesn't currently support interop between different D3DDevices.
+ // If the user specifies which physical device to use, then Flex always
+ // creates its own D3DDevice, even if graphics is on the same physical device.
+ // So specified physical device always means no interop.
+ g_interop = false;
+ }
else
{
- // disable shared resources
- g_interop = false;
+ // Ask Flex to run on the same GPU as rendering
+ GetRenderDevice(&desc.renderDevice,
+ &desc.renderContext);
}
+ // Shared resources are unimplemented on D3D12,
+ // so disable it for now.
+ if (g_d3d12)
+ g_interop = false;
+
+ // Setting runOnRenderContext = true doesn't prevent async compute, it just
+ // makes Flex send compute and graphics to the GPU on the same queue.
+ //
+ // So to allow the user to toggle async compute, we set runOnRenderContext = false
+ // and provide a toggleable sync between compute and graphics in the app.
+ //
+ // Search for g_useAsyncCompute for details
+ desc.runOnRenderContext = false;
#endif
// Init Flex library, note that no CUDA methods should be called before this
@@ -2983,14 +3186,15 @@ int main(int argc, char* argv[])
printf("Compute Device: %s\n\n", g_deviceName);
if (g_benchmark)
- BenchmarkInit();
-
+ g_scene = BenchmarkInit();
// create shadow maps
g_shadowMap = ShadowCreate();
// init default scene
+ StartGpuWork();
Init(g_scene);
+ EndGpuWork();
SDLMainLoop();
@@ -3001,9 +3205,9 @@ int main(int argc, char* argv[])
DestroyDiffuseRenderBuffers(g_diffuseRenderBuffers);
ShadowDestroy(g_shadowMap);
- DestroyRender();
-
+
Shutdown();
+ DestroyRender();
SDL_DestroyWindow(g_window);
SDL_Quit();
diff --git a/demo/opengl/shadersGL.cpp b/demo/opengl/shadersGL.cpp
index b4023db..1005be2 100644
--- a/demo/opengl/shadersGL.cpp
+++ b/demo/opengl/shadersGL.cpp
@@ -46,6 +46,93 @@
#define CudaCheck(x) { cudaError_t err = x; if (err != cudaSuccess) { printf("Cuda error: %d in %s at %s:%d\n", err, #x, __FILE__, __LINE__); assert(0); } }
+typedef unsigned int VertexBuffer;
+typedef unsigned int IndexBuffer;
+typedef unsigned int Texture;
+
+struct FluidRenderBuffersGL
+{
+ FluidRenderBuffersGL(int numParticles = 0):
+ mPositionVBO(0),
+ mDensityVBO(0),
+ mIndices(0),
+ mPositionBuf(nullptr),
+ mDensitiesBuf(nullptr),
+ mIndicesBuf(nullptr)
+ {
+ mNumParticles = numParticles;
+ for (int i = 0; i < 3; i++)
+ {
+ mAnisotropyVBO[i] = 0;
+ mAnisotropyBuf[i] = nullptr;
+ }
+ }
+ ~FluidRenderBuffersGL()
+ {
+ glDeleteBuffers(1, &mPositionVBO);
+ glDeleteBuffers(3, mAnisotropyVBO);
+ glDeleteBuffers(1, &mDensityVBO);
+ glDeleteBuffers(1, &mIndices);
+
+ NvFlexUnregisterOGLBuffer(mPositionBuf);
+ NvFlexUnregisterOGLBuffer(mDensitiesBuf);
+ NvFlexUnregisterOGLBuffer(mIndicesBuf);
+
+ NvFlexUnregisterOGLBuffer(mAnisotropyBuf[0]);
+ NvFlexUnregisterOGLBuffer(mAnisotropyBuf[1]);
+ NvFlexUnregisterOGLBuffer(mAnisotropyBuf[2]);
+ }
+
+ int mNumParticles;
+ VertexBuffer mPositionVBO;
+ VertexBuffer mDensityVBO;
+ VertexBuffer mAnisotropyVBO[3];
+ IndexBuffer mIndices;
+
+ // wrapper buffers that allow Flex to write directly to VBOs
+ NvFlexBuffer* mPositionBuf;
+ NvFlexBuffer* mDensitiesBuf;
+ NvFlexBuffer* mAnisotropyBuf[3];
+ NvFlexBuffer* mIndicesBuf;
+};
+
+// vertex buffers for diffuse particles
+struct DiffuseRenderBuffersGL
+{
+ DiffuseRenderBuffersGL(int numParticles = 0):
+ mDiffusePositionVBO(0),
+ mDiffuseVelocityVBO(0),
+ mDiffuseIndicesIBO(0),
+ mDiffuseIndicesBuf(nullptr),
+ mDiffusePositionsBuf(nullptr),
+ mDiffuseVelocitiesBuf(nullptr)
+ {
+ mNumParticles = numParticles;
+ }
+ ~DiffuseRenderBuffersGL()
+ {
+ if (mNumParticles > 0)
+ {
+ glDeleteBuffers(1, &mDiffusePositionVBO);
+ glDeleteBuffers(1, &mDiffuseVelocityVBO);
+ glDeleteBuffers(1, &mDiffuseIndicesIBO);
+
+ NvFlexUnregisterOGLBuffer(mDiffuseIndicesBuf);
+ NvFlexUnregisterOGLBuffer(mDiffusePositionsBuf);
+ NvFlexUnregisterOGLBuffer(mDiffuseVelocitiesBuf);
+ }
+ }
+
+ int mNumParticles;
+ VertexBuffer mDiffusePositionVBO;
+ VertexBuffer mDiffuseVelocityVBO;
+ IndexBuffer mDiffuseIndicesIBO;
+
+ NvFlexBuffer* mDiffuseIndicesBuf;
+ NvFlexBuffer* mDiffusePositionsBuf;
+ NvFlexBuffer* mDiffuseVelocitiesBuf;
+};
+
namespace
{
@@ -59,24 +146,13 @@ int g_screenHeight;
SDL_Window* g_window;
-static float gSpotMin = 0.5f;
-static float gSpotMax = 1.0f;
-float gShadowBias = 0.05f;
+static float g_spotMin = 0.5f;
+static float g_spotMax = 1.0f;
+float g_shadowBias = 0.05f;
} // anonymous namespace
-Colour gColors[] =
-{
- Colour(0.0f, 0.5f, 1.0f),
- Colour(0.797f, 0.354f, 0.000f),
- Colour(0.092f, 0.465f, 0.820f),
- Colour(0.000f, 0.349f, 0.173f),
- Colour(0.875f, 0.782f, 0.051f),
- Colour(0.000f, 0.170f, 0.453f),
- Colour(0.673f, 0.111f, 0.000f),
- Colour(0.612f, 0.194f, 0.394f)
-};
-
+extern Colour g_colors[];
struct ShadowMap
{
@@ -85,8 +161,11 @@ struct ShadowMap
};
-void InitRender(SDL_Window* window, bool fullscreen, int msaaSamples)
+void InitRender(const RenderInitOptions& options)
{
+ SDL_Window* window = options.window;
+ int msaaSamples = options.numMsaaSamples;
+
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
@@ -625,7 +704,7 @@ void ShadowApply(GLint sprogram, Vec3 lightPos, Vec3 lightTarget, Matrix44 light
glUniform3fv(uLightDir, 1, Normalize(lightTarget-lightPos));
GLint uBias = glGetUniformLocation(sprogram, "bias");
- glUniform1f(uBias, gShadowBias);
+ glUniform1f(uBias, g_shadowBias);
const Vec2 taps[] =
{
@@ -646,8 +725,13 @@ void ShadowApply(GLint sprogram, Vec3 lightPos, Vec3 lightTarget, Matrix44 light
}
-void DrawPoints(GLuint positions, GLuint colors, GLuint indices, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowMap, bool showDensity)
+void DrawPoints(FluidRenderBuffers* buffersIn, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowMap, bool showDensity)
{
+ FluidRenderBuffersGL* buffers = reinterpret_cast<FluidRenderBuffersGL*>(buffersIn);
+ GLuint positions = buffers->mPositionVBO;
+ GLuint colors = buffers->mDensityVBO;
+ GLuint indices = buffers->mIndices;
+
static int sprogram = -1;
if (sprogram == -1)
{
@@ -671,10 +755,10 @@ void DrawPoints(GLuint positions, GLuint colors, GLuint indices, int n, int offs
glVerify(glUseProgram(sprogram));
glVerify(glUniform1f( glGetUniformLocation(sprogram, "pointRadius"), radius));
glVerify(glUniform1f( glGetUniformLocation(sprogram, "pointScale"), screenWidth/screenAspect * (1.0f / (tanf(fov*0.5f)))));
- glVerify(glUniform1f( glGetUniformLocation(sprogram, "spotMin"), gSpotMin));
- glVerify(glUniform1f( glGetUniformLocation(sprogram, "spotMax"), gSpotMax));
+ glVerify(glUniform1f( glGetUniformLocation(sprogram, "spotMin"), g_spotMin));
+ glVerify(glUniform1f( glGetUniformLocation(sprogram, "spotMax"), g_spotMax));
glVerify(glUniform1i( glGetUniformLocation(sprogram, "mode"), mode));
- glVerify(glUniform4fv( glGetUniformLocation(sprogram, "colors"), 8, (float*)&gColors[0].r));
+ glVerify(glUniform4fv( glGetUniformLocation(sprogram, "colors"), 8, (float*)&g_colors[0].r));
// set shadow parameters
ShadowApply(sprogram, lightPos, lightTarget, lightTransform, shadowMap->texture);
@@ -817,8 +901,8 @@ void BindSolidShader(Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, S
glVerify(glUseProgram(s_diffuseProgram));
glVerify(glUniform1i(glGetUniformLocation(s_diffuseProgram, "grid"), 0));
- glVerify(glUniform1f( glGetUniformLocation(s_diffuseProgram, "spotMin"), gSpotMin));
- glVerify(glUniform1f( glGetUniformLocation(s_diffuseProgram, "spotMax"), gSpotMax));
+ glVerify(glUniform1f( glGetUniformLocation(s_diffuseProgram, "spotMin"), g_spotMin));
+ glVerify(glUniform1f( glGetUniformLocation(s_diffuseProgram, "spotMax"), g_spotMax));
glVerify(glUniform4fv( glGetUniformLocation(s_diffuseProgram, "fogColor"), 1, fogColor));
glVerify(glUniformMatrix4fv( glGetUniformLocation(s_diffuseProgram, "objectTransform"), 1, false, Matrix44::kIdentity));
@@ -858,7 +942,7 @@ void DrawPlanes(Vec4* planes, int n, float bias)
}
glVerify(glUniform1i(uGrid, 0));
- glVerify(glUniform1f(uBias, gShadowBias));
+ glVerify(glUniform1f(uBias, g_shadowBias));
}
void DrawMesh(const Mesh* m, Vec3 color)
@@ -915,8 +999,8 @@ void DrawCloth(const Vec4* positions, const Vec4* normals, const float* uvs, con
}
#endif
- glColor3fv(gColors[colorIndex+1]*1.5f);
- glSecondaryColor3fv(gColors[colorIndex]*1.5f);
+ glColor3fv(g_colors[colorIndex+1]*1.5f);
+ glSecondaryColor3fv(g_colors[colorIndex]*1.5f);
glVerify(glBindBuffer(GL_ARRAY_BUFFER, 0));
glVerify(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0));
@@ -939,7 +1023,7 @@ void DrawCloth(const Vec4* positions, const Vec4* normals, const float* uvs, con
if (program == GLint(s_diffuseProgram))
{
GLint uBias = glGetUniformLocation(s_diffuseProgram, "bias");
- glUniform1f(uBias, gShadowBias);
+ glUniform1f(uBias, g_shadowBias);
GLint uExpand = glGetUniformLocation(s_diffuseProgram, "expand");
glUniform1f(uExpand, 0.0f);
@@ -971,8 +1055,8 @@ void DrawRope(Vec4* positions, int* indices, int numIndices, float radius, int c
Extrude(&curve[0], int(curve.size()), vertices, normals, triangles, radius, resolution, smoothing);
glVerify(glDisable(GL_CULL_FACE));
- glVerify(glColor3fv(gColors[color%8]*1.5f));
- glVerify(glSecondaryColor3fv(gColors[color%8]*1.5f));
+ glVerify(glColor3fv(g_colors[color%8]*1.5f));
+ glVerify(glSecondaryColor3fv(g_colors[color%8]*1.5f));
glVerify(glBindBuffer(GL_ARRAY_BUFFER, 0));
@@ -1807,206 +1891,185 @@ void DestroyFluidRenderer(FluidRenderer* renderer)
glVerify(glDeleteTextures(1, &renderer->mThicknessTex));
}
-FluidRenderBuffers CreateFluidRenderBuffers(int numFluidParticles, bool enableInterop)
+FluidRenderBuffers* CreateFluidRenderBuffers(int numFluidParticles, bool enableInterop)
{
- FluidRenderBuffers buffers = {};
- buffers.mNumFluidParticles = numFluidParticles;
-
+ FluidRenderBuffersGL* buffers = new FluidRenderBuffersGL(numFluidParticles);
+
// vbos
- glVerify(glGenBuffers(1, &buffers.mPositionVBO));
- glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers.mPositionVBO));
+ glVerify(glGenBuffers(1, &buffers->mPositionVBO));
+ glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers->mPositionVBO));
glVerify(glBufferData(GL_ARRAY_BUFFER, sizeof(float) * 4 * numFluidParticles, 0, GL_DYNAMIC_DRAW));
// density
- glVerify(glGenBuffers(1, &buffers.mDensityVBO));
- glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers.mDensityVBO));
+ glVerify(glGenBuffers(1, &buffers->mDensityVBO));
+ glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers->mDensityVBO));
glVerify(glBufferData(GL_ARRAY_BUFFER, sizeof(int)*numFluidParticles, 0, GL_DYNAMIC_DRAW));
for (int i = 0; i < 3; ++i)
{
- glVerify(glGenBuffers(1, &buffers.mAnisotropyVBO[i]));
- glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers.mAnisotropyVBO[i]));
+ glVerify(glGenBuffers(1, &buffers->mAnisotropyVBO[i]));
+ glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers->mAnisotropyVBO[i]));
glVerify(glBufferData(GL_ARRAY_BUFFER, sizeof(float) * 4 * numFluidParticles, 0, GL_DYNAMIC_DRAW));
}
- glVerify(glGenBuffers(1, &buffers.mIndices));
- glVerify(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buffers.mIndices));
+ glVerify(glGenBuffers(1, &buffers->mIndices));
+ glVerify(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buffers->mIndices));
glVerify(glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(int)*numFluidParticles, 0, GL_DYNAMIC_DRAW));
if (enableInterop)
{
extern NvFlexLibrary* g_flexLib;
- buffers.mPositionBuf = NvFlexRegisterOGLBuffer(g_flexLib, buffers.mPositionVBO, numFluidParticles, sizeof(Vec4));
- buffers.mDensitiesBuf = NvFlexRegisterOGLBuffer(g_flexLib, buffers.mDensityVBO, numFluidParticles, sizeof(float));
- buffers.mIndicesBuf = NvFlexRegisterOGLBuffer(g_flexLib, buffers.mIndices, numFluidParticles, sizeof(int));
+ buffers->mPositionBuf = NvFlexRegisterOGLBuffer(g_flexLib, buffers->mPositionVBO, numFluidParticles, sizeof(Vec4));
+ buffers->mDensitiesBuf = NvFlexRegisterOGLBuffer(g_flexLib, buffers->mDensityVBO, numFluidParticles, sizeof(float));
+ buffers->mIndicesBuf = NvFlexRegisterOGLBuffer(g_flexLib, buffers->mIndices, numFluidParticles, sizeof(int));
- buffers.mAnisotropyBuf[0] = NvFlexRegisterOGLBuffer(g_flexLib, buffers.mAnisotropyVBO[0], numFluidParticles, sizeof(Vec4));
- buffers.mAnisotropyBuf[1] = NvFlexRegisterOGLBuffer(g_flexLib, buffers.mAnisotropyVBO[1], numFluidParticles, sizeof(Vec4));
- buffers.mAnisotropyBuf[2] = NvFlexRegisterOGLBuffer(g_flexLib, buffers.mAnisotropyVBO[2], numFluidParticles, sizeof(Vec4));
+ buffers->mAnisotropyBuf[0] = NvFlexRegisterOGLBuffer(g_flexLib, buffers->mAnisotropyVBO[0], numFluidParticles, sizeof(Vec4));
+ buffers->mAnisotropyBuf[1] = NvFlexRegisterOGLBuffer(g_flexLib, buffers->mAnisotropyVBO[1], numFluidParticles, sizeof(Vec4));
+ buffers->mAnisotropyBuf[2] = NvFlexRegisterOGLBuffer(g_flexLib, buffers->mAnisotropyVBO[2], numFluidParticles, sizeof(Vec4));
}
- return buffers;
+ return reinterpret_cast<FluidRenderBuffers*>(buffers);
}
-void DestroyFluidRenderBuffers(FluidRenderBuffers buffers)
+void DestroyFluidRenderBuffers(FluidRenderBuffers* buffers)
{
- glDeleteBuffers(1, &buffers.mPositionVBO);
- glDeleteBuffers(3, buffers.mAnisotropyVBO);
- glDeleteBuffers(1, &buffers.mDensityVBO);
- glDeleteBuffers(1, &buffers.mIndices);
-
- NvFlexUnregisterOGLBuffer(buffers.mPositionBuf);
- NvFlexUnregisterOGLBuffer(buffers.mDensitiesBuf);
- NvFlexUnregisterOGLBuffer(buffers.mIndicesBuf);
-
- NvFlexUnregisterOGLBuffer(buffers.mAnisotropyBuf[0]);
- NvFlexUnregisterOGLBuffer(buffers.mAnisotropyBuf[1]);
- NvFlexUnregisterOGLBuffer(buffers.mAnisotropyBuf[2]);
+ delete reinterpret_cast<FluidRenderBuffersGL*>(buffers);
}
-void UpdateFluidRenderBuffers(FluidRenderBuffers buffers, NvFlexSolver* solver, bool anisotropy, bool density)
+void UpdateFluidRenderBuffers(FluidRenderBuffers* buffersIn, NvFlexSolver* solver, bool anisotropy, bool density)
{
+ FluidRenderBuffersGL* buffers = reinterpret_cast<FluidRenderBuffersGL*>(buffersIn);
// use VBO buffer wrappers to allow Flex to write directly to the OpenGL buffers
// Flex will take care of any CUDA interop mapping/unmapping during the get() operations
if (!anisotropy)
{
// regular particles
- NvFlexGetParticles(solver, buffers.mPositionBuf, buffers.mNumFluidParticles);
+ NvFlexGetParticles(solver, buffers->mPositionBuf, NULL);
}
else
{
// fluid buffers
- NvFlexGetSmoothParticles(solver, buffers.mPositionBuf, buffers.mNumFluidParticles);
- NvFlexGetAnisotropy(solver, buffers.mAnisotropyBuf[0], buffers.mAnisotropyBuf[1], buffers.mAnisotropyBuf[2]);
+ NvFlexGetSmoothParticles(solver, buffers->mPositionBuf, NULL);
+ NvFlexGetAnisotropy(solver, buffers->mAnisotropyBuf[0], buffers->mAnisotropyBuf[1], buffers->mAnisotropyBuf[2], NULL);
}
if (density)
{
- NvFlexGetDensities(solver, buffers.mDensitiesBuf, buffers.mNumFluidParticles);
+ NvFlexGetDensities(solver, buffers->mDensitiesBuf, NULL);
}
else
{
- NvFlexGetPhases(solver, buffers.mDensitiesBuf, buffers.mNumFluidParticles);
+ NvFlexGetPhases(solver, buffers->mDensitiesBuf, NULL);
}
- NvFlexGetActive(solver, buffers.mIndicesBuf);
+ NvFlexGetActive(solver, buffers->mIndicesBuf, NULL);
}
-void UpdateFluidRenderBuffers(FluidRenderBuffers buffers, Vec4* particles, float* densities, Vec4* anisotropy1, Vec4* anisotropy2, Vec4* anisotropy3, int numParticles, int* indices, int numIndices)
+void UpdateFluidRenderBuffers(FluidRenderBuffers* buffersIn, Vec4* particles, float* densities, Vec4* anisotropy1, Vec4* anisotropy2, Vec4* anisotropy3, int numParticles, int* indices, int numIndices)
{
+ FluidRenderBuffersGL* buffers = reinterpret_cast<FluidRenderBuffersGL*>(buffersIn);
// regular particles
- glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers.mPositionVBO));
- glVerify(glBufferSubData(GL_ARRAY_BUFFER, 0, buffers.mNumFluidParticles*sizeof(Vec4), particles));
+ glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers->mPositionVBO));
+ glVerify(glBufferSubData(GL_ARRAY_BUFFER, 0, buffers->mNumParticles*sizeof(Vec4), particles));
- if (anisotropy1)
+ Vec4*const anisotropies[] =
{
- glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers.mAnisotropyVBO[0]));
- glVerify(glBufferSubData(GL_ARRAY_BUFFER, 0, buffers.mNumFluidParticles*sizeof(Vec4), anisotropy1));
- }
-
- if (anisotropy2)
- {
- glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers.mAnisotropyVBO[1]));
- glVerify(glBufferSubData(GL_ARRAY_BUFFER, 0, buffers.mNumFluidParticles*sizeof(Vec4), anisotropy2));
- }
+ anisotropy1,
+ anisotropy2,
+ anisotropy3,
+ };
- if (anisotropy3)
+ for (int i = 0; i < 3; i++)
{
- glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers.mAnisotropyVBO[2]));
- glVerify(glBufferSubData(GL_ARRAY_BUFFER, 0, buffers.mNumFluidParticles*sizeof(Vec4), anisotropy3));
+ Vec4* anisotropy = anisotropies[i];
+ if (anisotropy)
+ {
+ glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers->mAnisotropyVBO[i]));
+ glVerify(glBufferSubData(GL_ARRAY_BUFFER, 0, buffers->mNumParticles * sizeof(Vec4), anisotropy));
+ }
}
// density /phase buffer
if (densities)
{
- glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers.mDensityVBO));
- glVerify(glBufferSubData(GL_ARRAY_BUFFER, 0, buffers.mNumFluidParticles*sizeof(float), densities));
+ glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers->mDensityVBO));
+ glVerify(glBufferSubData(GL_ARRAY_BUFFER, 0, buffers->mNumParticles*sizeof(float), densities));
}
if (indices)
{
- glVerify(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buffers.mIndices));
+ glVerify(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buffers->mIndices));
glVerify(glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, numIndices*sizeof(int), indices));
}
// reset
glVerify(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0));
glVerify(glBindBuffer(GL_ARRAY_BUFFER, 0));
-
}
-DiffuseRenderBuffers CreateDiffuseRenderBuffers(int numDiffuseParticles, bool& enableInterop)
+DiffuseRenderBuffers* CreateDiffuseRenderBuffers(int numDiffuseParticles, bool& enableInterop)
{
- DiffuseRenderBuffers buffers = {};
- buffers.mNumDiffuseParticles = numDiffuseParticles;
-
+ DiffuseRenderBuffersGL* buffers = new DiffuseRenderBuffersGL(numDiffuseParticles);
+
if (numDiffuseParticles > 0)
{
- glVerify(glGenBuffers(1, &buffers.mDiffusePositionVBO));
- glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers.mDiffusePositionVBO));
+ glVerify(glGenBuffers(1, &buffers->mDiffusePositionVBO));
+ glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers->mDiffusePositionVBO));
glVerify(glBufferData(GL_ARRAY_BUFFER, sizeof(float) * 4 * numDiffuseParticles, 0, GL_DYNAMIC_DRAW));
glVerify(glBindBuffer(GL_ARRAY_BUFFER, 0));
- glVerify(glGenBuffers(1, &buffers.mDiffuseVelocityVBO));
- glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers.mDiffuseVelocityVBO));
+ glVerify(glGenBuffers(1, &buffers->mDiffuseVelocityVBO));
+ glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers->mDiffuseVelocityVBO));
glVerify(glBufferData(GL_ARRAY_BUFFER, sizeof(float) * 4 * numDiffuseParticles, 0, GL_DYNAMIC_DRAW));
glVerify(glBindBuffer(GL_ARRAY_BUFFER, 0));
- glVerify(glGenBuffers(1, &buffers.mDiffuseIndicesIBO));
- glVerify(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buffers.mDiffuseIndicesIBO));
- glVerify(glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(int)*numDiffuseParticles, 0, GL_DYNAMIC_DRAW));
- glVerify(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0));
-
if (enableInterop)
{
extern NvFlexLibrary* g_flexLib;
- buffers.mDiffuseIndicesBuf = NvFlexRegisterOGLBuffer(g_flexLib, buffers.mDiffuseIndicesIBO, numDiffuseParticles, sizeof(int));
- buffers.mDiffusePositionsBuf = NvFlexRegisterOGLBuffer(g_flexLib, buffers.mDiffusePositionVBO, numDiffuseParticles, sizeof(Vec4));
- buffers.mDiffuseVelocitiesBuf = NvFlexRegisterOGLBuffer(g_flexLib, buffers.mDiffuseVelocityVBO, numDiffuseParticles, sizeof(Vec4));
+ buffers->mDiffusePositionsBuf = NvFlexRegisterOGLBuffer(g_flexLib, buffers->mDiffusePositionVBO, numDiffuseParticles, sizeof(Vec4));
+ buffers->mDiffuseVelocitiesBuf = NvFlexRegisterOGLBuffer(g_flexLib, buffers->mDiffuseVelocityVBO, numDiffuseParticles, sizeof(Vec4));
}
}
- return buffers;
+ return reinterpret_cast<DiffuseRenderBuffers*>(buffers);
}
-void DestroyDiffuseRenderBuffers(DiffuseRenderBuffers buffers)
+void DestroyDiffuseRenderBuffers(DiffuseRenderBuffers* buffersIn)
{
- if (buffers.mNumDiffuseParticles > 0)
+ DiffuseRenderBuffersGL* buffers = reinterpret_cast<DiffuseRenderBuffersGL*>(buffersIn);
+ if (buffers->mNumParticles > 0)
{
- glDeleteBuffers(1, &buffers.mDiffusePositionVBO);
- glDeleteBuffers(1, &buffers.mDiffuseVelocityVBO);
- glDeleteBuffers(1, &buffers.mDiffuseIndicesIBO);
+ glDeleteBuffers(1, &buffers->mDiffusePositionVBO);
+ glDeleteBuffers(1, &buffers->mDiffuseVelocityVBO);
- NvFlexUnregisterOGLBuffer(buffers.mDiffuseIndicesBuf);
- NvFlexUnregisterOGLBuffer(buffers.mDiffusePositionsBuf);
- NvFlexUnregisterOGLBuffer(buffers.mDiffuseVelocitiesBuf);
+ NvFlexUnregisterOGLBuffer(buffers->mDiffusePositionsBuf);
+ NvFlexUnregisterOGLBuffer(buffers->mDiffuseVelocitiesBuf);
}
}
-void UpdateDiffuseRenderBuffers(DiffuseRenderBuffers buffers, NvFlexSolver* solver)
+void UpdateDiffuseRenderBuffers(DiffuseRenderBuffers* buffersIn, NvFlexSolver* solver)
{
+ DiffuseRenderBuffersGL* buffers = reinterpret_cast<DiffuseRenderBuffersGL*>(buffersIn);
// diffuse particles
- if (buffers.mNumDiffuseParticles)
+ if (buffers->mNumParticles)
{
- NvFlexGetDiffuseParticles(solver, buffers.mDiffusePositionsBuf, buffers.mDiffuseVelocitiesBuf, buffers.mDiffuseIndicesBuf);
+ NvFlexGetDiffuseParticles(solver, buffers->mDiffusePositionsBuf, buffers->mDiffuseVelocitiesBuf, NULL);
}
}
-void UpdateDiffuseRenderBuffers(DiffuseRenderBuffers buffers, Vec4* diffusePositions, Vec4* diffuseVelocities, int* diffuseIndices, int numDiffuseParticles)
+void UpdateDiffuseRenderBuffers(DiffuseRenderBuffers* buffersIn, Vec4* diffusePositions, Vec4* diffuseVelocities, int numDiffuseParticles)
{
+ DiffuseRenderBuffersGL* buffers = reinterpret_cast<DiffuseRenderBuffersGL*>(buffersIn);
// diffuse particles
- if (buffers.mNumDiffuseParticles)
+ if (buffers->mNumParticles)
{
- glVerify(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buffers.mDiffuseIndicesIBO));
- glVerify(glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, buffers.mNumDiffuseParticles*sizeof(int), diffuseIndices));
+ glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers->mDiffusePositionVBO));
+ glVerify(glBufferSubData(GL_ARRAY_BUFFER, 0, buffers->mNumParticles*sizeof(Vec4), diffusePositions));
- glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers.mDiffusePositionVBO));
- glVerify(glBufferSubData(GL_ARRAY_BUFFER, 0, buffers.mNumDiffuseParticles*sizeof(Vec4), diffusePositions));
-
- glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers.mDiffuseVelocityVBO));
- glVerify(glBufferSubData(GL_ARRAY_BUFFER, 0, buffers.mNumDiffuseParticles*sizeof(Vec4), diffuseVelocities));
+ glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers->mDiffuseVelocityVBO));
+ glVerify(glBufferSubData(GL_ARRAY_BUFFER, 0, buffers->mNumParticles*sizeof(Vec4), diffuseVelocities));
}
}
@@ -2033,8 +2096,10 @@ void RenderFullscreenQuad()
extern Mesh* g_mesh;
void DrawShapes();
-void RenderEllipsoids(FluidRenderer* render, FluidRenderBuffers buffers, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowMap, Vec4 color, float blur, float ior, bool debug)
+void RenderEllipsoids(FluidRenderer* render, FluidRenderBuffers* buffersIn, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowMap, Vec4 color, float blur, float ior, bool debug)
{
+ FluidRenderBuffersGL* buffers = reinterpret_cast<FluidRenderBuffersGL*>(buffersIn);
+
#if !ENABLE_SIMPLE_FLUID
// resolve msaa back buffer to texture
glVerify(glBindFramebuffer(GL_READ_FRAMEBUFFER_EXT, g_msaaFbo));
@@ -2076,7 +2141,7 @@ void RenderEllipsoids(FluidRenderer* render, FluidRenderBuffers buffers, int n,
glUniform1f( glGetUniformLocation(render->mPointThicknessProgram, "pointScale"), screenWidth/screenAspect * (1.0f / (tanf(fov*0.5f))));
glEnableClientState(GL_VERTEX_ARRAY);
- glBindBuffer(GL_ARRAY_BUFFER, buffers.mPositionVBO);
+ glBindBuffer(GL_ARRAY_BUFFER, buffers->mPositionVBO);
glVertexPointer(3, GL_FLOAT, sizeof(float)*4, (void*)(offset*sizeof(float)*4));
glDrawArrays(GL_POINTS, 0, n);
@@ -2110,23 +2175,23 @@ void RenderEllipsoids(FluidRenderer* render, FluidRenderBuffers buffers, int n,
glUniform3fv( glGetUniformLocation(render->mEllipsoidDepthProgram, "invProjection"), 1, Vec3(screenAspect*viewHeight, viewHeight, 1.0f));
glEnableClientState(GL_VERTEX_ARRAY);
- glBindBuffer(GL_ARRAY_BUFFER, buffers.mPositionVBO);
+ glBindBuffer(GL_ARRAY_BUFFER, buffers->mPositionVBO);
glVertexPointer(3, GL_FLOAT, sizeof(float)*4, 0);//(void*)(offset*sizeof(float)*4));
// ellipsoid eigenvectors
int s1 = glGetAttribLocation(render->mEllipsoidDepthProgram, "q1");
glEnableVertexAttribArray(s1);
- glBindBuffer(GL_ARRAY_BUFFER, buffers.mAnisotropyVBO[0]);
+ glBindBuffer(GL_ARRAY_BUFFER, buffers->mAnisotropyVBO[0]);
glVertexAttribPointer(s1, 4, GL_FLOAT, GL_FALSE, 0, 0);// (void*)(offset*sizeof(float)*4));
int s2 = glGetAttribLocation(render->mEllipsoidDepthProgram, "q2");
glEnableVertexAttribArray(s2);
- glBindBuffer(GL_ARRAY_BUFFER, buffers.mAnisotropyVBO[1]);
+ glBindBuffer(GL_ARRAY_BUFFER, buffers->mAnisotropyVBO[1]);
glVertexAttribPointer(s2, 4, GL_FLOAT, GL_FALSE, 0, 0);//(void*)(offset*sizeof(float)*4));
int s3 = glGetAttribLocation(render->mEllipsoidDepthProgram, "q3");
glEnableVertexAttribArray(s3);
- glBindBuffer(GL_ARRAY_BUFFER, buffers.mAnisotropyVBO[2]);
+ glBindBuffer(GL_ARRAY_BUFFER, buffers->mAnisotropyVBO[2]);
glVertexAttribPointer(s3, 4, GL_FLOAT, GL_FALSE, 0, 0);// (void*)(offset*sizeof(float)*4));
glVerify(glDrawArrays(GL_POINTS, offset, n));
@@ -2185,8 +2250,8 @@ void RenderEllipsoids(FluidRenderer* render, FluidRenderBuffers buffers, int n,
glVerify(glUniform2fv(glGetUniformLocation(render->mCompositeProgram, "clipPosToEye"), 1, Vec2(tanf(fov*0.5f)*screenAspect, tanf(fov*0.5f))));
glVerify(glUniform4fv(glGetUniformLocation(render->mCompositeProgram, "color"), 1, color));
glVerify(glUniform1f(glGetUniformLocation(render->mCompositeProgram, "ior"), ior));
- glVerify(glUniform1f(glGetUniformLocation(render->mCompositeProgram, "spotMin"), gSpotMin));
- glVerify(glUniform1f(glGetUniformLocation(render->mCompositeProgram, "spotMax"), gSpotMax));
+ glVerify(glUniform1f(glGetUniformLocation(render->mCompositeProgram, "spotMin"), g_spotMin));
+ glVerify(glUniform1f(glGetUniformLocation(render->mCompositeProgram, "spotMax"), g_spotMax));
glVerify(glUniform1i(glGetUniformLocation(render->mCompositeProgram, "debug"), debug));
glVerify(glUniform3fv(glGetUniformLocation(render->mCompositeProgram, "lightPos"), 1, lightPos));
@@ -2431,8 +2496,14 @@ void main()
}
);
-void RenderDiffuse(FluidRenderer* render, DiffuseRenderBuffers buffers, int n, float radius, float screenWidth, float screenAspect, float fov, Vec4 color, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowMap, float motionBlur, float inscatter, float outscatter, bool shadow, bool front)
+int GetNumDiffuseRenderParticles(DiffuseRenderBuffers* buffers)
{
+ return reinterpret_cast<DiffuseRenderBuffersGL*>(buffers)->mNumParticles;
+}
+
+void RenderDiffuse(FluidRenderer* render, DiffuseRenderBuffers* buffersIn, int n, float radius, float screenWidth, float screenAspect, float fov, Vec4 color, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowMap, float motionBlur, float inscatter, float outscatter, bool shadow, bool front)
+{
+ DiffuseRenderBuffersGL* buffers = reinterpret_cast<DiffuseRenderBuffersGL*>(buffersIn);
static int sprogram = -1;
if (sprogram == -1)
sprogram = CompileProgram(vertexDiffuseShader, fragmentDiffuseShader, geometryDiffuseShader);
@@ -2483,8 +2554,8 @@ void RenderDiffuse(FluidRenderer* render, DiffuseRenderBuffers buffers, int n, f
GLint uLightDir = glGetUniformLocation(sprogram, "lightDir");
glUniform3fv(uLightDir, 1, Normalize(lightTarget-lightPos));
- glUniform1f( glGetUniformLocation(sprogram, "spotMin"), gSpotMin);
- glUniform1f( glGetUniformLocation(sprogram, "spotMax"), gSpotMax);
+ glUniform1f( glGetUniformLocation(sprogram, "spotMin"), g_spotMin);
+ glUniform1f( glGetUniformLocation(sprogram, "spotMax"), g_spotMax);
const Vec2 taps[] =
{
@@ -2522,16 +2593,16 @@ void RenderDiffuse(FluidRenderer* render, DiffuseRenderBuffers buffers, int n, f
glClientActiveTexture(GL_TEXTURE1);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers.mDiffuseVelocityVBO));
+ glVerify(glBindBuffer(GL_ARRAY_BUFFER, buffers->mDiffuseVelocityVBO));
glTexCoordPointer(4, GL_FLOAT, sizeof(float)*4, 0);
glEnableClientState(GL_VERTEX_ARRAY);
- glBindBuffer(GL_ARRAY_BUFFER, buffers.mDiffusePositionVBO);
+ glBindBuffer(GL_ARRAY_BUFFER, buffers->mDiffusePositionVBO);
glVertexPointer(4, GL_FLOAT, sizeof(float)*4, 0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buffers.mDiffuseIndicesIBO);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
- glDrawElements(GL_POINTS, n, GL_UNSIGNED_INT, 0);
+ glDrawArrays(GL_POINTS, 0, n);
glUseProgram(0);
glBindBuffer(GL_ARRAY_BUFFER, 0);
@@ -2770,3 +2841,31 @@ void EndPoints()
glEnd();
}
+
+
+float SyncAndGetRenderTime(unsigned long long* begin, unsigned long long* end, unsigned long long* freq)
+{
+ *begin = 0;
+ *end = 0;
+ *freq = 1;
+ return 0.0f;
+}
+
+float RendererGetDeviceTimestamps(unsigned long long* begin, unsigned long long* end, unsigned long long* freq) { return 0.0f; }
+void* GetGraphicsCommandQueue() { return nullptr; }
+void GraphicsTimerBegin() { }
+void GraphicsTimerEnd() { }
+
+void StartGpuWork() { }
+void EndGpuWork() { }
+
+void GetRenderDevice(void** deviceOut, void** contextOut)
+{
+ *deviceOut = nullptr;
+ *contextOut = nullptr;
+}
+
+void DrawImguiGraph()
+{
+ imguiGraphDraw();
+} \ No newline at end of file
diff --git a/demo/scenes.h b/demo/scenes.h
index 94e6913..331927b 100644
--- a/demo/scenes.h
+++ b/demo/scenes.h
@@ -93,7 +93,6 @@ public:
#include "scenes/nonconvex.h"
#include "scenes/parachutingbunnies.h"
#include "scenes/pasta.h"
-#include "scenes/plasticstack.h"
#include "scenes/player.h"
#include "scenes/potpourri.h"
#include "scenes/rayleightaylor.h"
@@ -104,6 +103,7 @@ public:
#include "scenes/rockpool.h"
#include "scenes/sdfcollision.h"
#include "scenes/shapecollision.h"
+#include "scenes/shapechannels.h"
#include "scenes/softbody.h"
#include "scenes/spherecloth.h"
#include "scenes/surfacetension.h"
diff --git a/demo/scenes/adhesion.h b/demo/scenes/adhesion.h
index efbdec2..10c614a 100644
--- a/demo/scenes/adhesion.h
+++ b/demo/scenes/adhesion.h
@@ -11,7 +11,6 @@ public:
g_params.radius = radius;
- g_params.fluid = true;
g_params.numIterations = 3;
g_params.vorticityConfinement = 0.0f;
g_params.fluidRestDistance = g_params.radius*0.55f;
diff --git a/demo/scenes/armadilloshower.h b/demo/scenes/armadilloshower.h
index fdbf194..0fd2cfe 100644
--- a/demo/scenes/armadilloshower.h
+++ b/demo/scenes/armadilloshower.h
@@ -18,7 +18,6 @@ public:
g_params.radius = radius;
- g_params.fluid = true;
g_params.numIterations = 3;
g_params.vorticityConfinement = 0.0f;
g_params.fluidRestDistance = g_params.radius*0.5f;
diff --git a/demo/scenes/bouyancy.h b/demo/scenes/bouyancy.h
index 816146f..9f5b0d2 100644
--- a/demo/scenes/bouyancy.h
+++ b/demo/scenes/bouyancy.h
@@ -34,7 +34,6 @@ public:
g_params.radius = radius;
g_params.dynamicFriction = 0.1f;
- g_params.fluid = true;
g_params.viscosity = 2.0f;
g_params.numIterations = 4;
g_params.vorticityConfinement = 180.f;
diff --git a/demo/scenes/bunnybath.h b/demo/scenes/bunnybath.h
index db9e6ac..eeec5ac 100644
--- a/demo/scenes/bunnybath.h
+++ b/demo/scenes/bunnybath.h
@@ -37,7 +37,6 @@ public:
g_params.radius = radius;
g_params.dynamicFriction = 0.01f;
- g_params.fluid = true;
g_params.viscosity = 2.0f;
g_params.numIterations = 4;
g_params.vorticityConfinement = 40.0f;
diff --git a/demo/scenes/ccdfluid.h b/demo/scenes/ccdfluid.h
index 356eec7..9ba018e 100644
--- a/demo/scenes/ccdfluid.h
+++ b/demo/scenes/ccdfluid.h
@@ -50,7 +50,6 @@ public:
g_numSubsteps = 2;
- g_params.fluid = true;
g_params.radius = radius;
g_params.fluidRestDistance = restDistance;
g_params.dynamicFriction = 0.1f;
diff --git a/demo/scenes/dambreak.h b/demo/scenes/dambreak.h
index c2f9a40..cf45c29 100644
--- a/demo/scenes/dambreak.h
+++ b/demo/scenes/dambreak.h
@@ -22,7 +22,6 @@ public:
g_numSubsteps = 2;
- g_params.fluid = true;
g_params.radius = radius;
g_params.fluidRestDistance = restDistance;
g_params.dynamicFriction = 0.f;
diff --git a/demo/scenes/debris.h b/demo/scenes/debris.h
index 39013ff..5454b76 100644
--- a/demo/scenes/debris.h
+++ b/demo/scenes/debris.h
@@ -112,7 +112,7 @@ public:
// emit new debris
int numToEmit = 1;//Rand()%8;
- int particleOffset = NvFlexGetActiveCount(g_flex);
+ int particleOffset = NvFlexGetActiveCount(g_solver);
for (int i = 0; i < numToEmit; ++i)
{
@@ -265,7 +265,7 @@ public:
virtual void Sync()
{
- NvFlexSetRigids(g_flex, g_buffers->rigidOffsets.buffer, g_buffers->rigidIndices.buffer, g_buffers->rigidLocalPositions.buffer, g_buffers->rigidLocalNormals.buffer, g_buffers->rigidCoefficients.buffer, g_buffers->rigidRotations.buffer, g_buffers->rigidTranslations.buffer, g_buffers->rigidOffsets.size() - 1, g_buffers->rigidIndices.size());
+ NvFlexSetRigids(g_solver, g_buffers->rigidOffsets.buffer, g_buffers->rigidIndices.buffer, g_buffers->rigidLocalPositions.buffer, g_buffers->rigidLocalNormals.buffer, g_buffers->rigidCoefficients.buffer, g_buffers->rigidPlasticThresholds.buffer, g_buffers->rigidPlasticCreeps.buffer, g_buffers->rigidRotations.buffer, g_buffers->rigidTranslations.buffer, g_buffers->rigidOffsets.size() - 1, g_buffers->rigidIndices.size());
}
virtual void KeyDown(int key)
@@ -303,8 +303,7 @@ public:
{
if (mBatches[b].mInstanceTransforms.size())
{
- extern Colour gColors[];
- DrawGpuMeshInstances(mBatches[b].mMesh, &mBatches[b].mInstanceTransforms[0], mBatches[b].mInstanceTransforms.size(), Vec3(gColors[b % 8]));
+ DrawGpuMeshInstances(mBatches[b].mMesh, &mBatches[b].mInstanceTransforms[0], mBatches[b].mInstanceTransforms.size(), Vec3(g_colors[b % 8]));
}
}
}
diff --git a/demo/scenes/envcloth.h b/demo/scenes/envcloth.h
index 7405739..50a703a 100644
--- a/demo/scenes/envcloth.h
+++ b/demo/scenes/envcloth.h
@@ -34,7 +34,7 @@ public:
int gridz = mGridZ;
int clothIndex = 0;
- int phase = NvFlexMakePhase(0, eNvFlexPhaseSelfCollide);
+ int phase = NvFlexMakePhase(0, eNvFlexPhaseSelfCollide | eNvFlexPhaseSelfCollideFilter);
for (int x=0; x < gridx; ++x)
{
@@ -49,6 +49,9 @@ public:
}
}
+ // only simple collision necessary
+ g_solverDesc.featureMode = eNvFlexFeatureModeSimpleSolids;
+
g_params.radius = radius*1.05f;
g_params.dynamicFriction = 0.25f;
g_params.dissipation = 0.0f;
diff --git a/demo/scenes/fluidblock.h b/demo/scenes/fluidblock.h
index 82de2cb..abf508b 100644
--- a/demo/scenes/fluidblock.h
+++ b/demo/scenes/fluidblock.h
@@ -45,7 +45,6 @@ public:
g_params.radius = radius;
g_params.dynamicFriction = 0.0f;
- g_params.fluid = true;
g_params.viscosity = 0.0f;
g_params.numIterations = 3;
g_params.vorticityConfinement = 40.f;
diff --git a/demo/scenes/fluidclothcoupling.h b/demo/scenes/fluidclothcoupling.h
index 403a775..d9802b0 100644
--- a/demo/scenes/fluidclothcoupling.h
+++ b/demo/scenes/fluidclothcoupling.h
@@ -138,7 +138,6 @@ public:
g_numExtraParticles = 64*1024;
g_params.radius = radius;
- g_params.fluid = true;
g_params.numIterations = 5;
g_params.vorticityConfinement = 0.0f;
g_params.anisotropyScale = 30.0f;
diff --git a/demo/scenes/forcefield.h b/demo/scenes/forcefield.h
index 1ffcd12..6510e87 100644
--- a/demo/scenes/forcefield.h
+++ b/demo/scenes/forcefield.h
@@ -40,7 +40,7 @@ public:
NvFlexExtDestroyForceFieldCallback(callback);
// create new callback
- callback = NvFlexExtCreateForceFieldCallback(g_flex);
+ callback = NvFlexExtCreateForceFieldCallback(g_solver);
// expand scene bounds to include force field
g_sceneLower -= Vec3(1.0f);
diff --git a/demo/scenes/gamemesh.h b/demo/scenes/gamemesh.h
index 6de6bd0..11824db 100644
--- a/demo/scenes/gamemesh.h
+++ b/demo/scenes/gamemesh.h
@@ -40,7 +40,6 @@ public:
g_params.radius = radius;
g_params.dynamicFriction = 0.3f;
g_params.dissipation = 0.0f;
- g_params.fluid = false;
g_params.fluidRestDistance = g_params.radius*0.5f;
g_params.viscosity = 0.05f;
g_params.anisotropyScale = 20.0f;
@@ -73,7 +72,6 @@ public:
g_params.dissipation = 0.0f;
g_params.numIterations = 4;
g_params.numPlanes = 1;
- g_params.fluid = false;
g_params.particleCollisionMargin = g_params.radius*0.1f;
g_params.restitution = 0.0f;
@@ -103,7 +101,6 @@ public:
g_params.numIterations = 3;
g_params.anisotropyScale = 30.0f;
g_params.smoothing = 0.5f;
- g_params.fluid = true;
g_params.relaxationFactor = 1.0f;
g_params.restitution = 0.0f;
g_params.smoothing = 0.5f;
diff --git a/demo/scenes/googun.h b/demo/scenes/googun.h
index 79ff396..71d1c51 100644
--- a/demo/scenes/googun.h
+++ b/demo/scenes/googun.h
@@ -17,7 +17,6 @@ public:
g_params.radius = radius;
- g_params.fluid = true;
g_params.numIterations = 3;
g_params.vorticityConfinement = 0.0f;
g_params.fluidRestDistance = g_params.radius*0.55f;
diff --git a/demo/scenes/granularpile.h b/demo/scenes/granularpile.h
index 56a85ea..d71c7a9 100644
--- a/demo/scenes/granularpile.h
+++ b/demo/scenes/granularpile.h
@@ -19,7 +19,7 @@ public:
CreateParticleShape(GetFilePathByPlatform("../../data/sandcastle.obj").c_str(), Vec3(-2.0f, -radius*0.15f, 0.0f), 4.0f, 0.0f, radius*1.0001f, 0.0f, 1.0f, false, 0.0f, NvFlexMakePhase(0, eNvFlexPhaseSelfCollide), false, 0.00f);
g_numSubsteps = 2;
-
+
g_params.radius = radius;
g_params.staticFriction = 1.0f;
g_params.dynamicFriction = 0.5f;
@@ -37,9 +37,8 @@ public:
g_drawPoints = true;
g_warmup = false;
- // hack, change the color of phase 0 particles to 'sand'
- extern Colour gColors[];
- gColors[0] = Colour(0.805f, 0.702f, 0.401f);
+ // hack, change the color of phase 0 particles to 'sand'
+ g_colors[0] = Colour(0.805f, 0.702f, 0.401f);
}
void Update()
diff --git a/demo/scenes/granularshape.h b/demo/scenes/granularshape.h
index 6d21738..b07581d 100644
--- a/demo/scenes/granularshape.h
+++ b/demo/scenes/granularshape.h
@@ -27,8 +27,7 @@ public:
g_numSubsteps = 3;
- extern Colour gColors[];
- gColors[1] = Colour(0.805f, 0.702f, 0.401f);
+ g_colors[1] = Colour(0.805f, 0.702f, 0.401f);
// draw options
g_drawPoints = true;
diff --git a/demo/scenes/inflatable.h b/demo/scenes/inflatable.h
index 58f5f08..b3e97f6 100644
--- a/demo/scenes/inflatable.h
+++ b/demo/scenes/inflatable.h
@@ -135,7 +135,7 @@ public:
virtual void Sync()
{
- NvFlexSetInflatables(g_flex, g_buffers->inflatableTriOffsets.buffer, g_buffers->inflatableTriCounts.buffer, g_buffers->inflatableVolumes.buffer, g_buffers->inflatablePressures.buffer, g_buffers->inflatableCoefficients.buffer, mCloths.size());
+ NvFlexSetInflatables(g_solver, g_buffers->inflatableTriOffsets.buffer, g_buffers->inflatableTriCounts.buffer, g_buffers->inflatableVolumes.buffer, g_buffers->inflatablePressures.buffer, g_buffers->inflatableCoefficients.buffer, mCloths.size());
}
virtual void Draw(int pass)
diff --git a/demo/scenes/lighthouse.h b/demo/scenes/lighthouse.h
index e4b410a..41e5d2f 100644
--- a/demo/scenes/lighthouse.h
+++ b/demo/scenes/lighthouse.h
@@ -23,7 +23,6 @@ public:
g_params.radius = radius;
g_params.dynamicFriction = 0.f;
- g_params.fluid = true;
g_params.viscosity = 0.01f;
g_params.numIterations = 3;
g_params.vorticityConfinement = 50.0f;
diff --git a/demo/scenes/localspacecloth.h b/demo/scenes/localspacecloth.h
index f28912e..1030f8b 100644
--- a/demo/scenes/localspacecloth.h
+++ b/demo/scenes/localspacecloth.h
@@ -65,7 +65,6 @@ public:
g_numSubsteps = 2;
- g_params.fluid = false;
g_params.radius = radius;
g_params.dynamicFriction = 0.f;
g_params.restitution = 0.0f;
diff --git a/demo/scenes/localspacefluid.h b/demo/scenes/localspacefluid.h
index 494249a..7bcbd8b 100644
--- a/demo/scenes/localspacefluid.h
+++ b/demo/scenes/localspacefluid.h
@@ -46,7 +46,6 @@ public:
g_numSubsteps = 2;
- g_params.fluid = true;
g_params.radius = radius;
g_params.fluidRestDistance = restDistance;
g_params.dynamicFriction = 0.f;
diff --git a/demo/scenes/lowdimensionalshapes.h b/demo/scenes/lowdimensionalshapes.h
index 5d32ea5..3c91394 100644
--- a/demo/scenes/lowdimensionalshapes.h
+++ b/demo/scenes/lowdimensionalshapes.h
@@ -21,7 +21,6 @@ public:
g_params.radius = radius;
g_params.dynamicFriction = 1.0f;
- g_params.fluid = false;
g_params.fluidRestDistance = radius;
g_params.viscosity = 0.0f;
g_params.numIterations = 4;
diff --git a/demo/scenes/melting.h b/demo/scenes/melting.h
index c7da792..f8d7083 100644
--- a/demo/scenes/melting.h
+++ b/demo/scenes/melting.h
@@ -13,7 +13,6 @@ public:
g_params.dynamicFriction = 0.25f;
g_params.dissipation = 0.0f;
g_params.viscosity = 0.0f;
- g_params.fluid = true;
g_params.cohesion = 0.0f;
g_params.fluidRestDistance = g_params.radius*0.6f;
g_params.anisotropyScale = 4.0f / g_params.radius;
@@ -63,7 +62,7 @@ public:
virtual void Sync()
{
- NvFlexSetRigids(g_flex, g_buffers->rigidOffsets.buffer, g_buffers->rigidIndices.buffer, g_buffers->rigidLocalPositions.buffer, g_buffers->rigidLocalNormals.buffer, g_buffers->rigidCoefficients.buffer, g_buffers->rigidRotations.buffer, g_buffers->rigidTranslations.buffer, g_buffers->rigidOffsets.size() - 1, g_buffers->rigidIndices.size());
+ NvFlexSetRigids(g_solver, g_buffers->rigidOffsets.buffer, g_buffers->rigidIndices.buffer, g_buffers->rigidLocalPositions.buffer, g_buffers->rigidLocalNormals.buffer, g_buffers->rigidCoefficients.buffer, g_buffers->rigidPlasticThresholds.buffer, g_buffers->rigidPlasticCreeps.buffer, g_buffers->rigidRotations.buffer, g_buffers->rigidTranslations.buffer, g_buffers->rigidOffsets.size() - 1, g_buffers->rigidIndices.size());
}
int mFrame;
diff --git a/demo/scenes/mixedpile.h b/demo/scenes/mixedpile.h
index 61bc5a5..35333ff 100644
--- a/demo/scenes/mixedpile.h
+++ b/demo/scenes/mixedpile.h
@@ -186,7 +186,6 @@ public:
g_params.shockPropagation = 0.0f;
g_params.restitution = 0.0f;
g_params.collisionDistance = g_params.radius*0.5f;
- g_params.fluid = false;
g_params.maxSpeed = 2.0f*g_params.radius*g_numSubsteps/g_dt;
// separte solid particle count
@@ -207,13 +206,13 @@ public:
g_emitters[0].mSpeed = (g_params.radius*0.5f/g_dt);
g_emitters[0].mSpeed = (g_params.radius/g_dt);
- extern Colour gColors[];
- gColors[0] = Colour(0.805f, 0.702f, 0.401f);
+ extern Colour g_colors[];
+ g_colors[0] = Colour(0.805f, 0.702f, 0.401f);
}
virtual void Update()
{
- NvFlexSetInflatables(g_flex, &mTriOffset[0], &mTriCount[0], &mRestVolume[0], &mOverPressure[0], &mConstraintScale[0], mCloths.size(), eFlexMemoryHost);
+ NvFlexSetInflatables(g_solver, &mTriOffset[0], &mTriCount[0], &mRestVolume[0], &mOverPressure[0], &mConstraintScale[0], mCloths.size(), eFlexMemoryHost);
}
int mHeight;
diff --git a/demo/scenes/parachutingbunnies.h b/demo/scenes/parachutingbunnies.h
index 04f2052..bfb18bb 100644
--- a/demo/scenes/parachutingbunnies.h
+++ b/demo/scenes/parachutingbunnies.h
@@ -124,7 +124,6 @@ public:
}
}
- g_params.fluid = true;
g_params.radius = 0.1f;
g_params.fluidRestDistance = radius;
g_params.numIterations = 4;
diff --git a/demo/scenes/plasticstack.h b/demo/scenes/plasticstack.h
deleted file mode 100644
index e1543ca..0000000
--- a/demo/scenes/plasticstack.h
+++ /dev/null
@@ -1,50 +0,0 @@
-
-class PlasticStack : public Scene
-{
-public:
-
- PlasticStack(const char* name) : Scene(name) {}
-
- virtual void Initialize()
- {
- g_params.radius = 0.225f;
-
- g_params.numIterations = 2;
- g_params.dynamicFriction = 0.5f;
- g_params.particleFriction = 0.15f;
- g_params.dissipation = 0.0f;
- g_params.viscosity = 0.0f;
-
- AddPlinth();
-
- const float rotation = -kPi*0.5f;
- const float spacing = g_params.radius*0.5f;
-
- // alternative box and sphere shapes
- const char* mesh[] =
- {
- "../../data/box_high.ply",
- "../../data/sphere.ply"
- };
-
- Vec3 lower = Vec3(4.0f, 1.0f, 0.0f);
- float sizeInc = 0.0f;
- float size = 1.0f;
- int group = 0;
-
- for (int i=0; i < 8; ++i)
- {
- CreateParticleShape(GetFilePathByPlatform(mesh[i%2]).c_str(), lower, size + i*sizeInc, rotation, spacing, Vec3(.0f, 0.0f, 0.0f), 1.0f, true, 1.0f, NvFlexMakePhase(group++, 0), true, 0.0f, 0.0f, g_params.radius*0.5f);
-
- lower += Vec3(0.0f, size + i*sizeInc + 0.2f, 0.0f);
- }
-
- g_params.plasticThreshold = 0.00025f;
- g_params.plasticCreep = 0.165f;
-
- g_numSubsteps = 4;
-
- // draw options
- g_drawPoints = false;
- }
-};
diff --git a/demo/scenes/player.h b/demo/scenes/player.h
index 83407ac..46f4ca5 100644
--- a/demo/scenes/player.h
+++ b/demo/scenes/player.h
@@ -40,7 +40,7 @@ public:
{
g_buffers->activeIndices = mInitialActive;
- NvFlexSetActive(g_flex, &mInitialActive[0], mInitialActive.size(), eFlexMemoryHost);
+ NvFlexSetActive(g_solver, &mInitialActive[0], mInitialActive.size(), eFlexMemoryHost);
}
virtual Matrix44 GetBasis()
@@ -166,6 +166,8 @@ public:
ReadArray(g_buffers->rigidLocalNormals, true);
ReadArray(g_buffers->rigidCoefficients, true);
+ ReadArray(g_buffers->rigidPlasticThresholds, true);
+ ReadArray(g_buffers->rigidPlasticCreeps, true);
ReadArray(g_buffers->rigidOffsets, true);
ReadArray(g_buffers->rigidRotations, true);
ReadArray(g_buffers->rigidTranslations, true);
diff --git a/demo/scenes/rayleightaylor.h b/demo/scenes/rayleightaylor.h
index f07fb46..b4f7ebd 100644
--- a/demo/scenes/rayleightaylor.h
+++ b/demo/scenes/rayleightaylor.h
@@ -31,7 +31,6 @@ public:
g_params.gravity[1] = -9.f;
g_params.radius = radius;
g_params.dynamicFriction = 0.00f;
- g_params.fluid = true;
g_params.viscosity = 2.0f;
g_params.numIterations = 10;
g_params.vorticityConfinement = 0.0f;
@@ -109,7 +108,6 @@ public:
g_params.gravity[1] = -9.f;
g_params.radius = radius;
g_params.dynamicFriction = 0.00f;
- g_params.fluid = true;
g_params.viscosity = 0.0f;
g_params.numIterations = 10;
g_params.vorticityConfinement = 0.0f;
diff --git a/demo/scenes/rigidfluidcoupling.h b/demo/scenes/rigidfluidcoupling.h
index b978eb8..0bde7d9 100644
--- a/demo/scenes/rigidfluidcoupling.h
+++ b/demo/scenes/rigidfluidcoupling.h
@@ -43,13 +43,12 @@ public:
g_params.radius = radius;
g_params.dynamicFriction = 0.5f;
- g_params.fluid = true;
g_params.viscosity = 0.1f;
g_params.numIterations = 3;
g_params.vorticityConfinement = 0.0f;
g_params.anisotropyScale = 25.0f;
- g_params.fluidRestDistance = g_params.radius*0.55f;
-
+ g_params.fluidRestDistance = g_params.radius*0.55f;
+ g_params.solidRestDistance = g_params.radius*0.5f;
g_emitters[0].mEnabled = true;
g_emitters[0].mSpeed = 2.0f*(g_params.fluidRestDistance)/g_dt;
diff --git a/demo/scenes/rigidrotation.h b/demo/scenes/rigidrotation.h
index 8abcb98..6d2e1d7 100644
--- a/demo/scenes/rigidrotation.h
+++ b/demo/scenes/rigidrotation.h
@@ -12,9 +12,9 @@ public:
{
float radius = 0.1f;
- float dimx = 1.0f;
- float dimy = 5.0f;
- float dimz = 1.0f;
+ float dimx = 3.0f;
+ float dimy = 3.0f;
+ float dimz = 3.0f;
CreateParticleShape(GetFilePathByPlatform("../../data/box.ply").c_str(), Vec3(0.0f, 1.0f, 0.0f), Vec3(dimx, dimy, dimz)*radius, 0.0f, radius, Vec3(0.0f), 1.0f, true, 1.0f, 0, true, 0.0f, 0.0f, 0.0f);
@@ -22,7 +22,7 @@ public:
g_params.gravity[1] = 0;
g_params.numIterations = 1;
- g_numSubsteps = 1;
+ g_numSubsteps = 3;
g_pause = true;
@@ -39,17 +39,19 @@ public:
Vec3 center = (lower + upper)*0.5f;
- Matrix44 rotation = RotationMatrix(DegToRad(95.0f), Vec3(0.0f, 0.0f, 1.0f));
+ //Matrix44 rotation = RotationMatrix(DegToRad(40.0f), Vec3(0.0f, 0.0f, 1.0f));
for (int i = 0; i < int(g_buffers->positions.size()); ++i)
{
Vec3 delta = Vec3(g_buffers->positions[i]) - center;
- delta = Vec3(rotation*Vec4(delta, 1.0f));
+ //delta = Vec3(rotation*Vec4(delta, 1.0f));
- g_buffers->positions[i].x = center.x + delta.x;
- g_buffers->positions[i].y = center.y + delta.y;
- g_buffers->positions[i].z = center.z + delta.z;
+ //g_buffers->positions[i].x = center.x + delta.x;
+ //g_buffers->positions[i].y = center.y + delta.y;
+ //g_buffers->positions[i].z = center.z + delta.z;
+
+ g_buffers->velocities[i] = Cross(delta, Vec3(0.0f, 0.0f, 1.0f))*10.0f;
}
}
}
diff --git a/demo/scenes/rockpool.h b/demo/scenes/rockpool.h
index e7c0034..f596de2 100644
--- a/demo/scenes/rockpool.h
+++ b/demo/scenes/rockpool.h
@@ -21,11 +21,12 @@ public:
CreateParticleGrid(Vec3(0.0f, radius*0.5f, -1.0f), 32, 32, 32, radius*0.55f, Vec3(0.0f), 1.0f, false, 0.0f, NvFlexMakePhase(0, eNvFlexPhaseSelfCollide | eNvFlexPhaseFluid), 0.005f);
+ g_solverDesc.featureMode = eNvFlexFeatureModeSimpleFluids;
+
g_numSubsteps = 2;
g_params.radius = radius;
g_params.dynamicFriction = 0.00f;
- g_params.fluid = true;
g_params.viscosity = 0.01f;
g_params.numIterations = 2;
g_params.vorticityConfinement = 75.0f;
diff --git a/demo/scenes/shapechannels.h b/demo/scenes/shapechannels.h
new file mode 100644
index 0000000..22ee649
--- /dev/null
+++ b/demo/scenes/shapechannels.h
@@ -0,0 +1,48 @@
+
+
+// demonstrates how to make particles collide with
+// selected collision shapes based on the channel mask
+class ShapeChannels : public Scene
+{
+public:
+
+ ShapeChannels(const char* name) : Scene(name) {}
+
+ void Initialize()
+ {
+ const float radius = 0.05f;
+
+ Vec3 offset = Vec3(-0.25f, 6.0f, -0.25f);
+
+ // layers of particles each set to collide with a different shape channel
+ int numLayers = 8;
+
+ for (int i=0; i < numLayers; ++i)
+ {
+ CreateParticleGrid(offset + Vec3(0.0f, 2.0f*i*radius, 0.0f), 10, 1, 10, radius, Vec3(0.0f), 1.0f, false, 0.0f, NvFlexMakePhaseWithChannels(i, eNvFlexPhaseSelfCollide, eNvFlexPhaseShapeChannel0<<i), 0.0f);
+ //CreateParticleGrid(offset + Vec3(0.0f, 2.0f*radius, 0.0f), 10, 1, 10, radius, Vec3(0.0f), 1.0f, false, 0.0f, NvFlexMakePhaseWithChannels(0, eNvFlexPhaseSelfCollide, eNvFlexPhaseShapeChannel1), 0.0f);
+ //CreateParticleGrid(offset + Vec3(0.0f, 4.0f*radius, 0.0f), 10, 1, 10, radius, Vec3(0.0f), 1.0f, false, 0.0f, NvFlexMakePhaseWithChannels(0, eNvFlexPhaseSelfCollide, eNvFlexPhaseShapeChannel2), 0.0f);
+
+ AddBox(Vec3(0.5f, 0.1f, 0.5f), Vec3(0.0f, 0.5f + i*0.5f, 0.0f), Quat(), false, eNvFlexPhaseShapeChannel0<<i);
+ }
+
+ // regular box
+ //AddBox(Vec3(0.5f, 0.1f, 0.5f), Vec3(0.0f, 0.5f, 0.0f), Quat(), false, eNvFlexPhaseShapeChannel0);
+ //AddBox(Vec3(0.5f, 0.1f, 0.5f), Vec3(0.0f, 1.0f, 0.0f), Quat(), false, eNvFlexPhaseShapeChannel1);
+ //AddBox(Vec3(0.5f, 0.1f, 0.5f), Vec3(0.0f, 1.5f, 0.0f), Quat(), false, eNvFlexPhaseShapeChannel2);
+
+ g_params.radius = radius;
+ g_params.dynamicFriction = 0.025f;
+ g_params.dissipation = 0.0f;
+ g_params.restitution = 0.0;
+ g_params.numIterations = 4;
+ g_params.particleCollisionMargin = g_params.radius*0.05f;
+
+ g_numSubsteps = 1;
+ }
+
+ virtual void Update()
+ {
+
+ }
+}; \ No newline at end of file
diff --git a/demo/scenes/softbody.h b/demo/scenes/softbody.h
index c12680c..265626b 100644
--- a/demo/scenes/softbody.h
+++ b/demo/scenes/softbody.h
@@ -2,51 +2,145 @@
class SoftBody : public Scene
{
-public:
- SoftBody(const char* name, const char* mesh) :
+public:
+ SoftBody(const char* name) :
Scene(name),
- mFile(mesh),
- mScale(2.0f),
- mOffset(0.0f, 1.0f, 0.0f),
mRadius(0.1f),
- mClusterSpacing(1.0f),
- mClusterRadius(0.0f),
- mClusterStiffness(0.5f),
- mLinkRadius(0.0f),
- mLinkStiffness(1.0f),
- mGlobalStiffness(0.0f),
- mSurfaceSampling(0.0f),
- mVolumeSampling(4.0f),
- mSkinningFalloff(2.0f),
- mSkinningMaxDistance(100.0f),
- mPlasticThreshold(0.0f),
- mPlasticCreep(0.0f),
mRelaxationFactor(1.0f),
- mPlinth(false)
+ mPlinth(false),
+ plasticDeformation(false)
{
- mStack[0] = 1;
- mStack[1] = 1;
- mStack[2] = 1;
+ const Vec3 colorPicker[7] =
+ {
+ Vec3(0.0f, 0.5f, 1.0f),
+ Vec3(0.797f, 0.354f, 0.000f),
+ Vec3(0.000f, 0.349f, 0.173f),
+ Vec3(0.875f, 0.782f, 0.051f),
+ Vec3(0.01f, 0.170f, 0.453f),
+ Vec3(0.673f, 0.111f, 0.000f),
+ Vec3(0.612f, 0.194f, 0.394f)
+ };
+ memcpy(mColorPicker, colorPicker, sizeof(Vec3) * 7);
+ }
+
+ float mRadius;
+ float mRelaxationFactor;
+ bool mPlinth;
+
+ Vec3 mColorPicker[7];
+
+ struct Instance
+ {
+ Instance(const char* mesh) :
+
+ mFile(mesh),
+ mColor(0.5f, 0.5f, 1.0f),
+
+ mScale(2.0f),
+ mTranslation(0.0f, 1.0f, 0.0f),
+
+ mClusterSpacing(1.0f),
+ mClusterRadius(0.0f),
+ mClusterStiffness(0.5f),
+
+ mLinkRadius(0.0f),
+ mLinkStiffness(1.0f),
+
+ mGlobalStiffness(0.0f),
+
+ mSurfaceSampling(0.0f),
+ mVolumeSampling(4.0f),
+
+ mSkinningFalloff(2.0f),
+ mSkinningMaxDistance(100.0f),
+
+ mClusterPlasticThreshold(0.0f),
+ mClusterPlasticCreep(0.0f)
+ {}
+
+ const char* mFile;
+ Vec3 mColor;
+
+ Vec3 mScale;
+ Vec3 mTranslation;
+
+ float mClusterSpacing;
+ float mClusterRadius;
+ float mClusterStiffness;
+
+ float mLinkRadius;
+ float mLinkStiffness;
+
+ float mGlobalStiffness;
+
+ float mSurfaceSampling;
+ float mVolumeSampling;
+
+ float mSkinningFalloff;
+ float mSkinningMaxDistance;
+
+ float mClusterPlasticThreshold;
+ float mClusterPlasticCreep;
+ };
+
+ std::vector<Instance> mInstances;
+
+private:
+
+ struct RenderingInstance
+ {
+ Mesh* mMesh;
+ std::vector<int> mSkinningIndices;
+ std::vector<float> mSkinningWeights;
+ vector<Vec3> mRigidRestPoses;
+ Vec3 mColor;
+ int mOffset;
+ };
+
+ std::vector<RenderingInstance> mRenderingInstances;
+
+ bool plasticDeformation;
+
+
+public:
+ virtual void AddInstance(Instance instance)
+ {
+ this->mInstances.push_back(instance);
+ }
+
+ virtual void AddStack(Instance instance, int xStack, int yStack, int zStack, bool rotateColors = false)
+ {
+ Vec3 translation = instance.mTranslation;
+ for (int x = 0; x < xStack; ++x)
+ {
+ for (int y = 0; y < yStack; ++y)
+ {
+ for (int z = 0; z < zStack; ++z)
+ {
+ instance.mTranslation = translation + Vec3(x*(instance.mScale.x + 1), y*(instance.mScale.y + 1), z*(instance.mScale.z + 1))*mRadius;
+ if (rotateColors) {
+ instance.mColor = mColorPicker[(x*yStack*zStack + y*zStack + z) % 7];
+ }
+ this->mInstances.push_back(instance);
+ }
+ }
+ }
}
virtual void Initialize()
{
float radius = mRadius;
+ // no fluids or sdf based collision
+ g_solverDesc.featureMode = eNvFlexFeatureModeSimpleSolids;
+
g_params.radius = radius;
g_params.dynamicFriction = 0.35f;
g_params.particleFriction = 0.25f;
- g_params.dissipation = 0.0f;
g_params.numIterations = 4;
- g_params.viscosity = 0.0f;
- g_params.drag = 0.0f;
- g_params.lift = 0.0f;
g_params.collisionDistance = radius*0.75f;
- g_params.plasticThreshold = mPlasticThreshold;
- g_params.plasticCreep = mPlasticCreep;
-
g_params.relaxationFactor = mRelaxationFactor;
g_windStrength = 0.0f;
@@ -61,14 +155,14 @@ public:
g_buffers->rigidOffsets.push_back(0);
- mInstances.resize(0);
+ mRenderingInstances.resize(0);
+ // build soft bodies
+ for (int i = 0; i < int(mInstances.size()); i++)
+ CreateSoftBody(mInstances[i], mRenderingInstances.size());
- CreateBodies();
-
- if (mPlinth) {
+ if (mPlinth)
AddPlinth();
- }
// fix any particles below the ground plane in place
for (int i = 0; i < int(g_buffers->positions.size()); ++i)
@@ -81,73 +175,60 @@ public:
g_lightDistance *= 1.5f;
}
- virtual void CreateBodies()
+ void CreateSoftBody(Instance instance, int group = 0)
{
- // build soft body
- for (int x = 0; x < mStack[0]; ++x)
- {
- for (int y = 0; y < mStack[1]; ++y)
- {
- for (int z = 0; z < mStack[2]; ++z)
- {
- CreateSoftBody(mRadius, mOffset + Vec3(x*(mScale.x + 1), y*(mScale.y + 1), z*(mScale.z + 1))*mRadius, mClusterStiffness, mInstances.size());
- }
- }
- }
- }
-
- void CreateSoftBody(float radius, Vec3 position, float clusterStiffness, int group = 0)
- {
- Instance instance;
+ RenderingInstance renderingInstance;
- Mesh* mesh = ImportMesh(GetFilePathByPlatform(mFile).c_str());
+ Mesh* mesh = ImportMesh(GetFilePathByPlatform(instance.mFile).c_str());
mesh->Normalize();
- mesh->Transform(TranslationMatrix(Point3(position))*ScaleMatrix(mScale*radius));
+ mesh->Transform(TranslationMatrix(Point3(instance.mTranslation))*ScaleMatrix(instance.mScale*mRadius));
- instance.mMesh = mesh;
- instance.mColor = Vec3(0.5f, 0.5f, 1.0f);
- instance.mOffset = g_buffers->rigidTranslations.size();
+ renderingInstance.mMesh = mesh;
+ renderingInstance.mColor = instance.mColor;
+ renderingInstance.mOffset = g_buffers->rigidTranslations.size();
double createStart = GetSeconds();
// create soft body definition
NvFlexExtAsset* asset = NvFlexExtCreateSoftFromMesh(
- (float*)&instance.mMesh->m_positions[0],
- instance.mMesh->m_positions.size(),
- (int*)&instance.mMesh->m_indices[0],
- instance.mMesh->m_indices.size(),
- radius,
- mVolumeSampling,
- mSurfaceSampling,
- mClusterSpacing*radius,
- mClusterRadius*radius,
- clusterStiffness,
- mLinkRadius*radius,
- mLinkStiffness,
- mGlobalStiffness);
+ (float*)&renderingInstance.mMesh->m_positions[0],
+ renderingInstance.mMesh->m_positions.size(),
+ (int*)&renderingInstance.mMesh->m_indices[0],
+ renderingInstance.mMesh->m_indices.size(),
+ mRadius,
+ instance.mVolumeSampling,
+ instance.mSurfaceSampling,
+ instance.mClusterSpacing*mRadius,
+ instance.mClusterRadius*mRadius,
+ instance.mClusterStiffness,
+ instance.mLinkRadius*mRadius,
+ instance.mLinkStiffness,
+ instance.mGlobalStiffness,
+ instance.mClusterPlasticThreshold,
+ instance.mClusterPlasticCreep);
double createEnd = GetSeconds();
// create skinning
const int maxWeights = 4;
- instance.mSkinningIndices.resize(instance.mMesh->m_positions.size()*maxWeights);
- instance.mSkinningWeights.resize(instance.mMesh->m_positions.size()*maxWeights);
+ renderingInstance.mSkinningIndices.resize(renderingInstance.mMesh->m_positions.size()*maxWeights);
+ renderingInstance.mSkinningWeights.resize(renderingInstance.mMesh->m_positions.size()*maxWeights);
for (int i = 0; i < asset->numShapes; ++i)
- instance.mRigidRestPoses.push_back(Vec3(&asset->shapeCenters[i * 3]));
+ renderingInstance.mRigidRestPoses.push_back(Vec3(&asset->shapeCenters[i * 3]));
double skinStart = GetSeconds();
NvFlexExtCreateSoftMeshSkinning(
- (float*)&instance.mMesh->m_positions[0],
- instance.mMesh->m_positions.size(),
+ (float*)&renderingInstance.mMesh->m_positions[0],
+ renderingInstance.mMesh->m_positions.size(),
asset->shapeCenters,
asset->numShapes,
- mSkinningFalloff,
- mSkinningMaxDistance,
- &instance.mSkinningWeights[0],
- &instance.mSkinningIndices[0]);
+ instance.mSkinningFalloff,
+ instance.mSkinningMaxDistance,
+ &renderingInstance.mSkinningWeights[0],
+ &renderingInstance.mSkinningIndices[0]);
double skinEnd = GetSeconds();
@@ -178,6 +259,52 @@ public:
g_buffers->rigidCoefficients.push_back(asset->shapeCoefficients[i]);
}
+
+ // add plastic deformation data to solver, if at least one asset has non-zero plastic deformation coefficients, leave the according pointers at NULL otherwise
+ if (plasticDeformation)
+ {
+ if (asset->shapePlasticThresholds && asset->shapePlasticCreeps)
+ {
+ for (int i = 0; i < asset->numShapes; ++i)
+ {
+ g_buffers->rigidPlasticThresholds.push_back(asset->shapePlasticThresholds[i]);
+ g_buffers->rigidPlasticCreeps.push_back(asset->shapePlasticCreeps[i]);
+ }
+ }
+ else
+ {
+ for (int i = 0; i < asset->numShapes; ++i)
+ {
+ g_buffers->rigidPlasticThresholds.push_back(0.0f);
+ g_buffers->rigidPlasticCreeps.push_back(0.0f);
+ }
+ }
+ }
+ else
+ {
+ if (asset->shapePlasticThresholds && asset->shapePlasticCreeps)
+ {
+ int oldBufferSize = g_buffers->rigidCoefficients.size() - asset->numShapes;
+
+ g_buffers->rigidPlasticThresholds.resize(oldBufferSize);
+ g_buffers->rigidPlasticCreeps.resize(oldBufferSize);
+
+ for (int i = 0; i < oldBufferSize; i++)
+ {
+ g_buffers->rigidPlasticThresholds[i] = 0.0f;
+ g_buffers->rigidPlasticCreeps[i] = 0.0f;
+ }
+
+ for (int i = 0; i < asset->numShapes; ++i)
+ {
+ g_buffers->rigidPlasticThresholds.push_back(asset->shapePlasticThresholds[i]);
+ g_buffers->rigidPlasticCreeps.push_back(asset->shapePlasticCreeps[i]);
+ }
+
+ plasticDeformation = true;
+ }
+ }
+
// add link data to the solver
for (int i = 0; i < asset->numSprings; ++i)
{
@@ -190,7 +317,7 @@ public:
NvFlexExtDestroyAsset(asset);
- mInstances.push_back(instance);
+ mRenderingInstances.push_back(renderingInstance);
}
virtual void Draw(int pass)
@@ -198,9 +325,9 @@ public:
if (!g_drawMesh)
return;
- for (int s = 0; s < int(mInstances.size()); ++s)
+ for (int s = 0; s < int(mRenderingInstances.size()); ++s)
{
- const Instance& instance = mInstances[s];
+ const RenderingInstance& instance = mRenderingInstances[s];
Mesh m;
m.m_positions.resize(instance.mMesh->m_positions.size());
@@ -239,58 +366,15 @@ public:
DrawMesh(&m, instance.mColor);
}
}
-
- struct Instance
- {
- Mesh* mMesh;
- std::vector<int> mSkinningIndices;
- std::vector<float> mSkinningWeights;
- vector<Vec3> mRigidRestPoses;
- Vec3 mColor;
- int mOffset;
- };
-
- std::vector<Instance> mInstances;
-
- const char* mFile;
- Vec3 mScale;
- Vec3 mOffset;
-
- float mRadius;
-
- float mClusterSpacing;
- float mClusterRadius;
- float mClusterStiffness;
-
- float mLinkRadius;
- float mLinkStiffness;
-
- float mGlobalStiffness;
-
- float mSurfaceSampling;
- float mVolumeSampling;
-
- float mSkinningFalloff;
- float mSkinningMaxDistance;
-
- float mPlasticThreshold;
- float mPlasticCreep;
-
- float mRelaxationFactor;
-
- bool mPlinth;
-
- int mStack[3];
};
-
-
class SoftBodyFixed : public SoftBody
{
public:
- SoftBodyFixed(const char* name, const char* mesh) : SoftBody(name, mesh) {}
+ SoftBodyFixed(const char* name) : SoftBody(name)
+ {}
virtual void Initialize()
{
@@ -302,16 +386,16 @@ public:
g_buffers->positions[i].w = 0.0f;
}
- virtual void CreateBodies()
+ virtual void AddStack(Instance instance, int zStack)
{
- int x = 0;
- int y = 0;
+ float clusterStiffness = instance.mClusterStiffness;
+ Vec3 translation = instance.mTranslation;
- for (int z = 0; z < 4; ++z)
+ for (int z = 0; z < zStack; ++z)
{
- float stiffness = sqr(mClusterStiffness*(z + 1));
-
- CreateSoftBody(mRadius, mOffset + Vec3(x*(mScale.x + 1), y*(mScale.y + 1), -z*(mScale.z + 1))*mRadius, stiffness, mInstances.size());
+ instance.mClusterStiffness = sqr(clusterStiffness*(z + 1));
+ instance.mTranslation = translation + Vec3(0.0f, 0.0f, -z*(instance.mScale.z + 1))*mRadius;
+ this->mInstances.push_back(instance);
}
}
@@ -322,4 +406,4 @@ public:
(Vec4&)g_params.planes[1] = Vec4(1.0f, 0.0f, 0.0f, 0.0f);
g_params.numPlanes = 2;
}
-};
+}; \ No newline at end of file
diff --git a/demo/scenes/surfacetension.h b/demo/scenes/surfacetension.h
index b22ad6d..60f1836 100644
--- a/demo/scenes/surfacetension.h
+++ b/demo/scenes/surfacetension.h
@@ -17,7 +17,6 @@ public:
g_params.radius = radius;
- g_params.fluid = true;
g_params.numIterations = 3;
g_params.vorticityConfinement = 0.0f;
g_params.fluidRestDistance = restDistance;
diff --git a/demo/scenes/tearing.h b/demo/scenes/tearing.h
index c36ca7a..ce9dacc 100644
--- a/demo/scenes/tearing.h
+++ b/demo/scenes/tearing.h
@@ -123,9 +123,9 @@ public:
virtual void Sync()
{
// update solver data not already updated in the main loop
- NvFlexSetSprings(g_flex, g_buffers->springIndices.buffer, g_buffers->springLengths.buffer, g_buffers->springStiffness.buffer, g_buffers->springLengths.size());
- NvFlexSetDynamicTriangles(g_flex, g_buffers->triangles.buffer, g_buffers->triangleNormals.buffer, g_buffers->triangles.size() / 3);
- NvFlexSetRestParticles(g_flex, g_buffers->restPositions.buffer, g_buffers->restPositions.size());
+ NvFlexSetSprings(g_solver, g_buffers->springIndices.buffer, g_buffers->springLengths.buffer, g_buffers->springStiffness.buffer, g_buffers->springLengths.size());
+ NvFlexSetDynamicTriangles(g_solver, g_buffers->triangles.buffer, g_buffers->triangleNormals.buffer, g_buffers->triangles.size() / 3);
+ NvFlexSetRestParticles(g_solver, g_buffers->restPositions.buffer, NULL);
}
NvFlexExtAsset* mCloth;
diff --git a/demo/scenes/thinbox.h b/demo/scenes/thinbox.h
index a77f258..d9005c9 100644
--- a/demo/scenes/thinbox.h
+++ b/demo/scenes/thinbox.h
@@ -47,7 +47,6 @@ public:
g_params.gravity[1] = -9.f;
g_params.radius = radius;
g_params.dynamicFriction = 0.0f;
- g_params.fluid = false;
g_params.numIterations = 5;
g_params.numPlanes = 1;
g_params.restitution = 0.0f;
diff --git a/demo/scenes/triggervolume.h b/demo/scenes/triggervolume.h
index 0e4c1a4..8c078de 100644
--- a/demo/scenes/triggervolume.h
+++ b/demo/scenes/triggervolume.h
@@ -45,14 +45,14 @@ public:
NvFlexVector<int> contactIndices(g_flexLib, g_buffers->positions.size());
NvFlexVector<unsigned int> contactCounts(g_flexLib, g_buffers->positions.size());
- NvFlexGetContacts(g_flex, contactPlanes.buffer, contactVelocities.buffer, contactIndices.buffer, contactCounts.buffer);
+ NvFlexGetContacts(g_solver, contactPlanes.buffer, contactVelocities.buffer, contactIndices.buffer, contactCounts.buffer);
contactPlanes.map();
contactVelocities.map();
contactIndices.map();
contactCounts.map();
- int activeCount = NvFlexGetActiveCount(g_flex);
+ int activeCount = NvFlexGetActiveCount(g_solver);
for (int i = 0; i < activeCount; ++i)
{
diff --git a/demo/scenes/viscosity.h b/demo/scenes/viscosity.h
index 0615855..52db6d5 100644
--- a/demo/scenes/viscosity.h
+++ b/demo/scenes/viscosity.h
@@ -10,9 +10,10 @@ public:
float radius = 0.1f;
float restDistance = radius*0.5f;
+ g_solverDesc.featureMode = eNvFlexFeatureModeSimpleFluids;
+
g_params.radius = radius;
- g_params.fluid = true;
g_params.numIterations = 3;
g_params.vorticityConfinement = 0.0f;
g_params.fluidRestDistance = restDistance;
diff --git a/demo/scenes/waterballoon.h b/demo/scenes/waterballoon.h
index 544bf78..0e59f40 100644
--- a/demo/scenes/waterballoon.h
+++ b/demo/scenes/waterballoon.h
@@ -88,8 +88,6 @@ public:
g_params.collisionDistance = 0.01f;
g_params.solidPressure = 0.0f;
- g_params.fluid = true;
-
g_params.fluidRestDistance = radius*0.65f;
g_params.viscosity = 0.0;
g_params.adhesion = 0.0f;
@@ -190,11 +188,11 @@ public:
virtual void Sync()
{
// send new particle data to the GPU
- NvFlexSetRestParticles(g_flex, g_buffers->restPositions.buffer, g_buffers->restPositions.size());
+ NvFlexSetRestParticles(g_solver, g_buffers->restPositions.buffer, NULL);
// update solver
- NvFlexSetSprings(g_flex, g_buffers->springIndices.buffer, g_buffers->springLengths.buffer, g_buffers->springStiffness.buffer, g_buffers->springLengths.size());
- NvFlexSetDynamicTriangles(g_flex, g_buffers->triangles.buffer, g_buffers->triangleNormals.buffer, g_buffers->triangles.size() / 3);
+ NvFlexSetSprings(g_solver, g_buffers->springIndices.buffer, g_buffers->springLengths.buffer, g_buffers->springStiffness.buffer, g_buffers->springLengths.size());
+ NvFlexSetDynamicTriangles(g_solver, g_buffers->triangles.buffer, g_buffers->triangleNormals.buffer, g_buffers->triangles.size() / 3);
}
virtual void Update()
diff --git a/demo/shaders.h b/demo/shaders.h
index 937c2a2..168a333 100644
--- a/demo/shaders.h
+++ b/demo/shaders.h
@@ -34,32 +34,41 @@
#include "../include/NvFlex.h"
+void GetRenderDevice(void** device, void** context);
-#if FLEX_DX
-
-#include <d3d11.h>
-typedef ID3D11Buffer* VertexBuffer;
-typedef ID3D11Buffer* IndexBuffer;
-
-void GetRenderDevice(ID3D11Device** device, ID3D11DeviceContext** context);
-
-#else
-
-typedef unsigned int VertexBuffer;
-typedef unsigned int IndexBuffer;
-typedef unsigned int Texture;
-
-#endif
+struct DiffuseRenderBuffers;
+struct FluidRenderBuffers;
struct SDL_Window;
-void InitRender(SDL_Window* window, bool fullscreen, int msaa);
+struct RenderInitOptions
+{
+ RenderInitOptions():
+ defaultFontHeight(-1),
+ asyncComputeBenchmark(false),
+ fullscreen(false),
+ numMsaaSamples(1),
+ window(nullptr)
+ {}
+ int defaultFontHeight; ///< Set to -1 for the default
+ bool asyncComputeBenchmark; ///< When set, will configure renderer to perform extra (unnecessary) rendering work to make sure async compute can take place.
+ bool fullscreen;
+ int numMsaaSamples;
+ SDL_Window* window;
+};
+
+void InitRender(const RenderInitOptions& options);
void DestroyRender();
void ReshapeRender(SDL_Window* window);
void StartFrame(Vec4 clearColor);
void EndFrame();
+void StartGpuWork();
+void EndGpuWork();
+
+void FlushGraphicsAndWait();
+
// set to true to enable vsync
void PresentFrame(bool fullsync);
@@ -86,7 +95,7 @@ void ShadowEnd();
// primitive draw methods
void DrawPlanes(Vec4* planes, int n, float bias);
-void DrawPoints(VertexBuffer positions, VertexBuffer color, IndexBuffer indices, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowTex, bool showDensity);
+void DrawPoints(FluidRenderBuffers* buffer, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowTex, bool showDensity);
void DrawMesh(const Mesh*, Vec3 color);
void DrawCloth(const Vec4* positions, const Vec4* normals, const float* uvs, const int* indices, int numTris, int numPositions, int colorIndex=3, float expand=0.0f, bool twosided=true, bool smooth=true);
void DrawBuffer(float* buffer, Vec3 camPos, Vec3 lightPos);
@@ -103,6 +112,11 @@ void DrawGpuMeshInstances(GpuMesh* m, const Matrix44* xforms, int n, const Vec3&
void BindSolidShader(Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowTex, float bias, Vec4 fogColor);
void UnbindSolidShader();
+float RendererGetDeviceTimestamps(unsigned long long* begin, unsigned long long* end, unsigned long long* freq);
+void* GetGraphicsCommandQueue();
+void GraphicsTimerBegin();
+void GraphicsTimerEnd();
+
// new fluid renderer
struct FluidRenderer;
@@ -110,32 +124,14 @@ struct FluidRenderer;
FluidRenderer* CreateFluidRenderer(uint32_t width, uint32_t height);
void DestroyFluidRenderer(FluidRenderer*);
-struct FluidRenderBuffers
-{
- VertexBuffer mPositionVBO;
- VertexBuffer mDensityVBO;
- VertexBuffer mAnisotropyVBO[3];
- IndexBuffer mIndices;
-
- VertexBuffer mFluidVBO; // to be removed
-
- // wrapper buffers that allow Flex to write directly to VBOs
- NvFlexBuffer* mPositionBuf;
- NvFlexBuffer* mDensitiesBuf;
- NvFlexBuffer* mAnisotropyBuf[3];
- NvFlexBuffer* mIndicesBuf;
-
- int mNumFluidParticles;
-};
-
-FluidRenderBuffers CreateFluidRenderBuffers(int numParticles, bool enableInterop);
-void DestroyFluidRenderBuffers(FluidRenderBuffers buffers);
+FluidRenderBuffers* CreateFluidRenderBuffers(int numParticles, bool enableInterop);
+void DestroyFluidRenderBuffers(FluidRenderBuffers* buffers);
// update fluid particle buffers from a FlexSovler
-void UpdateFluidRenderBuffers(FluidRenderBuffers buffers, NvFlexSolver* flex, bool anisotropy, bool density);
+void UpdateFluidRenderBuffers(FluidRenderBuffers* buffers, NvFlexSolver* flex, bool anisotropy, bool density);
// update fluid particle buffers from host memory
-void UpdateFluidRenderBuffers(FluidRenderBuffers buffers,
+void UpdateFluidRenderBuffers(FluidRenderBuffers* buffers,
Vec4* particles,
float* densities,
Vec4* anisotropy1,
@@ -145,38 +141,26 @@ void UpdateFluidRenderBuffers(FluidRenderBuffers buffers,
int* indices,
int numIndices);
-// vertex buffers for diffuse particles
-struct DiffuseRenderBuffers
-{
- VertexBuffer mDiffusePositionVBO;
- VertexBuffer mDiffuseVelocityVBO;
- IndexBuffer mDiffuseIndicesIBO;
-
- NvFlexBuffer* mDiffuseIndicesBuf;
- NvFlexBuffer* mDiffusePositionsBuf;
- NvFlexBuffer* mDiffuseVelocitiesBuf;
-
- int mNumDiffuseParticles;
-};
-
// owns diffuse particle vertex buffers
-DiffuseRenderBuffers CreateDiffuseRenderBuffers(int numDiffuseParticles, bool& enableInterop);
-void DestroyDiffuseRenderBuffers(DiffuseRenderBuffers buffers);
+DiffuseRenderBuffers* CreateDiffuseRenderBuffers(int numDiffuseParticles, bool& enableInterop);
+void DestroyDiffuseRenderBuffers(DiffuseRenderBuffers* buffers);
// update diffuse particle vertex buffers from a NvFlexSolver
-void UpdateDiffuseRenderBuffers(DiffuseRenderBuffers buffers, NvFlexSolver* solver);
+void UpdateDiffuseRenderBuffers(DiffuseRenderBuffers* buffers, NvFlexSolver* solver);
// update diffuse particle vertex buffers from host memory
-void UpdateDiffuseRenderBuffers(DiffuseRenderBuffers buffers,
+void UpdateDiffuseRenderBuffers(DiffuseRenderBuffers* buffers,
Vec4* diffusePositions,
Vec4* diffuseVelocities,
- int* diffuseIndices,
int numDiffuseParticles);
+// Returns the number of particles in the diffuse buffers
+int GetNumDiffuseRenderParticles(DiffuseRenderBuffers* buffers);
+
// screen space fluid rendering
-void RenderEllipsoids(FluidRenderer* render, FluidRenderBuffers buffers, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowTex, Vec4 color, float blur, float ior, bool debug);
-void RenderDiffuse(FluidRenderer* render, DiffuseRenderBuffers buffer, int n, float radius, float screenWidth, float screenAspect, float fov, Vec4 color, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowTex, float motionBlur, float inscatter, float outscatter, bool shadow, bool front);
+void RenderEllipsoids(FluidRenderer* render, FluidRenderBuffers* buffers, int n, int offset, float radius, float screenWidth, float screenAspect, float fov, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowTex, Vec4 color, float blur, float ior, bool debug);
+void RenderDiffuse(FluidRenderer* render, DiffuseRenderBuffers* buffer, int n, float radius, float screenWidth, float screenAspect, float fov, Vec4 color, Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTransform, ShadowMap* shadowTex, float motionBlur, float inscatter, float outscatter, bool shadow, bool front);
// UI rendering
-void imguiGraphDraw();
-void imguiGraphInit(const char* fontpath); \ No newline at end of file
+
+void DrawImguiGraph();
diff --git a/doc/.buildinfo b/doc/.buildinfo
index 52b7d53..796e70f 100644
--- a/doc/.buildinfo
+++ b/doc/.buildinfo
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: 6cf9db66665815d32ac02a4ae6d96335
+config: 39b9edc0aafd74c178215254aff93032
tags: 645f666f9bcd5a90fca523b33c5a78b7
diff --git a/doc/_sources/manual.txt b/doc/_sources/manual.txt
index 08f61af..d4d916b 100644
--- a/doc/_sources/manual.txt
+++ b/doc/_sources/manual.txt
@@ -38,21 +38,26 @@ Quick Start
The example code below shows how to initialize the library, create a new solver (similar to a scene in PhysX), and how to tick the solver::
- #include <NvFlex.h>
-
NvFlexLibrary* library = NvFlexInit();
- NvFlexSolver* solver = NvFlexCreateSolver(library);
- NvFlexBuffer* particleBuffer = NvlexAllocBuffer(library, n, sizeof(Vec4), eNvFlexBufferHost);
- NvFlexBuffer* velocityBuffer = NvlexAllocBuffer(library, n, sizeof(Vec4), eNvFlexBufferHost);
- NvFlexBuffer* phaseBuffer = NvlexAllocBuffer(library, n, sizeof(int), eNvFlexBufferHost);
+ // create new solver
+ NvFlexSolverDesc solverDesc;
+ NvFlexSetSolverDescDefaults(&solverDesc);
+ solverDesc.maxParticles = n;
+ solverDesc.maxDiffuseParticles = 0;
+
+ NvFlexSolver* solver = NvFlexCreateSolver(library, &solverDesc);
+
+ NvFlexBuffer* particleBuffer = NvFlexAllocBuffer(library, n, sizeof(float4), eNvFlexBufferHost);
+ NvFlexBuffer* velocityBuffer = NvFlexAllocBuffer(library, n, sizeof(float4), eNvFlexBufferHost);
+ NvFlexBuffer* phaseBuffer = NvFlexAllocBuffer(library, n, sizeof(int), eNvFlexBufferHost);
while(!done)
{
// map buffers for reading / writing
- float4* particles = (float4*)NvlexMap(particles, eNvFlexMapWait);
- float3* velocities = (float3*)NvFlexMap(velocities, eNvFlexMapWait);
- int* phases = (int*)NvFlexMap(phases, eNvFlexMapWait);
+ float4* particles = (float4*)NvFlexMap(particleBuffer, eNvFlexMapWait);
+ float3* velocities = (float3*)NvFlexMap(velocityBuffer, eNvFlexMapWait);
+ int* phases = (int*)NvFlexMap(phaseBuffer, eNvFlexMapWait);
// spawn (user method)
SpawnParticles(particles, velocities, phases);
@@ -66,17 +71,17 @@ The example code below shows how to initialize the library, create a new solver
NvFlexUnmap(phaseBuffer);
// write to device (async)
- NvFlexSetParticles(particleBuffer, n);
- NvFlexSetVelocities(velocityBuffer, n);
- NvFlexSetPhases(phaseBuffer, n);
+ NvFlexSetParticles(solver, particleBuffer, NULL);
+ NvFlexSetVelocities(solver, velocityBuffer, NULL);
+ NvFlexSetPhases(solver, phaseBuffer, NULL);
// tick
NvFlexUpdateSolver(solver, dt, 1, false);
// read back (async)
- NvFlexGetParticles(particleBuffer, n);
- NvFlexGetVelocities(velocityBuffer, n);
- NvFlexGetPhases(phaseBuffer, n);
+ NvFlexGetParticles(solver, particleBuffer, NULL);
+ NvFlexGetVelocities(solver, velocityBuffer, NULL);
+ NvFlexGetPhases(solver, phaseBuffer, NULL);
}
NvFlexFreeBuffer(particleBuffer);
@@ -119,9 +124,9 @@ Particles are the fundamental building-block in Flex. For each particle the basi
NvFlexBuffer* phaseBuffer = NvFlexAllocBuffer(library, n, sizeof(int), eNvFlexBufferHost);
// map buffers for reading / writing
- float4* particles = (float4*)NvFlexMap(particles, eNvFlexMapWait);
- float3* velocities = (float3*)NvFlexMap(velocities, eNvFlexMapWait);
- int* phases = (int*)NvFlexMap(phases, eFlexMapWait);
+ float4* particles = (float4*)NvFlexMap(particlesBuffer, eNvFlexMapWait);
+ float3* velocities = (float3*)NvFlexMap(velocityBuffer, eNvFlexMapWait);
+ int* phases = (int*)NvFlexMap(phaseBuffer, eFlexMapWait);
// spawn particles
for (int i=0; i < n; ++i)
@@ -137,9 +142,9 @@ Particles are the fundamental building-block in Flex. For each particle the basi
NvFlexUnmap(phaseBuffer);
// write to device (async)
- NvFlexSetParticles(particleBuffer, n);
- NvFlexSetVelocities(velocityBuffer, n);
- NvFlexSetPhases(phaseBuffer, n);
+ NvFlexSetParticles(solver, particleBuffer, NULL);
+ NvFlexSetVelocities(solver, velocityBuffer, NULL);
+ NvFlexSetPhases(solver, phaseBuffer, NULL);
.. _Radius:
@@ -187,7 +192,9 @@ The example code below shows how to create an active set which enables simulatio
activeIndices[i] = i;
NvFlexUnmap(activeBuffer);
- NvFlexSetActive(solver, activeBuffer, 10)
+
+ NvFlexSetActive(solver, activeBuffer, NULL)
+ NvFlexSetActiveCount(solver, 10);
**Note:** constraints referencing inactive particles may behave unexpectedly.
@@ -581,34 +588,34 @@ Synchronization occurs when you call **NvFlexMap()** on a simulation buffer. To
while (!done)
{
- // map buffers for reading / writing (synchronizes with GPU)
- float4* particles = (float4*)NvFlexMap(particleBuffer, eNvFlexMapWait);
- float3* velocities = (float3*)NvFlexMap(velocityBuffer, eNvFlexMapWait);
- int* phases = (int*)NvFlexMap(phaseBuffer, eNvFlexMapWait);
-
- // application CPU-side particle update
- UpdateBuffers(particles, velocities, phases);
-
- // unmap buffers
- NvFlexUnmap(particleBuffer);
- NvFlexUnmap(velocityBuffer);
- NvFlexUnmap(phaseBuffer);
-
- // write to device (async)
- NvFlexSetParticles(particleBuffer, n);
- NvFlexSetVelocities(velocityBuffer, n);
- NvFlexSetPhases(phaseBuffer, n);
-
- // tick (async)
- NvFlexUpdateSolver(solver, dt, 1, NULL);
-
- // read back (async)
- NvFlexGetParticles(particleBuffer, n);
- NvFlexGetVelocities(velocityBuffer, n);
- NvFlexGetPhases(phaseBuffer, n);
-
- // Perform CPU work here while update and transfer are in flight
- TickGame()
+ // map buffers for reading / writing (synchronizes with GPU)
+ float4* particles = (float4*)NvFlexMap(particleBuffer, eNvFlexMapWait);
+ float3* velocities = (float3*)NvFlexMap(velocityBuffer, eNvFlexMapWait);
+ int* phases = (int*)NvFlexMap(phaseBuffer, eNvFlexMapWait);
+
+ // application CPU-side particle update
+ UpdateBuffers(particles, velocities, phases);
+
+ // unmap buffers
+ NvFlexUnmap(particleBuffer);
+ NvFlexUnmap(velocityBuffer);
+ NvFlexUnmap(phaseBuffer);
+
+ // write to device (async)
+ NvFlexSetParticles(solver, particleBuffer, NULL);
+ NvFlexSetVelocities(solver, velocityBuffer, NULL);
+ NvFlexSetPhases(solver, phaseBuffer, NULL);
+
+ // tick (async)
+ NvFlexUpdateSolver(solver, dt, 1, NULL);
+
+ // read back (async)
+ NvFlexGetParticles(solver, particleBuffer, NULL);
+ NvFlexGetVelocities(solver, velocityBuffer, NULL);
+ NvFlexGetPhases(solver, phaseBuffer, NULL);
+
+ // Perform CPU work here while update and transfer are in flight
+ TickGame()
}
diff --git a/doc/_static/api/_nv_flex_8h.html b/doc/_static/api/_nv_flex_8h.html
index 837b040..ca04c36 100644
--- a/doc/_static/api/_nv_flex_8h.html
+++ b/doc/_static/api/_nv_flex_8h.html
@@ -20,7 +20,7 @@
<td id="projectlogo"><img alt="Logo" src="nvidia.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">FLEX
- &#160;<span id="projectnumber">1.1.0</span>
+ &#160;<span id="projectnumber">1.2.0</span>
</div>
</td>
</tr>
@@ -55,10 +55,14 @@ Data Structures</h2></td></tr>
<tr class="separator:struct_nv_flex_timers"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:struct_nv_flex_solver_callback_params"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#struct_nv_flex_solver_callback_params">NvFlexSolverCallbackParams</a></td></tr>
<tr class="separator:struct_nv_flex_solver_callback_params"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:struct_nv_flex_init_desc"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#struct_nv_flex_init_desc">NvFlexInitDesc</a></td></tr>
-<tr class="separator:struct_nv_flex_init_desc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_nv_flex_solver_callback.html">NvFlexSolverCallback</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:struct_nv_flex_init_desc"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#struct_nv_flex_init_desc">NvFlexInitDesc</a></td></tr>
+<tr class="separator:struct_nv_flex_init_desc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:struct_nv_flex_solver_desc"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#struct_nv_flex_solver_desc">NvFlexSolverDesc</a></td></tr>
+<tr class="separator:struct_nv_flex_solver_desc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:struct_nv_flex_copy_desc"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a></td></tr>
+<tr class="separator:struct_nv_flex_copy_desc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:struct_nv_flex_sphere_geometry"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#struct_nv_flex_sphere_geometry">NvFlexSphereGeometry</a></td></tr>
<tr class="separator:struct_nv_flex_sphere_geometry"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:struct_nv_flex_capsule_geometry"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#struct_nv_flex_capsule_geometry">NvFlexCapsuleGeometry</a></td></tr>
@@ -98,9 +102,7 @@ Enumerations</h2></td></tr>
<tr class="memitem:a6541b33eaca7b2323e73b30cea34d16c"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16c">NvFlexMapFlags</a> { <br />
&#160;&#160;<a class="el" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16ca11adf517d180983daec217e761acc3d6">eNvFlexMapWait</a> = 0,
<br />
-&#160;&#160;<a class="el" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16ca1bd450ab65ccc06288fae95e23d5e6f1">eNvFlexMapDoNotWait</a> = 1,
-<br />
-&#160;&#160;<a class="el" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16caa01c2dce3aa1e0d9d151060e1786c706">eNvFlexMapDiscard</a> = 2
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16ca1bd450ab65ccc06288fae95e23d5e6f1">eNvFlexMapDoNotWait</a> = 1
<br />
}</td></tr>
<tr class="separator:a6541b33eaca7b2323e73b30cea34d16c"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -119,13 +121,35 @@ Enumerations</h2></td></tr>
}</td></tr>
<tr class="separator:a46f5d35902f7da40628247175a174f3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ad2a7745fcb4d4afd5b5f1bda074644"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644">NvFlexPhase</a> { <br />
-&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ad108f6ebf28346813cfd3602d984bb32">eNvFlexPhaseGroupMask</a> = 0x00ffffff,
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ad108f6ebf28346813cfd3602d984bb32">eNvFlexPhaseGroupMask</a> = 0x000fffff,
+<br />
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a7b776084468bae4e3566484cf34d0154">eNvFlexPhaseFlagsMask</a> = 0x00f00000,
+<br />
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ae4ea43366942f719f40e8526ad21a038">eNvFlexPhaseShapeChannelMask</a> = 0xff000000,
+<br />
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a453a23cc8e9d2e6097b5be187f3c6977">eNvFlexPhaseSelfCollide</a> = 1 &lt;&lt; 20,
+<br />
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a76a62d3a5df428f18e01f8b37573a7b1">eNvFlexPhaseSelfCollideFilter</a> = 1 &lt;&lt; 21,
+<br />
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a1728772beb1746ace4c549b2ed8f1d74">eNvFlexPhaseFluid</a> = 1 &lt;&lt; 22,
+<br />
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a52ee05f3e425c336856277774bc9f69f">eNvFlexPhaseUnused</a> = 1 &lt;&lt; 23,
+<br />
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a66aa70953a97744621e2afa41d0e32d2">eNvFlexPhaseShapeChannel0</a> = 1 &lt;&lt; 24,
+<br />
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a1de4e956764950e501bcb8376a70f5a9">eNvFlexPhaseShapeChannel1</a> = 1 &lt;&lt; 25,
+<br />
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644aa3a4fd0d5930b31199334e500ac2d7c8">eNvFlexPhaseShapeChannel2</a> = 1 &lt;&lt; 26,
+<br />
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ab4034dbf78d6045ee13278531ee21c2b">eNvFlexPhaseShapeChannel3</a> = 1 &lt;&lt; 27,
<br />
-&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a453a23cc8e9d2e6097b5be187f3c6977">eNvFlexPhaseSelfCollide</a> = 1 &lt;&lt; 24,
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644af309316efb695be38a4e15986be21ef9">eNvFlexPhaseShapeChannel4</a> = 1 &lt;&lt; 28,
<br />
-&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a76a62d3a5df428f18e01f8b37573a7b1">eNvFlexPhaseSelfCollideFilter</a> = 1 &lt;&lt; 25,
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a92bbb75d47ea0058a9a89deb0abec67f">eNvFlexPhaseShapeChannel5</a> = 1 &lt;&lt; 29,
<br />
-&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a1728772beb1746ace4c549b2ed8f1d74">eNvFlexPhaseFluid</a> = 1 &lt;&lt; 26
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a0c8d08e646d2713e34d7e2dd6e7b21f2">eNvFlexPhaseShapeChannel6</a> = 1 &lt;&lt; 30,
+<br />
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a0679f1deab7afc547900e30aae0b711a">eNvFlexPhaseShapeChannel7</a> = 1 &lt;&lt; 31
<br />
}</td></tr>
<tr class="separator:a5ad2a7745fcb4d4afd5b5f1bda074644"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -166,6 +190,15 @@ Enumerations</h2></td></tr>
<br />
}</td></tr>
<tr class="separator:a9b2d3dc5ac42011aeec4e13be2e14252"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aee5c235d5fab40831cf339680aa25560"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560">NvFlexFeatureMode</a> { <br />
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560a3ab06dc4cd4aa073ab0f2d96a56c499d">eNvFlexFeatureModeDefault</a> = 0,
+<br />
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560a421fe1e1bb00fc41e9b32208cd9155f5">eNvFlexFeatureModeSimpleSolids</a> = 1,
+<br />
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560aeab2b8a68b528d46e11b71ad0f4d83f2">eNvFlexFeatureModeSimpleFluids</a> = 2
+<br />
+ }</td></tr>
+<tr class="separator:aee5c235d5fab40831cf339680aa25560"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0506ae712f846087b8647ea389ac26ba"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26ba">NvFlexCollisionShapeType</a> { <br />
&#160;&#160;<a class="el" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baae22144512ae098865c6725af16a68ad3">eNvFlexShapeSphere</a> = 0,
<br />
@@ -184,9 +217,9 @@ Enumerations</h2></td></tr>
<tr class="memitem:a31c31ea4f96cd4fdadc6b7317691304c"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304c">NvFlexCollisionShapeFlags</a> { <br />
&#160;&#160;<a class="el" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304cae8a10737948abf6973f0f1d66bae7ef8">eNvFlexShapeFlagTypeMask</a> = 0x7,
<br />
-&#160;&#160;<a class="el" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304cadc6740cf6d829fba159d92e43ffb5992">eNvFlexShapeFlagDynamic</a> = 8,
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304cadc6740cf6d829fba159d92e43ffb5992">eNvFlexShapeFlagDynamic</a> = 0x8,
<br />
-&#160;&#160;<a class="el" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304ca409215fa9b917f2d0830a66bd11b3ff8">eNvFlexShapeFlagTrigger</a> = 16,
+&#160;&#160;<a class="el" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304ca409215fa9b917f2d0830a66bd11b3ff8">eNvFlexShapeFlagTrigger</a> = 0x10,
<br />
&#160;&#160;<a class="el" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304caa1c1225f6b8b2906c83748cfc46b81d9">eNvFlexShapeFlagReserved</a> = 0xffffff00
<br />
@@ -195,20 +228,26 @@ Enumerations</h2></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
-<tr class="memitem:af53fa9d7caef50db346475065504848d"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#af53fa9d7caef50db346475065504848d">NvFlexMakePhase</a> (int group, int flags)</td></tr>
-<tr class="separator:af53fa9d7caef50db346475065504848d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a615e8070212c24a70e7a849120c13353"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a615e8070212c24a70e7a849120c13353">NvFlexMakePhaseWithChannels</a> (int group, int particleFlags, int shapeChannels)</td></tr>
+<tr class="separator:a615e8070212c24a70e7a849120c13353"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab43db5f28808f8038cfc9330d4b47d57"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#ab43db5f28808f8038cfc9330d4b47d57">NvFlexMakePhase</a> (int group, int particleFlags)</td></tr>
+<tr class="separator:ab43db5f28808f8038cfc9330d4b47d57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a687e5ec141948f779faa9183b68cb743"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API <a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a687e5ec141948f779faa9183b68cb743">NvFlexInit</a> (int version=NV_FLEX_VERSION, <a class="el" href="_nv_flex_8h.html#abe6f00c9b94debbf7c181082a14076d5">NvFlexErrorCallback</a> errorFunc=0, <a class="el" href="_nv_flex_8h.html#struct_nv_flex_init_desc">NvFlexInitDesc</a> *desc=0)</td></tr>
<tr class="separator:a687e5ec141948f779faa9183b68cb743"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf59e45ada57c7f958a8030099cbe211"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#aaf59e45ada57c7f958a8030099cbe211">NvFlexShutdown</a> (<a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *lib)</td></tr>
<tr class="separator:aaf59e45ada57c7f958a8030099cbe211"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac25ec5de38c177db51198bb620644d36"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#ac25ec5de38c177db51198bb620644d36">NvFlexGetVersion</a> ()</td></tr>
<tr class="separator:ac25ec5de38c177db51198bb620644d36"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:af7f91fa47c779fcd8bee60061de6d31c"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API <a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#af7f91fa47c779fcd8bee60061de6d31c">NvFlexCreateSolver</a> (<a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *lib, int maxParticles, int maxDiffuseParticles, int maxNeighborsPerParticle=96)</td></tr>
-<tr class="separator:af7f91fa47c779fcd8bee60061de6d31c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a69a33d464c002a8916a5925c6ef32ae6"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a69a33d464c002a8916a5925c6ef32ae6">NvFlexSetSolverDescDefaults</a> (<a class="el" href="_nv_flex_8h.html#struct_nv_flex_solver_desc">NvFlexSolverDesc</a> *desc)</td></tr>
+<tr class="separator:a69a33d464c002a8916a5925c6ef32ae6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a9e925acbc34675dfe247da017cbd855f"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API <a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a9e925acbc34675dfe247da017cbd855f">NvFlexCreateSolver</a> (<a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *lib, const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_solver_desc">NvFlexSolverDesc</a> *desc)</td></tr>
+<tr class="separator:a9e925acbc34675dfe247da017cbd855f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d755d7b090f7ed5c4c50d2d3fef1558"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a1d755d7b090f7ed5c4c50d2d3fef1558">NvFlexDestroySolver</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver)</td></tr>
<tr class="separator:a1d755d7b090f7ed5c4c50d2d3fef1558"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0d57e4fc2b3b51ec08f7da0a28ff343"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API <a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#ae0d57e4fc2b3b51ec08f7da0a28ff343">NvFlexGetSolverLibrary</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver)</td></tr>
<tr class="separator:ae0d57e4fc2b3b51ec08f7da0a28ff343"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:afd6aff58269d6c359df2453c96397840"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#afd6aff58269d6c359df2453c96397840">NvFlexGetSolverDesc</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#struct_nv_flex_solver_desc">NvFlexSolverDesc</a> *desc)</td></tr>
+<tr class="separator:afd6aff58269d6c359df2453c96397840"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5427457488ab3f2de91cf65335dda08"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API <a class="el" href="struct_nv_flex_solver_callback.html">NvFlexSolverCallback</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#ac5427457488ab3f2de91cf65335dda08">NvFlexRegisterSolverCallback</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="struct_nv_flex_solver_callback.html">NvFlexSolverCallback</a> function, <a class="el" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9">NvFlexSolverCallbackStage</a> stage)</td></tr>
<tr class="separator:ac5427457488ab3f2de91cf65335dda08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac75370f005fd453fe8a324fe62be1b5c"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#ac75370f005fd453fe8a324fe62be1b5c">NvFlexUpdateSolver</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, float dt, int substeps, bool enableTimers)</td></tr>
@@ -217,42 +256,44 @@ Functions</h2></td></tr>
<tr class="separator:ae2db6ad8006027c1acf2315a0d15fe71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a581b458848039220203547af53de128f"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a581b458848039220203547af53de128f">NvFlexGetParams</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#struct_nv_flex_params">NvFlexParams</a> *params)</td></tr>
<tr class="separator:a581b458848039220203547af53de128f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:aea2af336bdd96d7168c3acdce6d1875d"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#aea2af336bdd96d7168c3acdce6d1875d">NvFlexSetActive</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *indices, int n)</td></tr>
-<tr class="separator:aea2af336bdd96d7168c3acdce6d1875d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:aeed8fe87fa073067af1a45560cc54a79"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#aeed8fe87fa073067af1a45560cc54a79">NvFlexGetActive</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *indices)</td></tr>
-<tr class="separator:aeed8fe87fa073067af1a45560cc54a79"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:adc0c97635cdbb3da7b571574a3b38990"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#adc0c97635cdbb3da7b571574a3b38990">NvFlexSetActive</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *indices, const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *desc)</td></tr>
+<tr class="separator:adc0c97635cdbb3da7b571574a3b38990"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1bd4b70e0118abe18ca5fe85157299b6"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a1bd4b70e0118abe18ca5fe85157299b6">NvFlexGetActive</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *indices, const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *desc)</td></tr>
+<tr class="separator:a1bd4b70e0118abe18ca5fe85157299b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a677dc591fe443ae058701966c52d1316"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a677dc591fe443ae058701966c52d1316">NvFlexSetActiveCount</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, int n)</td></tr>
+<tr class="separator:a677dc591fe443ae058701966c52d1316"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2345372dea2ad4f043153a84e7a2c407"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a2345372dea2ad4f043153a84e7a2c407">NvFlexGetActiveCount</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver)</td></tr>
<tr class="separator:a2345372dea2ad4f043153a84e7a2c407"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:abef057ac89ba5cf1cd71f0084f9313de"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#abef057ac89ba5cf1cd71f0084f9313de">NvFlexSetParticles</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *p, int n)</td></tr>
-<tr class="separator:abef057ac89ba5cf1cd71f0084f9313de"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a84f06fff995d8eb034cff81c811fa312"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a84f06fff995d8eb034cff81c811fa312">NvFlexGetParticles</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *p, int n)</td></tr>
-<tr class="separator:a84f06fff995d8eb034cff81c811fa312"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:aa457096286567a37d4f1d5f4857d9296"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#aa457096286567a37d4f1d5f4857d9296">NvFlexSetRestParticles</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *p, int n)</td></tr>
-<tr class="separator:aa457096286567a37d4f1d5f4857d9296"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:affb884bcf3e7e389812d0b52b0fc0490"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#affb884bcf3e7e389812d0b52b0fc0490">NvFlexGetRestParticles</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *p, int n)</td></tr>
-<tr class="separator:affb884bcf3e7e389812d0b52b0fc0490"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:abfa62e01c4f4511d3f6a00ab6a0f257a"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#abfa62e01c4f4511d3f6a00ab6a0f257a">NvFlexGetSmoothParticles</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *p, int n)</td></tr>
-<tr class="separator:abfa62e01c4f4511d3f6a00ab6a0f257a"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:afe09e63d22c5156fe24cd2d2bc069c04"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#afe09e63d22c5156fe24cd2d2bc069c04">NvFlexSetVelocities</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *v, int n)</td></tr>
-<tr class="separator:afe09e63d22c5156fe24cd2d2bc069c04"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a67bd9669086e823ebe33d08d14f5b2b9"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a67bd9669086e823ebe33d08d14f5b2b9">NvFlexGetVelocities</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *v, int n)</td></tr>
-<tr class="separator:a67bd9669086e823ebe33d08d14f5b2b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a3117f92571613709936291c48414e521"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a3117f92571613709936291c48414e521">NvFlexSetPhases</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *phases, int n)</td></tr>
-<tr class="separator:a3117f92571613709936291c48414e521"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a15b7a5449bee38bbe5dcaf23690f09f5"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a15b7a5449bee38bbe5dcaf23690f09f5">NvFlexGetPhases</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *phases, int n)</td></tr>
-<tr class="separator:a15b7a5449bee38bbe5dcaf23690f09f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:add03fd357383845f07e0596290faf316"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#add03fd357383845f07e0596290faf316">NvFlexSetNormals</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *normals, int n)</td></tr>
-<tr class="separator:add03fd357383845f07e0596290faf316"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:aadb2a0cf125e4a6b2f3443ab7dcbd3d4"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#aadb2a0cf125e4a6b2f3443ab7dcbd3d4">NvFlexGetNormals</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *normals, int n)</td></tr>
-<tr class="separator:aadb2a0cf125e4a6b2f3443ab7dcbd3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7ec5ebe3e98a44a2058d6be74b2cb633"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a7ec5ebe3e98a44a2058d6be74b2cb633">NvFlexSetParticles</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *p, const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *desc)</td></tr>
+<tr class="separator:a7ec5ebe3e98a44a2058d6be74b2cb633"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aaff62cfd50431d82af5d04a6c9ac4ffd"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#aaff62cfd50431d82af5d04a6c9ac4ffd">NvFlexGetParticles</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *p, const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *desc)</td></tr>
+<tr class="separator:aaff62cfd50431d82af5d04a6c9ac4ffd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a125cfd9817437bb4f4bcb9418efa3dda"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a125cfd9817437bb4f4bcb9418efa3dda">NvFlexSetRestParticles</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *p, const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *desc)</td></tr>
+<tr class="separator:a125cfd9817437bb4f4bcb9418efa3dda"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aafc89f87307602fb9bfa8f6668122121"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#aafc89f87307602fb9bfa8f6668122121">NvFlexGetRestParticles</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *p, const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *desc)</td></tr>
+<tr class="separator:aafc89f87307602fb9bfa8f6668122121"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a96a771dd328d019e6164e5f23d29ffcb"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a96a771dd328d019e6164e5f23d29ffcb">NvFlexGetSmoothParticles</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *p, const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *desc)</td></tr>
+<tr class="separator:a96a771dd328d019e6164e5f23d29ffcb"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae2b271f123db0054512936f2acc6467f"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#ae2b271f123db0054512936f2acc6467f">NvFlexSetVelocities</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *v, const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *desc)</td></tr>
+<tr class="separator:ae2b271f123db0054512936f2acc6467f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:afbcbff4e4865105514c194398ab3a7b0"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#afbcbff4e4865105514c194398ab3a7b0">NvFlexGetVelocities</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *v, const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *desc)</td></tr>
+<tr class="separator:afbcbff4e4865105514c194398ab3a7b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa1d44495e442f8cae874c635ef847478"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#aa1d44495e442f8cae874c635ef847478">NvFlexSetPhases</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *phases, const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *desc)</td></tr>
+<tr class="separator:aa1d44495e442f8cae874c635ef847478"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:accc944f0e76ee2e5d67c3f977b150806"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#accc944f0e76ee2e5d67c3f977b150806">NvFlexGetPhases</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *phases, const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *desc)</td></tr>
+<tr class="separator:accc944f0e76ee2e5d67c3f977b150806"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a32e8fdb39029a2564c129bd493c52058"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a32e8fdb39029a2564c129bd493c52058">NvFlexSetNormals</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *normals, const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *desc)</td></tr>
+<tr class="separator:a32e8fdb39029a2564c129bd493c52058"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a73d87b460a34c52ff4b616e97a53ade7"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a73d87b460a34c52ff4b616e97a53ade7">NvFlexGetNormals</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *normals, const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *desc)</td></tr>
+<tr class="separator:a73d87b460a34c52ff4b616e97a53ade7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae67c0cab2ecee8eb9485a26ef0fad6a9"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#ae67c0cab2ecee8eb9485a26ef0fad6a9">NvFlexSetSprings</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *indices, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *restLengths, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *stiffness, int numSprings)</td></tr>
<tr class="separator:ae67c0cab2ecee8eb9485a26ef0fad6a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab5f90f4024d71d08c3f9327c6d8c184"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#aab5f90f4024d71d08c3f9327c6d8c184">NvFlexGetSprings</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *indices, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *restLengths, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *stiffness, int numSprings)</td></tr>
<tr class="separator:aab5f90f4024d71d08c3f9327c6d8c184"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a89c872e761a53c87375f536a0ef597d8"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a89c872e761a53c87375f536a0ef597d8">NvFlexSetRigids</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *offsets, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *indices, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *restPositions, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *restNormals, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *stiffness, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *rotations, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *translations, int numRigids, int numIndices)</td></tr>
-<tr class="separator:a89c872e761a53c87375f536a0ef597d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a3eafe7fe6b200c757c7402eca7d13f6d"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a3eafe7fe6b200c757c7402eca7d13f6d">NvFlexGetRigidTransforms</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *rotations, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *translations)</td></tr>
-<tr class="separator:a3eafe7fe6b200c757c7402eca7d13f6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa8b7bfeffb0fa7dc6dbd291fee87edc9"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#aa8b7bfeffb0fa7dc6dbd291fee87edc9">NvFlexSetRigids</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *offsets, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *indices, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *restPositions, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *restNormals, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *stiffness, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *thresholds, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *creeps, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *rotations, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *translations, int numRigids, int numIndices)</td></tr>
+<tr class="separator:aa8b7bfeffb0fa7dc6dbd291fee87edc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab5cc56e228374b1da0910356b3172b4e"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#ab5cc56e228374b1da0910356b3172b4e">NvFlexGetRigids</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *offsets, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *indices, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *restPositions, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *restNormals, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *stiffness, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *thresholds, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *creeps, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *rotations, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *translations)</td></tr>
+<tr class="separator:ab5cc56e228374b1da0910356b3172b4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdda5a5210938a1e8a7c3a8218ad468e"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API <a class="el" href="_nv_flex_8h.html#a2aea4c3d772b4dbccb7dd9ba37c1bdc0">NvFlexTriangleMeshId</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#afdda5a5210938a1e8a7c3a8218ad468e">NvFlexCreateTriangleMesh</a> (<a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *lib)</td></tr>
<tr class="separator:afdda5a5210938a1e8a7c3a8218ad468e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4cb4462803ebff105d151fd45b4efad6"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a4cb4462803ebff105d151fd45b4efad6">NvFlexDestroyTriangleMesh</a> (<a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *lib, <a class="el" href="_nv_flex_8h.html#a2aea4c3d772b4dbccb7dd9ba37c1bdc0">NvFlexTriangleMeshId</a> mesh)</td></tr>
@@ -271,10 +312,12 @@ Functions</h2></td></tr>
<tr class="separator:afbaafe2b1006352002b03aabaca531cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac85b6372e5c7bfc508ecb7b8c59c72a0"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#ac85b6372e5c7bfc508ecb7b8c59c72a0">NvFlexDestroyConvexMesh</a> (<a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *lib, <a class="el" href="_nv_flex_8h.html#a7ab5aa68da7ca1f69211a900f1a1c586">NvFlexConvexMeshId</a> convex)</td></tr>
<tr class="separator:ac85b6372e5c7bfc508ecb7b8c59c72a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a69289002a6f8ecd697118f0ec6572f5d"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a69289002a6f8ecd697118f0ec6572f5d">NvFlexUpdateConvexMesh</a> (<a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *lib, <a class="el" href="_nv_flex_8h.html#a7ab5aa68da7ca1f69211a900f1a1c586">NvFlexConvexMeshId</a> convex, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *planes, int numPlanes, float *lower, float *upper)</td></tr>
-<tr class="separator:a69289002a6f8ecd697118f0ec6572f5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab452c355f92dda050d4b4dafb8e71b03"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#ab452c355f92dda050d4b4dafb8e71b03">NvFlexUpdateConvexMesh</a> (<a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *lib, <a class="el" href="_nv_flex_8h.html#a7ab5aa68da7ca1f69211a900f1a1c586">NvFlexConvexMeshId</a> convex, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *planes, int numPlanes, const float *lower, const float *upper)</td></tr>
+<tr class="separator:ab452c355f92dda050d4b4dafb8e71b03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad56e661161763579afb375b3841eb5ff"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#ad56e661161763579afb375b3841eb5ff">NvFlexGetConvexMeshBounds</a> (<a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *lib, <a class="el" href="_nv_flex_8h.html#a7ab5aa68da7ca1f69211a900f1a1c586">NvFlexConvexMeshId</a> mesh, float *lower, float *upper)</td></tr>
<tr class="separator:ad56e661161763579afb375b3841eb5ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad83b7fb561a91467a3094771bb682b96"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#ad83b7fb561a91467a3094771bb682b96">NvFlexMakeShapeFlagsWithChannels</a> (<a class="el" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26ba">NvFlexCollisionShapeType</a> type, bool dynamic, int shapeChannels)</td></tr>
+<tr class="separator:ad83b7fb561a91467a3094771bb682b96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6ee1e23e0c49aad63df8f605182de3a"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#ad6ee1e23e0c49aad63df8f605182de3a">NvFlexMakeShapeFlags</a> (<a class="el" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26ba">NvFlexCollisionShapeType</a> type, bool dynamic)</td></tr>
<tr class="separator:ad6ee1e23e0c49aad63df8f605182de3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea4e7117722df53dfe44c676496117fa"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#aea4e7117722df53dfe44c676496117fa">NvFlexSetShapes</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *geometry, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *shapePositions, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *shapeRotations, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *shapePrevPositions, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *shapePrevRotations, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *shapeFlags, int numShapes)</td></tr>
@@ -285,20 +328,22 @@ Functions</h2></td></tr>
<tr class="separator:abdfd0834422dd99154a27962614525e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f2b59fba77c60ce116e1eac57d63e50"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a7f2b59fba77c60ce116e1eac57d63e50">NvFlexSetInflatables</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *startTris, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *numTris, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *restVolumes, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *overPressures, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *constraintScales, int numInflatables)</td></tr>
<tr class="separator:a7f2b59fba77c60ce116e1eac57d63e50"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a6f6f14e625dc744a127be81e6dc4cb74"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a6f6f14e625dc744a127be81e6dc4cb74">NvFlexGetDensities</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *densities, int n)</td></tr>
-<tr class="separator:a6f6f14e625dc744a127be81e6dc4cb74"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ae28167c680ad56dcff600ce0a223cec5"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#ae28167c680ad56dcff600ce0a223cec5">NvFlexGetAnisotropy</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *q1, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *q2, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *q3)</td></tr>
-<tr class="separator:ae28167c680ad56dcff600ce0a223cec5"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a37ada4b95999cc253dfb049b99030d50"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a37ada4b95999cc253dfb049b99030d50">NvFlexGetDiffuseParticles</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *p, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *v, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *indices)</td></tr>
-<tr class="separator:a37ada4b95999cc253dfb049b99030d50"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3a20cc2539983a009caaf77ec9ceab82"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a3a20cc2539983a009caaf77ec9ceab82">NvFlexGetDensities</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *densities, const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *desc)</td></tr>
+<tr class="separator:a3a20cc2539983a009caaf77ec9ceab82"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aef768edc8e4df1a78a94a6c971541550"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#aef768edc8e4df1a78a94a6c971541550">NvFlexGetAnisotropy</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *q1, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *q2, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *q3, const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *desc)</td></tr>
+<tr class="separator:aef768edc8e4df1a78a94a6c971541550"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:afa458a6eec8b0d117e53c40c13788fd9"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#afa458a6eec8b0d117e53c40c13788fd9">NvFlexGetDiffuseParticles</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *p, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *v, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *count)</td></tr>
+<tr class="separator:afa458a6eec8b0d117e53c40c13788fd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a7213593dd9a23d9d67f8517d1da9de"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a5a7213593dd9a23d9d67f8517d1da9de">NvFlexSetDiffuseParticles</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *p, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *v, int n)</td></tr>
<tr class="separator:a5a7213593dd9a23d9d67f8517d1da9de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7edac9cf450917147b83e98f5cb09f5d"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a7edac9cf450917147b83e98f5cb09f5d">NvFlexGetContacts</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *planes, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *velocities, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *indices, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *counts)</td></tr>
<tr class="separator:a7edac9cf450917147b83e98f5cb09f5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ade1ef600ada4d7567e515258b289e209"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#ade1ef600ada4d7567e515258b289e209">NvFlexGetNeighbors</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *neighbors, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *counts, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *remap)</td></tr>
+<tr class="separator:ade1ef600ada4d7567e515258b289e209"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1eec84a21b1872fba11c9b4cc1d1629"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#ab1eec84a21b1872fba11c9b4cc1d1629">NvFlexGetBounds</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *lower, <a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *upper)</td></tr>
<tr class="separator:ab1eec84a21b1872fba11c9b4cc1d1629"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a221a4621ab98eca6ecd3368d288154a4"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a221a4621ab98eca6ecd3368d288154a4">NvFlexGetDeviceLatency</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver)</td></tr>
-<tr class="separator:a221a4621ab98eca6ecd3368d288154a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa77d2a4edd4ccd79c9389854dca80613"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#aa77d2a4edd4ccd79c9389854dca80613">NvFlexGetDeviceLatency</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, unsigned long long *begin, unsigned long long *end, unsigned long long *frequency)</td></tr>
+<tr class="separator:aa77d2a4edd4ccd79c9389854dca80613"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab16b6d2e11e0ab417ee6c4cf16f0a27d"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#ab16b6d2e11e0ab417ee6c4cf16f0a27d">NvFlexGetTimers</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#struct_nv_flex_timers">NvFlexTimers</a> *timers)</td></tr>
<tr class="separator:ab16b6d2e11e0ab417ee6c4cf16f0a27d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1efb6764f65900cb09f0188ad6da08a"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#ab1efb6764f65900cb09f0188ad6da08a">NvFlexGetDetailTimers</a> (<a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *solver, <a class="el" href="_nv_flex_8h.html#struct_nv_flex_detail_timer">NvFlexDetailTimer</a> **timers)</td></tr>
@@ -329,6 +374,8 @@ Functions</h2></td></tr>
<tr class="separator:a2ac0a898a565a2cdf13b80acd4a3555c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a898eb8e66a456dd2266c694f29cab600"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a898eb8e66a456dd2266c694f29cab600">NvFlexFlush</a> (<a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *lib)</td></tr>
<tr class="separator:a898eb8e66a456dd2266c694f29cab600"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a615d2e6eec2486a5db815d929f9c642c"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_8h.html#a615d2e6eec2486a5db815d929f9c642c">NvFlexWait</a> (<a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *lib)</td></tr>
+<tr class="separator:a615d2e6eec2486a5db815d929f9c642c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The main include file for the core Flex solver. </p>
@@ -460,12 +507,6 @@ lift</td>
<td class="fielddoc">
Lift force applied to particles belonging to dynamic triangles, proportional to velocity^2*area in the direction perpendicular to velocity and (if possible), parallel to the plane normal. </td></tr>
<tr><td class="fieldtype">
-<a class="anchor" id="a8f0ee62a14387dd5b5a4e8c6bc429140"></a>bool</td>
-<td class="fieldname">
-fluid</td>
-<td class="fielddoc">
-If true then particles with phase 0 are considered fluid particles and interact using the position based fluids method. </td></tr>
-<tr><td class="fieldtype">
<a class="anchor" id="a3ef4d1035530c3583bdf983c7e62b472"></a>float</td>
<td class="fieldname">
cohesion</td>
@@ -494,7 +535,7 @@ Increases vorticity by applying rotational forces to particles. </td></tr>
<td class="fieldname">
anisotropyScale</td>
<td class="fielddoc">
-Control how much anisotropy is present in resulting ellipsoids for rendering, if zero then anisotropy will not be calculated, see <a class="el" href="_nv_flex_8h.html#ae28167c680ad56dcff600ce0a223cec5">NvFlexGetAnisotropy()</a> </td></tr>
+Control how much anisotropy is present in resulting ellipsoids for rendering, if zero then anisotropy will not be calculated, see <a class="el" href="_nv_flex_8h.html#aef768edc8e4df1a78a94a6c971541550">NvFlexGetAnisotropy()</a> </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ab136ae1511a39ef570c010f321eff206"></a>float</td>
<td class="fieldname">
@@ -512,7 +553,7 @@ Clamp the anisotropy scale to this fraction of the radius. </td></tr>
<td class="fieldname">
smoothing</td>
<td class="fielddoc">
-Control the strength of Laplacian smoothing in particles for rendering, if zero then smoothed positions will not be calculated, see <a class="el" href="_nv_flex_8h.html#abfa62e01c4f4511d3f6a00ab6a0f257a">NvFlexGetSmoothParticles()</a> </td></tr>
+Control the strength of Laplacian smoothing in particles for rendering, if zero then smoothed positions will not be calculated, see <a class="el" href="_nv_flex_8h.html#a96a771dd328d019e6164e5f23d29ffcb">NvFlexGetSmoothParticles()</a> </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a3f93fba688338576ff3258b034525dc5"></a>float</td>
<td class="fieldname">
@@ -556,30 +597,12 @@ diffuseBallistic</td>
<td class="fielddoc">
The number of neighbors below which a diffuse particle is considered ballistic. </td></tr>
<tr><td class="fieldtype">
-<a class="anchor" id="a7bed2ff24c30c76aed0923809fc16d8c"></a>float</td>
-<td class="fieldname">
-diffuseSortAxis[3]</td>
-<td class="fielddoc">
-Diffuse particles will be sorted by depth along this axis if non-zero. </td></tr>
-<tr><td class="fieldtype">
<a class="anchor" id="a469950744e0b7222969762a89b992255"></a>float</td>
<td class="fieldname">
diffuseLifetime</td>
<td class="fielddoc">
Time in seconds that a diffuse particle will live for after being spawned, particles will be spawned with a random lifetime in the range [0, diffuseLifetime]. </td></tr>
<tr><td class="fieldtype">
-<a class="anchor" id="a3a1f5e2ba6c8cad0bc3f3eebd27415f0"></a>float</td>
-<td class="fieldname">
-plasticThreshold</td>
-<td class="fielddoc">
-Particles belonging to rigid shapes that move with a position delta magnitude &gt; threshold will be permanently deformed in the rest pose. </td></tr>
-<tr><td class="fieldtype">
-<a class="anchor" id="a42346069505d3bba70bcdf0a94f0615c"></a>float</td>
-<td class="fieldname">
-plasticCreep</td>
-<td class="fielddoc">
-Controls the rate at which particles in the rest pose are deformed for particles passing the deformation threshold. </td></tr>
-<tr><td class="fieldtype">
<a class="anchor" id="a55bf1f547086b8e469f2c3b20c9ae39d"></a>float</td>
<td class="fieldname">
collisionDistance</td>
@@ -895,8 +918,20 @@ Direct3D device to use for simulation, if none is specified a new device and con
<td class="fieldname">
renderContext</td>
<td class="fielddoc">
+Direct3D context that the app is using for rendering. In DirectX 12 this should be a ID3D12CommandQueue pointer. </td></tr>
+<tr><td class="fieldtype">
+<a class="anchor" id="ad1d0256dac295346120fda40f6eea7e2"></a>void *</td>
+<td class="fieldname">
+computeContext</td>
+<td class="fielddoc">
Direct3D context to use for simulation, if none is specified a new context will be created, in DirectX 12 this should be a pointer to the ID3D12CommandQueue where compute operations will take place. </td></tr>
<tr><td class="fieldtype">
+<a class="anchor" id="a77687a448947946483c73f7cc94932c6"></a>bool</td>
+<td class="fieldname">
+useComputeQueue</td>
+<td class="fielddoc">
+If true, run Flex on a D3D12 compute queue, or vendor specific D3D11 compute queue. This allows compute and graphics to run in parallel on some GPUs. </td></tr>
+<tr><td class="fieldtype">
<a class="anchor" id="aeeeaf91dad0804d1dd3125e592a3260b"></a><a class="el" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252">NvFlexComputeType</a></td>
<td class="fieldname">
computeType</td>
@@ -906,6 +941,80 @@ Set to eNvFlexD3D11 if DirectX 11 should be used, eNvFlexD3D12 for DirectX 12, t
</div>
</div>
+<a name="struct_nv_flex_solver_desc" id="struct_nv_flex_solver_desc"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">struct NvFlexSolverDesc</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<div class="textblock"><p>Describes the creation time parameters for the solver </p>
+</div><table class="fieldtable">
+<tr><th colspan="3">Data Fields</th></tr>
+<tr><td class="fieldtype">
+<a class="anchor" id="a0999d825c8760e19ba4c980d2eb097ac"></a><a class="el" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560">NvFlexFeatureMode</a></td>
+<td class="fieldname">
+featureMode</td>
+<td class="fielddoc">
+Control which features are enabled. </td></tr>
+<tr><td class="fieldtype">
+<a class="anchor" id="aedf73c7aa1f4df92c7724d58f4dcb266"></a>int</td>
+<td class="fieldname">
+maxParticles</td>
+<td class="fielddoc">
+Maximum number of regular particles in the solver. </td></tr>
+<tr><td class="fieldtype">
+<a class="anchor" id="a39ab69ac3fbde631b71f59f5bbbf1bdf"></a>int</td>
+<td class="fieldname">
+maxDiffuseParticles</td>
+<td class="fielddoc">
+Maximum number of diffuse particles in the solver. </td></tr>
+<tr><td class="fieldtype">
+<a class="anchor" id="a5ea0cd160a13a72924340184edfbea2f"></a>int</td>
+<td class="fieldname">
+maxNeighborsPerParticle</td>
+<td class="fielddoc">
+Maximum number of neighbors per-particle, for solids this can be around 32, for fluids up to 128 may be necessary depending on smoothing radius. </td></tr>
+</table>
+
+</div>
+</div>
+<a name="struct_nv_flex_copy_desc" id="struct_nv_flex_copy_desc"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">struct NvFlexCopyDesc</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<div class="textblock"><p>Describes a source and destination buffer region for performing a copy operation. </p>
+</div><table class="fieldtable">
+<tr><th colspan="3">Data Fields</th></tr>
+<tr><td class="fieldtype">
+<a class="anchor" id="ae01bc8c45cf48f5faed2a8e78df1c678"></a>int</td>
+<td class="fieldname">
+srcOffset</td>
+<td class="fielddoc">
+</td></tr>
+<tr><td class="fieldtype">
+<a class="anchor" id="aa544809448a95c3864e1443c7a507d7f"></a>int</td>
+<td class="fieldname">
+dstOffset</td>
+<td class="fielddoc">
+</td></tr>
+<tr><td class="fieldtype">
+<a class="anchor" id="af842f041f92c608b3ebfa2092caea889"></a>int</td>
+<td class="fieldname">
+elementCount</td>
+<td class="fielddoc">
+</td></tr>
+</table>
+
+</div>
+</div>
<a name="struct_nv_flex_sphere_geometry" id="struct_nv_flex_sphere_geometry"></a>
<div class="memitem">
<div class="memproto">
@@ -1252,9 +1361,6 @@ time</td>
<tr><td class="fieldname"><a class="anchor" id="a6541b33eaca7b2323e73b30cea34d16ca1bd450ab65ccc06288fae95e23d5e6f1"></a>eNvFlexMapDoNotWait&#160;</td><td class="fielddoc">
<p>Calling thread will check if buffer is ready for access, if not ready then the method will return NULL immediately. </p>
</td></tr>
-<tr><td class="fieldname"><a class="anchor" id="a6541b33eaca7b2323e73b30cea34d16caa01c2dce3aa1e0d9d151060e1786c706"></a>eNvFlexMapDiscard&#160;</td><td class="fielddoc">
-<p>Buffer contents will be discarded, this allows for efficent buffer reuse. </p>
-</td></tr>
</table>
</div>
@@ -1271,10 +1377,10 @@ time</td>
<p>Controls memory space of a NvFlexBuffer, see <a class="el" href="_nv_flex_8h.html#ad48f83b8442323687d2268206e913496">NvFlexAllocBuffer()</a> </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8"></a>eNvFlexBufferHost&#160;</td><td class="fielddoc">
-<p>Host mappable buffer, pinned memory on CUDA, staging buffer on DX. </p>
+<p>A host mappable buffer, pinned memory on CUDA, staging buffer on DX. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a169e4c126acf46bdebf76c36a44deca3a103255fa795b55a7f430a41493002576"></a>eNvFlexBufferDevice&#160;</td><td class="fielddoc">
-<p>Device memory buffer, mapping this on CUDA will return a device memory pointer, and will return a buffer pointer on DX. </p>
+<p>A device memory buffer, mapping this on CUDA will return a device memory pointer, and will return a buffer pointer on DX. </p>
</td></tr>
</table>
@@ -1310,20 +1416,53 @@ time</td>
</tr>
</table>
</div><div class="memdoc">
-<p>Flags that control the a particle's behavior and grouping, use <a class="el" href="_nv_flex_8h.html#af53fa9d7caef50db346475065504848d">NvFlexMakePhase()</a> to construct a valid 32bit phase identifier </p>
+<p>Flags that control a particle's behavior and grouping, use <a class="el" href="_nv_flex_8h.html#ab43db5f28808f8038cfc9330d4b47d57">NvFlexMakePhase()</a> to construct a valid 32bit phase identifier </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a5ad2a7745fcb4d4afd5b5f1bda074644ad108f6ebf28346813cfd3602d984bb32"></a>eNvFlexPhaseGroupMask&#160;</td><td class="fielddoc">
-<p>Low 24 bits represent the particle group for controlling collisions. </p>
+<p>Bits [ 0, 19] represent the particle group for controlling collisions. </p>
+</td></tr>
+<tr><td class="fieldname"><a class="anchor" id="a5ad2a7745fcb4d4afd5b5f1bda074644a7b776084468bae4e3566484cf34d0154"></a>eNvFlexPhaseFlagsMask&#160;</td><td class="fielddoc">
+<p>Bits [20, 23] hold flags about how the particle behave. </p>
+</td></tr>
+<tr><td class="fieldname"><a class="anchor" id="a5ad2a7745fcb4d4afd5b5f1bda074644ae4ea43366942f719f40e8526ad21a038"></a>eNvFlexPhaseShapeChannelMask&#160;</td><td class="fielddoc">
+<p>Bits [24, 31] hold flags representing what shape collision channels particles will collide with, see <a class="el" href="_nv_flex_8h.html#ad6ee1e23e0c49aad63df8f605182de3a">NvFlexMakeShapeFlags()</a> </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a5ad2a7745fcb4d4afd5b5f1bda074644a453a23cc8e9d2e6097b5be187f3c6977"></a>eNvFlexPhaseSelfCollide&#160;</td><td class="fielddoc">
<p>If set this particle will interact with particles of the same group. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a5ad2a7745fcb4d4afd5b5f1bda074644a76a62d3a5df428f18e01f8b37573a7b1"></a>eNvFlexPhaseSelfCollideFilter&#160;</td><td class="fielddoc">
-<p>If set this particle will ignore collisions with particles closer than the radius in the rest pose, this flag should not be specified unless valid rest positions have been specified using <a class="el" href="_nv_flex_8h.html#aa457096286567a37d4f1d5f4857d9296">NvFlexSetRestParticles()</a> </p>
+<p>If set this particle will ignore collisions with particles closer than the radius in the rest pose, this flag should not be specified unless valid rest positions have been specified using <a class="el" href="_nv_flex_8h.html#a125cfd9817437bb4f4bcb9418efa3dda">NvFlexSetRestParticles()</a> </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a5ad2a7745fcb4d4afd5b5f1bda074644a1728772beb1746ace4c549b2ed8f1d74"></a>eNvFlexPhaseFluid&#160;</td><td class="fielddoc">
<p>If set this particle will generate fluid density constraints for its overlapping neighbors. </p>
</td></tr>
+<tr><td class="fieldname"><a class="anchor" id="a5ad2a7745fcb4d4afd5b5f1bda074644a52ee05f3e425c336856277774bc9f69f"></a>eNvFlexPhaseUnused&#160;</td><td class="fielddoc">
+<p>Reserved. </p>
+</td></tr>
+<tr><td class="fieldname"><a class="anchor" id="a5ad2a7745fcb4d4afd5b5f1bda074644a66aa70953a97744621e2afa41d0e32d2"></a>eNvFlexPhaseShapeChannel0&#160;</td><td class="fielddoc">
+<p>Particle will collide with shapes with channel 0 set (see <a class="el" href="_nv_flex_8h.html#ad6ee1e23e0c49aad63df8f605182de3a">NvFlexMakeShapeFlags()</a>) </p>
+</td></tr>
+<tr><td class="fieldname"><a class="anchor" id="a5ad2a7745fcb4d4afd5b5f1bda074644a1de4e956764950e501bcb8376a70f5a9"></a>eNvFlexPhaseShapeChannel1&#160;</td><td class="fielddoc">
+<p>Particle will collide with shapes with channel 1 set (see <a class="el" href="_nv_flex_8h.html#ad6ee1e23e0c49aad63df8f605182de3a">NvFlexMakeShapeFlags()</a>) </p>
+</td></tr>
+<tr><td class="fieldname"><a class="anchor" id="a5ad2a7745fcb4d4afd5b5f1bda074644aa3a4fd0d5930b31199334e500ac2d7c8"></a>eNvFlexPhaseShapeChannel2&#160;</td><td class="fielddoc">
+<p>Particle will collide with shapes with channel 2 set (see <a class="el" href="_nv_flex_8h.html#ad6ee1e23e0c49aad63df8f605182de3a">NvFlexMakeShapeFlags()</a>) </p>
+</td></tr>
+<tr><td class="fieldname"><a class="anchor" id="a5ad2a7745fcb4d4afd5b5f1bda074644ab4034dbf78d6045ee13278531ee21c2b"></a>eNvFlexPhaseShapeChannel3&#160;</td><td class="fielddoc">
+<p>Particle will collide with shapes with channel 3 set (see <a class="el" href="_nv_flex_8h.html#ad6ee1e23e0c49aad63df8f605182de3a">NvFlexMakeShapeFlags()</a>) </p>
+</td></tr>
+<tr><td class="fieldname"><a class="anchor" id="a5ad2a7745fcb4d4afd5b5f1bda074644af309316efb695be38a4e15986be21ef9"></a>eNvFlexPhaseShapeChannel4&#160;</td><td class="fielddoc">
+<p>Particle will collide with shapes with channel 4 set (see <a class="el" href="_nv_flex_8h.html#ad6ee1e23e0c49aad63df8f605182de3a">NvFlexMakeShapeFlags()</a>) </p>
+</td></tr>
+<tr><td class="fieldname"><a class="anchor" id="a5ad2a7745fcb4d4afd5b5f1bda074644a92bbb75d47ea0058a9a89deb0abec67f"></a>eNvFlexPhaseShapeChannel5&#160;</td><td class="fielddoc">
+<p>Particle will collide with shapes with channel 5 set (see <a class="el" href="_nv_flex_8h.html#ad6ee1e23e0c49aad63df8f605182de3a">NvFlexMakeShapeFlags()</a>) </p>
+</td></tr>
+<tr><td class="fieldname"><a class="anchor" id="a5ad2a7745fcb4d4afd5b5f1bda074644a0c8d08e646d2713e34d7e2dd6e7b21f2"></a>eNvFlexPhaseShapeChannel6&#160;</td><td class="fielddoc">
+<p>Particle will collide with shapes with channel 6 set (see <a class="el" href="_nv_flex_8h.html#ad6ee1e23e0c49aad63df8f605182de3a">NvFlexMakeShapeFlags()</a>) </p>
+</td></tr>
+<tr><td class="fieldname"><a class="anchor" id="a5ad2a7745fcb4d4afd5b5f1bda074644a0679f1deab7afc547900e30aae0b711a"></a>eNvFlexPhaseShapeChannel7&#160;</td><td class="fielddoc">
+<p>Particle will collide with shapes with channel 7 set (see <a class="el" href="_nv_flex_8h.html#ad6ee1e23e0c49aad63df8f605182de3a">NvFlexMakeShapeFlags()</a>) </p>
+</td></tr>
</table>
</div>
@@ -1400,7 +1539,7 @@ time</td>
</tr>
</table>
</div><div class="memdoc">
-<p>Defines the different DirectX compute modes that Flex can use </p>
+<p>Defines the different compute backends that Flex can use </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a9b2d3dc5ac42011aeec4e13be2e14252ad0c27f7aafdc4fe569722025c8eb2178"></a>eNvFlexCUDA&#160;</td><td class="fielddoc">
<p>Use CUDA compute for Flex, the application must link against the CUDA libraries. </p>
@@ -1415,6 +1554,30 @@ time</td>
</div>
</div>
+<a class="anchor" id="aee5c235d5fab40831cf339680aa25560"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">enum <a class="el" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560">NvFlexFeatureMode</a></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Controls which features are enabled, choosing a simple option will disable features and can lead to better performance and reduced memory usage </p>
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="aee5c235d5fab40831cf339680aa25560a3ab06dc4cd4aa073ab0f2d96a56c499d"></a>eNvFlexFeatureModeDefault&#160;</td><td class="fielddoc">
+<p>All features enabled. </p>
+</td></tr>
+<tr><td class="fieldname"><a class="anchor" id="aee5c235d5fab40831cf339680aa25560a421fe1e1bb00fc41e9b32208cd9155f5"></a>eNvFlexFeatureModeSimpleSolids&#160;</td><td class="fielddoc">
+<p>Simple per-particle collision (no per-particle SDF normals, no fluids) </p>
+</td></tr>
+<tr><td class="fieldname"><a class="anchor" id="aee5c235d5fab40831cf339680aa25560aeab2b8a68b528d46e11b71ad0f4d83f2"></a>eNvFlexFeatureModeSimpleFluids&#160;</td><td class="fielddoc">
+<p>Simple single phase fluid-only particles (no solids) </p>
+</td></tr>
+</table>
+
+</div>
+</div>
<a class="anchor" id="a0506ae712f846087b8647ea389ac26ba"></a>
<div class="memitem">
<div class="memproto">
@@ -1458,7 +1621,7 @@ time</td>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a31c31ea4f96cd4fdadc6b7317691304cae8a10737948abf6973f0f1d66bae7ef8"></a>eNvFlexShapeFlagTypeMask&#160;</td><td class="fielddoc">
-<p>Lower 3 bits holds the type of the collision shape. </p>
+<p>Lower 3 bits holds the type of the collision shape given by the NvFlexCollisionShapeType enum. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a31c31ea4f96cd4fdadc6b7317691304cadc6740cf6d829fba159d92e43ffb5992"></a>eNvFlexShapeFlagDynamic&#160;</td><td class="fielddoc">
<p>Indicates the shape is dynamic and should have lower priority over static collision shapes. </p>
@@ -1473,7 +1636,56 @@ time</td>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
-<a class="anchor" id="af53fa9d7caef50db346475065504848d"></a>
+<a class="anchor" id="a615e8070212c24a70e7a849120c13353"></a>
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">NV_FLEX_API int NvFlexMakePhaseWithChannels </td>
+ <td>(</td>
+ <td class="paramtype">int&#160;</td>
+ <td class="paramname"><em>group</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&#160;</td>
+ <td class="paramname"><em>particleFlags</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&#160;</td>
+ <td class="paramname"><em>shapeChannels</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">inline</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+<p>Generate a bit set for the particle phase, this is a helper method to simply combine the group id and bit flags into a single integer.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[in]</td><td class="paramname">group</td><td>The index of the group for this particle, should be an integer &lt; 2^20 </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">particleFlags</td><td>A combination of the phase flags which should be a combination of eNvFlexPhaseSelfCollide, eNvFlexPhaseSelfCollideFilter, and eNvFlexPhaseFluid </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">shapeChannels</td><td>A combination of eNvFlexPhaseShapeChannel* flags that control which shapes will be collided against, particles will only collide against shapes that share at least one set channel, see <a class="el" href="_nv_flex_8h.html#ad83b7fb561a91467a3094771bb682b96">NvFlexMakeShapeFlagsWithChannels()</a> </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="ab43db5f28808f8038cfc9330d4b47d57"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
@@ -1490,7 +1702,7 @@ time</td>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
- <td class="paramname"><em>flags</em>&#160;</td>
+ <td class="paramname"><em>particleFlags</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -1504,7 +1716,7 @@ time</td>
</tr>
</table>
</div><div class="memdoc">
-<p>Generate a bit set for the particle phase, the group should be an integer &lt; 2^24, and the flags should be a combination of FlexPhase enum values </p>
+<p>Deprecated helper method to generates a phase with all shape channels set </p>
</div>
</div>
@@ -1589,33 +1801,43 @@ time</td>
</div>
</div>
-<a class="anchor" id="af7f91fa47c779fcd8bee60061de6d31c"></a>
+<a class="anchor" id="a69a33d464c002a8916a5925c6ef32ae6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname">NV_FLEX_API <a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* NvFlexCreateSolver </td>
+ <td class="memname">NV_FLEX_API void NvFlexSetSolverDescDefaults </td>
<td>(</td>
- <td class="paramtype"><a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *&#160;</td>
- <td class="paramname"><em>lib</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#struct_nv_flex_solver_desc">NvFlexSolverDesc</a> *&#160;</td>
+ <td class="paramname"><em>desc</em></td><td>)</td>
<td></td>
- <td class="paramtype">int&#160;</td>
- <td class="paramname"><em>maxParticles</em>, </td>
</tr>
+ </table>
+</div><div class="memdoc">
+<p>Initialize the solver desc to its default values </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[in]</td><td class="paramname">desc</td><td>Pointer to a description structure that will be initialized to default values </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="a9e925acbc34675dfe247da017cbd855f"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
<tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int&#160;</td>
- <td class="paramname"><em>maxDiffuseParticles</em>, </td>
+ <td class="memname">NV_FLEX_API <a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* NvFlexCreateSolver </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *&#160;</td>
+ <td class="paramname"><em>lib</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">int&#160;</td>
- <td class="paramname"><em>maxNeighborsPerParticle</em> = <code>96</code>&#160;</td>
+ <td class="paramtype">const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_solver_desc">NvFlexSolverDesc</a> *&#160;</td>
+ <td class="paramname"><em>desc</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -1628,9 +1850,7 @@ time</td>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lib</td><td>The library instance to use </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">maxParticles</td><td>Maximum number of simulation particles possible for this solver </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">maxDiffuseParticles</td><td>Maximum number of diffuse (non-simulation) particles possible for this solver </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">maxNeighborsPerParticle</td><td>Maximum number of neighbors per particle possible for this solver </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">desc</td><td>Pointer to a solver description structure used to create the solver </td></tr>
</table>
</dd>
</dl>
@@ -1653,7 +1873,7 @@ time</td>
<p>Delete a particle solver</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
- <tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver pointer created from <a class="el" href="_nv_flex_8h.html#af7f91fa47c779fcd8bee60061de6d31c">NvFlexCreateSolver()</a> </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver pointer created from <a class="el" href="_nv_flex_8h.html#a9e925acbc34675dfe247da017cbd855f">NvFlexCreateSolver()</a> </td></tr>
</table>
</dd>
</dl>
@@ -1676,7 +1896,7 @@ time</td>
<p>Return the library associated with a solver</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
- <tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver created with <a class="el" href="_nv_flex_8h.html#af7f91fa47c779fcd8bee60061de6d31c">NvFlexCreateSolver()</a> </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver created with <a class="el" href="_nv_flex_8h.html#a9e925acbc34675dfe247da017cbd855f">NvFlexCreateSolver()</a> </td></tr>
</table>
</dd>
</dl>
@@ -1684,6 +1904,40 @@ time</td>
</div>
</div>
+<a class="anchor" id="afd6aff58269d6c359df2453c96397840"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">NV_FLEX_API void NvFlexGetSolverDesc </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *&#160;</td>
+ <td class="paramname"><em>solver</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#struct_nv_flex_solver_desc">NvFlexSolverDesc</a> *&#160;</td>
+ <td class="paramname"><em>desc</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Return the solver desc that was used to create a solver</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>Pointer to a valid Flex solver </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">desc</td><td>Pointer to a desc structure </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
<a class="anchor" id="ac5427457488ab3f2de91cf65335dda08"></a>
<div class="memitem">
<div class="memproto">
@@ -1763,7 +2017,7 @@ time</td>
</div><div class="memdoc">
<p>Integrate particle solver forward in time. Below is an example of how to step Flex in the context of a simple game loop:</p>
<div class="fragment"><div class="line"><a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* library = <a class="code" href="_nv_flex_8h.html#a687e5ec141948f779faa9183b68cb743">NvFlexInit</a>();</div>
-<div class="line"><a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver = <a class="code" href="_nv_flex_8h.html#af7f91fa47c779fcd8bee60061de6d31c">NvFlexCreateSolver</a>(library);</div>
+<div class="line"><a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver = <a class="code" href="_nv_flex_8h.html#a9e925acbc34675dfe247da017cbd855f">NvFlexCreateSolver</a>(library);</div>
<div class="line"></div>
<div class="line"><a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* particleBuffer = <a class="code" href="_nv_flex_8h.html#ad48f83b8442323687d2268206e913496">NvFlexAllocBuffer</a>(library, n, <span class="keyword">sizeof</span>(Vec4), <a class="code" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8">eNvFlexBufferHost</a>);</div>
<div class="line"><a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* velocityBuffer = <a class="code" href="_nv_flex_8h.html#ad48f83b8442323687d2268206e913496">NvFlexAllocBuffer</a>(library, n, <span class="keyword">sizeof</span>(Vec4), <a class="code" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8">eNvFlexBufferHost</a>);</div>
@@ -1788,17 +2042,17 @@ time</td>
<div class="line"> <a class="code" href="_nv_flex_8h.html#a054cb27646a389ea257d1bbde46a6e97">NvFlexUnmap</a>(phaseBuffer);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// write to device (async)</span></div>
-<div class="line"> <a class="code" href="_nv_flex_8h.html#abef057ac89ba5cf1cd71f0084f9313de">NvFlexSetParticles</a>(particleBuffer, n);</div>
-<div class="line"> <a class="code" href="_nv_flex_8h.html#afe09e63d22c5156fe24cd2d2bc069c04">NvFlexSetVelocities</a>(velocityBuffer, n);</div>
-<div class="line"> <a class="code" href="_nv_flex_8h.html#a3117f92571613709936291c48414e521">NvFlexSetPhases</a>(phaseBuffer, n);</div>
+<div class="line"> <a class="code" href="_nv_flex_8h.html#a7ec5ebe3e98a44a2058d6be74b2cb633">NvFlexSetParticles</a>(particleBuffer, n);</div>
+<div class="line"> <a class="code" href="_nv_flex_8h.html#ae2b271f123db0054512936f2acc6467f">NvFlexSetVelocities</a>(velocityBuffer, n);</div>
+<div class="line"> <a class="code" href="_nv_flex_8h.html#aa1d44495e442f8cae874c635ef847478">NvFlexSetPhases</a>(phaseBuffer, n);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// tick</span></div>
<div class="line"> <a class="code" href="_nv_flex_8h.html#ac75370f005fd453fe8a324fe62be1b5c">NvFlexUpdateSolver</a>(solver, dt, 1, NULL);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// read back (async)</span></div>
-<div class="line"> <a class="code" href="_nv_flex_8h.html#a84f06fff995d8eb034cff81c811fa312">NvFlexGetParticles</a>(particleBuffer, n);</div>
-<div class="line"> <a class="code" href="_nv_flex_8h.html#a67bd9669086e823ebe33d08d14f5b2b9">NvFlexGetVelocities</a>(velocityBuffer, n);</div>
-<div class="line"> <a class="code" href="_nv_flex_8h.html#a15b7a5449bee38bbe5dcaf23690f09f5">NvFlexGetPhases</a>(phaseBuffer, n);</div>
+<div class="line"> <a class="code" href="_nv_flex_8h.html#aaff62cfd50431d82af5d04a6c9ac4ffd">NvFlexGetParticles</a>(particleBuffer, n);</div>
+<div class="line"> <a class="code" href="_nv_flex_8h.html#afbcbff4e4865105514c194398ab3a7b0">NvFlexGetVelocities</a>(velocityBuffer, n);</div>
+<div class="line"> <a class="code" href="_nv_flex_8h.html#accc944f0e76ee2e5d67c3f977b150806">NvFlexGetPhases</a>(phaseBuffer, n);</div>
<div class="line">}</div>
<div class="line"></div>
<div class="line"><a class="code" href="_nv_flex_8h.html#ab559759820a4322aff061745ef26c867">NvFlexFreeBuffer</a>(particleBuffer);</div>
@@ -1887,7 +2141,7 @@ time</td>
</div>
</div>
-<a class="anchor" id="aea2af336bdd96d7168c3acdce6d1875d"></a>
+<a class="anchor" id="adc0c97635cdbb3da7b571574a3b38990"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -1906,8 +2160,8 @@ time</td>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">int&#160;</td>
- <td class="paramname"><em>n</em>&#160;</td>
+ <td class="paramtype">const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *&#160;</td>
+ <td class="paramname"><em>desc</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -1921,14 +2175,14 @@ time</td>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">indices</td><td>Holds the indices of particles that have been made active </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Number of particles to allocate </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">desc</td><td>Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
-<a class="anchor" id="aeed8fe87fa073067af1a45560cc54a79"></a>
+<a class="anchor" id="a1bd4b70e0118abe18ca5fe85157299b6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -1942,7 +2196,13 @@ time</td>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *&#160;</td>
- <td class="paramname"><em>indices</em>&#160;</td>
+ <td class="paramname"><em>indices</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *&#160;</td>
+ <td class="paramname"><em>desc</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -1956,6 +2216,41 @@ time</td>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">indices</td><td>a buffer of indices at least activeCount in length </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">desc</td><td>Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length) </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="a677dc591fe443ae058701966c52d1316"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">NV_FLEX_API void NvFlexSetActiveCount </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *&#160;</td>
+ <td class="paramname"><em>solver</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&#160;</td>
+ <td class="paramname"><em>n</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Set the total number of active particles</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>The number of active particles, the first n indices in the active particles array will be used as the active count </td></tr>
</table>
</dd>
</dl>
@@ -1986,7 +2281,7 @@ time</td>
</div>
</div>
-<a class="anchor" id="abef057ac89ba5cf1cd71f0084f9313de"></a>
+<a class="anchor" id="a7ec5ebe3e98a44a2058d6be74b2cb633"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -2005,8 +2300,8 @@ time</td>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">int&#160;</td>
- <td class="paramname"><em>n</em>&#160;</td>
+ <td class="paramtype">const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *&#160;</td>
+ <td class="paramname"><em>desc</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -2020,14 +2315,14 @@ time</td>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">p</td><td>Pointer to a buffer of particle data, should be 4*n in length </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>The number of particles to set </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">desc</td><td>Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
-<a class="anchor" id="a84f06fff995d8eb034cff81c811fa312"></a>
+<a class="anchor" id="aaff62cfd50431d82af5d04a6c9ac4ffd"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -2046,8 +2341,8 @@ time</td>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">int&#160;</td>
- <td class="paramname"><em>n</em>&#160;</td>
+ <td class="paramtype">const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *&#160;</td>
+ <td class="paramname"><em>desc</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -2061,14 +2356,14 @@ time</td>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">p</td><td>Pointer to a buffer of 4*n floats that will be filled out with the particle data, can be either a host or device pointer </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>The number of particles to get, must be less than max particles passed to NvFlexCreateSolver </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">desc</td><td>Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
-<a class="anchor" id="aa457096286567a37d4f1d5f4857d9296"></a>
+<a class="anchor" id="a125cfd9817437bb4f4bcb9418efa3dda"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -2087,8 +2382,8 @@ time</td>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">int&#160;</td>
- <td class="paramname"><em>n</em>&#160;</td>
+ <td class="paramtype">const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *&#160;</td>
+ <td class="paramname"><em>desc</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -2102,14 +2397,14 @@ time</td>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">p</td><td>Pointer to a buffer of particle data, should be 4*n in length </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>The number of particles to set </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">desc</td><td>Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
-<a class="anchor" id="affb884bcf3e7e389812d0b52b0fc0490"></a>
+<a class="anchor" id="aafc89f87307602fb9bfa8f6668122121"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -2128,8 +2423,8 @@ time</td>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">int&#160;</td>
- <td class="paramname"><em>n</em>&#160;</td>
+ <td class="paramtype">const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *&#160;</td>
+ <td class="paramname"><em>desc</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -2143,14 +2438,14 @@ time</td>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">p</td><td>Pointer to a buffer of particle data, should be 4*n in length </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>The number of particles to set </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">desc</td><td>Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
-<a class="anchor" id="abfa62e01c4f4511d3f6a00ab6a0f257a"></a>
+<a class="anchor" id="a96a771dd328d019e6164e5f23d29ffcb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -2169,8 +2464,8 @@ time</td>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">int&#160;</td>
- <td class="paramname"><em>n</em>&#160;</td>
+ <td class="paramtype">const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *&#160;</td>
+ <td class="paramname"><em>desc</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -2184,14 +2479,14 @@ time</td>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">p</td><td>Pointer to a buffer of 4*n floats that will be filled out with the data, can be either a host or device pointer </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>The number of smooth particles to return </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">desc</td><td>Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
-<a class="anchor" id="afe09e63d22c5156fe24cd2d2bc069c04"></a>
+<a class="anchor" id="ae2b271f123db0054512936f2acc6467f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -2210,8 +2505,8 @@ time</td>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">int&#160;</td>
- <td class="paramname"><em>n</em>&#160;</td>
+ <td class="paramtype">const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *&#160;</td>
+ <td class="paramname"><em>desc</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -2225,14 +2520,14 @@ time</td>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>Pointer to a buffer of 3*n floats </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>The number of velocities to set </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">desc</td><td>Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
-<a class="anchor" id="a67bd9669086e823ebe33d08d14f5b2b9"></a>
+<a class="anchor" id="afbcbff4e4865105514c194398ab3a7b0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -2251,8 +2546,8 @@ time</td>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">int&#160;</td>
- <td class="paramname"><em>n</em>&#160;</td>
+ <td class="paramtype">const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *&#160;</td>
+ <td class="paramname"><em>desc</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -2266,14 +2561,14 @@ time</td>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">v</td><td>Pointer to a buffer of 3*n floats that will be filled out with the data, can be either a host or device pointer </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>The number of velocities to get </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">desc</td><td>Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
-<a class="anchor" id="a3117f92571613709936291c48414e521"></a>
+<a class="anchor" id="aa1d44495e442f8cae874c635ef847478"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -2292,8 +2587,8 @@ time</td>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">int&#160;</td>
- <td class="paramname"><em>n</em>&#160;</td>
+ <td class="paramtype">const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *&#160;</td>
+ <td class="paramname"><em>desc</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -2309,14 +2604,14 @@ time</td>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">phases</td><td>Pointer to a buffer of n integers containing the phases </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>The number of phases to set </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">desc</td><td>Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
-<a class="anchor" id="a15b7a5449bee38bbe5dcaf23690f09f5"></a>
+<a class="anchor" id="accc944f0e76ee2e5d67c3f977b150806"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -2335,8 +2630,8 @@ time</td>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">int&#160;</td>
- <td class="paramname"><em>n</em>&#160;</td>
+ <td class="paramtype">const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *&#160;</td>
+ <td class="paramname"><em>desc</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -2350,14 +2645,14 @@ time</td>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">phases</td><td>Pointer to a buffer of n integers that will be filled with the phase data, can be either a host or device pointer </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>The number of phases to get </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">desc</td><td>Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
-<a class="anchor" id="add03fd357383845f07e0596290faf316"></a>
+<a class="anchor" id="a32e8fdb39029a2564c129bd493c52058"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -2376,8 +2671,8 @@ time</td>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">int&#160;</td>
- <td class="paramname"><em>n</em>&#160;</td>
+ <td class="paramtype">const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *&#160;</td>
+ <td class="paramname"><em>desc</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -2391,14 +2686,14 @@ time</td>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">normals</td><td>Pointer to a buffer of normals, should be 4*n in length </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>The number of normals to set </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">desc</td><td>Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
-<a class="anchor" id="aadb2a0cf125e4a6b2f3443ab7dcbd3d4"></a>
+<a class="anchor" id="a73d87b460a34c52ff4b616e97a53ade7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -2417,8 +2712,8 @@ time</td>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">int&#160;</td>
- <td class="paramname"><em>n</em>&#160;</td>
+ <td class="paramtype">const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *&#160;</td>
+ <td class="paramname"><em>desc</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -2432,7 +2727,7 @@ time</td>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">normals</td><td>Pointer to a buffer of normals, should be 4*n in length </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>The number of normals to get </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">desc</td><td>Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length) </td></tr>
</table>
</dd>
</dl>
@@ -2549,7 +2844,7 @@ time</td>
</div>
</div>
-<a class="anchor" id="a89c872e761a53c87375f536a0ef597d8"></a>
+<a class="anchor" id="aa8b7bfeffb0fa7dc6dbd291fee87edc9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -2593,6 +2888,18 @@ time</td>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *&#160;</td>
+ <td class="paramname"><em>thresholds</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *&#160;</td>
+ <td class="paramname"><em>creeps</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *&#160;</td>
<td class="paramname"><em>rotations</em>, </td>
</tr>
<tr>
@@ -2629,6 +2936,8 @@ time</td>
<tr><td class="paramdir">[in]</td><td class="paramname">restPositions</td><td>Pointer to a buffer of local space positions relative to the rigid's center of mass (average position), this should be at least 3*numIndices in length in the format x,y,z </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">restNormals</td><td>Pointer to a buffer of local space normals, this should be at least 4*numIndices in length in the format x,y,z,w where w is the (negative) signed distance of the particle inside its shape </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">stiffness</td><td>Pointer to a buffer of rigid stiffness coefficents, should be numRigids in length, valid values in range [0, 1] </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">thresholds</td><td>Pointer to a buffer of plastic deformation threshold coefficients, should be numRigids in length </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">creeps</td><td>Pointer to a buffer of plastic deformation creep coefficients, should be numRigids in length, valid values in range [0, 1] </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rotations</td><td>Pointer to a buffer of quaternions (4*numRigids in length) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">translations</td><td>Pointer to a buffer of translations of the center of mass (3*numRigids in length) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">numRigids</td><td>The number of rigid bodies to set </td></tr>
@@ -2639,12 +2948,12 @@ time</td>
</div>
</div>
-<a class="anchor" id="a3eafe7fe6b200c757c7402eca7d13f6d"></a>
+<a class="anchor" id="ab5cc56e228374b1da0910356b3172b4e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname">NV_FLEX_API void NvFlexGetRigidTransforms </td>
+ <td class="memname">NV_FLEX_API void NvFlexGetRigids </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *&#160;</td>
<td class="paramname"><em>solver</em>, </td>
@@ -2653,6 +2962,48 @@ time</td>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *&#160;</td>
+ <td class="paramname"><em>offsets</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *&#160;</td>
+ <td class="paramname"><em>indices</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *&#160;</td>
+ <td class="paramname"><em>restPositions</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *&#160;</td>
+ <td class="paramname"><em>restNormals</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *&#160;</td>
+ <td class="paramname"><em>stiffness</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *&#160;</td>
+ <td class="paramname"><em>thresholds</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *&#160;</td>
+ <td class="paramname"><em>creeps</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *&#160;</td>
<td class="paramname"><em>rotations</em>, </td>
</tr>
<tr>
@@ -2668,12 +3019,19 @@ time</td>
</tr>
</table>
</div><div class="memdoc">
-<p>Get the rotation matrices for the rigid bodies in the solver</p>
+<p>Retrive the rigid body shape matching constraints and transforms, if any buffer pointers are NULL then they will be ignored This method supersedes the previous NvFlexGetRigidTransforms method and can be used to retrieve modified rest positions from plastic deformation.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
- <tr><td class="paramdir">[out]</td><td class="paramname">rotations</td><td>Pointer to a buffer of quaternions, should be 4*numRigids floats in length </td></tr>
- <tr><td class="paramdir">[out]</td><td class="paramname">translations</td><td>Pointer to a buffer of vectors to hold the rigid translations, should be 3*numRigids floats in length </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">offsets</td><td>Pointer to a buffer of start offsets for a rigid in the indices array, should be numRigids+1 in length, the first entry must be 0 </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">indices</td><td>Pointer to a buffer of indices for the rigid bodies, the indices for the jth rigid body start at indices[offsets[j]] and run to indices[offsets[j+1]] exclusive </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">restPositions</td><td>Pointer to a buffer of local space positions relative to the rigid's center of mass (average position), this should be at least 3*numIndices in length in the format x,y,z </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">restNormals</td><td>Pointer to a buffer of local space normals, this should be at least 4*numIndices in length in the format x,y,z,w where w is the (negative) signed distance of the particle inside its shape </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">stiffness</td><td>Pointer to a buffer of rigid stiffness coefficents, should be numRigids in length, valid values in range [0, 1] </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">thresholds</td><td>Pointer to a buffer of plastic deformation threshold coefficients, should be numRigids in length </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">creeps</td><td>Pointer to a buffer of plastic deformation creep coefficients, should be numRigids in length, valid values in range [0, 1] </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">rotations</td><td>Pointer to a buffer of quaternions (4*numRigids in length with the imaginary elements in the x,y,z components) </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">translations</td><td>Pointer to a buffer of translations of the center of mass (3*numRigids in length) </td></tr>
</table>
</dd>
</dl>
@@ -2995,7 +3353,7 @@ time</td>
</tr>
</table>
</div><div class="memdoc">
-<p>Create a convex mesh collision shapes, see NvFlexConvexMeshId for details.</p>
+<p>Create a convex mesh collision shape, see NvFlexConvexMeshId for details.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lib</td><td>The library instance to use </td></tr>
@@ -3040,7 +3398,7 @@ time</td>
</div>
</div>
-<a class="anchor" id="a69289002a6f8ecd697118f0ec6572f5d"></a>
+<a class="anchor" id="ab452c355f92dda050d4b4dafb8e71b03"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -3071,13 +3429,13 @@ time</td>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">float *&#160;</td>
+ <td class="paramtype">const float *&#160;</td>
<td class="paramname"><em>lower</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">float *&#160;</td>
+ <td class="paramtype">const float *&#160;</td>
<td class="paramname"><em>upper</em>&#160;</td>
</tr>
<tr>
@@ -3093,7 +3451,7 @@ time</td>
<tr><td class="paramdir">[in]</td><td class="paramname">lib</td><td>The library instance to use </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">convex</td><td>A valid convex mesh shape created from <a class="el" href="_nv_flex_8h.html#afbaafe2b1006352002b03aabaca531cc">NvFlexCreateConvexMesh()</a> </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">planes</td><td>An array of planes, each plane consists of 4 floats in the form a*x + b*y + c*z + d = 0 </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">numPlanes</td><td>The number of planes in the convex </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">numPlanes</td><td>The number of planes in the convex, must be less than 64 planes per-convex </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">lower</td><td>The local space lower bound of the convex shape </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">upper</td><td>The local space upper bound of the convex shape </td></tr>
</table>
@@ -3137,7 +3495,7 @@ time</td>
</tr>
</table>
</div><div class="memdoc">
-<p>Retrieve the local space bounds of the mesh, these are the same values specified to <a class="el" href="_nv_flex_8h.html#a69289002a6f8ecd697118f0ec6572f5d">NvFlexUpdateConvexMesh()</a></p>
+<p>Retrieve the local space bounds of the mesh, these are the same values specified to <a class="el" href="_nv_flex_8h.html#ab452c355f92dda050d4b4dafb8e71b03">NvFlexUpdateConvexMesh()</a></p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lib</td><td>The library instance to use </td></tr>
@@ -3150,6 +3508,55 @@ time</td>
</div>
</div>
+<a class="anchor" id="ad83b7fb561a91467a3094771bb682b96"></a>
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">NV_FLEX_API int NvFlexMakeShapeFlagsWithChannels </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26ba">NvFlexCollisionShapeType</a>&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">bool&#160;</td>
+ <td class="paramname"><em>dynamic</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&#160;</td>
+ <td class="paramname"><em>shapeChannels</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">inline</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+<p>Helper function to combine shape type, flags, and phase/shape collision channels into a 32bit value</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>The type of the shape, see NvFlexCollisionShapeType </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">dynamic</td><td>See eNvFlexShapeFlagDynamic </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">shapeChannels</td><td>A combination of the eNvFlexPhaseShapeChannel* flags, collisions will only be processed between a particle and a shape if a channel is set on both the particle and shape, see <a class="el" href="_nv_flex_8h.html#a615e8070212c24a70e7a849120c13353">NvFlexMakePhaseWithChannels()</a> </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
<a class="anchor" id="ad6ee1e23e0c49aad63df8f605182de3a"></a>
<div class="memitem">
<div class="memproto">
@@ -3181,7 +3588,7 @@ time</td>
</tr>
</table>
</div><div class="memdoc">
-<p>Combines geometry type and static/dynamic flags </p>
+<p>Deprecrated helper method that creates shape flags that by default have all collision channels enabled </p>
</div>
</div>
@@ -3426,7 +3833,7 @@ time</td>
</div>
</div>
-<a class="anchor" id="a6f6f14e625dc744a127be81e6dc4cb74"></a>
+<a class="anchor" id="a3a20cc2539983a009caaf77ec9ceab82"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -3445,8 +3852,8 @@ time</td>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">int&#160;</td>
- <td class="paramname"><em>n</em>&#160;</td>
+ <td class="paramtype">const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *&#160;</td>
+ <td class="paramname"><em>desc</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -3459,15 +3866,15 @@ time</td>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>The number of particle densities to return </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">densities</td><td>Pointer to a buffer of floats, should be maxParticles in length, density values are normalized between [0, 1] where 1 represents the rest density </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">desc</td><td>Pointer to a descriptor specifying the contents to read back </td></tr>
</table>
</dd>
</dl>
</div>
</div>
-<a class="anchor" id="ae28167c680ad56dcff600ce0a223cec5"></a>
+<a class="anchor" id="aef768edc8e4df1a78a94a6c971541550"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -3493,7 +3900,13 @@ time</td>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *&#160;</td>
- <td class="paramname"><em>q3</em>&#160;</td>
+ <td class="paramname"><em>q3</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a> *&#160;</td>
+ <td class="paramname"><em>desc</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -3510,18 +3923,19 @@ time</td>
<tr><td class="paramdir">[out]</td><td class="paramname">q1</td><td>Pointer to a buffer of floats that receive the first basis vector and scale, should be 4*maxParticles in length </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">q2</td><td>Pointer to a buffer of floats that receive the second basis vector and scale, should be 4*maxParticles in length </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">q3</td><td>Pointer to a buffer of floats that receive the third basis vector and scale, should be 4*maxParticles in length </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">desc</td><td>Pointer to a descriptor specifying the contents to read back </td></tr>
</table>
</dd>
</dl>
</div>
</div>
-<a class="anchor" id="a37ada4b95999cc253dfb049b99030d50"></a>
+<a class="anchor" id="afa458a6eec8b0d117e53c40c13788fd9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname">NV_FLEX_API int NvFlexGetDiffuseParticles </td>
+ <td class="memname">NV_FLEX_API void NvFlexGetDiffuseParticles </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *&#160;</td>
<td class="paramname"><em>solver</em>, </td>
@@ -3542,7 +3956,7 @@ time</td>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *&#160;</td>
- <td class="paramname"><em>indices</em>&#160;</td>
+ <td class="paramname"><em>count</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -3557,7 +3971,7 @@ time</td>
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">p</td><td>Pointer to a buffer of floats, should be 4*maxParticles in length, the w component represents the particles lifetime with 1 representing a new particle, and 0 representing an inactive particle </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">v</td><td>Pointer to a buffer of floats, should be 4*maxParticles in length, the w component is not used </td></tr>
- <tr><td class="paramdir">[out]</td><td class="paramname">indices</td><td>Pointer to a buffer of ints that specify particle indices in depth sorted order, should be maxParticles in length, see NvFlexParams::mDiffuseSortDir </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">count</td><td>Pointer to a buffer of a single int that holds the current particle count (this may be updated by the GPU which is why it is passed back in a buffer) </td></tr>
</table>
</dd>
</dl>
@@ -3605,7 +4019,7 @@ time</td>
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">p</td><td>Pointer to a buffer of floats, should be 4*n in length, the w component represents the particles lifetime with 1 representing a new particle, and 0 representing an inactive particle </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>Pointer to a buffer of floats, should be 4*n in length, the w component is not used </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Number of diffuse particles to set </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>The number of active diffuse particles </td></tr>
</table>
</dd>
</dl>
@@ -3657,13 +4071,90 @@ time</td>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
- <tr><td class="paramdir">[out]</td><td class="paramname">planes</td><td>Pointer to a destination buffer containing the contact planes for the particle, each particle can have up to 4 contact planes so this buffer should be 16*maxParticles in length </td></tr>
- <tr><td class="paramdir">[out]</td><td class="paramname">velocities</td><td>Pointer to a destination buffer containing the velocity of the contact point on the shape in world space, the index of the shape (corresponding to the shape in <a class="el" href="_nv_flex_8h.html#aea4e7117722df53dfe44c676496117fa">NvFlexSetShapes()</a> is stored in the w component), each particle can have up to 4 contact planes so this buffer should be 16*maxParticles in length </td></tr>
- <tr><td class="paramdir">[out]</td><td class="paramname">indices</td><td>Pointer to a buffer of indices into the contacts buffer, the first contact plane for the i'th particle is given by planes[indices[i]*sizeof(float)*4] and subsequent contacts for that particle are stored sequentially, this array should be maxParticles in length </td></tr>
- <tr><td class="paramdir">[out]</td><td class="paramname">counts</td><td>Pointer to a buffer of contact counts for each particle (will be &lt;= 4), this buffer should be maxParticles in length </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">planes</td><td>Pointer to a destination buffer containing the contact planes for the particle, each particle can have up to 6 contact planes so this buffer should be 4*6*maxParticles floats in length </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">velocities</td><td>Pointer to a destination buffer containing the velocity of the contact point on the shape in world space, the index of the shape (corresponding to the shape in <a class="el" href="_nv_flex_8h.html#aea4e7117722df53dfe44c676496117fa">NvFlexSetShapes()</a> is stored in the w component), each particle can have up to 6 contact planes so this buffer should be 4*6*maxParticles floats in length </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">indices</td><td>Pointer to a buffer of indices into the contacts buffer, the first contact plane for the i'th particle is given by planes[indices[i]*sizeof(float)*4*6] and subsequent contact planes for that particle are stored sequentially, this array should be maxParticles in length </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">counts</td><td>Pointer to a buffer of contact counts for each particle (will be &lt;= 6), this buffer should be maxParticles in length </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="ade1ef600ada4d7567e515258b289e209"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">NV_FLEX_API void NvFlexGetNeighbors </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *&#160;</td>
+ <td class="paramname"><em>solver</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *&#160;</td>
+ <td class="paramname"><em>neighbors</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *&#160;</td>
+ <td class="paramname"><em>counts</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a> *&#160;</td>
+ <td class="paramname"><em>remap</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Get the particle neighbor lists, these are stored in a strided format, and can be iterated in the following manner:</p>
+<div class="fragment"><div class="line"><a class="code" href="_nv_flex_8h.html#ade1ef600ada4d7567e515258b289e209">NvFlexGetNeighbors</a>(solver, neighborsBuffer, countsBuffer, indicesBuffer);</div>
+<div class="line"></div>
+<div class="line"><span class="keywordtype">int</span>* neighbors = (<span class="keywordtype">int</span>*)<a class="code" href="_nv_flex_8h.html#a0898bb9210440b159688d4647f6eb083">NvFlexMap</a>(neighborsBuffer, 0);</div>
+<div class="line"><span class="keywordtype">int</span>* counts = (<span class="keywordtype">int</span>*)<a class="code" href="_nv_flex_8h.html#a0898bb9210440b159688d4647f6eb083">NvFlexMap</a>(countsBuffer, 0);</div>
+<div class="line"><span class="keywordtype">int</span>* remap = (<span class="keywordtype">int</span>*)<a class="code" href="_nv_flex_8h.html#a0898bb9210440b159688d4647f6eb083">NvFlexMap</a>(remapBuffer, 0);</div>
+<div class="line"></div>
+<div class="line"><span class="comment">// neighbors are stored in a strided format so that the first neighbor</span></div>
+<div class="line"><span class="comment">// of each particle is stored sequentially, then the second, and so on</span></div>
+<div class="line"></div>
+<div class="line"><span class="keywordtype">int</span> stride = maxParticles;</div>
+<div class="line"></div>
+<div class="line"><span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i &lt; maxParticles; ++i)</div>
+<div class="line">{</div>
+<div class="line"> <span class="comment">// find offset in the neighbors buffer</span></div>
+<div class="line"> <span class="keywordtype">int</span> offset = remap[i];</div>
+<div class="line"> <span class="keywordtype">int</span> count = counts[offset];</div>
+<div class="line"></div>
+<div class="line"> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> c=0; c &lt; count; ++c)</div>
+<div class="line"> {</div>
+<div class="line"> <span class="keywordtype">int</span> neighbor = remap[neighbors[c*stride + offset]];</div>
+<div class="line"></div>
+<div class="line"> printf(<span class="stringliteral">&quot;Particle %d&#39;s neighbor %d is particle %d\n&quot;</span>, i, c, neighbor);</div>
+<div class="line"> }</div>
+<div class="line">}</div>
+<div class="line"></div>
+<div class="line"><a class="code" href="_nv_flex_8h.html#a054cb27646a389ea257d1bbde46a6e97">NvFlexUnmap</a>(neighborsBuffer);</div>
+<div class="line"><a class="code" href="_nv_flex_8h.html#a054cb27646a389ea257d1bbde46a6e97">NvFlexUnmap</a>(countsBuffer);</div>
+<div class="line"><a class="code" href="_nv_flex_8h.html#a054cb27646a389ea257d1bbde46a6e97">NvFlexUnmap</a>(remapBuffer);</div>
+</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">neighbors</td><td>Pointer to a destination buffer containing the the neighbors for all particles, this should be maxParticles*maxParticleNeighbors ints (passed to <a class="el" href="_nv_flex_8h.html#a687e5ec141948f779faa9183b68cb743">NvFlexInit()</a> in length) </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">counts</td><td>Pointer to a buffer of neighbor counts per-particle, should be maxParticles ints in length </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">remap</td><td>Pointer to a buffer of indices, because Flex internally re-orders particles these are used to map from an API particle index to it internal index</td></tr>
</table>
</dd>
</dl>
+<dl class="section note"><dt>Note</dt><dd>Neighbors are only valid after a call to <a class="el" href="_nv_flex_8h.html#ac75370f005fd453fe8a324fe62be1b5c">NvFlexUpdateSolver()</a> has completed, the returned neighbors correspond to the last substep of the last update </dd></dl>
</div>
</div>
@@ -3708,7 +4199,7 @@ time</td>
</div>
</div>
-<a class="anchor" id="a221a4621ab98eca6ecd3368d288154a4"></a>
+<a class="anchor" id="aa77d2a4edd4ccd79c9389854dca80613"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -3716,14 +4207,39 @@ time</td>
<td class="memname">NV_FLEX_API float NvFlexGetDeviceLatency </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a> *&#160;</td>
- <td class="paramname"><em>solver</em></td><td>)</td>
+ <td class="paramname"><em>solver</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">unsigned long long *&#160;</td>
+ <td class="paramname"><em>begin</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">unsigned long long *&#160;</td>
+ <td class="paramname"><em>end</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
<td></td>
+ <td class="paramtype">unsigned long long *&#160;</td>
+ <td class="paramname"><em>frequency</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">begin</td><td>Optional pointer to a 64 bit unsigned to receive the value of the GPU clock when Flex update began (in cycles) </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">end</td><td>Optional pointer to a 64 bit unsigned to receive the value of the GPU clock when Flex update ended (in cycles) </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">frequency</td><td>Optional pointer to a 64 bit unsigned to receive the frequency of the clock used to measure begin and end </td></tr>
</table>
</dd>
</dl>
@@ -3898,7 +4414,7 @@ time</td>
</tr>
</table>
</div><div class="memdoc">
-<p>Maps a buffer for reading and writing. When the buffer is created with NvFlexBufferType::eHost, then the returned pointer will be a host memory address that can be read/written. Mapping a buffer implicitly synchronizes with the GPU to ensure that any reads or writes from the buffer (e.g.: from the NvFlexGet*() or NvFlexSet*()) methods have completed.</p>
+<p>Maps a buffer for reading and writing. When the buffer is created with NvFlexBufferType::eHost, then the returned pointer will be a host memory address that can be read/written. Mapping a buffer implicitly synchronizes with the GPU to ensure that any reads or writes from the buffer (e.g.: from the NvFlexGet*() or NvFlexSet*() methods) have completed.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">buffer</td><td>A buffer allocated with <a class="el" href="_nv_flex_8h.html#ad48f83b8442323687d2268206e913496">NvFlexAllocBuffer()</a> </td></tr>
@@ -3980,7 +4496,7 @@ time</td>
<div class="line">...</div>
<div class="line"></div>
<div class="line"><span class="comment">// copy directly from Flex into render buffer</span></div>
-<div class="line"><a class="code" href="_nv_flex_8h.html#a84f06fff995d8eb034cff81c811fa312">NvFlexGetParticles</a>(vboBuffer, n);</div>
+<div class="line"><a class="code" href="_nv_flex_8h.html#aaff62cfd50431d82af5d04a6c9ac4ffd">NvFlexGetParticles</a>(vboBuffer, n);</div>
<div class="line"></div>
<div class="line"><span class="comment">// render</span></div>
<div class="line">...</div>
@@ -4219,10 +4735,26 @@ time</td>
</div>
</div>
+<a class="anchor" id="a615d2e6eec2486a5db815d929f9c642c"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">NV_FLEX_API void NvFlexWait </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *&#160;</td>
+ <td class="paramname"><em>lib</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+</div>
+</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
-Generated on Wed Feb 22 2017 12:18:22 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
+Generated on Fri Jun 9 2017 09:57:25 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
diff --git a/doc/_static/api/_nv_flex_8h_source.html b/doc/_static/api/_nv_flex_8h_source.html
index 434a362..c4cd011 100644
--- a/doc/_static/api/_nv_flex_8h_source.html
+++ b/doc/_static/api/_nv_flex_8h_source.html
@@ -20,7 +20,7 @@
<td id="projectlogo"><img alt="Logo" src="nvidia.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">FLEX
- &#160;<span id="projectnumber">1.1.0</span>
+ &#160;<span id="projectnumber">1.2.0</span>
</div>
</td>
</tr>
@@ -76,7 +76,7 @@
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="comment">// least 2 significant digits define minor version, eg: 10 -&gt; version 0.10</span></div>
-<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="preprocessor">#define NV_FLEX_VERSION 110</span></div>
+<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="preprocessor">#define NV_FLEX_VERSION 120</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
@@ -91,644 +91,725 @@
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;{</div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16ca11adf517d180983daec217e761acc3d6"> 69</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16ca11adf517d180983daec217e761acc3d6">eNvFlexMapWait</a> = 0, </div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16ca1bd450ab65ccc06288fae95e23d5e6f1"> 70</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16ca1bd450ab65ccc06288fae95e23d5e6f1">eNvFlexMapDoNotWait</a> = 1, </div>
-<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16caa01c2dce3aa1e0d9d151060e1786c706"> 71</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16caa01c2dce3aa1e0d9d151060e1786c706">eNvFlexMapDiscard</a> = 2 </div>
-<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;};</div>
-<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;</div>
-<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3"> 77</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3">NvFlexBufferType</a></div>
-<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;{</div>
-<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8"> 79</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8">eNvFlexBufferHost</a> = 0, </div>
-<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3a103255fa795b55a7f430a41493002576"> 80</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3a103255fa795b55a7f430a41493002576">eNvFlexBufferDevice</a> = 1, </div>
-<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;};</div>
-<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;</div>
-<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3b"> 86</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3b">NvFlexRelaxationMode</a></div>
-<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;{</div>
-<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3ba33711a4b466d606d68dee43918f819db"> 88</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3ba33711a4b466d606d68dee43918f819db">eNvFlexRelaxationGlobal</a> = 0, </div>
-<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3ba858afe9529e908c2bc8ce92da8943b7c"> 89</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3ba858afe9529e908c2bc8ce92da8943b7c">eNvFlexRelaxationLocal</a> = 1 </div>
-<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;};</div>
+<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;};</div>
+<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;</div>
+<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3"> 76</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3">NvFlexBufferType</a></div>
+<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;{</div>
+<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8"> 78</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8">eNvFlexBufferHost</a> = 0, </div>
+<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3a103255fa795b55a7f430a41493002576"> 79</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3a103255fa795b55a7f430a41493002576">eNvFlexBufferDevice</a> = 1, </div>
+<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;};</div>
+<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;</div>
+<div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3b"> 85</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3b">NvFlexRelaxationMode</a></div>
+<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;{</div>
+<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3ba33711a4b466d606d68dee43918f819db"> 87</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3ba33711a4b466d606d68dee43918f819db">eNvFlexRelaxationGlobal</a> = 0, </div>
+<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3ba858afe9529e908c2bc8ce92da8943b7c"> 88</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3ba858afe9529e908c2bc8ce92da8943b7c">eNvFlexRelaxationLocal</a> = 1 </div>
+<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;};</div>
+<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;</div>
-<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;</div>
-<div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 96</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_params">NvFlexParams</a></div>
-<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;{</div>
-<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a572c9bf93128466e27d57f225f4d0188"> 98</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#a572c9bf93128466e27d57f225f4d0188">numIterations</a>; </div>
-<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;</div>
-<div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a482a7c3b197c4df656e9509fbd04032c"> 100</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a482a7c3b197c4df656e9509fbd04032c">gravity</a>[3]; </div>
-<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aa6eddaa3a6eb35917c093dcabf69a200"> 101</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#aa6eddaa3a6eb35917c093dcabf69a200">radius</a>; </div>
-<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab7c54d6c0b3d3595780e5179bf62ebc4"> 102</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ab7c54d6c0b3d3595780e5179bf62ebc4">solidRestDistance</a>; </div>
-<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ad019ad1901bc33d43e3a60df0dfe9b09"> 103</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ad019ad1901bc33d43e3a60df0dfe9b09">fluidRestDistance</a>; </div>
-<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;</div>
-<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; <span class="comment">// common params</span></div>
-<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a27a185172ad1951d40c476ade8307068"> 106</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a27a185172ad1951d40c476ade8307068">dynamicFriction</a>; </div>
-<div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#af0a34fd0cdf686022650be9f895cbf2f"> 107</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#af0a34fd0cdf686022650be9f895cbf2f">staticFriction</a>; </div>
-<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#af7a56fc54644e7020e105f2ff41dfb60"> 108</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#af7a56fc54644e7020e105f2ff41dfb60">particleFriction</a>; </div>
-<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#afc306cb48c313ee518461d60c1014485"> 109</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#afc306cb48c313ee518461d60c1014485">restitution</a>; </div>
-<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a8114a049f5e16f7d1b960f3ac4993fdb"> 110</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a8114a049f5e16f7d1b960f3ac4993fdb">adhesion</a>; </div>
-<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a533a78227b462a268c905f9c307c4bd6"> 111</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a533a78227b462a268c905f9c307c4bd6">sleepThreshold</a>; </div>
-<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; </div>
-<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab003c023dde289dee075c49db022ccaf"> 113</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ab003c023dde289dee075c49db022ccaf">maxSpeed</a>; </div>
-<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0def9c3ceff57bbae5bcec15f6d64b36"> 114</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a0def9c3ceff57bbae5bcec15f6d64b36">maxAcceleration</a>; </div>
-<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; </div>
-<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab98a2aba477ab4d4178bf677852bf544"> 116</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ab98a2aba477ab4d4178bf677852bf544">shockPropagation</a>; </div>
-<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aeff62427426510eeb1cf5625e14ff585"> 117</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#aeff62427426510eeb1cf5625e14ff585">dissipation</a>; </div>
-<div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a6198445df7f341ec75f37e1dfb44830c"> 118</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a6198445df7f341ec75f37e1dfb44830c">damping</a>; </div>
-<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;</div>
-<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="comment">// cloth params</span></div>
-<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aafb92c4fa45ce9614cdfd349b3722c8a"> 121</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#aafb92c4fa45ce9614cdfd349b3722c8a">wind</a>[3]; </div>
-<div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a7043181449aebf540351d1d2f785cf4a"> 122</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a7043181449aebf540351d1d2f785cf4a">drag</a>; </div>
-<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#af9bb710afb22ec5ed50679aef8717777"> 123</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#af9bb710afb22ec5ed50679aef8717777">lift</a>; </div>
-<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;</div>
-<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <span class="comment">// fluid params</span></div>
-<div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a8f0ee62a14387dd5b5a4e8c6bc429140"> 126</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="_nv_flex_8h.html#a8f0ee62a14387dd5b5a4e8c6bc429140">fluid</a>; </div>
-<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a3ef4d1035530c3583bdf983c7e62b472"> 127</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a3ef4d1035530c3583bdf983c7e62b472">cohesion</a>; </div>
-<div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5628f890f4ae070e405feaf1f81a7b85"> 128</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a5628f890f4ae070e405feaf1f81a7b85">surfaceTension</a>; </div>
-<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a40f452b4edbf11b793f31286a0ae270e"> 129</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a40f452b4edbf11b793f31286a0ae270e">viscosity</a>; </div>
-<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ae763dd9bfcfa4092c0165a506e32e18b"> 130</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ae763dd9bfcfa4092c0165a506e32e18b">vorticityConfinement</a>; </div>
-<div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a608af97e77a912e959b0e825082a9cd6"> 131</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a608af97e77a912e959b0e825082a9cd6">anisotropyScale</a>; </div>
-<div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab136ae1511a39ef570c010f321eff206"> 132</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ab136ae1511a39ef570c010f321eff206">anisotropyMin</a>; </div>
-<div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5e37444b8c96e0880a428d9ea58dbf54"> 133</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a5e37444b8c96e0880a428d9ea58dbf54">anisotropyMax</a>; </div>
-<div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ac017e05107d0362d3d03a14eaadf0657"> 134</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ac017e05107d0362d3d03a14eaadf0657">smoothing</a>; </div>
-<div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a3f93fba688338576ff3258b034525dc5"> 135</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a3f93fba688338576ff3258b034525dc5">solidPressure</a>; </div>
-<div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a05f92015449662f5a2f5d5e9ecdc2c6e"> 136</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a05f92015449662f5a2f5d5e9ecdc2c6e">freeSurfaceDrag</a>; </div>
-<div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ae2e480822cc06ec249ee2557f6cc8ee1"> 137</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ae2e480822cc06ec249ee2557f6cc8ee1">buoyancy</a>; </div>
-<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;</div>
-<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <span class="comment">// diffuse params</span></div>
-<div class="line"><a name="l00140"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#acdde802d58e1558c03e449e04ae33f15"> 140</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#acdde802d58e1558c03e449e04ae33f15">diffuseThreshold</a>; </div>
-<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5be673031b100c3861fd9eb824fcf00f"> 141</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a5be673031b100c3861fd9eb824fcf00f">diffuseBuoyancy</a>; </div>
-<div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a4bf0ccff128c165560dba52afb748d7e"> 142</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a4bf0ccff128c165560dba52afb748d7e">diffuseDrag</a>; </div>
-<div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a7ade7491cd0693a6d7c5e88a99298378"> 143</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#a7ade7491cd0693a6d7c5e88a99298378">diffuseBallistic</a>; </div>
-<div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a7bed2ff24c30c76aed0923809fc16d8c"> 144</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a7bed2ff24c30c76aed0923809fc16d8c">diffuseSortAxis</a>[3]; </div>
-<div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a469950744e0b7222969762a89b992255"> 145</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a469950744e0b7222969762a89b992255">diffuseLifetime</a>; </div>
-<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;</div>
-<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="comment">// rigid params</span></div>
-<div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a3a1f5e2ba6c8cad0bc3f3eebd27415f0"> 148</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a3a1f5e2ba6c8cad0bc3f3eebd27415f0">plasticThreshold</a>; </div>
-<div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a42346069505d3bba70bcdf0a94f0615c"> 149</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a42346069505d3bba70bcdf0a94f0615c">plasticCreep</a>; </div>
-<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160;</div>
-<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <span class="comment">// collision params</span></div>
-<div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a55bf1f547086b8e469f2c3b20c9ae39d"> 152</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a55bf1f547086b8e469f2c3b20c9ae39d">collisionDistance</a>; </div>
-<div class="line"><a name="l00153"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aeecd11525503649b579ae262b671fbc8"> 153</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#aeecd11525503649b579ae262b671fbc8">particleCollisionMargin</a>; </div>
-<div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0e4cb2f91d3b7d122000d36a7d67ab81"> 154</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a0e4cb2f91d3b7d122000d36a7d67ab81">shapeCollisionMargin</a>; </div>
+<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 95</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_params">NvFlexParams</a></div>
+<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;{</div>
+<div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a572c9bf93128466e27d57f225f4d0188"> 97</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#a572c9bf93128466e27d57f225f4d0188">numIterations</a>; </div>
+<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;</div>
+<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a482a7c3b197c4df656e9509fbd04032c"> 99</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a482a7c3b197c4df656e9509fbd04032c">gravity</a>[3]; </div>
+<div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aa6eddaa3a6eb35917c093dcabf69a200"> 100</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#aa6eddaa3a6eb35917c093dcabf69a200">radius</a>; </div>
+<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab7c54d6c0b3d3595780e5179bf62ebc4"> 101</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ab7c54d6c0b3d3595780e5179bf62ebc4">solidRestDistance</a>; </div>
+<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ad019ad1901bc33d43e3a60df0dfe9b09"> 102</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ad019ad1901bc33d43e3a60df0dfe9b09">fluidRestDistance</a>; </div>
+<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;</div>
+<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <span class="comment">// common params</span></div>
+<div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a27a185172ad1951d40c476ade8307068"> 105</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a27a185172ad1951d40c476ade8307068">dynamicFriction</a>; </div>
+<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#af0a34fd0cdf686022650be9f895cbf2f"> 106</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#af0a34fd0cdf686022650be9f895cbf2f">staticFriction</a>; </div>
+<div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#af7a56fc54644e7020e105f2ff41dfb60"> 107</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#af7a56fc54644e7020e105f2ff41dfb60">particleFriction</a>; </div>
+<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#afc306cb48c313ee518461d60c1014485"> 108</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#afc306cb48c313ee518461d60c1014485">restitution</a>; </div>
+<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a8114a049f5e16f7d1b960f3ac4993fdb"> 109</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a8114a049f5e16f7d1b960f3ac4993fdb">adhesion</a>; </div>
+<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a533a78227b462a268c905f9c307c4bd6"> 110</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a533a78227b462a268c905f9c307c4bd6">sleepThreshold</a>; </div>
+<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; </div>
+<div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab003c023dde289dee075c49db022ccaf"> 112</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ab003c023dde289dee075c49db022ccaf">maxSpeed</a>; </div>
+<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0def9c3ceff57bbae5bcec15f6d64b36"> 113</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a0def9c3ceff57bbae5bcec15f6d64b36">maxAcceleration</a>; </div>
+<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; </div>
+<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab98a2aba477ab4d4178bf677852bf544"> 115</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ab98a2aba477ab4d4178bf677852bf544">shockPropagation</a>; </div>
+<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aeff62427426510eeb1cf5625e14ff585"> 116</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#aeff62427426510eeb1cf5625e14ff585">dissipation</a>; </div>
+<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a6198445df7f341ec75f37e1dfb44830c"> 117</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a6198445df7f341ec75f37e1dfb44830c">damping</a>; </div>
+<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;</div>
+<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="comment">// cloth params</span></div>
+<div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aafb92c4fa45ce9614cdfd349b3722c8a"> 120</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#aafb92c4fa45ce9614cdfd349b3722c8a">wind</a>[3]; </div>
+<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a7043181449aebf540351d1d2f785cf4a"> 121</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a7043181449aebf540351d1d2f785cf4a">drag</a>; </div>
+<div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#af9bb710afb22ec5ed50679aef8717777"> 122</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#af9bb710afb22ec5ed50679aef8717777">lift</a>; </div>
+<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;</div>
+<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="comment">// fluid params</span></div>
+<div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a3ef4d1035530c3583bdf983c7e62b472"> 125</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a3ef4d1035530c3583bdf983c7e62b472">cohesion</a>; </div>
+<div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5628f890f4ae070e405feaf1f81a7b85"> 126</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a5628f890f4ae070e405feaf1f81a7b85">surfaceTension</a>; </div>
+<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a40f452b4edbf11b793f31286a0ae270e"> 127</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a40f452b4edbf11b793f31286a0ae270e">viscosity</a>; </div>
+<div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ae763dd9bfcfa4092c0165a506e32e18b"> 128</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ae763dd9bfcfa4092c0165a506e32e18b">vorticityConfinement</a>; </div>
+<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a608af97e77a912e959b0e825082a9cd6"> 129</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a608af97e77a912e959b0e825082a9cd6">anisotropyScale</a>; </div>
+<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab136ae1511a39ef570c010f321eff206"> 130</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ab136ae1511a39ef570c010f321eff206">anisotropyMin</a>; </div>
+<div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5e37444b8c96e0880a428d9ea58dbf54"> 131</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a5e37444b8c96e0880a428d9ea58dbf54">anisotropyMax</a>; </div>
+<div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ac017e05107d0362d3d03a14eaadf0657"> 132</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ac017e05107d0362d3d03a14eaadf0657">smoothing</a>; </div>
+<div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a3f93fba688338576ff3258b034525dc5"> 133</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a3f93fba688338576ff3258b034525dc5">solidPressure</a>; </div>
+<div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a05f92015449662f5a2f5d5e9ecdc2c6e"> 134</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a05f92015449662f5a2f5d5e9ecdc2c6e">freeSurfaceDrag</a>; </div>
+<div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ae2e480822cc06ec249ee2557f6cc8ee1"> 135</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ae2e480822cc06ec249ee2557f6cc8ee1">buoyancy</a>; </div>
+<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;</div>
+<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="comment">// diffuse params</span></div>
+<div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#acdde802d58e1558c03e449e04ae33f15"> 138</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#acdde802d58e1558c03e449e04ae33f15">diffuseThreshold</a>; </div>
+<div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5be673031b100c3861fd9eb824fcf00f"> 139</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a5be673031b100c3861fd9eb824fcf00f">diffuseBuoyancy</a>; </div>
+<div class="line"><a name="l00140"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a4bf0ccff128c165560dba52afb748d7e"> 140</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a4bf0ccff128c165560dba52afb748d7e">diffuseDrag</a>; </div>
+<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a7ade7491cd0693a6d7c5e88a99298378"> 141</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#a7ade7491cd0693a6d7c5e88a99298378">diffuseBallistic</a>; </div>
+<div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a469950744e0b7222969762a89b992255"> 142</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a469950744e0b7222969762a89b992255">diffuseLifetime</a>; </div>
+<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;</div>
+<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <span class="comment">// collision params</span></div>
+<div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a55bf1f547086b8e469f2c3b20c9ae39d"> 145</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a55bf1f547086b8e469f2c3b20c9ae39d">collisionDistance</a>; </div>
+<div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aeecd11525503649b579ae262b671fbc8"> 146</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#aeecd11525503649b579ae262b671fbc8">particleCollisionMargin</a>; </div>
+<div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0e4cb2f91d3b7d122000d36a7d67ab81"> 147</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a0e4cb2f91d3b7d122000d36a7d67ab81">shapeCollisionMargin</a>; </div>
+<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160;</div>
+<div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ae54ff0cacfedd4333aa1a1f9b9291906"> 149</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ae54ff0cacfedd4333aa1a1f9b9291906">planes</a>[8][4]; </div>
+<div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab4f2eb16c8aba6371fbae51a991eaaa5"> 150</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#ab4f2eb16c8aba6371fbae51a991eaaa5">numPlanes</a>; </div>
+<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160;</div>
+<div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ac2f8dff9857a86683aa6e55c058888d7"> 152</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3b">NvFlexRelaxationMode</a> <a class="code" href="_nv_flex_8h.html#ac2f8dff9857a86683aa6e55c058888d7">relaxationMode</a>;</div>
+<div class="line"><a name="l00153"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a8a1b3c24aa73606bcd47a72473db9629"> 153</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a8a1b3c24aa73606bcd47a72473db9629">relaxationFactor</a>; </div>
+<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;};</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160;</div>
-<div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ae54ff0cacfedd4333aa1a1f9b9291906"> 156</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ae54ff0cacfedd4333aa1a1f9b9291906">planes</a>[8][4]; </div>
-<div class="line"><a name="l00157"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab4f2eb16c8aba6371fbae51a991eaaa5"> 157</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#ab4f2eb16c8aba6371fbae51a991eaaa5">numPlanes</a>; </div>
-<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;</div>
-<div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ac2f8dff9857a86683aa6e55c058888d7"> 159</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3b">NvFlexRelaxationMode</a> <a class="code" href="_nv_flex_8h.html#ac2f8dff9857a86683aa6e55c058888d7">relaxationMode</a>;</div>
-<div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a8a1b3c24aa73606bcd47a72473db9629"> 160</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a8a1b3c24aa73606bcd47a72473db9629">relaxationFactor</a>; </div>
-<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;};</div>
-<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160;</div>
-<div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644"> 166</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644">NvFlexPhase</a></div>
-<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160;{</div>
-<div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ad108f6ebf28346813cfd3602d984bb32"> 168</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ad108f6ebf28346813cfd3602d984bb32">eNvFlexPhaseGroupMask</a> = 0x00ffffff, </div>
-<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;</div>
-<div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a453a23cc8e9d2e6097b5be187f3c6977"> 170</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a453a23cc8e9d2e6097b5be187f3c6977">eNvFlexPhaseSelfCollide</a> = 1 &lt;&lt; 24, </div>
-<div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a76a62d3a5df428f18e01f8b37573a7b1"> 171</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a76a62d3a5df428f18e01f8b37573a7b1">eNvFlexPhaseSelfCollideFilter</a> = 1 &lt;&lt; 25, </div>
-<div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a1728772beb1746ace4c549b2ed8f1d74"> 172</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a1728772beb1746ace4c549b2ed8f1d74">eNvFlexPhaseFluid</a> = 1 &lt;&lt; 26, </div>
-<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160;};</div>
-<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160;</div>
-<div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#af53fa9d7caef50db346475065504848d"> 178</a></span>&#160;NV_FLEX_API <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#af53fa9d7caef50db346475065504848d">NvFlexMakePhase</a>(<span class="keywordtype">int</span> group, <span class="keywordtype">int</span> flags) { <span class="keywordflow">return</span> (group &amp; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ad108f6ebf28346813cfd3602d984bb32">eNvFlexPhaseGroupMask</a>) | flags; }</div>
-<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160;</div>
+<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;</div>
+<div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644"> 160</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644">NvFlexPhase</a></div>
+<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;{</div>
+<div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ad108f6ebf28346813cfd3602d984bb32"> 162</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ad108f6ebf28346813cfd3602d984bb32">eNvFlexPhaseGroupMask</a> = 0x000fffff, </div>
+<div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a7b776084468bae4e3566484cf34d0154"> 163</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a7b776084468bae4e3566484cf34d0154">eNvFlexPhaseFlagsMask</a> = 0x00f00000, </div>
+<div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ae4ea43366942f719f40e8526ad21a038"> 164</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ae4ea43366942f719f40e8526ad21a038">eNvFlexPhaseShapeChannelMask</a> = 0xff000000, </div>
+<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; </div>
+<div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a453a23cc8e9d2e6097b5be187f3c6977"> 166</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a453a23cc8e9d2e6097b5be187f3c6977">eNvFlexPhaseSelfCollide</a> = 1 &lt;&lt; 20, </div>
+<div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a76a62d3a5df428f18e01f8b37573a7b1"> 167</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a76a62d3a5df428f18e01f8b37573a7b1">eNvFlexPhaseSelfCollideFilter</a> = 1 &lt;&lt; 21, </div>
+<div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a1728772beb1746ace4c549b2ed8f1d74"> 168</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a1728772beb1746ace4c549b2ed8f1d74">eNvFlexPhaseFluid</a> = 1 &lt;&lt; 22, </div>
+<div class="line"><a name="l00169"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a52ee05f3e425c336856277774bc9f69f"> 169</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a52ee05f3e425c336856277774bc9f69f">eNvFlexPhaseUnused</a> = 1 &lt;&lt; 23, </div>
+<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; </div>
+<div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a66aa70953a97744621e2afa41d0e32d2"> 171</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a66aa70953a97744621e2afa41d0e32d2">eNvFlexPhaseShapeChannel0</a> = 1 &lt;&lt; 24, </div>
+<div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a1de4e956764950e501bcb8376a70f5a9"> 172</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a1de4e956764950e501bcb8376a70f5a9">eNvFlexPhaseShapeChannel1</a> = 1 &lt;&lt; 25, </div>
+<div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644aa3a4fd0d5930b31199334e500ac2d7c8"> 173</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644aa3a4fd0d5930b31199334e500ac2d7c8">eNvFlexPhaseShapeChannel2</a> = 1 &lt;&lt; 26, </div>
+<div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ab4034dbf78d6045ee13278531ee21c2b"> 174</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ab4034dbf78d6045ee13278531ee21c2b">eNvFlexPhaseShapeChannel3</a> = 1 &lt;&lt; 27, </div>
+<div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644af309316efb695be38a4e15986be21ef9"> 175</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644af309316efb695be38a4e15986be21ef9">eNvFlexPhaseShapeChannel4</a> = 1 &lt;&lt; 28, </div>
+<div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a92bbb75d47ea0058a9a89deb0abec67f"> 176</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a92bbb75d47ea0058a9a89deb0abec67f">eNvFlexPhaseShapeChannel5</a> = 1 &lt;&lt; 29, </div>
+<div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a0c8d08e646d2713e34d7e2dd6e7b21f2"> 177</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a0c8d08e646d2713e34d7e2dd6e7b21f2">eNvFlexPhaseShapeChannel6</a> = 1 &lt;&lt; 30, </div>
+<div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a0679f1deab7afc547900e30aae0b711a"> 178</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a0679f1deab7afc547900e30aae0b711a">eNvFlexPhaseShapeChannel7</a> = 1 &lt;&lt; 31, </div>
+<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160;};</div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160;</div>
-<div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 184</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_timers">NvFlexTimers</a></div>
-<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160;{</div>
-<div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aaf8baa00e709ff8fd40d114f00bee0b6"> 186</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#aaf8baa00e709ff8fd40d114f00bee0b6">predict</a>; </div>
-<div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aba34bc2bc8736e3a0cf18a7a6b56ff68"> 187</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#aba34bc2bc8736e3a0cf18a7a6b56ff68">createCellIndices</a>; </div>
-<div class="line"><a name="l00188"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ae45cb18deec2db8ff44d181e80f24695"> 188</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ae45cb18deec2db8ff44d181e80f24695">sortCellIndices</a>; </div>
-<div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a98b4df3721709c862ef5d09edcc6d4c3"> 189</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a98b4df3721709c862ef5d09edcc6d4c3">createGrid</a>; </div>
-<div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a6071050991cf71a8d9ff28ea968479af"> 190</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a6071050991cf71a8d9ff28ea968479af">reorder</a>; </div>
-<div class="line"><a name="l00191"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ac1f3c3a1eeeb57cf5b20d030a788e25c"> 191</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ac1f3c3a1eeeb57cf5b20d030a788e25c">collideParticles</a>; </div>
-<div class="line"><a name="l00192"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ae4203fb9cf4772c3186f96cc2d9f6ea8"> 192</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ae4203fb9cf4772c3186f96cc2d9f6ea8">collideShapes</a>; </div>
-<div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#afc20d27121f49b61be9cc6bd4c25f547"> 193</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#afc20d27121f49b61be9cc6bd4c25f547">collideTriangles</a>; </div>
-<div class="line"><a name="l00194"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aaa36ba5ee44e34e762167fb0b8b3292e"> 194</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#aaa36ba5ee44e34e762167fb0b8b3292e">collideFields</a>; </div>
-<div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a49f7117a457a716e7790904209f68707"> 195</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a49f7117a457a716e7790904209f68707">calculateDensity</a>; </div>
-<div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#abe52b62e7af361f387d67414b9e2cf9b"> 196</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#abe52b62e7af361f387d67414b9e2cf9b">solveDensities</a>; </div>
-<div class="line"><a name="l00197"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a4d10188e917ae045e0e903f3db1c638d"> 197</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a4d10188e917ae045e0e903f3db1c638d">solveVelocities</a>; </div>
-<div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#abdd60b0a83674283d09b4897fdd637a2"> 198</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#abdd60b0a83674283d09b4897fdd637a2">solveShapes</a>; </div>
-<div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a57e4d27b0aa8774e479fa66d65079f78"> 199</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a57e4d27b0aa8774e479fa66d65079f78">solveSprings</a>; </div>
-<div class="line"><a name="l00200"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a215e06106ec0cdbbcd405055a4535d1d"> 200</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a215e06106ec0cdbbcd405055a4535d1d">solveContacts</a>; </div>
-<div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a75eade1512d023cb19da5b7ebbad10f3"> 201</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a75eade1512d023cb19da5b7ebbad10f3">solveInflatables</a>; </div>
-<div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#afc5d58e7f591213c3fe1c31b4d440eb6"> 202</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#afc5d58e7f591213c3fe1c31b4d440eb6">applyDeltas</a>; </div>
-<div class="line"><a name="l00203"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#af9b72d2909ef335b12a46cdbd4b71f57"> 203</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#af9b72d2909ef335b12a46cdbd4b71f57">calculateAnisotropy</a>; </div>
-<div class="line"><a name="l00204"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a2ff723870a6eba26d9f3bb7e5250b27f"> 204</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a2ff723870a6eba26d9f3bb7e5250b27f">updateDiffuse</a>; </div>
-<div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a8cb34cbcf9def6817d6d5d3c07177052"> 205</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a8cb34cbcf9def6817d6d5d3c07177052">updateTriangles</a>; </div>
-<div class="line"><a name="l00206"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a1a1e69f26e02e8b3fca1d3636a7f3f13"> 206</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a1a1e69f26e02e8b3fca1d3636a7f3f13">updateNormals</a>; </div>
-<div class="line"><a name="l00207"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a9d825db54bc9a0bca998b3654db3b20e"> 207</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a9d825db54bc9a0bca998b3654db3b20e">finalize</a>; </div>
-<div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a2f85189cbc3014b73164cf8c4eb87e0a"> 208</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a2f85189cbc3014b73164cf8c4eb87e0a">updateBounds</a>; </div>
-<div class="line"><a name="l00209"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a3c4d2aa395ff8d0f70a6380448943be2"> 209</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a3c4d2aa395ff8d0f70a6380448943be2">total</a>; </div>
-<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160;};</div>
-<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160;</div>
-<div class="line"><a name="l00215"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfca"> 215</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfca">NvFlexErrorSeverity</a></div>
-<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160;{</div>
-<div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa8aed6496f033604148138299fa075edd"> 217</a></span>&#160; <a class="code" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa8aed6496f033604148138299fa075edd">eNvFlexLogError</a> = 0, </div>
-<div class="line"><a name="l00218"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa03d239332ae87f46270855dd06b6e58f"> 218</a></span>&#160; <a class="code" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa03d239332ae87f46270855dd06b6e58f">eNvFlexLogInfo</a> = 1, </div>
-<div class="line"><a name="l00219"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa5538835c4767004ba5fd443ada08ea61"> 219</a></span>&#160; <a class="code" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa5538835c4767004ba5fd443ada08ea61">eNvFlexLogWarning</a> = 2, </div>
-<div class="line"><a name="l00220"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa77b51759e33d60b2caf327bb4835351e"> 220</a></span>&#160; <a class="code" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa77b51759e33d60b2caf327bb4835351e">eNvFlexLogDebug</a> = 4, </div>
-<div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa8feff72c0b0391e8adf3ddb6c39ef10e"> 221</a></span>&#160; <a class="code" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa8feff72c0b0391e8adf3ddb6c39ef10e">eNvFlexLogAll</a> = -1, </div>
-<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160;};</div>
-<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160;</div>
-<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; </div>
-<div class="line"><a name="l00227"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9"> 227</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9">NvFlexSolverCallbackStage</a></div>
-<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160;{</div>
-<div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a9f3914fdb03915a14ebe55a2c730e7ff"> 229</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a9f3914fdb03915a14ebe55a2c730e7ff">eNvFlexStageIterationStart</a>, </div>
-<div class="line"><a name="l00230"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9ab75a912c3990b0fbd6b06a6741a20e69"> 230</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9ab75a912c3990b0fbd6b06a6741a20e69">eNvFlexStageIterationEnd</a>, </div>
-<div class="line"><a name="l00231"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a79ce9005dbc92198a1f180c6afde6a44"> 231</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a79ce9005dbc92198a1f180c6afde6a44">eNvFlexStageSubstepBegin</a>, </div>
-<div class="line"><a name="l00232"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a6f13e2ebdbf21f8c8ebcfe1ac9160586"> 232</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a6f13e2ebdbf21f8c8ebcfe1ac9160586">eNvFlexStageSubstepEnd</a>, </div>
-<div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a260340ba9071892bd8795c3b29289806"> 233</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a260340ba9071892bd8795c3b29289806">eNvFlexStageUpdateEnd</a>, </div>
-<div class="line"><a name="l00234"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a1f2e7acff9b3b74922f90240d29fd1b3"> 234</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a1f2e7acff9b3b74922f90240d29fd1b3">eNvFlexStageCount</a>, </div>
-<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160;};</div>
-<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160;</div>
-<div class="line"><a name="l00239"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252"> 239</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252">NvFlexComputeType</a></div>
-<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160;{</div>
-<div class="line"><a name="l00241"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252ad0c27f7aafdc4fe569722025c8eb2178"> 241</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252ad0c27f7aafdc4fe569722025c8eb2178">eNvFlexCUDA</a>, </div>
-<div class="line"><a name="l00242"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252a297a93979a88fda6e6b551dcab5fb3df"> 242</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252a297a93979a88fda6e6b551dcab5fb3df">eNvFlexD3D11</a>, </div>
-<div class="line"><a name="l00243"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252a15e78a7baf13cc7fd73f255ac84f0943"> 243</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252a15e78a7baf13cc7fd73f255ac84f0943">eNvFlexD3D12</a>, </div>
-<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160;};</div>
-<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160;</div>
-<div class="line"><a name="l00258"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 258</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_solver_callback_params">NvFlexSolverCallbackParams</a></div>
-<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160;{</div>
-<div class="line"><a name="l00260"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a3974e1e608d9f532d5520dc158b47903"> 260</a></span>&#160; <a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* <a class="code" href="_nv_flex_8h.html#a3974e1e608d9f532d5520dc158b47903">solver</a>; </div>
-<div class="line"><a name="l00261"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5b9af9cf4d889b4772cb61cefda92a87"> 261</a></span>&#160; <span class="keywordtype">void</span>* <a class="code" href="_nv_flex_8h.html#a5b9af9cf4d889b4772cb61cefda92a87">userData</a>; </div>
-<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160;</div>
-<div class="line"><a name="l00263"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a8ed42f9bd016cbcef45c96b5b32ca609"> 263</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_8h.html#a8ed42f9bd016cbcef45c96b5b32ca609">particles</a>; </div>
-<div class="line"><a name="l00264"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ac48a490fa3d62cc678c309dd4b8cbf18"> 264</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_8h.html#ac48a490fa3d62cc678c309dd4b8cbf18">velocities</a>; </div>
-<div class="line"><a name="l00265"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a9e5f943053d43d7e1a6b149babe4fe44"> 265</a></span>&#160; <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_8h.html#a9e5f943053d43d7e1a6b149babe4fe44">phases</a>; </div>
-<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160;</div>
-<div class="line"><a name="l00267"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ac32019f7dd1f30ab8a7391a417ed02c9"> 267</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#ac32019f7dd1f30ab8a7391a417ed02c9">numActive</a>; </div>
-<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; </div>
-<div class="line"><a name="l00269"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a843360ebf23cd00e5eff72d19e796dd9"> 269</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a843360ebf23cd00e5eff72d19e796dd9">dt</a>; </div>
-<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160;</div>
-<div class="line"><a name="l00271"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#abe564dbbbd4957542322b60d77a70e29"> 271</a></span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_8h.html#abe564dbbbd4957542322b60d77a70e29">originalToSortedMap</a>; </div>
-<div class="line"><a name="l00272"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a9b65813d2a2d3f99db162d39a62481f8"> 272</a></span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_8h.html#a9b65813d2a2d3f99db162d39a62481f8">sortedToOriginalMap</a>; </div>
-<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160;};</div>
-<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160;</div>
-<div class="line"><a name="l00277"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 277</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_init_desc">NvFlexInitDesc</a></div>
-<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160;{</div>
-<div class="line"><a name="l00279"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5890b9e46d626cfa19994976ea53c52e"> 279</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#a5890b9e46d626cfa19994976ea53c52e">deviceIndex</a>; </div>
-<div class="line"><a name="l00280"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a23b8779c1516647ef5ed7f8010d619ff"> 280</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="_nv_flex_8h.html#a23b8779c1516647ef5ed7f8010d619ff">enableExtensions</a>; </div>
-<div class="line"><a name="l00281"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a7e760844341b78a547ca4e29abf48806"> 281</a></span>&#160; <span class="keywordtype">void</span>* <a class="code" href="_nv_flex_8h.html#a7e760844341b78a547ca4e29abf48806">renderDevice</a>; </div>
-<div class="line"><a name="l00282"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#abf304d5c1f8f041fa46a2bfb0bdf56fe"> 282</a></span>&#160; <span class="keywordtype">void</span>* <a class="code" href="_nv_flex_8h.html#abf304d5c1f8f041fa46a2bfb0bdf56fe">renderContext</a>; </div>
-<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; </div>
-<div class="line"><a name="l00284"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aeeeaf91dad0804d1dd3125e592a3260b"> 284</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252">NvFlexComputeType</a> <a class="code" href="_nv_flex_8h.html#aeeeaf91dad0804d1dd3125e592a3260b">computeType</a>; </div>
-<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160;};</div>
-<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160;</div>
-<div class="line"><a name="l00289"></a><span class="lineno"><a class="line" href="struct_nv_flex_solver_callback.html"> 289</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_nv_flex_solver_callback.html">NvFlexSolverCallback</a></div>
-<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160;{</div>
-<div class="line"><a name="l00292"></a><span class="lineno"><a class="line" href="struct_nv_flex_solver_callback.html#a2878301f697313b3ef3ad1bc2410c915"> 292</a></span>&#160; <span class="keywordtype">void</span>* <a class="code" href="struct_nv_flex_solver_callback.html#a2878301f697313b3ef3ad1bc2410c915">userData</a>;</div>
-<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; </div>
-<div class="line"><a name="l00295"></a><span class="lineno"><a class="line" href="struct_nv_flex_solver_callback.html#a728134bf4d667b207539d7318e42e92a"> 295</a></span>&#160; void (*<span class="keyword">function</span>)(<a class="code" href="_nv_flex_8h.html#struct_nv_flex_solver_callback_params">NvFlexSolverCallbackParams</a> params);</div>
-<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160;};</div>
-<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160;</div>
-<div class="line"><a name="l00301"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#abe6f00c9b94debbf7c181082a14076d5"> 301</a></span>&#160;<span class="keyword">typedef</span> void (*<a class="code" href="_nv_flex_8h.html#abe6f00c9b94debbf7c181082a14076d5">NvFlexErrorCallback</a>)(<a class="code" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfca">NvFlexErrorSeverity</a> type, <span class="keyword">const</span> <span class="keywordtype">char</span>* msg, <span class="keyword">const</span> <span class="keywordtype">char</span>* file, <span class="keywordtype">int</span> line);</div>
+<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160;</div>
+<div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a615e8070212c24a70e7a849120c13353"> 190</a></span>&#160;NV_FLEX_API <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#a615e8070212c24a70e7a849120c13353">NvFlexMakePhaseWithChannels</a>(<span class="keywordtype">int</span> group, <span class="keywordtype">int</span> particleFlags, <span class="keywordtype">int</span> shapeChannels) { <span class="keywordflow">return</span> (group &amp; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ad108f6ebf28346813cfd3602d984bb32">eNvFlexPhaseGroupMask</a>) | (particleFlags &amp; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a7b776084468bae4e3566484cf34d0154">eNvFlexPhaseFlagsMask</a>) | (shapeChannels &amp; <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ae4ea43366942f719f40e8526ad21a038">eNvFlexPhaseShapeChannelMask</a>); }</div>
+<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160;</div>
+<div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab43db5f28808f8038cfc9330d4b47d57"> 195</a></span>&#160;NV_FLEX_API <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#ab43db5f28808f8038cfc9330d4b47d57">NvFlexMakePhase</a>(<span class="keywordtype">int</span> group, <span class="keywordtype">int</span> particleFlags) { <span class="keywordflow">return</span> <a class="code" href="_nv_flex_8h.html#a615e8070212c24a70e7a849120c13353">NvFlexMakePhaseWithChannels</a>(group, particleFlags, <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ae4ea43366942f719f40e8526ad21a038">eNvFlexPhaseShapeChannelMask</a>); }</div>
+<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160;</div>
+<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160;</div>
+<div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 201</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_timers">NvFlexTimers</a></div>
+<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;{</div>
+<div class="line"><a name="l00203"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aaf8baa00e709ff8fd40d114f00bee0b6"> 203</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#aaf8baa00e709ff8fd40d114f00bee0b6">predict</a>; </div>
+<div class="line"><a name="l00204"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aba34bc2bc8736e3a0cf18a7a6b56ff68"> 204</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#aba34bc2bc8736e3a0cf18a7a6b56ff68">createCellIndices</a>; </div>
+<div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ae45cb18deec2db8ff44d181e80f24695"> 205</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ae45cb18deec2db8ff44d181e80f24695">sortCellIndices</a>; </div>
+<div class="line"><a name="l00206"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a98b4df3721709c862ef5d09edcc6d4c3"> 206</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a98b4df3721709c862ef5d09edcc6d4c3">createGrid</a>; </div>
+<div class="line"><a name="l00207"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a6071050991cf71a8d9ff28ea968479af"> 207</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a6071050991cf71a8d9ff28ea968479af">reorder</a>; </div>
+<div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ac1f3c3a1eeeb57cf5b20d030a788e25c"> 208</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ac1f3c3a1eeeb57cf5b20d030a788e25c">collideParticles</a>; </div>
+<div class="line"><a name="l00209"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ae4203fb9cf4772c3186f96cc2d9f6ea8"> 209</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ae4203fb9cf4772c3186f96cc2d9f6ea8">collideShapes</a>; </div>
+<div class="line"><a name="l00210"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#afc20d27121f49b61be9cc6bd4c25f547"> 210</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#afc20d27121f49b61be9cc6bd4c25f547">collideTriangles</a>; </div>
+<div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aaa36ba5ee44e34e762167fb0b8b3292e"> 211</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#aaa36ba5ee44e34e762167fb0b8b3292e">collideFields</a>; </div>
+<div class="line"><a name="l00212"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a49f7117a457a716e7790904209f68707"> 212</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a49f7117a457a716e7790904209f68707">calculateDensity</a>; </div>
+<div class="line"><a name="l00213"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#abe52b62e7af361f387d67414b9e2cf9b"> 213</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#abe52b62e7af361f387d67414b9e2cf9b">solveDensities</a>; </div>
+<div class="line"><a name="l00214"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a4d10188e917ae045e0e903f3db1c638d"> 214</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a4d10188e917ae045e0e903f3db1c638d">solveVelocities</a>; </div>
+<div class="line"><a name="l00215"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#abdd60b0a83674283d09b4897fdd637a2"> 215</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#abdd60b0a83674283d09b4897fdd637a2">solveShapes</a>; </div>
+<div class="line"><a name="l00216"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a57e4d27b0aa8774e479fa66d65079f78"> 216</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a57e4d27b0aa8774e479fa66d65079f78">solveSprings</a>; </div>
+<div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a215e06106ec0cdbbcd405055a4535d1d"> 217</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a215e06106ec0cdbbcd405055a4535d1d">solveContacts</a>; </div>
+<div class="line"><a name="l00218"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a75eade1512d023cb19da5b7ebbad10f3"> 218</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a75eade1512d023cb19da5b7ebbad10f3">solveInflatables</a>; </div>
+<div class="line"><a name="l00219"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#afc5d58e7f591213c3fe1c31b4d440eb6"> 219</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#afc5d58e7f591213c3fe1c31b4d440eb6">applyDeltas</a>; </div>
+<div class="line"><a name="l00220"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#af9b72d2909ef335b12a46cdbd4b71f57"> 220</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#af9b72d2909ef335b12a46cdbd4b71f57">calculateAnisotropy</a>; </div>
+<div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a2ff723870a6eba26d9f3bb7e5250b27f"> 221</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a2ff723870a6eba26d9f3bb7e5250b27f">updateDiffuse</a>; </div>
+<div class="line"><a name="l00222"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a8cb34cbcf9def6817d6d5d3c07177052"> 222</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a8cb34cbcf9def6817d6d5d3c07177052">updateTriangles</a>; </div>
+<div class="line"><a name="l00223"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a1a1e69f26e02e8b3fca1d3636a7f3f13"> 223</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a1a1e69f26e02e8b3fca1d3636a7f3f13">updateNormals</a>; </div>
+<div class="line"><a name="l00224"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a9d825db54bc9a0bca998b3654db3b20e"> 224</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a9d825db54bc9a0bca998b3654db3b20e">finalize</a>; </div>
+<div class="line"><a name="l00225"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a2f85189cbc3014b73164cf8c4eb87e0a"> 225</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a2f85189cbc3014b73164cf8c4eb87e0a">updateBounds</a>; </div>
+<div class="line"><a name="l00226"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a3c4d2aa395ff8d0f70a6380448943be2"> 226</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a3c4d2aa395ff8d0f70a6380448943be2">total</a>; </div>
+<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160;};</div>
+<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160;</div>
+<div class="line"><a name="l00232"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfca"> 232</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfca">NvFlexErrorSeverity</a></div>
+<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160;{</div>
+<div class="line"><a name="l00234"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa8aed6496f033604148138299fa075edd"> 234</a></span>&#160; <a class="code" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa8aed6496f033604148138299fa075edd">eNvFlexLogError</a> = 0, </div>
+<div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa03d239332ae87f46270855dd06b6e58f"> 235</a></span>&#160; <a class="code" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa03d239332ae87f46270855dd06b6e58f">eNvFlexLogInfo</a> = 1, </div>
+<div class="line"><a name="l00236"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa5538835c4767004ba5fd443ada08ea61"> 236</a></span>&#160; <a class="code" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa5538835c4767004ba5fd443ada08ea61">eNvFlexLogWarning</a> = 2, </div>
+<div class="line"><a name="l00237"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa77b51759e33d60b2caf327bb4835351e"> 237</a></span>&#160; <a class="code" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa77b51759e33d60b2caf327bb4835351e">eNvFlexLogDebug</a> = 4, </div>
+<div class="line"><a name="l00238"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa8feff72c0b0391e8adf3ddb6c39ef10e"> 238</a></span>&#160; <a class="code" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa8feff72c0b0391e8adf3ddb6c39ef10e">eNvFlexLogAll</a> = -1, </div>
+<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160;};</div>
+<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160;</div>
+<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; </div>
+<div class="line"><a name="l00244"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9"> 244</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9">NvFlexSolverCallbackStage</a></div>
+<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160;{</div>
+<div class="line"><a name="l00246"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a9f3914fdb03915a14ebe55a2c730e7ff"> 246</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a9f3914fdb03915a14ebe55a2c730e7ff">eNvFlexStageIterationStart</a>, </div>
+<div class="line"><a name="l00247"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9ab75a912c3990b0fbd6b06a6741a20e69"> 247</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9ab75a912c3990b0fbd6b06a6741a20e69">eNvFlexStageIterationEnd</a>, </div>
+<div class="line"><a name="l00248"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a79ce9005dbc92198a1f180c6afde6a44"> 248</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a79ce9005dbc92198a1f180c6afde6a44">eNvFlexStageSubstepBegin</a>, </div>
+<div class="line"><a name="l00249"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a6f13e2ebdbf21f8c8ebcfe1ac9160586"> 249</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a6f13e2ebdbf21f8c8ebcfe1ac9160586">eNvFlexStageSubstepEnd</a>, </div>
+<div class="line"><a name="l00250"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a260340ba9071892bd8795c3b29289806"> 250</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a260340ba9071892bd8795c3b29289806">eNvFlexStageUpdateEnd</a>, </div>
+<div class="line"><a name="l00251"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a1f2e7acff9b3b74922f90240d29fd1b3"> 251</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a1f2e7acff9b3b74922f90240d29fd1b3">eNvFlexStageCount</a>, </div>
+<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160;};</div>
+<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160;</div>
+<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160;</div>
+<div class="line"><a name="l00267"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 267</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_solver_callback_params">NvFlexSolverCallbackParams</a></div>
+<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160;{</div>
+<div class="line"><a name="l00269"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a3974e1e608d9f532d5520dc158b47903"> 269</a></span>&#160; <a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* <a class="code" href="_nv_flex_8h.html#a3974e1e608d9f532d5520dc158b47903">solver</a>; </div>
+<div class="line"><a name="l00270"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5b9af9cf4d889b4772cb61cefda92a87"> 270</a></span>&#160; <span class="keywordtype">void</span>* <a class="code" href="_nv_flex_8h.html#a5b9af9cf4d889b4772cb61cefda92a87">userData</a>; </div>
+<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160;</div>
+<div class="line"><a name="l00272"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a8ed42f9bd016cbcef45c96b5b32ca609"> 272</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_8h.html#a8ed42f9bd016cbcef45c96b5b32ca609">particles</a>; </div>
+<div class="line"><a name="l00273"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ac48a490fa3d62cc678c309dd4b8cbf18"> 273</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_8h.html#ac48a490fa3d62cc678c309dd4b8cbf18">velocities</a>; </div>
+<div class="line"><a name="l00274"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a9e5f943053d43d7e1a6b149babe4fe44"> 274</a></span>&#160; <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_8h.html#a9e5f943053d43d7e1a6b149babe4fe44">phases</a>; </div>
+<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160;</div>
+<div class="line"><a name="l00276"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ac32019f7dd1f30ab8a7391a417ed02c9"> 276</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#ac32019f7dd1f30ab8a7391a417ed02c9">numActive</a>; </div>
+<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; </div>
+<div class="line"><a name="l00278"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a843360ebf23cd00e5eff72d19e796dd9"> 278</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a843360ebf23cd00e5eff72d19e796dd9">dt</a>; </div>
+<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160;</div>
+<div class="line"><a name="l00280"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#abe564dbbbd4957542322b60d77a70e29"> 280</a></span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_8h.html#abe564dbbbd4957542322b60d77a70e29">originalToSortedMap</a>; </div>
+<div class="line"><a name="l00281"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a9b65813d2a2d3f99db162d39a62481f8"> 281</a></span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_8h.html#a9b65813d2a2d3f99db162d39a62481f8">sortedToOriginalMap</a>; </div>
+<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160;};</div>
+<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160;</div>
+<div class="line"><a name="l00286"></a><span class="lineno"><a class="line" href="struct_nv_flex_solver_callback.html"> 286</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_nv_flex_solver_callback.html">NvFlexSolverCallback</a></div>
+<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160;{</div>
+<div class="line"><a name="l00289"></a><span class="lineno"><a class="line" href="struct_nv_flex_solver_callback.html#a2878301f697313b3ef3ad1bc2410c915"> 289</a></span>&#160; <span class="keywordtype">void</span>* <a class="code" href="struct_nv_flex_solver_callback.html#a2878301f697313b3ef3ad1bc2410c915">userData</a>;</div>
+<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; </div>
+<div class="line"><a name="l00292"></a><span class="lineno"><a class="line" href="struct_nv_flex_solver_callback.html#a728134bf4d667b207539d7318e42e92a"> 292</a></span>&#160; void (*<span class="keyword">function</span>)(<a class="code" href="_nv_flex_8h.html#struct_nv_flex_solver_callback_params">NvFlexSolverCallbackParams</a> params);</div>
+<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160;};</div>
+<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160;</div>
+<div class="line"><a name="l00298"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#abe6f00c9b94debbf7c181082a14076d5"> 298</a></span>&#160;<span class="keyword">typedef</span> void (*<a class="code" href="_nv_flex_8h.html#abe6f00c9b94debbf7c181082a14076d5">NvFlexErrorCallback</a>)(<a class="code" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfca">NvFlexErrorSeverity</a> type, <span class="keyword">const</span> <span class="keywordtype">char</span>* msg, <span class="keyword">const</span> <span class="keywordtype">char</span>* file, <span class="keywordtype">int</span> line);</div>
+<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160;</div>
+<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160;</div>
+<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160;</div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160;</div>
-<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* <a class="code" href="_nv_flex_8h.html#a687e5ec141948f779faa9183b68cb743">NvFlexInit</a>(<span class="keywordtype">int</span> version = NV_FLEX_VERSION, <a class="code" href="_nv_flex_8h.html#abe6f00c9b94debbf7c181082a14076d5">NvFlexErrorCallback</a> errorFunc = 0, <a class="code" href="_nv_flex_8h.html#struct_nv_flex_init_desc">NvFlexInitDesc</a> * desc = 0);</div>
-<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160;</div>
-<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#aaf59e45ada57c7f958a8030099cbe211">NvFlexShutdown</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib);</div>
-<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160;</div>
-<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160;NV_FLEX_API <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#ac25ec5de38c177db51198bb620644d36">NvFlexGetVersion</a>();</div>
+<div class="line"><a name="l00305"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252"> 305</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252">NvFlexComputeType</a></div>
+<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160;{</div>
+<div class="line"><a name="l00307"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252ad0c27f7aafdc4fe569722025c8eb2178"> 307</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252ad0c27f7aafdc4fe569722025c8eb2178">eNvFlexCUDA</a>, </div>
+<div class="line"><a name="l00308"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252a297a93979a88fda6e6b551dcab5fb3df"> 308</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252a297a93979a88fda6e6b551dcab5fb3df">eNvFlexD3D11</a>, </div>
+<div class="line"><a name="l00309"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252a15e78a7baf13cc7fd73f255ac84f0943"> 309</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252a15e78a7baf13cc7fd73f255ac84f0943">eNvFlexD3D12</a>, </div>
+<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160;};</div>
+<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160;</div>
+<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160;</div>
+<div class="line"><a name="l00315"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 315</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_init_desc">NvFlexInitDesc</a></div>
+<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160;{</div>
+<div class="line"><a name="l00317"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5890b9e46d626cfa19994976ea53c52e"> 317</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#a5890b9e46d626cfa19994976ea53c52e">deviceIndex</a>; </div>
+<div class="line"><a name="l00318"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a23b8779c1516647ef5ed7f8010d619ff"> 318</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="_nv_flex_8h.html#a23b8779c1516647ef5ed7f8010d619ff">enableExtensions</a>; </div>
+<div class="line"><a name="l00319"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a7e760844341b78a547ca4e29abf48806"> 319</a></span>&#160; <span class="keywordtype">void</span>* <a class="code" href="_nv_flex_8h.html#a7e760844341b78a547ca4e29abf48806">renderDevice</a>; </div>
+<div class="line"><a name="l00320"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#abf304d5c1f8f041fa46a2bfb0bdf56fe"> 320</a></span>&#160; <span class="keywordtype">void</span>* <a class="code" href="_nv_flex_8h.html#abf304d5c1f8f041fa46a2bfb0bdf56fe">renderContext</a>; </div>
+<div class="line"><a name="l00321"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ad1d0256dac295346120fda40f6eea7e2"> 321</a></span>&#160; <span class="keywordtype">void</span>* <a class="code" href="_nv_flex_8h.html#ad1d0256dac295346120fda40f6eea7e2">computeContext</a>; </div>
+<div class="line"><a name="l00322"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a77687a448947946483c73f7cc94932c6"> 322</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="_nv_flex_8h.html#a77687a448947946483c73f7cc94932c6">useComputeQueue</a>; </div>
+<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160;</div>
+<div class="line"><a name="l00324"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aeeeaf91dad0804d1dd3125e592a3260b"> 324</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252">NvFlexComputeType</a> <a class="code" href="_nv_flex_8h.html#aeeeaf91dad0804d1dd3125e592a3260b">computeType</a>; </div>
+<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160;};</div>
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160;</div>
-<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* <a class="code" href="_nv_flex_8h.html#af7f91fa47c779fcd8bee60061de6d31c">NvFlexCreateSolver</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, <span class="keywordtype">int</span> maxParticles, <span class="keywordtype">int</span> maxDiffuseParticles, <span class="keywordtype">int</span> maxNeighborsPerParticle = 96);</div>
-<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a1d755d7b090f7ed5c4c50d2d3fef1558">NvFlexDestroySolver</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver);</div>
-<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>&#160;</div>
-<div class="line"><a name="l00349"></a><span class="lineno"> 349</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* <a class="code" href="_nv_flex_8h.html#ae0d57e4fc2b3b51ec08f7da0a28ff343">NvFlexGetSolverLibrary</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver);</div>
+<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* <a class="code" href="_nv_flex_8h.html#a687e5ec141948f779faa9183b68cb743">NvFlexInit</a>(<span class="keywordtype">int</span> version = NV_FLEX_VERSION, <a class="code" href="_nv_flex_8h.html#abe6f00c9b94debbf7c181082a14076d5">NvFlexErrorCallback</a> errorFunc = 0, <a class="code" href="_nv_flex_8h.html#struct_nv_flex_init_desc">NvFlexInitDesc</a>* desc = 0);</div>
+<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160;</div>
+<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#aaf59e45ada57c7f958a8030099cbe211">NvFlexShutdown</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib);</div>
+<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160;</div>
+<div class="line"><a name="l00349"></a><span class="lineno"> 349</span>&#160;NV_FLEX_API <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#ac25ec5de38c177db51198bb620644d36">NvFlexGetVersion</a>();</div>
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>&#160;</div>
-<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>&#160;NV_FLEX_API <a class="code" href="struct_nv_flex_solver_callback.html">NvFlexSolverCallback</a> <a class="code" href="_nv_flex_8h.html#ac5427457488ab3f2de91cf65335dda08">NvFlexRegisterSolverCallback</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="struct_nv_flex_solver_callback.html">NvFlexSolverCallback</a> <span class="keyword">function</span>, <a class="code" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9">NvFlexSolverCallbackStage</a> stage);</div>
+<div class="line"><a name="l00354"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560"> 354</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560">NvFlexFeatureMode</a></div>
+<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>&#160;{</div>
+<div class="line"><a name="l00356"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560a3ab06dc4cd4aa073ab0f2d96a56c499d"> 356</a></span>&#160; <a class="code" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560a3ab06dc4cd4aa073ab0f2d96a56c499d">eNvFlexFeatureModeDefault</a> = 0, </div>
+<div class="line"><a name="l00357"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560a421fe1e1bb00fc41e9b32208cd9155f5"> 357</a></span>&#160; <a class="code" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560a421fe1e1bb00fc41e9b32208cd9155f5">eNvFlexFeatureModeSimpleSolids</a> = 1, </div>
+<div class="line"><a name="l00358"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560aeab2b8a68b528d46e11b71ad0f4d83f2"> 358</a></span>&#160; <a class="code" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560aeab2b8a68b528d46e11b71ad0f4d83f2">eNvFlexFeatureModeSimpleFluids</a> = 2, </div>
+<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>&#160;};</div>
<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>&#160;</div>
-<div class="line"><a name="l00420"></a><span class="lineno"> 420</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ac75370f005fd453fe8a324fe62be1b5c">NvFlexUpdateSolver</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <span class="keywordtype">float</span> dt, <span class="keywordtype">int</span> substeps, <span class="keywordtype">bool</span> enableTimers);</div>
-<div class="line"><a name="l00421"></a><span class="lineno"> 421</span>&#160;</div>
-<div class="line"><a name="l00428"></a><span class="lineno"> 428</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ae2db6ad8006027c1acf2315a0d15fe71">NvFlexSetParams</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <span class="keyword">const</span> <a class="code" href="_nv_flex_8h.html#struct_nv_flex_params">NvFlexParams</a>* params);</div>
-<div class="line"><a name="l00429"></a><span class="lineno"> 429</span>&#160;</div>
-<div class="line"><a name="l00437"></a><span class="lineno"> 437</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a581b458848039220203547af53de128f">NvFlexGetParams</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#struct_nv_flex_params">NvFlexParams</a>* params);</div>
-<div class="line"><a name="l00438"></a><span class="lineno"> 438</span>&#160;</div>
-<div class="line"><a name="l00446"></a><span class="lineno"> 446</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#aea2af336bdd96d7168c3acdce6d1875d">NvFlexSetActive</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices, <span class="keywordtype">int</span> n);</div>
-<div class="line"><a name="l00447"></a><span class="lineno"> 447</span>&#160;</div>
-<div class="line"><a name="l00454"></a><span class="lineno"> 454</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#aeed8fe87fa073067af1a45560cc54a79">NvFlexGetActive</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices);</div>
-<div class="line"><a name="l00455"></a><span class="lineno"> 455</span>&#160;</div>
-<div class="line"><a name="l00462"></a><span class="lineno"> 462</span>&#160;NV_FLEX_API <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#a2345372dea2ad4f043153a84e7a2c407">NvFlexGetActiveCount</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver);</div>
-<div class="line"><a name="l00463"></a><span class="lineno"> 463</span>&#160;</div>
-<div class="line"><a name="l00472"></a><span class="lineno"> 472</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#abef057ac89ba5cf1cd71f0084f9313de">NvFlexSetParticles</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* p, <span class="keywordtype">int</span> n);</div>
-<div class="line"><a name="l00473"></a><span class="lineno"> 473</span>&#160;</div>
-<div class="line"><a name="l00481"></a><span class="lineno"> 481</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a84f06fff995d8eb034cff81c811fa312">NvFlexGetParticles</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* p, <span class="keywordtype">int</span> n);</div>
-<div class="line"><a name="l00482"></a><span class="lineno"> 482</span>&#160;</div>
-<div class="line"><a name="l00492"></a><span class="lineno"> 492</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#aa457096286567a37d4f1d5f4857d9296">NvFlexSetRestParticles</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* p, <span class="keywordtype">int</span> n);</div>
-<div class="line"><a name="l00493"></a><span class="lineno"> 493</span>&#160;</div>
-<div class="line"><a name="l00502"></a><span class="lineno"> 502</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#affb884bcf3e7e389812d0b52b0fc0490">NvFlexGetRestParticles</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* p, <span class="keywordtype">int</span> n);</div>
-<div class="line"><a name="l00503"></a><span class="lineno"> 503</span>&#160;</div>
-<div class="line"><a name="l00504"></a><span class="lineno"> 504</span>&#160;</div>
-<div class="line"><a name="l00512"></a><span class="lineno"> 512</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#abfa62e01c4f4511d3f6a00ab6a0f257a">NvFlexGetSmoothParticles</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* p, <span class="keywordtype">int</span> n);</div>
-<div class="line"><a name="l00513"></a><span class="lineno"> 513</span>&#160;</div>
-<div class="line"><a name="l00522"></a><span class="lineno"> 522</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#afe09e63d22c5156fe24cd2d2bc069c04">NvFlexSetVelocities</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* v, <span class="keywordtype">int</span> n);</div>
-<div class="line"><a name="l00530"></a><span class="lineno"> 530</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a67bd9669086e823ebe33d08d14f5b2b9">NvFlexGetVelocities</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* v, <span class="keywordtype">int</span> n);</div>
-<div class="line"><a name="l00531"></a><span class="lineno"> 531</span>&#160;</div>
-<div class="line"><a name="l00548"></a><span class="lineno"> 548</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a3117f92571613709936291c48414e521">NvFlexSetPhases</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* phases, <span class="keywordtype">int</span> n);</div>
-<div class="line"><a name="l00556"></a><span class="lineno"> 556</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a15b7a5449bee38bbe5dcaf23690f09f5">NvFlexGetPhases</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* phases, <span class="keywordtype">int</span> n);</div>
-<div class="line"><a name="l00557"></a><span class="lineno"> 557</span>&#160;</div>
-<div class="line"><a name="l00566"></a><span class="lineno"> 566</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#add03fd357383845f07e0596290faf316">NvFlexSetNormals</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* normals, <span class="keywordtype">int</span> n);</div>
-<div class="line"><a name="l00567"></a><span class="lineno"> 567</span>&#160;</div>
-<div class="line"><a name="l00575"></a><span class="lineno"> 575</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#aadb2a0cf125e4a6b2f3443ab7dcbd3d4">NvFlexGetNormals</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* normals, <span class="keywordtype">int</span> n);</div>
-<div class="line"><a name="l00576"></a><span class="lineno"> 576</span>&#160;</div>
-<div class="line"><a name="l00577"></a><span class="lineno"> 577</span>&#160;</div>
-<div class="line"><a name="l00590"></a><span class="lineno"> 590</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ae67c0cab2ecee8eb9485a26ef0fad6a9">NvFlexSetSprings</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* restLengths, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* stiffness, <span class="keywordtype">int</span> numSprings);</div>
-<div class="line"><a name="l00600"></a><span class="lineno"> 600</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#aab5f90f4024d71d08c3f9327c6d8c184">NvFlexGetSprings</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* restLengths, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* stiffness, <span class="keywordtype">int</span> numSprings);</div>
-<div class="line"><a name="l00601"></a><span class="lineno"> 601</span>&#160;</div>
-<div class="line"><a name="l00618"></a><span class="lineno"> 618</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a89c872e761a53c87375f536a0ef597d8">NvFlexSetRigids</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* offsets, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* restPositions, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* restNormals, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* stiffness, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* rotations, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* translations, <span class="keywordtype">int</span> numRigids, <span class="keywordtype">int</span> numIndices);</div>
-<div class="line"><a name="l00619"></a><span class="lineno"> 619</span>&#160;</div>
-<div class="line"><a name="l00620"></a><span class="lineno"> 620</span>&#160;</div>
-<div class="line"><a name="l00628"></a><span class="lineno"> 628</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a3eafe7fe6b200c757c7402eca7d13f6d">NvFlexGetRigidTransforms</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* rotations, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* translations);</div>
-<div class="line"><a name="l00629"></a><span class="lineno"> 629</span>&#160;</div>
-<div class="line"><a name="l00633"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a2aea4c3d772b4dbccb7dd9ba37c1bdc0"> 633</a></span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#a2aea4c3d772b4dbccb7dd9ba37c1bdc0">NvFlexTriangleMeshId</a>;</div>
+<div class="line"><a name="l00364"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 364</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_solver_desc">NvFlexSolverDesc</a></div>
+<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>&#160;{</div>
+<div class="line"><a name="l00366"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0999d825c8760e19ba4c980d2eb097ac"> 366</a></span>&#160; <a class="code" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560">NvFlexFeatureMode</a> <a class="code" href="_nv_flex_8h.html#a0999d825c8760e19ba4c980d2eb097ac">featureMode</a>; </div>
+<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>&#160;</div>
+<div class="line"><a name="l00368"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aedf73c7aa1f4df92c7724d58f4dcb266"> 368</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#aedf73c7aa1f4df92c7724d58f4dcb266">maxParticles</a>; </div>
+<div class="line"><a name="l00369"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a39ab69ac3fbde631b71f59f5bbbf1bdf"> 369</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#a39ab69ac3fbde631b71f59f5bbbf1bdf">maxDiffuseParticles</a>; </div>
+<div class="line"><a name="l00370"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a5ea0cd160a13a72924340184edfbea2f"> 370</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#a5ea0cd160a13a72924340184edfbea2f">maxNeighborsPerParticle</a>; </div>
+<div class="line"><a name="l00371"></a><span class="lineno"> 371</span>&#160;};</div>
+<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>&#160;</div>
+<div class="line"><a name="l00377"></a><span class="lineno"> 377</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a69a33d464c002a8916a5925c6ef32ae6">NvFlexSetSolverDescDefaults</a>(<a class="code" href="_nv_flex_8h.html#struct_nv_flex_solver_desc">NvFlexSolverDesc</a>* desc);</div>
+<div class="line"><a name="l00378"></a><span class="lineno"> 378</span>&#160;</div>
+<div class="line"><a name="l00385"></a><span class="lineno"> 385</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* <a class="code" href="_nv_flex_8h.html#a9e925acbc34675dfe247da017cbd855f">NvFlexCreateSolver</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, <span class="keyword">const</span> <a class="code" href="_nv_flex_8h.html#struct_nv_flex_solver_desc">NvFlexSolverDesc</a>* desc);</div>
+<div class="line"><a name="l00391"></a><span class="lineno"> 391</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a1d755d7b090f7ed5c4c50d2d3fef1558">NvFlexDestroySolver</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver);</div>
+<div class="line"><a name="l00392"></a><span class="lineno"> 392</span>&#160;</div>
+<div class="line"><a name="l00399"></a><span class="lineno"> 399</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* <a class="code" href="_nv_flex_8h.html#ae0d57e4fc2b3b51ec08f7da0a28ff343">NvFlexGetSolverLibrary</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver);</div>
+<div class="line"><a name="l00400"></a><span class="lineno"> 400</span>&#160;</div>
+<div class="line"><a name="l00407"></a><span class="lineno"> 407</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#afd6aff58269d6c359df2453c96397840">NvFlexGetSolverDesc</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#struct_nv_flex_solver_desc">NvFlexSolverDesc</a>* desc);</div>
+<div class="line"><a name="l00408"></a><span class="lineno"> 408</span>&#160;</div>
+<div class="line"><a name="l00417"></a><span class="lineno"> 417</span>&#160;NV_FLEX_API <a class="code" href="struct_nv_flex_solver_callback.html">NvFlexSolverCallback</a> <a class="code" href="_nv_flex_8h.html#ac5427457488ab3f2de91cf65335dda08">NvFlexRegisterSolverCallback</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="struct_nv_flex_solver_callback.html">NvFlexSolverCallback</a> <span class="keyword">function</span>, <a class="code" href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9">NvFlexSolverCallbackStage</a> stage);</div>
+<div class="line"><a name="l00418"></a><span class="lineno"> 418</span>&#160;</div>
+<div class="line"><a name="l00478"></a><span class="lineno"> 478</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ac75370f005fd453fe8a324fe62be1b5c">NvFlexUpdateSolver</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <span class="keywordtype">float</span> dt, <span class="keywordtype">int</span> substeps, <span class="keywordtype">bool</span> enableTimers);</div>
+<div class="line"><a name="l00479"></a><span class="lineno"> 479</span>&#160;</div>
+<div class="line"><a name="l00486"></a><span class="lineno"> 486</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ae2db6ad8006027c1acf2315a0d15fe71">NvFlexSetParams</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <span class="keyword">const</span> <a class="code" href="_nv_flex_8h.html#struct_nv_flex_params">NvFlexParams</a>* params);</div>
+<div class="line"><a name="l00487"></a><span class="lineno"> 487</span>&#160;</div>
+<div class="line"><a name="l00495"></a><span class="lineno"> 495</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a581b458848039220203547af53de128f">NvFlexGetParams</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#struct_nv_flex_params">NvFlexParams</a>* params);</div>
+<div class="line"><a name="l00496"></a><span class="lineno"> 496</span>&#160;</div>
+<div class="line"><a name="l00500"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 500</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a></div>
+<div class="line"><a name="l00501"></a><span class="lineno"> 501</span>&#160;{</div>
+<div class="line"><a name="l00502"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ae01bc8c45cf48f5faed2a8e78df1c678"> 502</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#ae01bc8c45cf48f5faed2a8e78df1c678">srcOffset</a>; <span class="comment">//&lt;! Offset in elements from the start of the source buffer to begin reading from</span></div>
+<div class="line"><a name="l00503"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aa544809448a95c3864e1443c7a507d7f"> 503</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#aa544809448a95c3864e1443c7a507d7f">dstOffset</a>; <span class="comment">//&lt;! Offset in elements from the start of the destination buffer to being writing to</span></div>
+<div class="line"><a name="l00504"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#af842f041f92c608b3ebfa2092caea889"> 504</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#af842f041f92c608b3ebfa2092caea889">elementCount</a>; <span class="comment">//&lt;! Number of elements to copy</span></div>
+<div class="line"><a name="l00505"></a><span class="lineno"> 505</span>&#160;};</div>
+<div class="line"><a name="l00506"></a><span class="lineno"> 506</span>&#160;</div>
+<div class="line"><a name="l00514"></a><span class="lineno"> 514</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#adc0c97635cdbb3da7b571574a3b38990">NvFlexSetActive</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices, <span class="keyword">const</span> <a class="code" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a>* desc);</div>
+<div class="line"><a name="l00515"></a><span class="lineno"> 515</span>&#160;</div>
+<div class="line"><a name="l00523"></a><span class="lineno"> 523</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a1bd4b70e0118abe18ca5fe85157299b6">NvFlexGetActive</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices, <span class="keyword">const</span> <a class="code" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a>* desc);</div>
+<div class="line"><a name="l00524"></a><span class="lineno"> 524</span>&#160;</div>
+<div class="line"><a name="l00531"></a><span class="lineno"> 531</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a677dc591fe443ae058701966c52d1316">NvFlexSetActiveCount</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <span class="keywordtype">int</span> n);</div>
+<div class="line"><a name="l00532"></a><span class="lineno"> 532</span>&#160;</div>
+<div class="line"><a name="l00539"></a><span class="lineno"> 539</span>&#160;NV_FLEX_API <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#a2345372dea2ad4f043153a84e7a2c407">NvFlexGetActiveCount</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver);</div>
+<div class="line"><a name="l00540"></a><span class="lineno"> 540</span>&#160;</div>
+<div class="line"><a name="l00549"></a><span class="lineno"> 549</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a7ec5ebe3e98a44a2058d6be74b2cb633">NvFlexSetParticles</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* p, <span class="keyword">const</span> <a class="code" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a>* desc);</div>
+<div class="line"><a name="l00550"></a><span class="lineno"> 550</span>&#160;</div>
+<div class="line"><a name="l00558"></a><span class="lineno"> 558</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#aaff62cfd50431d82af5d04a6c9ac4ffd">NvFlexGetParticles</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* p, <span class="keyword">const</span> <a class="code" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a>* desc);</div>
+<div class="line"><a name="l00559"></a><span class="lineno"> 559</span>&#160;</div>
+<div class="line"><a name="l00569"></a><span class="lineno"> 569</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a125cfd9817437bb4f4bcb9418efa3dda">NvFlexSetRestParticles</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* p, <span class="keyword">const</span> <a class="code" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a>* desc);</div>
+<div class="line"><a name="l00570"></a><span class="lineno"> 570</span>&#160;</div>
+<div class="line"><a name="l00579"></a><span class="lineno"> 579</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#aafc89f87307602fb9bfa8f6668122121">NvFlexGetRestParticles</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* p, <span class="keyword">const</span> <a class="code" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a>* desc);</div>
+<div class="line"><a name="l00580"></a><span class="lineno"> 580</span>&#160;</div>
+<div class="line"><a name="l00581"></a><span class="lineno"> 581</span>&#160;</div>
+<div class="line"><a name="l00589"></a><span class="lineno"> 589</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a96a771dd328d019e6164e5f23d29ffcb">NvFlexGetSmoothParticles</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* p, <span class="keyword">const</span> <a class="code" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a>* desc);</div>
+<div class="line"><a name="l00590"></a><span class="lineno"> 590</span>&#160;</div>
+<div class="line"><a name="l00599"></a><span class="lineno"> 599</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ae2b271f123db0054512936f2acc6467f">NvFlexSetVelocities</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* v, <span class="keyword">const</span> <a class="code" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a>* desc);</div>
+<div class="line"><a name="l00607"></a><span class="lineno"> 607</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#afbcbff4e4865105514c194398ab3a7b0">NvFlexGetVelocities</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* v, <span class="keyword">const</span> <a class="code" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a>* desc);</div>
+<div class="line"><a name="l00608"></a><span class="lineno"> 608</span>&#160;</div>
+<div class="line"><a name="l00625"></a><span class="lineno"> 625</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#aa1d44495e442f8cae874c635ef847478">NvFlexSetPhases</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* phases, <span class="keyword">const</span> <a class="code" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a>* desc);</div>
+<div class="line"><a name="l00633"></a><span class="lineno"> 633</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#accc944f0e76ee2e5d67c3f977b150806">NvFlexGetPhases</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* phases, <span class="keyword">const</span> <a class="code" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a>* desc);</div>
<div class="line"><a name="l00634"></a><span class="lineno"> 634</span>&#160;</div>
-<div class="line"><a name="l00638"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a56e990c5bfbc89677988cbf2471c0ade"> 638</a></span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#a56e990c5bfbc89677988cbf2471c0ade">NvFlexDistanceFieldId</a>;</div>
-<div class="line"><a name="l00639"></a><span class="lineno"> 639</span>&#160;</div>
-<div class="line"><a name="l00645"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a7ab5aa68da7ca1f69211a900f1a1c586"> 645</a></span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#a7ab5aa68da7ca1f69211a900f1a1c586">NvFlexConvexMeshId</a>;</div>
-<div class="line"><a name="l00646"></a><span class="lineno"> 646</span>&#160;</div>
-<div class="line"><a name="l00653"></a><span class="lineno"> 653</span>&#160;NV_FLEX_API NvFlexTriangleMeshId <a class="code" href="_nv_flex_8h.html#afdda5a5210938a1e8a7c3a8218ad468e">NvFlexCreateTriangleMesh</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib);</div>
-<div class="line"><a name="l00654"></a><span class="lineno"> 654</span>&#160;</div>
-<div class="line"><a name="l00661"></a><span class="lineno"> 661</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a4cb4462803ebff105d151fd45b4efad6">NvFlexDestroyTriangleMesh</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, NvFlexTriangleMeshId mesh);</div>
-<div class="line"><a name="l00662"></a><span class="lineno"> 662</span>&#160;</div>
-<div class="line"><a name="l00676"></a><span class="lineno"> 676</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a4958c555f0ed65dee54c37af32529356">NvFlexUpdateTriangleMesh</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, NvFlexTriangleMeshId mesh, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* vertices, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices, <span class="keywordtype">int</span> numVertices, <span class="keywordtype">int</span> numTriangles, <span class="keyword">const</span> <span class="keywordtype">float</span>* lower, <span class="keyword">const</span> <span class="keywordtype">float</span>* upper);</div>
+<div class="line"><a name="l00642"></a><span class="lineno"> 642</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a32e8fdb39029a2564c129bd493c52058">NvFlexSetNormals</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* normals, <span class="keyword">const</span> <a class="code" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a>* desc);</div>
+<div class="line"><a name="l00643"></a><span class="lineno"> 643</span>&#160;</div>
+<div class="line"><a name="l00651"></a><span class="lineno"> 651</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a73d87b460a34c52ff4b616e97a53ade7">NvFlexGetNormals</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* normals, <span class="keyword">const</span> <a class="code" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a>* desc);</div>
+<div class="line"><a name="l00652"></a><span class="lineno"> 652</span>&#160;</div>
+<div class="line"><a name="l00653"></a><span class="lineno"> 653</span>&#160;</div>
+<div class="line"><a name="l00666"></a><span class="lineno"> 666</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ae67c0cab2ecee8eb9485a26ef0fad6a9">NvFlexSetSprings</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* restLengths, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* stiffness, <span class="keywordtype">int</span> numSprings);</div>
+<div class="line"><a name="l00676"></a><span class="lineno"> 676</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#aab5f90f4024d71d08c3f9327c6d8c184">NvFlexGetSprings</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* restLengths, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* stiffness, <span class="keywordtype">int</span> numSprings);</div>
<div class="line"><a name="l00677"></a><span class="lineno"> 677</span>&#160;</div>
-<div class="line"><a name="l00686"></a><span class="lineno"> 686</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a60794d849b4184335e2a0ddec0a9e6a2">NvFlexGetTriangleMeshBounds</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, <span class="keyword">const</span> NvFlexTriangleMeshId mesh, <span class="keywordtype">float</span>* lower, <span class="keywordtype">float</span>* upper);</div>
-<div class="line"><a name="l00687"></a><span class="lineno"> 687</span>&#160;</div>
-<div class="line"><a name="l00694"></a><span class="lineno"> 694</span>&#160;NV_FLEX_API NvFlexDistanceFieldId <a class="code" href="_nv_flex_8h.html#a5c28caf6d5d513c5adacd4fbc782f308">NvFlexCreateDistanceField</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib);</div>
-<div class="line"><a name="l00695"></a><span class="lineno"> 695</span>&#160;</div>
-<div class="line"><a name="l00702"></a><span class="lineno"> 702</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ab11bdd7f778d17af16cefea33265cb65">NvFlexDestroyDistanceField</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, NvFlexDistanceFieldId sdf);</div>
-<div class="line"><a name="l00703"></a><span class="lineno"> 703</span>&#160;</div>
-<div class="line"><a name="l00715"></a><span class="lineno"> 715</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a584ffb275b9986fd5444ed1a7ea247d9">NvFlexUpdateDistanceField</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, NvFlexDistanceFieldId sdf, <span class="keywordtype">int</span> dimx, <span class="keywordtype">int</span> dimy, <span class="keywordtype">int</span> dimz, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* field);</div>
-<div class="line"><a name="l00716"></a><span class="lineno"> 716</span>&#160;</div>
-<div class="line"><a name="l00723"></a><span class="lineno"> 723</span>&#160;NV_FLEX_API NvFlexConvexMeshId <a class="code" href="_nv_flex_8h.html#afbaafe2b1006352002b03aabaca531cc">NvFlexCreateConvexMesh</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib);</div>
+<div class="line"><a name="l00696"></a><span class="lineno"> 696</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#aa8b7bfeffb0fa7dc6dbd291fee87edc9">NvFlexSetRigids</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* offsets, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* restPositions, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* restNormals, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* stiffness, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* thresholds, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* creeps, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* rotations, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* translations, <span class="keywordtype">int</span> numRigids, <span class="keywordtype">int</span> numIndices);</div>
+<div class="line"><a name="l00697"></a><span class="lineno"> 697</span>&#160;</div>
+<div class="line"><a name="l00713"></a><span class="lineno"> 713</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ab5cc56e228374b1da0910356b3172b4e">NvFlexGetRigids</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* offsets, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* restPositions, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* restNormals, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* stiffness, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* thresholds, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* creeps, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* rotations, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* translations);</div>
+<div class="line"><a name="l00714"></a><span class="lineno"> 714</span>&#160;</div>
+<div class="line"><a name="l00718"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a2aea4c3d772b4dbccb7dd9ba37c1bdc0"> 718</a></span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#a2aea4c3d772b4dbccb7dd9ba37c1bdc0">NvFlexTriangleMeshId</a>;</div>
+<div class="line"><a name="l00719"></a><span class="lineno"> 719</span>&#160;</div>
+<div class="line"><a name="l00723"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a56e990c5bfbc89677988cbf2471c0ade"> 723</a></span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#a56e990c5bfbc89677988cbf2471c0ade">NvFlexDistanceFieldId</a>;</div>
<div class="line"><a name="l00724"></a><span class="lineno"> 724</span>&#160;</div>
-<div class="line"><a name="l00731"></a><span class="lineno"> 731</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ac85b6372e5c7bfc508ecb7b8c59c72a0">NvFlexDestroyConvexMesh</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, NvFlexConvexMeshId convex);</div>
-<div class="line"><a name="l00732"></a><span class="lineno"> 732</span>&#160;</div>
-<div class="line"><a name="l00743"></a><span class="lineno"> 743</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a69289002a6f8ecd697118f0ec6572f5d">NvFlexUpdateConvexMesh</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, NvFlexConvexMeshId convex, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* planes, <span class="keywordtype">int</span> numPlanes, <span class="keywordtype">float</span>* lower, <span class="keywordtype">float</span>* upper);</div>
-<div class="line"><a name="l00744"></a><span class="lineno"> 744</span>&#160;</div>
-<div class="line"><a name="l00753"></a><span class="lineno"> 753</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ad56e661161763579afb375b3841eb5ff">NvFlexGetConvexMeshBounds</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, NvFlexConvexMeshId mesh, <span class="keywordtype">float</span>* lower, <span class="keywordtype">float</span>* upper);</div>
-<div class="line"><a name="l00754"></a><span class="lineno"> 754</span>&#160;</div>
-<div class="line"><a name="l00758"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 758</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_sphere_geometry">NvFlexSphereGeometry</a></div>
-<div class="line"><a name="l00759"></a><span class="lineno"> 759</span>&#160;{</div>
-<div class="line"><a name="l00760"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a7a6e24c01235abc364ed12570ab15f84"> 760</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a7a6e24c01235abc364ed12570ab15f84">radius</a>;</div>
-<div class="line"><a name="l00761"></a><span class="lineno"> 761</span>&#160;};</div>
+<div class="line"><a name="l00730"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a7ab5aa68da7ca1f69211a900f1a1c586"> 730</a></span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#a7ab5aa68da7ca1f69211a900f1a1c586">NvFlexConvexMeshId</a>;</div>
+<div class="line"><a name="l00731"></a><span class="lineno"> 731</span>&#160;</div>
+<div class="line"><a name="l00738"></a><span class="lineno"> 738</span>&#160;NV_FLEX_API NvFlexTriangleMeshId <a class="code" href="_nv_flex_8h.html#afdda5a5210938a1e8a7c3a8218ad468e">NvFlexCreateTriangleMesh</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib);</div>
+<div class="line"><a name="l00739"></a><span class="lineno"> 739</span>&#160;</div>
+<div class="line"><a name="l00746"></a><span class="lineno"> 746</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a4cb4462803ebff105d151fd45b4efad6">NvFlexDestroyTriangleMesh</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, NvFlexTriangleMeshId mesh);</div>
+<div class="line"><a name="l00747"></a><span class="lineno"> 747</span>&#160;</div>
+<div class="line"><a name="l00761"></a><span class="lineno"> 761</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a4958c555f0ed65dee54c37af32529356">NvFlexUpdateTriangleMesh</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, NvFlexTriangleMeshId mesh, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* vertices, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices, <span class="keywordtype">int</span> numVertices, <span class="keywordtype">int</span> numTriangles, <span class="keyword">const</span> <span class="keywordtype">float</span>* lower, <span class="keyword">const</span> <span class="keywordtype">float</span>* upper);</div>
<div class="line"><a name="l00762"></a><span class="lineno"> 762</span>&#160;</div>
-<div class="line"><a name="l00766"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 766</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_capsule_geometry">NvFlexCapsuleGeometry</a></div>
-<div class="line"><a name="l00767"></a><span class="lineno"> 767</span>&#160;{</div>
-<div class="line"><a name="l00768"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a1241ff3522eafac4b402370a7a6525d8"> 768</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a1241ff3522eafac4b402370a7a6525d8">radius</a>;</div>
-<div class="line"><a name="l00769"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aef1b5bceccca709ebb782d2ea8a61dc9"> 769</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#aef1b5bceccca709ebb782d2ea8a61dc9">halfHeight</a>;</div>
-<div class="line"><a name="l00770"></a><span class="lineno"> 770</span>&#160;};</div>
-<div class="line"><a name="l00771"></a><span class="lineno"> 771</span>&#160;</div>
-<div class="line"><a name="l00775"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 775</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_box_geometry">NvFlexBoxGeometry</a></div>
-<div class="line"><a name="l00776"></a><span class="lineno"> 776</span>&#160;{</div>
-<div class="line"><a name="l00777"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab669c404607156367b09878870dbe30c"> 777</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ab669c404607156367b09878870dbe30c">halfExtents</a>[3];</div>
-<div class="line"><a name="l00778"></a><span class="lineno"> 778</span>&#160;};</div>
-<div class="line"><a name="l00779"></a><span class="lineno"> 779</span>&#160;</div>
-<div class="line"><a name="l00783"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 783</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_convex_mesh_geometry">NvFlexConvexMeshGeometry</a></div>
-<div class="line"><a name="l00784"></a><span class="lineno"> 784</span>&#160;{</div>
-<div class="line"><a name="l00785"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a800620cc4888bbe5696c5f0e19b22bb9"> 785</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a800620cc4888bbe5696c5f0e19b22bb9">scale</a>[3];</div>
-<div class="line"><a name="l00786"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#abdc984644770fec15d7af740c9730186"> 786</a></span>&#160; NvFlexConvexMeshId <a class="code" href="_nv_flex_8h.html#abdc984644770fec15d7af740c9730186">mesh</a>;</div>
-<div class="line"><a name="l00787"></a><span class="lineno"> 787</span>&#160;};</div>
+<div class="line"><a name="l00771"></a><span class="lineno"> 771</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a60794d849b4184335e2a0ddec0a9e6a2">NvFlexGetTriangleMeshBounds</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, <span class="keyword">const</span> NvFlexTriangleMeshId mesh, <span class="keywordtype">float</span>* lower, <span class="keywordtype">float</span>* upper);</div>
+<div class="line"><a name="l00772"></a><span class="lineno"> 772</span>&#160;</div>
+<div class="line"><a name="l00779"></a><span class="lineno"> 779</span>&#160;NV_FLEX_API NvFlexDistanceFieldId <a class="code" href="_nv_flex_8h.html#a5c28caf6d5d513c5adacd4fbc782f308">NvFlexCreateDistanceField</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib);</div>
+<div class="line"><a name="l00780"></a><span class="lineno"> 780</span>&#160;</div>
+<div class="line"><a name="l00787"></a><span class="lineno"> 787</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ab11bdd7f778d17af16cefea33265cb65">NvFlexDestroyDistanceField</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, NvFlexDistanceFieldId sdf);</div>
<div class="line"><a name="l00788"></a><span class="lineno"> 788</span>&#160;</div>
-<div class="line"><a name="l00792"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 792</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_triangle_mesh_geometry">NvFlexTriangleMeshGeometry</a></div>
-<div class="line"><a name="l00793"></a><span class="lineno"> 793</span>&#160;{</div>
-<div class="line"><a name="l00794"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab6e2aa06b69e92cbd3b2bca19f18e794"> 794</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ab6e2aa06b69e92cbd3b2bca19f18e794">scale</a>[3]; </div>
-<div class="line"><a name="l00795"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#af6a50e64591866ae2390a57e3342566c"> 795</a></span>&#160; NvFlexTriangleMeshId <a class="code" href="_nv_flex_8h.html#af6a50e64591866ae2390a57e3342566c">mesh</a>; </div>
-<div class="line"><a name="l00796"></a><span class="lineno"> 796</span>&#160;};</div>
-<div class="line"><a name="l00797"></a><span class="lineno"> 797</span>&#160;</div>
-<div class="line"><a name="l00802"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 802</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_s_d_f_geometry">NvFlexSDFGeometry</a></div>
-<div class="line"><a name="l00803"></a><span class="lineno"> 803</span>&#160;{</div>
-<div class="line"><a name="l00804"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0008a52f6ae1e17c436b095549bf1c78"> 804</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a0008a52f6ae1e17c436b095549bf1c78">scale</a>; </div>
-<div class="line"><a name="l00805"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0a6936f3cb0544ad624f1dea6b7eb50c"> 805</a></span>&#160; NvFlexDistanceFieldId <a class="code" href="_nv_flex_8h.html#a0a6936f3cb0544ad624f1dea6b7eb50c">field</a>; </div>
-<div class="line"><a name="l00806"></a><span class="lineno"> 806</span>&#160;};</div>
-<div class="line"><a name="l00807"></a><span class="lineno"> 807</span>&#160;</div>
-<div class="line"><a name="l00812"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 812</a></span>&#160;<span class="keyword">union </span><a class="code" href="_nv_flex_8h.html#union_nv_flex_collision_geometry">NvFlexCollisionGeometry</a></div>
-<div class="line"><a name="l00813"></a><span class="lineno"> 813</span>&#160;{</div>
-<div class="line"><a name="l00814"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0e3c0e02ec7addd25ebb3355a8865bfb"> 814</a></span>&#160; <a class="code" href="_nv_flex_8h.html#struct_nv_flex_sphere_geometry">NvFlexSphereGeometry</a> <a class="code" href="_nv_flex_8h.html#a0e3c0e02ec7addd25ebb3355a8865bfb">sphere</a>;</div>
-<div class="line"><a name="l00815"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a8ad5aa3c9c9456607de9a2c9f1d0d2c1"> 815</a></span>&#160; <a class="code" href="_nv_flex_8h.html#struct_nv_flex_capsule_geometry">NvFlexCapsuleGeometry</a> <a class="code" href="_nv_flex_8h.html#a8ad5aa3c9c9456607de9a2c9f1d0d2c1">capsule</a>;</div>
-<div class="line"><a name="l00816"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a53e827707abaf2e03b78c3c88469d7bf"> 816</a></span>&#160; <a class="code" href="_nv_flex_8h.html#struct_nv_flex_box_geometry">NvFlexBoxGeometry</a> <a class="code" href="_nv_flex_8h.html#a53e827707abaf2e03b78c3c88469d7bf">box</a>;</div>
-<div class="line"><a name="l00817"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ae701fdcc0e7bf26c1dfc54d400ffb3d2"> 817</a></span>&#160; <a class="code" href="_nv_flex_8h.html#struct_nv_flex_convex_mesh_geometry">NvFlexConvexMeshGeometry</a> <a class="code" href="_nv_flex_8h.html#ae701fdcc0e7bf26c1dfc54d400ffb3d2">convexMesh</a>;</div>
-<div class="line"><a name="l00818"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a064e3ce30320610d495ba3faa72dc8d6"> 818</a></span>&#160; <a class="code" href="_nv_flex_8h.html#struct_nv_flex_triangle_mesh_geometry">NvFlexTriangleMeshGeometry</a> <a class="code" href="_nv_flex_8h.html#a064e3ce30320610d495ba3faa72dc8d6">triMesh</a>;</div>
-<div class="line"><a name="l00819"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ac0049037dcff7a769030acd567eac6cd"> 819</a></span>&#160; <a class="code" href="_nv_flex_8h.html#struct_nv_flex_s_d_f_geometry">NvFlexSDFGeometry</a> <a class="code" href="_nv_flex_8h.html#ac0049037dcff7a769030acd567eac6cd">sdf</a>;</div>
-<div class="line"><a name="l00820"></a><span class="lineno"> 820</span>&#160;};</div>
-<div class="line"><a name="l00821"></a><span class="lineno"> 821</span>&#160;</div>
-<div class="line"><a name="l00822"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26ba"> 822</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26ba">NvFlexCollisionShapeType</a></div>
-<div class="line"><a name="l00823"></a><span class="lineno"> 823</span>&#160;{</div>
-<div class="line"><a name="l00824"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baae22144512ae098865c6725af16a68ad3"> 824</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baae22144512ae098865c6725af16a68ad3">eNvFlexShapeSphere</a> = 0, </div>
-<div class="line"><a name="l00825"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baa1724c140b583fbf2c11c14a24dd3764a"> 825</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baa1724c140b583fbf2c11c14a24dd3764a">eNvFlexShapeCapsule</a> = 1, </div>
-<div class="line"><a name="l00826"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baab17c8dd4f9500016b77a9b49de3c48e7"> 826</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baab17c8dd4f9500016b77a9b49de3c48e7">eNvFlexShapeBox</a> = 2, </div>
-<div class="line"><a name="l00827"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baaed52f0e803c6745ffc1a5f018a8756ce"> 827</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baaed52f0e803c6745ffc1a5f018a8756ce">eNvFlexShapeConvexMesh</a> = 3, </div>
-<div class="line"><a name="l00828"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baa315488da382a5e9794c83358385f7ae1"> 828</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baa315488da382a5e9794c83358385f7ae1">eNvFlexShapeTriangleMesh</a> = 4, </div>
-<div class="line"><a name="l00829"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baa1fd78f8694b954f8d12fe7d911f17180"> 829</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baa1fd78f8694b954f8d12fe7d911f17180">eNvFlexShapeSDF</a> = 5, </div>
-<div class="line"><a name="l00830"></a><span class="lineno"> 830</span>&#160;};</div>
-<div class="line"><a name="l00831"></a><span class="lineno"> 831</span>&#160;</div>
-<div class="line"><a name="l00832"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304c"> 832</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304c">NvFlexCollisionShapeFlags</a></div>
-<div class="line"><a name="l00833"></a><span class="lineno"> 833</span>&#160;{</div>
-<div class="line"><a name="l00834"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304cae8a10737948abf6973f0f1d66bae7ef8"> 834</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304cae8a10737948abf6973f0f1d66bae7ef8">eNvFlexShapeFlagTypeMask</a> = 0x7, </div>
-<div class="line"><a name="l00835"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304cadc6740cf6d829fba159d92e43ffb5992"> 835</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304cadc6740cf6d829fba159d92e43ffb5992">eNvFlexShapeFlagDynamic</a> = 8, </div>
-<div class="line"><a name="l00836"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304ca409215fa9b917f2d0830a66bd11b3ff8"> 836</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304ca409215fa9b917f2d0830a66bd11b3ff8">eNvFlexShapeFlagTrigger</a> = 16, </div>
-<div class="line"><a name="l00837"></a><span class="lineno"> 837</span>&#160;</div>
-<div class="line"><a name="l00838"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304caa1c1225f6b8b2906c83748cfc46b81d9"> 838</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304caa1c1225f6b8b2906c83748cfc46b81d9">eNvFlexShapeFlagReserved</a> = 0xffffff00</div>
-<div class="line"><a name="l00839"></a><span class="lineno"> 839</span>&#160;};</div>
-<div class="line"><a name="l00840"></a><span class="lineno"> 840</span>&#160;</div>
-<div class="line"><a name="l00844"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ad6ee1e23e0c49aad63df8f605182de3a"> 844</a></span>&#160;NV_FLEX_API <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#ad6ee1e23e0c49aad63df8f605182de3a">NvFlexMakeShapeFlags</a>(<a class="code" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26ba">NvFlexCollisionShapeType</a> type, <span class="keywordtype">bool</span> dynamic) { <span class="keywordflow">return</span> type | (dynamic?<a class="code" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304cadc6740cf6d829fba159d92e43ffb5992">eNvFlexShapeFlagDynamic</a>:0); }</div>
-<div class="line"><a name="l00845"></a><span class="lineno"> 845</span>&#160;</div>
-<div class="line"><a name="l00859"></a><span class="lineno"> 859</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#aea4e7117722df53dfe44c676496117fa">NvFlexSetShapes</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* geometry, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* shapePositions, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* shapeRotations, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* shapePrevPositions, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* shapePrevRotations, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* shapeFlags, <span class="keywordtype">int</span> numShapes);</div>
-<div class="line"><a name="l00860"></a><span class="lineno"> 860</span>&#160;</div>
-<div class="line"><a name="l00871"></a><span class="lineno"> 871</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#aa03d94be697cdc3aaa56e469d87255a4">NvFlexSetDynamicTriangles</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* normals, <span class="keywordtype">int</span> numTris);</div>
-<div class="line"><a name="l00880"></a><span class="lineno"> 880</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#abdfd0834422dd99154a27962614525e5">NvFlexGetDynamicTriangles</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* normals, <span class="keywordtype">int</span> numTris);</div>
-<div class="line"><a name="l00881"></a><span class="lineno"> 881</span>&#160;</div>
-<div class="line"><a name="l00896"></a><span class="lineno"> 896</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a7f2b59fba77c60ce116e1eac57d63e50">NvFlexSetInflatables</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* startTris, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* numTris, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* restVolumes, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* overPressures, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* constraintScales, <span class="keywordtype">int</span> numInflatables);</div>
-<div class="line"><a name="l00897"></a><span class="lineno"> 897</span>&#160;</div>
-<div class="line"><a name="l00905"></a><span class="lineno"> 905</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a6f6f14e625dc744a127be81e6dc4cb74">NvFlexGetDensities</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* densities, <span class="keywordtype">int</span> n);</div>
+<div class="line"><a name="l00800"></a><span class="lineno"> 800</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a584ffb275b9986fd5444ed1a7ea247d9">NvFlexUpdateDistanceField</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, NvFlexDistanceFieldId sdf, <span class="keywordtype">int</span> dimx, <span class="keywordtype">int</span> dimy, <span class="keywordtype">int</span> dimz, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* field);</div>
+<div class="line"><a name="l00801"></a><span class="lineno"> 801</span>&#160;</div>
+<div class="line"><a name="l00808"></a><span class="lineno"> 808</span>&#160;NV_FLEX_API NvFlexConvexMeshId <a class="code" href="_nv_flex_8h.html#afbaafe2b1006352002b03aabaca531cc">NvFlexCreateConvexMesh</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib);</div>
+<div class="line"><a name="l00809"></a><span class="lineno"> 809</span>&#160;</div>
+<div class="line"><a name="l00816"></a><span class="lineno"> 816</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ac85b6372e5c7bfc508ecb7b8c59c72a0">NvFlexDestroyConvexMesh</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, NvFlexConvexMeshId convex);</div>
+<div class="line"><a name="l00817"></a><span class="lineno"> 817</span>&#160;</div>
+<div class="line"><a name="l00828"></a><span class="lineno"> 828</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ab452c355f92dda050d4b4dafb8e71b03">NvFlexUpdateConvexMesh</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, NvFlexConvexMeshId convex, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* planes, <span class="keywordtype">int</span> numPlanes, <span class="keyword">const</span> <span class="keywordtype">float</span>* lower, <span class="keyword">const</span> <span class="keywordtype">float</span>* upper);</div>
+<div class="line"><a name="l00829"></a><span class="lineno"> 829</span>&#160;</div>
+<div class="line"><a name="l00838"></a><span class="lineno"> 838</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ad56e661161763579afb375b3841eb5ff">NvFlexGetConvexMeshBounds</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, NvFlexConvexMeshId mesh, <span class="keywordtype">float</span>* lower, <span class="keywordtype">float</span>* upper);</div>
+<div class="line"><a name="l00839"></a><span class="lineno"> 839</span>&#160;</div>
+<div class="line"><a name="l00843"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 843</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_sphere_geometry">NvFlexSphereGeometry</a></div>
+<div class="line"><a name="l00844"></a><span class="lineno"> 844</span>&#160;{</div>
+<div class="line"><a name="l00845"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a7a6e24c01235abc364ed12570ab15f84"> 845</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a7a6e24c01235abc364ed12570ab15f84">radius</a>;</div>
+<div class="line"><a name="l00846"></a><span class="lineno"> 846</span>&#160;};</div>
+<div class="line"><a name="l00847"></a><span class="lineno"> 847</span>&#160;</div>
+<div class="line"><a name="l00851"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 851</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_capsule_geometry">NvFlexCapsuleGeometry</a></div>
+<div class="line"><a name="l00852"></a><span class="lineno"> 852</span>&#160;{</div>
+<div class="line"><a name="l00853"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a1241ff3522eafac4b402370a7a6525d8"> 853</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a1241ff3522eafac4b402370a7a6525d8">radius</a>;</div>
+<div class="line"><a name="l00854"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#aef1b5bceccca709ebb782d2ea8a61dc9"> 854</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#aef1b5bceccca709ebb782d2ea8a61dc9">halfHeight</a>;</div>
+<div class="line"><a name="l00855"></a><span class="lineno"> 855</span>&#160;};</div>
+<div class="line"><a name="l00856"></a><span class="lineno"> 856</span>&#160;</div>
+<div class="line"><a name="l00860"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 860</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_box_geometry">NvFlexBoxGeometry</a></div>
+<div class="line"><a name="l00861"></a><span class="lineno"> 861</span>&#160;{</div>
+<div class="line"><a name="l00862"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab669c404607156367b09878870dbe30c"> 862</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ab669c404607156367b09878870dbe30c">halfExtents</a>[3];</div>
+<div class="line"><a name="l00863"></a><span class="lineno"> 863</span>&#160;};</div>
+<div class="line"><a name="l00864"></a><span class="lineno"> 864</span>&#160;</div>
+<div class="line"><a name="l00868"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 868</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_convex_mesh_geometry">NvFlexConvexMeshGeometry</a></div>
+<div class="line"><a name="l00869"></a><span class="lineno"> 869</span>&#160;{</div>
+<div class="line"><a name="l00870"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a800620cc4888bbe5696c5f0e19b22bb9"> 870</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a800620cc4888bbe5696c5f0e19b22bb9">scale</a>[3];</div>
+<div class="line"><a name="l00871"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#abdc984644770fec15d7af740c9730186"> 871</a></span>&#160; NvFlexConvexMeshId <a class="code" href="_nv_flex_8h.html#abdc984644770fec15d7af740c9730186">mesh</a>;</div>
+<div class="line"><a name="l00872"></a><span class="lineno"> 872</span>&#160;};</div>
+<div class="line"><a name="l00873"></a><span class="lineno"> 873</span>&#160;</div>
+<div class="line"><a name="l00877"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 877</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_triangle_mesh_geometry">NvFlexTriangleMeshGeometry</a></div>
+<div class="line"><a name="l00878"></a><span class="lineno"> 878</span>&#160;{</div>
+<div class="line"><a name="l00879"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ab6e2aa06b69e92cbd3b2bca19f18e794"> 879</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#ab6e2aa06b69e92cbd3b2bca19f18e794">scale</a>[3]; </div>
+<div class="line"><a name="l00880"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#af6a50e64591866ae2390a57e3342566c"> 880</a></span>&#160; NvFlexTriangleMeshId <a class="code" href="_nv_flex_8h.html#af6a50e64591866ae2390a57e3342566c">mesh</a>; </div>
+<div class="line"><a name="l00881"></a><span class="lineno"> 881</span>&#160;};</div>
+<div class="line"><a name="l00882"></a><span class="lineno"> 882</span>&#160;</div>
+<div class="line"><a name="l00887"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 887</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_s_d_f_geometry">NvFlexSDFGeometry</a></div>
+<div class="line"><a name="l00888"></a><span class="lineno"> 888</span>&#160;{</div>
+<div class="line"><a name="l00889"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0008a52f6ae1e17c436b095549bf1c78"> 889</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a0008a52f6ae1e17c436b095549bf1c78">scale</a>; </div>
+<div class="line"><a name="l00890"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0a6936f3cb0544ad624f1dea6b7eb50c"> 890</a></span>&#160; NvFlexDistanceFieldId <a class="code" href="_nv_flex_8h.html#a0a6936f3cb0544ad624f1dea6b7eb50c">field</a>; </div>
+<div class="line"><a name="l00891"></a><span class="lineno"> 891</span>&#160;};</div>
+<div class="line"><a name="l00892"></a><span class="lineno"> 892</span>&#160;</div>
+<div class="line"><a name="l00897"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 897</a></span>&#160;<span class="keyword">union </span><a class="code" href="_nv_flex_8h.html#union_nv_flex_collision_geometry">NvFlexCollisionGeometry</a></div>
+<div class="line"><a name="l00898"></a><span class="lineno"> 898</span>&#160;{</div>
+<div class="line"><a name="l00899"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0e3c0e02ec7addd25ebb3355a8865bfb"> 899</a></span>&#160; <a class="code" href="_nv_flex_8h.html#struct_nv_flex_sphere_geometry">NvFlexSphereGeometry</a> <a class="code" href="_nv_flex_8h.html#a0e3c0e02ec7addd25ebb3355a8865bfb">sphere</a>;</div>
+<div class="line"><a name="l00900"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a8ad5aa3c9c9456607de9a2c9f1d0d2c1"> 900</a></span>&#160; <a class="code" href="_nv_flex_8h.html#struct_nv_flex_capsule_geometry">NvFlexCapsuleGeometry</a> <a class="code" href="_nv_flex_8h.html#a8ad5aa3c9c9456607de9a2c9f1d0d2c1">capsule</a>;</div>
+<div class="line"><a name="l00901"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a53e827707abaf2e03b78c3c88469d7bf"> 901</a></span>&#160; <a class="code" href="_nv_flex_8h.html#struct_nv_flex_box_geometry">NvFlexBoxGeometry</a> <a class="code" href="_nv_flex_8h.html#a53e827707abaf2e03b78c3c88469d7bf">box</a>;</div>
+<div class="line"><a name="l00902"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ae701fdcc0e7bf26c1dfc54d400ffb3d2"> 902</a></span>&#160; <a class="code" href="_nv_flex_8h.html#struct_nv_flex_convex_mesh_geometry">NvFlexConvexMeshGeometry</a> <a class="code" href="_nv_flex_8h.html#ae701fdcc0e7bf26c1dfc54d400ffb3d2">convexMesh</a>;</div>
+<div class="line"><a name="l00903"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a064e3ce30320610d495ba3faa72dc8d6"> 903</a></span>&#160; <a class="code" href="_nv_flex_8h.html#struct_nv_flex_triangle_mesh_geometry">NvFlexTriangleMeshGeometry</a> <a class="code" href="_nv_flex_8h.html#a064e3ce30320610d495ba3faa72dc8d6">triMesh</a>;</div>
+<div class="line"><a name="l00904"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ac0049037dcff7a769030acd567eac6cd"> 904</a></span>&#160; <a class="code" href="_nv_flex_8h.html#struct_nv_flex_s_d_f_geometry">NvFlexSDFGeometry</a> <a class="code" href="_nv_flex_8h.html#ac0049037dcff7a769030acd567eac6cd">sdf</a>;</div>
+<div class="line"><a name="l00905"></a><span class="lineno"> 905</span>&#160;};</div>
<div class="line"><a name="l00906"></a><span class="lineno"> 906</span>&#160;</div>
-<div class="line"><a name="l00920"></a><span class="lineno"> 920</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ae28167c680ad56dcff600ce0a223cec5">NvFlexGetAnisotropy</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* q1, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* q2, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* q3);</div>
-<div class="line"><a name="l00930"></a><span class="lineno"> 930</span>&#160;NV_FLEX_API <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#a37ada4b95999cc253dfb049b99030d50">NvFlexGetDiffuseParticles</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* p, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* v, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices);</div>
-<div class="line"><a name="l00931"></a><span class="lineno"> 931</span>&#160;</div>
-<div class="line"><a name="l00942"></a><span class="lineno"> 942</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a5a7213593dd9a23d9d67f8517d1da9de">NvFlexSetDiffuseParticles</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* p, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* v, <span class="keywordtype">int</span> n);</div>
-<div class="line"><a name="l00943"></a><span class="lineno"> 943</span>&#160;</div>
-<div class="line"><a name="l00953"></a><span class="lineno"> 953</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a7edac9cf450917147b83e98f5cb09f5d">NvFlexGetContacts</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* planes, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* velocities, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* counts);</div>
-<div class="line"><a name="l00954"></a><span class="lineno"> 954</span>&#160;</div>
-<div class="line"><a name="l00963"></a><span class="lineno"> 963</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ab1eec84a21b1872fba11c9b4cc1d1629">NvFlexGetBounds</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* lower, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* upper);</div>
-<div class="line"><a name="l00964"></a><span class="lineno"> 964</span>&#160;</div>
-<div class="line"><a name="l00973"></a><span class="lineno"> 973</span>&#160;NV_FLEX_API <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a221a4621ab98eca6ecd3368d288154a4">NvFlexGetDeviceLatency</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver);</div>
-<div class="line"><a name="l00974"></a><span class="lineno"> 974</span>&#160;</div>
-<div class="line"><a name="l00985"></a><span class="lineno"> 985</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ab16b6d2e11e0ab417ee6c4cf16f0a27d">NvFlexGetTimers</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#struct_nv_flex_timers">NvFlexTimers</a>* timers);</div>
-<div class="line"><a name="l00986"></a><span class="lineno"> 986</span>&#160;</div>
-<div class="line"><a name="l00990"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 990</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_detail_timer">NvFlexDetailTimer</a></div>
-<div class="line"><a name="l00991"></a><span class="lineno"> 991</span>&#160;{ </div>
-<div class="line"><a name="l00992"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a3ddbb30a2fde4a2e9ccec7854300b1d4"> 992</a></span>&#160; <span class="keywordtype">char</span>* <a class="code" href="_nv_flex_8h.html#a3ddbb30a2fde4a2e9ccec7854300b1d4">name</a>; </div>
-<div class="line"><a name="l00993"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a83f6117fe98bc6426027a9b784fd737c"> 993</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a83f6117fe98bc6426027a9b784fd737c">time</a>;</div>
-<div class="line"><a name="l00994"></a><span class="lineno"> 994</span>&#160;};</div>
-<div class="line"><a name="l00995"></a><span class="lineno"> 995</span>&#160;</div>
-<div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>&#160;NV_FLEX_API <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#ab1efb6764f65900cb09f0188ad6da08a">NvFlexGetDetailTimers</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#struct_nv_flex_detail_timer">NvFlexDetailTimer</a>** timers);</div>
-<div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>&#160;</div>
-<div class="line"><a name="l01019"></a><span class="lineno"> 1019</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* <a class="code" href="_nv_flex_8h.html#ad48f83b8442323687d2268206e913496">NvFlexAllocBuffer</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, <span class="keywordtype">int</span> elementCount, <span class="keywordtype">int</span> elementByteStride, <a class="code" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3">NvFlexBufferType</a> type);</div>
-<div class="line"><a name="l01020"></a><span class="lineno"> 1020</span>&#160;</div>
-<div class="line"><a name="l01026"></a><span class="lineno"> 1026</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ab559759820a4322aff061745ef26c867">NvFlexFreeBuffer</a>(<a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* buf);</div>
+<div class="line"><a name="l00907"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26ba"> 907</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26ba">NvFlexCollisionShapeType</a></div>
+<div class="line"><a name="l00908"></a><span class="lineno"> 908</span>&#160;{</div>
+<div class="line"><a name="l00909"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baae22144512ae098865c6725af16a68ad3"> 909</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baae22144512ae098865c6725af16a68ad3">eNvFlexShapeSphere</a> = 0, </div>
+<div class="line"><a name="l00910"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baa1724c140b583fbf2c11c14a24dd3764a"> 910</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baa1724c140b583fbf2c11c14a24dd3764a">eNvFlexShapeCapsule</a> = 1, </div>
+<div class="line"><a name="l00911"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baab17c8dd4f9500016b77a9b49de3c48e7"> 911</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baab17c8dd4f9500016b77a9b49de3c48e7">eNvFlexShapeBox</a> = 2, </div>
+<div class="line"><a name="l00912"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baaed52f0e803c6745ffc1a5f018a8756ce"> 912</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baaed52f0e803c6745ffc1a5f018a8756ce">eNvFlexShapeConvexMesh</a> = 3, </div>
+<div class="line"><a name="l00913"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baa315488da382a5e9794c83358385f7ae1"> 913</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baa315488da382a5e9794c83358385f7ae1">eNvFlexShapeTriangleMesh</a> = 4, </div>
+<div class="line"><a name="l00914"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baa1fd78f8694b954f8d12fe7d911f17180"> 914</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baa1fd78f8694b954f8d12fe7d911f17180">eNvFlexShapeSDF</a> = 5, </div>
+<div class="line"><a name="l00915"></a><span class="lineno"> 915</span>&#160;};</div>
+<div class="line"><a name="l00916"></a><span class="lineno"> 916</span>&#160;</div>
+<div class="line"><a name="l00917"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304c"> 917</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304c">NvFlexCollisionShapeFlags</a></div>
+<div class="line"><a name="l00918"></a><span class="lineno"> 918</span>&#160;{</div>
+<div class="line"><a name="l00919"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304cae8a10737948abf6973f0f1d66bae7ef8"> 919</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304cae8a10737948abf6973f0f1d66bae7ef8">eNvFlexShapeFlagTypeMask</a> = 0x7, </div>
+<div class="line"><a name="l00920"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304cadc6740cf6d829fba159d92e43ffb5992"> 920</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304cadc6740cf6d829fba159d92e43ffb5992">eNvFlexShapeFlagDynamic</a> = 0x8, </div>
+<div class="line"><a name="l00921"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304ca409215fa9b917f2d0830a66bd11b3ff8"> 921</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304ca409215fa9b917f2d0830a66bd11b3ff8">eNvFlexShapeFlagTrigger</a> = 0x10, </div>
+<div class="line"><a name="l00922"></a><span class="lineno"> 922</span>&#160; </div>
+<div class="line"><a name="l00923"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304caa1c1225f6b8b2906c83748cfc46b81d9"> 923</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304caa1c1225f6b8b2906c83748cfc46b81d9">eNvFlexShapeFlagReserved</a> = 0xffffff00</div>
+<div class="line"><a name="l00924"></a><span class="lineno"> 924</span>&#160;};</div>
+<div class="line"><a name="l00925"></a><span class="lineno"> 925</span>&#160;</div>
+<div class="line"><a name="l00933"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ad83b7fb561a91467a3094771bb682b96"> 933</a></span>&#160;NV_FLEX_API <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#ad83b7fb561a91467a3094771bb682b96">NvFlexMakeShapeFlagsWithChannels</a>(<a class="code" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26ba">NvFlexCollisionShapeType</a> type, <span class="keywordtype">bool</span> dynamic, <span class="keywordtype">int</span> shapeChannels) { <span class="keywordflow">return</span> type | (dynamic?<a class="code" href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304cadc6740cf6d829fba159d92e43ffb5992">eNvFlexShapeFlagDynamic</a>:0) | shapeChannels; }</div>
+<div class="line"><a name="l00934"></a><span class="lineno"> 934</span>&#160;</div>
+<div class="line"><a name="l00938"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#ad6ee1e23e0c49aad63df8f605182de3a"> 938</a></span>&#160;NV_FLEX_API <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#ad6ee1e23e0c49aad63df8f605182de3a">NvFlexMakeShapeFlags</a>(<a class="code" href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26ba">NvFlexCollisionShapeType</a> type, <span class="keywordtype">bool</span> dynamic) { <span class="keywordflow">return</span> <a class="code" href="_nv_flex_8h.html#ad83b7fb561a91467a3094771bb682b96">NvFlexMakeShapeFlagsWithChannels</a>(type, dynamic, <a class="code" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ae4ea43366942f719f40e8526ad21a038">eNvFlexPhaseShapeChannelMask</a>); }</div>
+<div class="line"><a name="l00939"></a><span class="lineno"> 939</span>&#160;</div>
+<div class="line"><a name="l00940"></a><span class="lineno"> 940</span>&#160;</div>
+<div class="line"><a name="l00954"></a><span class="lineno"> 954</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#aea4e7117722df53dfe44c676496117fa">NvFlexSetShapes</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* geometry, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* shapePositions, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* shapeRotations, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* shapePrevPositions, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* shapePrevRotations, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* shapeFlags, <span class="keywordtype">int</span> numShapes);</div>
+<div class="line"><a name="l00955"></a><span class="lineno"> 955</span>&#160;</div>
+<div class="line"><a name="l00966"></a><span class="lineno"> 966</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#aa03d94be697cdc3aaa56e469d87255a4">NvFlexSetDynamicTriangles</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* normals, <span class="keywordtype">int</span> numTris);</div>
+<div class="line"><a name="l00975"></a><span class="lineno"> 975</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#abdfd0834422dd99154a27962614525e5">NvFlexGetDynamicTriangles</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* normals, <span class="keywordtype">int</span> numTris);</div>
+<div class="line"><a name="l00976"></a><span class="lineno"> 976</span>&#160;</div>
+<div class="line"><a name="l00991"></a><span class="lineno"> 991</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a7f2b59fba77c60ce116e1eac57d63e50">NvFlexSetInflatables</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* startTris, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* numTris, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* restVolumes, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* overPressures, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* constraintScales, <span class="keywordtype">int</span> numInflatables);</div>
+<div class="line"><a name="l00992"></a><span class="lineno"> 992</span>&#160;</div>
+<div class="line"><a name="l01000"></a><span class="lineno"> 1000</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a3a20cc2539983a009caaf77ec9ceab82">NvFlexGetDensities</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* densities, <span class="keyword">const</span> <a class="code" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a>* desc);</div>
+<div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>&#160;</div>
+<div class="line"><a name="l01016"></a><span class="lineno"> 1016</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#aef768edc8e4df1a78a94a6c971541550">NvFlexGetAnisotropy</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* q1, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* q2, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* q3, <span class="keyword">const</span> <a class="code" href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a>* desc);</div>
+<div class="line"><a name="l01026"></a><span class="lineno"> 1026</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#afa458a6eec8b0d117e53c40c13788fd9">NvFlexGetDiffuseParticles</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* p, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* v, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* count);</div>
<div class="line"><a name="l01027"></a><span class="lineno"> 1027</span>&#160;</div>
-<div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>&#160;NV_FLEX_API <span class="keywordtype">void</span>* <a class="code" href="_nv_flex_8h.html#a0898bb9210440b159688d4647f6eb083">NvFlexMap</a>(<a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* buffer, <span class="keywordtype">int</span> flags);</div>
-<div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>&#160;</div>
-<div class="line"><a name="l01044"></a><span class="lineno"> 1044</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a054cb27646a389ea257d1bbde46a6e97">NvFlexUnmap</a>(<a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* buffer);</div>
-<div class="line"><a name="l01045"></a><span class="lineno"> 1045</span>&#160;</div>
-<div class="line"><a name="l01075"></a><span class="lineno"> 1075</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* <a class="code" href="_nv_flex_8h.html#aab83daf46e5a9428a0ad76fb75e8ec7e">NvFlexRegisterOGLBuffer</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, <span class="keywordtype">int</span> buf, <span class="keywordtype">int</span> elementCount, <span class="keywordtype">int</span> elementByteStride);</div>
-<div class="line"><a name="l01076"></a><span class="lineno"> 1076</span>&#160;</div>
-<div class="line"><a name="l01082"></a><span class="lineno"> 1082</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a78045a8d4e856372df108dc616a94cd8">NvFlexUnregisterOGLBuffer</a>(<a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* buf);</div>
-<div class="line"><a name="l01083"></a><span class="lineno"> 1083</span>&#160;</div>
-<div class="line"><a name="l01093"></a><span class="lineno"> 1093</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* <a class="code" href="_nv_flex_8h.html#ab487e68ce1c84ce1eec0c85b7daf5aa0">NvFlexRegisterD3DBuffer</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, <span class="keywordtype">void</span>* buffer, <span class="keywordtype">int</span> elementCount, <span class="keywordtype">int</span> elementByteStride);</div>
-<div class="line"><a name="l01094"></a><span class="lineno"> 1094</span>&#160;</div>
-<div class="line"><a name="l01100"></a><span class="lineno"> 1100</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ad607e7916e5d76b384a61f1c1f94ab32">NvFlexUnregisterD3DBuffer</a>(<a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* buf);</div>
-<div class="line"><a name="l01101"></a><span class="lineno"> 1101</span>&#160;</div>
-<div class="line"><a name="l01107"></a><span class="lineno"> 1107</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a42ec7b30c79d4733e6a756b5d9b15ee6">NvFlexAcquireContext</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib);</div>
-<div class="line"><a name="l01108"></a><span class="lineno"> 1108</span>&#160;</div>
-<div class="line"><a name="l01113"></a><span class="lineno"> 1113</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ae6671f352bd77e296609d0bc2a57fd11">NvFlexRestoreContext</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib);</div>
-<div class="line"><a name="l01114"></a><span class="lineno"> 1114</span>&#160;</div>
-<div class="line"><a name="l01120"></a><span class="lineno"> 1120</span>&#160;NV_FLEX_API <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="_nv_flex_8h.html#a4c451971259524c6878b6b1ed4023ada">NvFlexGetDeviceName</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib);</div>
-<div class="line"><a name="l01121"></a><span class="lineno"> 1121</span>&#160;</div>
-<div class="line"><a name="l01131"></a><span class="lineno"> 1131</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a2ac0a898a565a2cdf13b80acd4a3555c">NvFlexGetDeviceAndContext</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, <span class="keywordtype">void</span>** device, <span class="keywordtype">void</span>** context);</div>
-<div class="line"><a name="l01132"></a><span class="lineno"> 1132</span>&#160; </div>
-<div class="line"><a name="l01133"></a><span class="lineno"> 1133</span>&#160;</div>
-<div class="line"><a name="l01139"></a><span class="lineno"> 1139</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a898eb8e66a456dd2266c694f29cab600">NvFlexFlush</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib);</div>
-<div class="line"><a name="l01140"></a><span class="lineno"> 1140</span>&#160;</div>
-<div class="line"><a name="l01142"></a><span class="lineno"> 1142</span>&#160;</div>
-<div class="line"><a name="l01147"></a><span class="lineno"> 1147</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> NvFlexSetDebug(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <span class="keywordtype">bool</span> enable);</div>
-<div class="line"><a name="l01148"></a><span class="lineno"> 1148</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> NvFlexGetShapeBVH(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <span class="keywordtype">void</span>* bvh);</div>
-<div class="line"><a name="l01149"></a><span class="lineno"> 1149</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> NvFlexCopySolver(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* dst, <a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* src);</div>
-<div class="line"><a name="l01150"></a><span class="lineno"> 1150</span>&#160;</div>
-<div class="line"><a name="l01152"></a><span class="lineno"> 1152</span>&#160;</div>
-<div class="line"><a name="l01153"></a><span class="lineno"> 1153</span>&#160;} <span class="comment">// extern &quot;C&quot;</span></div>
-<div class="line"><a name="l01154"></a><span class="lineno"> 1154</span>&#160;</div>
-<div class="line"><a name="l01155"></a><span class="lineno"> 1155</span>&#160;<span class="preprocessor">#endif // NV_FLEX_H</span></div>
+<div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a5a7213593dd9a23d9d67f8517d1da9de">NvFlexSetDiffuseParticles</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* p, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* v, <span class="keywordtype">int</span> n);</div>
+<div class="line"><a name="l01039"></a><span class="lineno"> 1039</span>&#160;</div>
+<div class="line"><a name="l01049"></a><span class="lineno"> 1049</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a7edac9cf450917147b83e98f5cb09f5d">NvFlexGetContacts</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* planes, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* velocities, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* indices, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* counts);</div>
+<div class="line"><a name="l01050"></a><span class="lineno"> 1050</span>&#160;</div>
+<div class="line"><a name="l01094"></a><span class="lineno"> 1094</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ade1ef600ada4d7567e515258b289e209">NvFlexGetNeighbors</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* neighbors, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* counts, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* remap);</div>
+<div class="line"><a name="l01095"></a><span class="lineno"> 1095</span>&#160;</div>
+<div class="line"><a name="l01104"></a><span class="lineno"> 1104</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ab1eec84a21b1872fba11c9b4cc1d1629">NvFlexGetBounds</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* lower, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* upper);</div>
+<div class="line"><a name="l01105"></a><span class="lineno"> 1105</span>&#160;</div>
+<div class="line"><a name="l01117"></a><span class="lineno"> 1117</span>&#160;NV_FLEX_API <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#aa77d2a4edd4ccd79c9389854dca80613">NvFlexGetDeviceLatency</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span>* begin, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span>* end, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span>* frequency);</div>
+<div class="line"><a name="l01118"></a><span class="lineno"> 1118</span>&#160;</div>
+<div class="line"><a name="l01129"></a><span class="lineno"> 1129</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ab16b6d2e11e0ab417ee6c4cf16f0a27d">NvFlexGetTimers</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#struct_nv_flex_timers">NvFlexTimers</a>* timers);</div>
+<div class="line"><a name="l01130"></a><span class="lineno"> 1130</span>&#160;</div>
+<div class="line"><a name="l01134"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html"> 1134</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_8h.html#struct_nv_flex_detail_timer">NvFlexDetailTimer</a></div>
+<div class="line"><a name="l01135"></a><span class="lineno"> 1135</span>&#160;{ </div>
+<div class="line"><a name="l01136"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a3ddbb30a2fde4a2e9ccec7854300b1d4"> 1136</a></span>&#160; <span class="keywordtype">char</span>* <a class="code" href="_nv_flex_8h.html#a3ddbb30a2fde4a2e9ccec7854300b1d4">name</a>; </div>
+<div class="line"><a name="l01137"></a><span class="lineno"><a class="line" href="_nv_flex_8h.html#a83f6117fe98bc6426027a9b784fd737c"> 1137</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_8h.html#a83f6117fe98bc6426027a9b784fd737c">time</a>;</div>
+<div class="line"><a name="l01138"></a><span class="lineno"> 1138</span>&#160;};</div>
+<div class="line"><a name="l01139"></a><span class="lineno"> 1139</span>&#160;</div>
+<div class="line"><a name="l01152"></a><span class="lineno"> 1152</span>&#160;NV_FLEX_API <span class="keywordtype">int</span> <a class="code" href="_nv_flex_8h.html#ab1efb6764f65900cb09f0188ad6da08a">NvFlexGetDetailTimers</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#struct_nv_flex_detail_timer">NvFlexDetailTimer</a>** timers);</div>
+<div class="line"><a name="l01153"></a><span class="lineno"> 1153</span>&#160;</div>
+<div class="line"><a name="l01163"></a><span class="lineno"> 1163</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* <a class="code" href="_nv_flex_8h.html#ad48f83b8442323687d2268206e913496">NvFlexAllocBuffer</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, <span class="keywordtype">int</span> elementCount, <span class="keywordtype">int</span> elementByteStride, <a class="code" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3">NvFlexBufferType</a> type);</div>
+<div class="line"><a name="l01164"></a><span class="lineno"> 1164</span>&#160;</div>
+<div class="line"><a name="l01170"></a><span class="lineno"> 1170</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ab559759820a4322aff061745ef26c867">NvFlexFreeBuffer</a>(<a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* buf);</div>
+<div class="line"><a name="l01171"></a><span class="lineno"> 1171</span>&#160;</div>
+<div class="line"><a name="l01181"></a><span class="lineno"> 1181</span>&#160;NV_FLEX_API <span class="keywordtype">void</span>* <a class="code" href="_nv_flex_8h.html#a0898bb9210440b159688d4647f6eb083">NvFlexMap</a>(<a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* buffer, <span class="keywordtype">int</span> flags);</div>
+<div class="line"><a name="l01182"></a><span class="lineno"> 1182</span>&#160;</div>
+<div class="line"><a name="l01188"></a><span class="lineno"> 1188</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a054cb27646a389ea257d1bbde46a6e97">NvFlexUnmap</a>(<a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* buffer);</div>
+<div class="line"><a name="l01189"></a><span class="lineno"> 1189</span>&#160;</div>
+<div class="line"><a name="l01219"></a><span class="lineno"> 1219</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* <a class="code" href="_nv_flex_8h.html#aab83daf46e5a9428a0ad76fb75e8ec7e">NvFlexRegisterOGLBuffer</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, <span class="keywordtype">int</span> buf, <span class="keywordtype">int</span> elementCount, <span class="keywordtype">int</span> elementByteStride);</div>
+<div class="line"><a name="l01220"></a><span class="lineno"> 1220</span>&#160;</div>
+<div class="line"><a name="l01226"></a><span class="lineno"> 1226</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a78045a8d4e856372df108dc616a94cd8">NvFlexUnregisterOGLBuffer</a>(<a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* buf);</div>
+<div class="line"><a name="l01227"></a><span class="lineno"> 1227</span>&#160;</div>
+<div class="line"><a name="l01237"></a><span class="lineno"> 1237</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* <a class="code" href="_nv_flex_8h.html#ab487e68ce1c84ce1eec0c85b7daf5aa0">NvFlexRegisterD3DBuffer</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, <span class="keywordtype">void</span>* buffer, <span class="keywordtype">int</span> elementCount, <span class="keywordtype">int</span> elementByteStride);</div>
+<div class="line"><a name="l01238"></a><span class="lineno"> 1238</span>&#160;</div>
+<div class="line"><a name="l01244"></a><span class="lineno"> 1244</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ad607e7916e5d76b384a61f1c1f94ab32">NvFlexUnregisterD3DBuffer</a>(<a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* buf);</div>
+<div class="line"><a name="l01245"></a><span class="lineno"> 1245</span>&#160;</div>
+<div class="line"><a name="l01251"></a><span class="lineno"> 1251</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a42ec7b30c79d4733e6a756b5d9b15ee6">NvFlexAcquireContext</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib);</div>
+<div class="line"><a name="l01252"></a><span class="lineno"> 1252</span>&#160;</div>
+<div class="line"><a name="l01257"></a><span class="lineno"> 1257</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#ae6671f352bd77e296609d0bc2a57fd11">NvFlexRestoreContext</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib);</div>
+<div class="line"><a name="l01258"></a><span class="lineno"> 1258</span>&#160;</div>
+<div class="line"><a name="l01264"></a><span class="lineno"> 1264</span>&#160;NV_FLEX_API <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="_nv_flex_8h.html#a4c451971259524c6878b6b1ed4023ada">NvFlexGetDeviceName</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib);</div>
+<div class="line"><a name="l01265"></a><span class="lineno"> 1265</span>&#160;</div>
+<div class="line"><a name="l01275"></a><span class="lineno"> 1275</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a2ac0a898a565a2cdf13b80acd4a3555c">NvFlexGetDeviceAndContext</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, <span class="keywordtype">void</span>** device, <span class="keywordtype">void</span>** context);</div>
+<div class="line"><a name="l01276"></a><span class="lineno"> 1276</span>&#160; </div>
+<div class="line"><a name="l01277"></a><span class="lineno"> 1277</span>&#160;</div>
+<div class="line"><a name="l01283"></a><span class="lineno"> 1283</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a898eb8e66a456dd2266c694f29cab600">NvFlexFlush</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib);</div>
+<div class="line"><a name="l01284"></a><span class="lineno"> 1284</span>&#160;</div>
+<div class="line"><a name="l01285"></a><span class="lineno"> 1285</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_8h.html#a615d2e6eec2486a5db815d929f9c642c">NvFlexWait</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib);</div>
+<div class="line"><a name="l01286"></a><span class="lineno"> 1286</span>&#160;</div>
+<div class="line"><a name="l01288"></a><span class="lineno"> 1288</span>&#160;</div>
+<div class="line"><a name="l01293"></a><span class="lineno"> 1293</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> NvFlexSetDebug(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <span class="keywordtype">bool</span> enable);</div>
+<div class="line"><a name="l01294"></a><span class="lineno"> 1294</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> NvFlexGetShapeBVH(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <span class="keywordtype">void</span>* bvh);</div>
+<div class="line"><a name="l01295"></a><span class="lineno"> 1295</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> NvFlexCopySolver(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* dst, <a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* src);</div>
+<div class="line"><a name="l01296"></a><span class="lineno"> 1296</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> NvFlexCopyDeviceToHost(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* pDevice, <span class="keywordtype">void</span>* pHost, <span class="keywordtype">int</span> size, <span class="keywordtype">int</span> stride);</div>
+<div class="line"><a name="l01297"></a><span class="lineno"> 1297</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> NvFlexComputeWaitForGraphics(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib);</div>
+<div class="line"><a name="l01298"></a><span class="lineno"> 1298</span>&#160;</div>
+<div class="line"><a name="l01300"></a><span class="lineno"> 1300</span>&#160;</div>
+<div class="line"><a name="l01301"></a><span class="lineno"> 1301</span>&#160;} <span class="comment">// extern &quot;C&quot;</span></div>
+<div class="line"><a name="l01302"></a><span class="lineno"> 1302</span>&#160;</div>
+<div class="line"><a name="l01303"></a><span class="lineno"> 1303</span>&#160;<span class="preprocessor">#endif // NV_FLEX_H</span></div>
<div class="ttc" id="_nv_flex_8h_html_a2345372dea2ad4f043153a84e7a2c407"><div class="ttname"><a href="_nv_flex_8h.html#a2345372dea2ad4f043153a84e7a2c407">NvFlexGetActiveCount</a></div><div class="ttdeci">NV_FLEX_API int NvFlexGetActiveCount(NvFlexSolver *solver)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_abdd60b0a83674283d09b4897fdd637a2"><div class="ttname"><a href="_nv_flex_8h.html#abdd60b0a83674283d09b4897fdd637a2">NvFlexTimers::solveShapes</a></div><div class="ttdeci">float solveShapes</div><div class="ttdoc">Time spent solving rigid body constraints. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:198</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644a52ee05f3e425c336856277774bc9f69f"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a52ee05f3e425c336856277774bc9f69f">eNvFlexPhaseUnused</a></div><div class="ttdoc">Reserved. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:169</div></div>
+<div class="ttc" id="_nv_flex_8h_html_abdd60b0a83674283d09b4897fdd637a2"><div class="ttname"><a href="_nv_flex_8h.html#abdd60b0a83674283d09b4897fdd637a2">NvFlexTimers::solveShapes</a></div><div class="ttdeci">float solveShapes</div><div class="ttdoc">Time spent solving rigid body constraints. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:215</div></div>
<div class="ttc" id="_nv_flex_8h_html_ac5427457488ab3f2de91cf65335dda08"><div class="ttname"><a href="_nv_flex_8h.html#ac5427457488ab3f2de91cf65335dda08">NvFlexRegisterSolverCallback</a></div><div class="ttdeci">NV_FLEX_API NvFlexSolverCallback NvFlexRegisterSolverCallback(NvFlexSolver *solver, NvFlexSolverCallback function, NvFlexSolverCallbackStage stage)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a7a6e24c01235abc364ed12570ab15f84"><div class="ttname"><a href="_nv_flex_8h.html#a7a6e24c01235abc364ed12570ab15f84">NvFlexSphereGeometry::radius</a></div><div class="ttdeci">float radius</div><div class="ttdef"><b>Definition:</b> NvFlex.h:760</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ab4435b3857752360375fe52fc992cfcaa5538835c4767004ba5fd443ada08ea61"><div class="ttname"><a href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa5538835c4767004ba5fd443ada08ea61">eNvFlexLogWarning</a></div><div class="ttdoc">Warning messages. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:219</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a57e4d27b0aa8774e479fa66d65079f78"><div class="ttname"><a href="_nv_flex_8h.html#a57e4d27b0aa8774e479fa66d65079f78">NvFlexTimers::solveSprings</a></div><div class="ttdeci">float solveSprings</div><div class="ttdoc">Time spent solving distance constraints. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:199</div></div>
+<div class="ttc" id="_nv_flex_8h_html_accc944f0e76ee2e5d67c3f977b150806"><div class="ttname"><a href="_nv_flex_8h.html#accc944f0e76ee2e5d67c3f977b150806">NvFlexGetPhases</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetPhases(NvFlexSolver *solver, NvFlexBuffer *phases, const NvFlexCopyDesc *desc)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a7a6e24c01235abc364ed12570ab15f84"><div class="ttname"><a href="_nv_flex_8h.html#a7a6e24c01235abc364ed12570ab15f84">NvFlexSphereGeometry::radius</a></div><div class="ttdeci">float radius</div><div class="ttdef"><b>Definition:</b> NvFlex.h:845</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ab4435b3857752360375fe52fc992cfcaa5538835c4767004ba5fd443ada08ea61"><div class="ttname"><a href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa5538835c4767004ba5fd443ada08ea61">eNvFlexLogWarning</a></div><div class="ttdoc">Warning messages. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:236</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a57e4d27b0aa8774e479fa66d65079f78"><div class="ttname"><a href="_nv_flex_8h.html#a57e4d27b0aa8774e479fa66d65079f78">NvFlexTimers::solveSprings</a></div><div class="ttdeci">float solveSprings</div><div class="ttdoc">Time spent solving distance constraints. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:216</div></div>
<div class="ttc" id="_nv_flex_8h_html_a6541b33eaca7b2323e73b30cea34d16c"><div class="ttname"><a href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16c">NvFlexMapFlags</a></div><div class="ttdeci">NvFlexMapFlags</div><div class="ttdef"><b>Definition:</b> NvFlex.h:67</div></div>
-<div class="ttc" id="_nv_flex_8h_html_affb884bcf3e7e389812d0b52b0fc0490"><div class="ttname"><a href="_nv_flex_8h.html#affb884bcf3e7e389812d0b52b0fc0490">NvFlexGetRestParticles</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetRestParticles(NvFlexSolver *solver, NvFlexBuffer *p, int n)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_abe6f00c9b94debbf7c181082a14076d5"><div class="ttname"><a href="_nv_flex_8h.html#abe6f00c9b94debbf7c181082a14076d5">NvFlexErrorCallback</a></div><div class="ttdeci">void(* NvFlexErrorCallback)(NvFlexErrorSeverity type, const char *msg, const char *file, int line)</div><div class="ttdef"><b>Definition:</b> NvFlex.h:301</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ab4435b3857752360375fe52fc992cfcaa03d239332ae87f46270855dd06b6e58f"><div class="ttname"><a href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa03d239332ae87f46270855dd06b6e58f">eNvFlexLogInfo</a></div><div class="ttdoc">Information messages. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:218</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ac017e05107d0362d3d03a14eaadf0657"><div class="ttname"><a href="_nv_flex_8h.html#ac017e05107d0362d3d03a14eaadf0657">NvFlexParams::smoothing</a></div><div class="ttdeci">float smoothing</div><div class="ttdoc">Control the strength of Laplacian smoothing in particles for rendering, if zero then smoothed positio...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:134</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a39ab69ac3fbde631b71f59f5bbbf1bdf"><div class="ttname"><a href="_nv_flex_8h.html#a39ab69ac3fbde631b71f59f5bbbf1bdf">NvFlexSolverDesc::maxDiffuseParticles</a></div><div class="ttdeci">int maxDiffuseParticles</div><div class="ttdoc">Maximum number of diffuse particles in the solver. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:369</div></div>
+<div class="ttc" id="_nv_flex_8h_html_abe6f00c9b94debbf7c181082a14076d5"><div class="ttname"><a href="_nv_flex_8h.html#abe6f00c9b94debbf7c181082a14076d5">NvFlexErrorCallback</a></div><div class="ttdeci">void(* NvFlexErrorCallback)(NvFlexErrorSeverity type, const char *msg, const char *file, int line)</div><div class="ttdef"><b>Definition:</b> NvFlex.h:298</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ab4435b3857752360375fe52fc992cfcaa03d239332ae87f46270855dd06b6e58f"><div class="ttname"><a href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa03d239332ae87f46270855dd06b6e58f">eNvFlexLogInfo</a></div><div class="ttdoc">Information messages. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:235</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ac017e05107d0362d3d03a14eaadf0657"><div class="ttname"><a href="_nv_flex_8h.html#ac017e05107d0362d3d03a14eaadf0657">NvFlexParams::smoothing</a></div><div class="ttdeci">float smoothing</div><div class="ttdoc">Control the strength of Laplacian smoothing in particles for rendering, if zero then smoothed positio...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:132</div></div>
<div class="ttc" id="_nv_flex_8h_html_ae2db6ad8006027c1acf2315a0d15fe71"><div class="ttname"><a href="_nv_flex_8h.html#ae2db6ad8006027c1acf2315a0d15fe71">NvFlexSetParams</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetParams(NvFlexSolver *solver, const NvFlexParams *params)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a4f80c8bcfa6de99a52983adb13d80db9a260340ba9071892bd8795c3b29289806"><div class="ttname"><a href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a260340ba9071892bd8795c3b29289806">eNvFlexStageUpdateEnd</a></div><div class="ttdoc">Called at the end of solver update after the final substep has completed. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:233</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a89c872e761a53c87375f536a0ef597d8"><div class="ttname"><a href="_nv_flex_8h.html#a89c872e761a53c87375f536a0ef597d8">NvFlexSetRigids</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetRigids(NvFlexSolver *solver, NvFlexBuffer *offsets, NvFlexBuffer *indices, NvFlexBuffer *restPositions, NvFlexBuffer *restNormals, NvFlexBuffer *stiffness, NvFlexBuffer *rotations, NvFlexBuffer *translations, int numRigids, int numIndices)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_abfa62e01c4f4511d3f6a00ab6a0f257a"><div class="ttname"><a href="_nv_flex_8h.html#abfa62e01c4f4511d3f6a00ab6a0f257a">NvFlexGetSmoothParticles</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetSmoothParticles(NvFlexSolver *solver, NvFlexBuffer *p, int n)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a4f80c8bcfa6de99a52983adb13d80db9a260340ba9071892bd8795c3b29289806"><div class="ttname"><a href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a260340ba9071892bd8795c3b29289806">eNvFlexStageUpdateEnd</a></div><div class="ttdoc">Called at the end of solver update after the final substep has completed. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:250</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644ab4034dbf78d6045ee13278531ee21c2b"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ab4034dbf78d6045ee13278531ee21c2b">eNvFlexPhaseShapeChannel3</a></div><div class="ttdoc">Particle will collide with shapes with channel 3 set (see NvFlexMakeShapeFlags()) ...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:174</div></div>
<div class="ttc" id="_nv_flex_8h_html_a4958c555f0ed65dee54c37af32529356"><div class="ttname"><a href="_nv_flex_8h.html#a4958c555f0ed65dee54c37af32529356">NvFlexUpdateTriangleMesh</a></div><div class="ttdeci">NV_FLEX_API void NvFlexUpdateTriangleMesh(NvFlexLibrary *lib, NvFlexTriangleMeshId mesh, NvFlexBuffer *vertices, NvFlexBuffer *indices, int numVertices, int numTriangles, const float *lower, const float *upper)</div></div>
<div class="ttc" id="_nv_flex_8h_html_a054cb27646a389ea257d1bbde46a6e97"><div class="ttname"><a href="_nv_flex_8h.html#a054cb27646a389ea257d1bbde46a6e97">NvFlexUnmap</a></div><div class="ttdeci">NV_FLEX_API void NvFlexUnmap(NvFlexBuffer *buffer)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644a453a23cc8e9d2e6097b5be187f3c6977"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a453a23cc8e9d2e6097b5be187f3c6977">eNvFlexPhaseSelfCollide</a></div><div class="ttdoc">If set this particle will interact with particles of the same group. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:170</div></div>
-<div class="ttc" id="_nv_flex_8h_html_aba34bc2bc8736e3a0cf18a7a6b56ff68"><div class="ttname"><a href="_nv_flex_8h.html#aba34bc2bc8736e3a0cf18a7a6b56ff68">NvFlexTimers::createCellIndices</a></div><div class="ttdeci">float createCellIndices</div><div class="ttdoc">Time spent creating grid indices. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:187</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a0e4cb2f91d3b7d122000d36a7d67ab81"><div class="ttname"><a href="_nv_flex_8h.html#a0e4cb2f91d3b7d122000d36a7d67ab81">NvFlexParams::shapeCollisionMargin</a></div><div class="ttdeci">float shapeCollisionMargin</div><div class="ttdoc">Increases the radius used during contact finding against kinematic shapes. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:154</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a0008a52f6ae1e17c436b095549bf1c78"><div class="ttname"><a href="_nv_flex_8h.html#a0008a52f6ae1e17c436b095549bf1c78">NvFlexSDFGeometry::scale</a></div><div class="ttdeci">float scale</div><div class="ttdoc">Uniform scale of SDF, this corresponds to the world space width of the shape. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:804</div></div>
-<div class="ttc" id="_nv_flex_8h_html_aeed8fe87fa073067af1a45560cc54a79"><div class="ttname"><a href="_nv_flex_8h.html#aeed8fe87fa073067af1a45560cc54a79">NvFlexGetActive</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetActive(NvFlexSolver *solver, NvFlexBuffer *indices)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a7ade7491cd0693a6d7c5e88a99298378"><div class="ttname"><a href="_nv_flex_8h.html#a7ade7491cd0693a6d7c5e88a99298378">NvFlexParams::diffuseBallistic</a></div><div class="ttdeci">int diffuseBallistic</div><div class="ttdoc">The number of neighbors below which a diffuse particle is considered ballistic. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:143</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a46f5d35902f7da40628247175a174f3b"><div class="ttname"><a href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3b">NvFlexRelaxationMode</a></div><div class="ttdeci">NvFlexRelaxationMode</div><div class="ttdef"><b>Definition:</b> NvFlex.h:86</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a7043181449aebf540351d1d2f785cf4a"><div class="ttname"><a href="_nv_flex_8h.html#a7043181449aebf540351d1d2f785cf4a">NvFlexParams::drag</a></div><div class="ttdeci">float drag</div><div class="ttdoc">Drag force applied to particles belonging to dynamic triangles, proportional to velocity^2*area in th...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:122</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ab4435b3857752360375fe52fc992cfca"><div class="ttname"><a href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfca">NvFlexErrorSeverity</a></div><div class="ttdeci">NvFlexErrorSeverity</div><div class="ttdef"><b>Definition:</b> NvFlex.h:215</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ab003c023dde289dee075c49db022ccaf"><div class="ttname"><a href="_nv_flex_8h.html#ab003c023dde289dee075c49db022ccaf">NvFlexParams::maxSpeed</a></div><div class="ttdeci">float maxSpeed</div><div class="ttdoc">The magnitude of particle velocity will be clamped to this value at the end of each step...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:113</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ae54ff0cacfedd4333aa1a1f9b9291906"><div class="ttname"><a href="_nv_flex_8h.html#ae54ff0cacfedd4333aa1a1f9b9291906">NvFlexParams::planes</a></div><div class="ttdeci">float planes[8][4]</div><div class="ttdoc">Collision planes in the form ax + by + cz + d = 0. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:156</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a3ef4d1035530c3583bdf983c7e62b472"><div class="ttname"><a href="_nv_flex_8h.html#a3ef4d1035530c3583bdf983c7e62b472">NvFlexParams::cohesion</a></div><div class="ttdeci">float cohesion</div><div class="ttdoc">Control how strongly particles hold each other together, default: 0.025, range [0.0, +inf]. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:127</div></div>
-<div class="ttc" id="_nv_flex_8h_html_af0a34fd0cdf686022650be9f895cbf2f"><div class="ttname"><a href="_nv_flex_8h.html#af0a34fd0cdf686022650be9f895cbf2f">NvFlexParams::staticFriction</a></div><div class="ttdeci">float staticFriction</div><div class="ttdoc">Coefficient of static friction used when colliding against shapes. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:107</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ac1f3c3a1eeeb57cf5b20d030a788e25c"><div class="ttname"><a href="_nv_flex_8h.html#ac1f3c3a1eeeb57cf5b20d030a788e25c">NvFlexTimers::collideParticles</a></div><div class="ttdeci">float collideParticles</div><div class="ttdoc">Time spent finding particle neighbors. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:191</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a8ad5aa3c9c9456607de9a2c9f1d0d2c1"><div class="ttname"><a href="_nv_flex_8h.html#a8ad5aa3c9c9456607de9a2c9f1d0d2c1">NvFlexCollisionGeometry::capsule</a></div><div class="ttdeci">NvFlexCapsuleGeometry capsule</div><div class="ttdef"><b>Definition:</b> NvFlex.h:815</div></div>
-<div class="ttc" id="_nv_flex_8h_html_aaf8baa00e709ff8fd40d114f00bee0b6"><div class="ttname"><a href="_nv_flex_8h.html#aaf8baa00e709ff8fd40d114f00bee0b6">NvFlexTimers::predict</a></div><div class="ttdeci">float predict</div><div class="ttdoc">Time spent in prediction. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:186</div></div>
-<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_convex_mesh_geometry"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_convex_mesh_geometry">NvFlexConvexMeshGeometry</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:783</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a2ff723870a6eba26d9f3bb7e5250b27f"><div class="ttname"><a href="_nv_flex_8h.html#a2ff723870a6eba26d9f3bb7e5250b27f">NvFlexTimers::updateDiffuse</a></div><div class="ttdeci">float updateDiffuse</div><div class="ttdoc">Time spent updating diffuse particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:204</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a0e3c0e02ec7addd25ebb3355a8865bfb"><div class="ttname"><a href="_nv_flex_8h.html#a0e3c0e02ec7addd25ebb3355a8865bfb">NvFlexCollisionGeometry::sphere</a></div><div class="ttdeci">NvFlexSphereGeometry sphere</div><div class="ttdef"><b>Definition:</b> NvFlex.h:814</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a55bf1f547086b8e469f2c3b20c9ae39d"><div class="ttname"><a href="_nv_flex_8h.html#a55bf1f547086b8e469f2c3b20c9ae39d">NvFlexParams::collisionDistance</a></div><div class="ttdeci">float collisionDistance</div><div class="ttdoc">Distance particles maintain against shapes, note that for robust collision against triangle meshes th...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:152</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a064e3ce30320610d495ba3faa72dc8d6"><div class="ttname"><a href="_nv_flex_8h.html#a064e3ce30320610d495ba3faa72dc8d6">NvFlexCollisionGeometry::triMesh</a></div><div class="ttdeci">NvFlexTriangleMeshGeometry triMesh</div><div class="ttdef"><b>Definition:</b> NvFlex.h:818</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a215e06106ec0cdbbcd405055a4535d1d"><div class="ttname"><a href="_nv_flex_8h.html#a215e06106ec0cdbbcd405055a4535d1d">NvFlexTimers::solveContacts</a></div><div class="ttdeci">float solveContacts</div><div class="ttdoc">Time spent solving contact constraints. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:200</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a31c31ea4f96cd4fdadc6b7317691304caa1c1225f6b8b2906c83748cfc46b81d9"><div class="ttname"><a href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304caa1c1225f6b8b2906c83748cfc46b81d9">eNvFlexShapeFlagReserved</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:838</div></div>
-<div class="ttc" id="_nv_flex_8h_html_aeeeaf91dad0804d1dd3125e592a3260b"><div class="ttname"><a href="_nv_flex_8h.html#aeeeaf91dad0804d1dd3125e592a3260b">NvFlexInitDesc::computeType</a></div><div class="ttdeci">NvFlexComputeType computeType</div><div class="ttdoc">Set to eNvFlexD3D11 if DirectX 11 should be used, eNvFlexD3D12 for DirectX 12, this must match the li...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:284</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644a453a23cc8e9d2e6097b5be187f3c6977"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a453a23cc8e9d2e6097b5be187f3c6977">eNvFlexPhaseSelfCollide</a></div><div class="ttdoc">If set this particle will interact with particles of the same group. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:166</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aba34bc2bc8736e3a0cf18a7a6b56ff68"><div class="ttname"><a href="_nv_flex_8h.html#aba34bc2bc8736e3a0cf18a7a6b56ff68">NvFlexTimers::createCellIndices</a></div><div class="ttdeci">float createCellIndices</div><div class="ttdoc">Time spent creating grid indices. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:204</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644af309316efb695be38a4e15986be21ef9"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644af309316efb695be38a4e15986be21ef9">eNvFlexPhaseShapeChannel4</a></div><div class="ttdoc">Particle will collide with shapes with channel 4 set (see NvFlexMakeShapeFlags()) ...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:175</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a0e4cb2f91d3b7d122000d36a7d67ab81"><div class="ttname"><a href="_nv_flex_8h.html#a0e4cb2f91d3b7d122000d36a7d67ab81">NvFlexParams::shapeCollisionMargin</a></div><div class="ttdeci">float shapeCollisionMargin</div><div class="ttdoc">Increases the radius used during contact finding against kinematic shapes. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:147</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a0008a52f6ae1e17c436b095549bf1c78"><div class="ttname"><a href="_nv_flex_8h.html#a0008a52f6ae1e17c436b095549bf1c78">NvFlexSDFGeometry::scale</a></div><div class="ttdeci">float scale</div><div class="ttdoc">Uniform scale of SDF, this corresponds to the world space width of the shape. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:889</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a7ade7491cd0693a6d7c5e88a99298378"><div class="ttname"><a href="_nv_flex_8h.html#a7ade7491cd0693a6d7c5e88a99298378">NvFlexParams::diffuseBallistic</a></div><div class="ttdeci">int diffuseBallistic</div><div class="ttdoc">The number of neighbors below which a diffuse particle is considered ballistic. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:141</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aa8b7bfeffb0fa7dc6dbd291fee87edc9"><div class="ttname"><a href="_nv_flex_8h.html#aa8b7bfeffb0fa7dc6dbd291fee87edc9">NvFlexSetRigids</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetRigids(NvFlexSolver *solver, NvFlexBuffer *offsets, NvFlexBuffer *indices, NvFlexBuffer *restPositions, NvFlexBuffer *restNormals, NvFlexBuffer *stiffness, NvFlexBuffer *thresholds, NvFlexBuffer *creeps, NvFlexBuffer *rotations, NvFlexBuffer *translations, int numRigids, int numIndices)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a46f5d35902f7da40628247175a174f3b"><div class="ttname"><a href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3b">NvFlexRelaxationMode</a></div><div class="ttdeci">NvFlexRelaxationMode</div><div class="ttdef"><b>Definition:</b> NvFlex.h:85</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a7043181449aebf540351d1d2f785cf4a"><div class="ttname"><a href="_nv_flex_8h.html#a7043181449aebf540351d1d2f785cf4a">NvFlexParams::drag</a></div><div class="ttdeci">float drag</div><div class="ttdoc">Drag force applied to particles belonging to dynamic triangles, proportional to velocity^2*area in th...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:121</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ab4435b3857752360375fe52fc992cfca"><div class="ttname"><a href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfca">NvFlexErrorSeverity</a></div><div class="ttdeci">NvFlexErrorSeverity</div><div class="ttdef"><b>Definition:</b> NvFlex.h:232</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aa1d44495e442f8cae874c635ef847478"><div class="ttname"><a href="_nv_flex_8h.html#aa1d44495e442f8cae874c635ef847478">NvFlexSetPhases</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetPhases(NvFlexSolver *solver, NvFlexBuffer *phases, const NvFlexCopyDesc *desc)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ab003c023dde289dee075c49db022ccaf"><div class="ttname"><a href="_nv_flex_8h.html#ab003c023dde289dee075c49db022ccaf">NvFlexParams::maxSpeed</a></div><div class="ttdeci">float maxSpeed</div><div class="ttdoc">The magnitude of particle velocity will be clamped to this value at the end of each step...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:112</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aee5c235d5fab40831cf339680aa25560a3ab06dc4cd4aa073ab0f2d96a56c499d"><div class="ttname"><a href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560a3ab06dc4cd4aa073ab0f2d96a56c499d">eNvFlexFeatureModeDefault</a></div><div class="ttdoc">All features enabled. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:356</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ae54ff0cacfedd4333aa1a1f9b9291906"><div class="ttname"><a href="_nv_flex_8h.html#ae54ff0cacfedd4333aa1a1f9b9291906">NvFlexParams::planes</a></div><div class="ttdeci">float planes[8][4]</div><div class="ttdoc">Collision planes in the form ax + by + cz + d = 0. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:149</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a3ef4d1035530c3583bdf983c7e62b472"><div class="ttname"><a href="_nv_flex_8h.html#a3ef4d1035530c3583bdf983c7e62b472">NvFlexParams::cohesion</a></div><div class="ttdeci">float cohesion</div><div class="ttdoc">Control how strongly particles hold each other together, default: 0.025, range [0.0, +inf]. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:125</div></div>
+<div class="ttc" id="_nv_flex_8h_html_af0a34fd0cdf686022650be9f895cbf2f"><div class="ttname"><a href="_nv_flex_8h.html#af0a34fd0cdf686022650be9f895cbf2f">NvFlexParams::staticFriction</a></div><div class="ttdeci">float staticFriction</div><div class="ttdoc">Coefficient of static friction used when colliding against shapes. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:106</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ac1f3c3a1eeeb57cf5b20d030a788e25c"><div class="ttname"><a href="_nv_flex_8h.html#ac1f3c3a1eeeb57cf5b20d030a788e25c">NvFlexTimers::collideParticles</a></div><div class="ttdeci">float collideParticles</div><div class="ttdoc">Time spent finding particle neighbors. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:208</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a73d87b460a34c52ff4b616e97a53ade7"><div class="ttname"><a href="_nv_flex_8h.html#a73d87b460a34c52ff4b616e97a53ade7">NvFlexGetNormals</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetNormals(NvFlexSolver *solver, NvFlexBuffer *normals, const NvFlexCopyDesc *desc)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a8ad5aa3c9c9456607de9a2c9f1d0d2c1"><div class="ttname"><a href="_nv_flex_8h.html#a8ad5aa3c9c9456607de9a2c9f1d0d2c1">NvFlexCollisionGeometry::capsule</a></div><div class="ttdeci">NvFlexCapsuleGeometry capsule</div><div class="ttdef"><b>Definition:</b> NvFlex.h:900</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aaf8baa00e709ff8fd40d114f00bee0b6"><div class="ttname"><a href="_nv_flex_8h.html#aaf8baa00e709ff8fd40d114f00bee0b6">NvFlexTimers::predict</a></div><div class="ttdeci">float predict</div><div class="ttdoc">Time spent in prediction. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:203</div></div>
+<div class="ttc" id="_nv_flex_8h_html_afa458a6eec8b0d117e53c40c13788fd9"><div class="ttname"><a href="_nv_flex_8h.html#afa458a6eec8b0d117e53c40c13788fd9">NvFlexGetDiffuseParticles</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetDiffuseParticles(NvFlexSolver *solver, NvFlexBuffer *p, NvFlexBuffer *v, NvFlexBuffer *count)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_convex_mesh_geometry"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_convex_mesh_geometry">NvFlexConvexMeshGeometry</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:868</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5ea0cd160a13a72924340184edfbea2f"><div class="ttname"><a href="_nv_flex_8h.html#a5ea0cd160a13a72924340184edfbea2f">NvFlexSolverDesc::maxNeighborsPerParticle</a></div><div class="ttdeci">int maxNeighborsPerParticle</div><div class="ttdoc">Maximum number of neighbors per-particle, for solids this can be around 32, for fluids up to 128 may ...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:370</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a2ff723870a6eba26d9f3bb7e5250b27f"><div class="ttname"><a href="_nv_flex_8h.html#a2ff723870a6eba26d9f3bb7e5250b27f">NvFlexTimers::updateDiffuse</a></div><div class="ttdeci">float updateDiffuse</div><div class="ttdoc">Time spent updating diffuse particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:221</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a0e3c0e02ec7addd25ebb3355a8865bfb"><div class="ttname"><a href="_nv_flex_8h.html#a0e3c0e02ec7addd25ebb3355a8865bfb">NvFlexCollisionGeometry::sphere</a></div><div class="ttdeci">NvFlexSphereGeometry sphere</div><div class="ttdef"><b>Definition:</b> NvFlex.h:899</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a55bf1f547086b8e469f2c3b20c9ae39d"><div class="ttname"><a href="_nv_flex_8h.html#a55bf1f547086b8e469f2c3b20c9ae39d">NvFlexParams::collisionDistance</a></div><div class="ttdeci">float collisionDistance</div><div class="ttdoc">Distance particles maintain against shapes, note that for robust collision against triangle meshes th...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:145</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a064e3ce30320610d495ba3faa72dc8d6"><div class="ttname"><a href="_nv_flex_8h.html#a064e3ce30320610d495ba3faa72dc8d6">NvFlexCollisionGeometry::triMesh</a></div><div class="ttdeci">NvFlexTriangleMeshGeometry triMesh</div><div class="ttdef"><b>Definition:</b> NvFlex.h:903</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a215e06106ec0cdbbcd405055a4535d1d"><div class="ttname"><a href="_nv_flex_8h.html#a215e06106ec0cdbbcd405055a4535d1d">NvFlexTimers::solveContacts</a></div><div class="ttdeci">float solveContacts</div><div class="ttdoc">Time spent solving contact constraints. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:217</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a677dc591fe443ae058701966c52d1316"><div class="ttname"><a href="_nv_flex_8h.html#a677dc591fe443ae058701966c52d1316">NvFlexSetActiveCount</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetActiveCount(NvFlexSolver *solver, int n)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644a7b776084468bae4e3566484cf34d0154"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a7b776084468bae4e3566484cf34d0154">eNvFlexPhaseFlagsMask</a></div><div class="ttdoc">Bits [20, 23] hold flags about how the particle behave. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:163</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a31c31ea4f96cd4fdadc6b7317691304caa1c1225f6b8b2906c83748cfc46b81d9"><div class="ttname"><a href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304caa1c1225f6b8b2906c83748cfc46b81d9">eNvFlexShapeFlagReserved</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:923</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aeeeaf91dad0804d1dd3125e592a3260b"><div class="ttname"><a href="_nv_flex_8h.html#aeeeaf91dad0804d1dd3125e592a3260b">NvFlexInitDesc::computeType</a></div><div class="ttdeci">NvFlexComputeType computeType</div><div class="ttdoc">Set to eNvFlexD3D11 if DirectX 11 should be used, eNvFlexD3D12 for DirectX 12, this must match the li...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:324</div></div>
<div class="ttc" id="_nv_flex_8h_html_ab11bdd7f778d17af16cefea33265cb65"><div class="ttname"><a href="_nv_flex_8h.html#ab11bdd7f778d17af16cefea33265cb65">NvFlexDestroyDistanceField</a></div><div class="ttdeci">NV_FLEX_API void NvFlexDestroyDistanceField(NvFlexLibrary *lib, NvFlexDistanceFieldId sdf)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a9b2d3dc5ac42011aeec4e13be2e14252a297a93979a88fda6e6b551dcab5fb3df"><div class="ttname"><a href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252a297a93979a88fda6e6b551dcab5fb3df">eNvFlexD3D11</a></div><div class="ttdoc">Use DirectX 11 compute for Flex, the application must link against the D3D libraries. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:242</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a9b2d3dc5ac42011aeec4e13be2e14252a297a93979a88fda6e6b551dcab5fb3df"><div class="ttname"><a href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252a297a93979a88fda6e6b551dcab5fb3df">eNvFlexD3D11</a></div><div class="ttdoc">Use DirectX 11 compute for Flex, the application must link against the D3D libraries. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:308</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ade1ef600ada4d7567e515258b289e209"><div class="ttname"><a href="_nv_flex_8h.html#ade1ef600ada4d7567e515258b289e209">NvFlexGetNeighbors</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetNeighbors(NvFlexSolver *solver, NvFlexBuffer *neighbors, NvFlexBuffer *counts, NvFlexBuffer *remap)</div></div>
<div class="ttc" id="_nv_flex_8h_html_a1d755d7b090f7ed5c4c50d2d3fef1558"><div class="ttname"><a href="_nv_flex_8h.html#a1d755d7b090f7ed5c4c50d2d3fef1558">NvFlexDestroySolver</a></div><div class="ttdeci">NV_FLEX_API void NvFlexDestroySolver(NvFlexSolver *solver)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a31c31ea4f96cd4fdadc6b7317691304cae8a10737948abf6973f0f1d66bae7ef8"><div class="ttname"><a href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304cae8a10737948abf6973f0f1d66bae7ef8">eNvFlexShapeFlagTypeMask</a></div><div class="ttdoc">Lower 3 bits holds the type of the collision shape. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:834</div></div>
-<div class="ttc" id="_nv_flex_8h_html_abe564dbbbd4957542322b60d77a70e29"><div class="ttname"><a href="_nv_flex_8h.html#abe564dbbbd4957542322b60d77a70e29">NvFlexSolverCallbackParams::originalToSortedMap</a></div><div class="ttdeci">const int * originalToSortedMap</div><div class="ttdoc">Device pointer that maps the sorted callback data to the original position given by SetParticles() ...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:271</div></div>
-<div class="ttc" id="_nv_flex_8h_html_aef1b5bceccca709ebb782d2ea8a61dc9"><div class="ttname"><a href="_nv_flex_8h.html#aef1b5bceccca709ebb782d2ea8a61dc9">NvFlexCapsuleGeometry::halfHeight</a></div><div class="ttdeci">float halfHeight</div><div class="ttdef"><b>Definition:</b> NvFlex.h:769</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a31c31ea4f96cd4fdadc6b7317691304cae8a10737948abf6973f0f1d66bae7ef8"><div class="ttname"><a href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304cae8a10737948abf6973f0f1d66bae7ef8">eNvFlexShapeFlagTypeMask</a></div><div class="ttdoc">Lower 3 bits holds the type of the collision shape given by the NvFlexCollisionShapeType enum...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:919</div></div>
+<div class="ttc" id="_nv_flex_8h_html_abe564dbbbd4957542322b60d77a70e29"><div class="ttname"><a href="_nv_flex_8h.html#abe564dbbbd4957542322b60d77a70e29">NvFlexSolverCallbackParams::originalToSortedMap</a></div><div class="ttdeci">const int * originalToSortedMap</div><div class="ttdoc">Device pointer that maps the sorted callback data to the original position given by SetParticles() ...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:280</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aef1b5bceccca709ebb782d2ea8a61dc9"><div class="ttname"><a href="_nv_flex_8h.html#aef1b5bceccca709ebb782d2ea8a61dc9">NvFlexCapsuleGeometry::halfHeight</a></div><div class="ttdeci">float halfHeight</div><div class="ttdef"><b>Definition:</b> NvFlex.h:854</div></div>
<div class="ttc" id="_nv_flex_8h_html_a6541b33eaca7b2323e73b30cea34d16ca11adf517d180983daec217e761acc3d6"><div class="ttname"><a href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16ca11adf517d180983daec217e761acc3d6">eNvFlexMapWait</a></div><div class="ttdoc">Calling thread will be blocked until buffer is ready for access, default. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:69</div></div>
<div class="ttc" id="_nv_flex_8h_html_a5a7213593dd9a23d9d67f8517d1da9de"><div class="ttname"><a href="_nv_flex_8h.html#a5a7213593dd9a23d9d67f8517d1da9de">NvFlexSetDiffuseParticles</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetDiffuseParticles(NvFlexSolver *solver, NvFlexBuffer *p, NvFlexBuffer *v, int n)</div></div>
<div class="ttc" id="_nv_flex_8h_html_afaeb57f4ee7e54b1ae1b912a465ed39e"><div class="ttname"><a href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a></div><div class="ttdeci">struct NvFlexSolver NvFlexSolver</div><div class="ttdef"><b>Definition:</b> NvFlex.h:57</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a4f80c8bcfa6de99a52983adb13d80db9a6f13e2ebdbf21f8c8ebcfe1ac9160586"><div class="ttname"><a href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a6f13e2ebdbf21f8c8ebcfe1ac9160586">eNvFlexStageSubstepEnd</a></div><div class="ttdoc">Called at the end of each substep after the velocity has been updated by the constraints. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:232</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a8ed42f9bd016cbcef45c96b5b32ca609"><div class="ttname"><a href="_nv_flex_8h.html#a8ed42f9bd016cbcef45c96b5b32ca609">NvFlexSolverCallbackParams::particles</a></div><div class="ttdeci">float * particles</div><div class="ttdoc">Device pointer to the active particle basic data in the form x,y,z,1/m. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:263</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a4f80c8bcfa6de99a52983adb13d80db9a6f13e2ebdbf21f8c8ebcfe1ac9160586"><div class="ttname"><a href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a6f13e2ebdbf21f8c8ebcfe1ac9160586">eNvFlexStageSubstepEnd</a></div><div class="ttdoc">Called at the end of each substep after the velocity has been updated by the constraints. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:249</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a8ed42f9bd016cbcef45c96b5b32ca609"><div class="ttname"><a href="_nv_flex_8h.html#a8ed42f9bd016cbcef45c96b5b32ca609">NvFlexSolverCallbackParams::particles</a></div><div class="ttdeci">float * particles</div><div class="ttdoc">Device pointer to the active particle basic data in the form x,y,z,1/m. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:272</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a1bd4b70e0118abe18ca5fe85157299b6"><div class="ttname"><a href="_nv_flex_8h.html#a1bd4b70e0118abe18ca5fe85157299b6">NvFlexGetActive</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetActive(NvFlexSolver *solver, NvFlexBuffer *indices, const NvFlexCopyDesc *desc)</div></div>
<div class="ttc" id="_nv_flex_8h_html_a7f2b59fba77c60ce116e1eac57d63e50"><div class="ttname"><a href="_nv_flex_8h.html#a7f2b59fba77c60ce116e1eac57d63e50">NvFlexSetInflatables</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetInflatables(NvFlexSolver *solver, NvFlexBuffer *startTris, NvFlexBuffer *numTris, NvFlexBuffer *restVolumes, NvFlexBuffer *overPressures, NvFlexBuffer *constraintScales, int numInflatables)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_sphere_geometry"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_sphere_geometry">NvFlexSphereGeometry</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:758</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a4f80c8bcfa6de99a52983adb13d80db9a9f3914fdb03915a14ebe55a2c730e7ff"><div class="ttname"><a href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a9f3914fdb03915a14ebe55a2c730e7ff">eNvFlexStageIterationStart</a></div><div class="ttdoc">Called at the beginning of each constraint iteration. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:229</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a615d2e6eec2486a5db815d929f9c642c"><div class="ttname"><a href="_nv_flex_8h.html#a615d2e6eec2486a5db815d929f9c642c">NvFlexWait</a></div><div class="ttdeci">NV_FLEX_API void NvFlexWait(NvFlexLibrary *lib)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a7ec5ebe3e98a44a2058d6be74b2cb633"><div class="ttname"><a href="_nv_flex_8h.html#a7ec5ebe3e98a44a2058d6be74b2cb633">NvFlexSetParticles</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetParticles(NvFlexSolver *solver, NvFlexBuffer *p, const NvFlexCopyDesc *desc)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_sphere_geometry"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_sphere_geometry">NvFlexSphereGeometry</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:843</div></div>
+<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_solver_desc"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_solver_desc">NvFlexSolverDesc</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:364</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aa544809448a95c3864e1443c7a507d7f"><div class="ttname"><a href="_nv_flex_8h.html#aa544809448a95c3864e1443c7a507d7f">NvFlexCopyDesc::dstOffset</a></div><div class="ttdeci">int dstOffset</div><div class="ttdef"><b>Definition:</b> NvFlex.h:503</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a4f80c8bcfa6de99a52983adb13d80db9a9f3914fdb03915a14ebe55a2c730e7ff"><div class="ttname"><a href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a9f3914fdb03915a14ebe55a2c730e7ff">eNvFlexStageIterationStart</a></div><div class="ttdoc">Called at the beginning of each constraint iteration. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:246</div></div>
<div class="ttc" id="_nv_flex_8h_html_a60794d849b4184335e2a0ddec0a9e6a2"><div class="ttname"><a href="_nv_flex_8h.html#a60794d849b4184335e2a0ddec0a9e6a2">NvFlexGetTriangleMeshBounds</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetTriangleMeshBounds(NvFlexLibrary *lib, const NvFlexTriangleMeshId mesh, float *lower, float *upper)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_solver_callback_params"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_solver_callback_params">NvFlexSolverCallbackParams</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:258</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ad83b7fb561a91467a3094771bb682b96"><div class="ttname"><a href="_nv_flex_8h.html#ad83b7fb561a91467a3094771bb682b96">NvFlexMakeShapeFlagsWithChannels</a></div><div class="ttdeci">NV_FLEX_API int NvFlexMakeShapeFlagsWithChannels(NvFlexCollisionShapeType type, bool dynamic, int shapeChannels)</div><div class="ttdef"><b>Definition:</b> NvFlex.h:933</div></div>
+<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_solver_callback_params"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_solver_callback_params">NvFlexSolverCallbackParams</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:267</div></div>
<div class="ttc" id="_nv_flex_8h_html_afbaafe2b1006352002b03aabaca531cc"><div class="ttname"><a href="_nv_flex_8h.html#afbaafe2b1006352002b03aabaca531cc">NvFlexCreateConvexMesh</a></div><div class="ttdeci">NV_FLEX_API NvFlexConvexMeshId NvFlexCreateConvexMesh(NvFlexLibrary *lib)</div></div>
<div class="ttc" id="_nv_flex_8h_html_a0898bb9210440b159688d4647f6eb083"><div class="ttname"><a href="_nv_flex_8h.html#a0898bb9210440b159688d4647f6eb083">NvFlexMap</a></div><div class="ttdeci">NV_FLEX_API void * NvFlexMap(NvFlexBuffer *buffer, int flags)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a83f6117fe98bc6426027a9b784fd737c"><div class="ttname"><a href="_nv_flex_8h.html#a83f6117fe98bc6426027a9b784fd737c">NvFlexDetailTimer::time</a></div><div class="ttdeci">float time</div><div class="ttdef"><b>Definition:</b> NvFlex.h:993</div></div>
-<div class="ttc" id="_nv_flex_8h_html_union_nv_flex_collision_geometry"><div class="ttname"><a href="_nv_flex_8h.html#union_nv_flex_collision_geometry">NvFlexCollisionGeometry</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:812</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a1a1e69f26e02e8b3fca1d3636a7f3f13"><div class="ttname"><a href="_nv_flex_8h.html#a1a1e69f26e02e8b3fca1d3636a7f3f13">NvFlexTimers::updateNormals</a></div><div class="ttdeci">float updateNormals</div><div class="ttdoc">Time spent updating vertex normals. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:206</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a2aea4c3d772b4dbccb7dd9ba37c1bdc0"><div class="ttname"><a href="_nv_flex_8h.html#a2aea4c3d772b4dbccb7dd9ba37c1bdc0">NvFlexTriangleMeshId</a></div><div class="ttdeci">unsigned int NvFlexTriangleMeshId</div><div class="ttdef"><b>Definition:</b> NvFlex.h:633</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a46f5d35902f7da40628247175a174f3ba858afe9529e908c2bc8ce92da8943b7c"><div class="ttname"><a href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3ba858afe9529e908c2bc8ce92da8943b7c">eNvFlexRelaxationLocal</a></div><div class="ttdoc">The relaxation factor is a fixed multiplier on each constraint&#39;s delta divided by the particle&#39;s cons...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:89</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a83f6117fe98bc6426027a9b784fd737c"><div class="ttname"><a href="_nv_flex_8h.html#a83f6117fe98bc6426027a9b784fd737c">NvFlexDetailTimer::time</a></div><div class="ttdeci">float time</div><div class="ttdef"><b>Definition:</b> NvFlex.h:1137</div></div>
+<div class="ttc" id="_nv_flex_8h_html_union_nv_flex_collision_geometry"><div class="ttname"><a href="_nv_flex_8h.html#union_nv_flex_collision_geometry">NvFlexCollisionGeometry</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:897</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a1a1e69f26e02e8b3fca1d3636a7f3f13"><div class="ttname"><a href="_nv_flex_8h.html#a1a1e69f26e02e8b3fca1d3636a7f3f13">NvFlexTimers::updateNormals</a></div><div class="ttdeci">float updateNormals</div><div class="ttdoc">Time spent updating vertex normals. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:223</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a2aea4c3d772b4dbccb7dd9ba37c1bdc0"><div class="ttname"><a href="_nv_flex_8h.html#a2aea4c3d772b4dbccb7dd9ba37c1bdc0">NvFlexTriangleMeshId</a></div><div class="ttdeci">unsigned int NvFlexTriangleMeshId</div><div class="ttdef"><b>Definition:</b> NvFlex.h:718</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a46f5d35902f7da40628247175a174f3ba858afe9529e908c2bc8ce92da8943b7c"><div class="ttname"><a href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3ba858afe9529e908c2bc8ce92da8943b7c">eNvFlexRelaxationLocal</a></div><div class="ttdoc">The relaxation factor is a fixed multiplier on each constraint&#39;s delta divided by the particle&#39;s cons...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:88</div></div>
<div class="ttc" id="_nv_flex_8h_html_ab487e68ce1c84ce1eec0c85b7daf5aa0"><div class="ttname"><a href="_nv_flex_8h.html#ab487e68ce1c84ce1eec0c85b7daf5aa0">NvFlexRegisterD3DBuffer</a></div><div class="ttdeci">NV_FLEX_API NvFlexBuffer * NvFlexRegisterD3DBuffer(NvFlexLibrary *lib, void *buffer, int elementCount, int elementByteStride)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a6541b33eaca7b2323e73b30cea34d16caa01c2dce3aa1e0d9d151060e1786c706"><div class="ttname"><a href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16caa01c2dce3aa1e0d9d151060e1786c706">eNvFlexMapDiscard</a></div><div class="ttdoc">Buffer contents will be discarded, this allows for efficent buffer reuse. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:71</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a31c31ea4f96cd4fdadc6b7317691304ca409215fa9b917f2d0830a66bd11b3ff8"><div class="ttname"><a href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304ca409215fa9b917f2d0830a66bd11b3ff8">eNvFlexShapeFlagTrigger</a></div><div class="ttdoc">Indicates that the shape is a trigger volume, this means it will not perform any collision response...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:836</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a0506ae712f846087b8647ea389ac26baae22144512ae098865c6725af16a68ad3"><div class="ttname"><a href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baae22144512ae098865c6725af16a68ad3">eNvFlexShapeSphere</a></div><div class="ttdoc">A sphere shape, see FlexSphereGeometry. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:824</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a0506ae712f846087b8647ea389ac26baa1fd78f8694b954f8d12fe7d911f17180"><div class="ttname"><a href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baa1fd78f8694b954f8d12fe7d911f17180">eNvFlexShapeSDF</a></div><div class="ttdoc">A signed distance field shape, see FlexSDFGeometry. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:829</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a5890b9e46d626cfa19994976ea53c52e"><div class="ttname"><a href="_nv_flex_8h.html#a5890b9e46d626cfa19994976ea53c52e">NvFlexInitDesc::deviceIndex</a></div><div class="ttdeci">int deviceIndex</div><div class="ttdoc">The GPU device index that should be used, if there is already a CUDA context on the calling thread th...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:279</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a8f0ee62a14387dd5b5a4e8c6bc429140"><div class="ttname"><a href="_nv_flex_8h.html#a8f0ee62a14387dd5b5a4e8c6bc429140">NvFlexParams::fluid</a></div><div class="ttdeci">bool fluid</div><div class="ttdoc">If true then particles with phase 0 are considered fluid particles and interact using the position ba...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:126</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a40f452b4edbf11b793f31286a0ae270e"><div class="ttname"><a href="_nv_flex_8h.html#a40f452b4edbf11b793f31286a0ae270e">NvFlexParams::viscosity</a></div><div class="ttdeci">float viscosity</div><div class="ttdoc">Smoothes particle velocities using XSPH viscosity. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:129</div></div>
-<div class="ttc" id="_nv_flex_8h_html_af6a50e64591866ae2390a57e3342566c"><div class="ttname"><a href="_nv_flex_8h.html#af6a50e64591866ae2390a57e3342566c">NvFlexTriangleMeshGeometry::mesh</a></div><div class="ttdeci">NvFlexTriangleMeshId mesh</div><div class="ttdoc">A triangle mesh pointer created by NvFlexCreateTriangleMesh() </div><div class="ttdef"><b>Definition:</b> NvFlex.h:795</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a67bd9669086e823ebe33d08d14f5b2b9"><div class="ttname"><a href="_nv_flex_8h.html#a67bd9669086e823ebe33d08d14f5b2b9">NvFlexGetVelocities</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetVelocities(NvFlexSolver *solver, NvFlexBuffer *v, int n)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_af53fa9d7caef50db346475065504848d"><div class="ttname"><a href="_nv_flex_8h.html#af53fa9d7caef50db346475065504848d">NvFlexMakePhase</a></div><div class="ttdeci">NV_FLEX_API int NvFlexMakePhase(int group, int flags)</div><div class="ttdef"><b>Definition:</b> NvFlex.h:178</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a8114a049f5e16f7d1b960f3ac4993fdb"><div class="ttname"><a href="_nv_flex_8h.html#a8114a049f5e16f7d1b960f3ac4993fdb">NvFlexParams::adhesion</a></div><div class="ttdeci">float adhesion</div><div class="ttdoc">Controls how strongly particles stick to surfaces they hit, default 0.0, range [0.0, +inf]. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:110</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a31c31ea4f96cd4fdadc6b7317691304ca409215fa9b917f2d0830a66bd11b3ff8"><div class="ttname"><a href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304ca409215fa9b917f2d0830a66bd11b3ff8">eNvFlexShapeFlagTrigger</a></div><div class="ttdoc">Indicates that the shape is a trigger volume, this means it will not perform any collision response...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:921</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aee5c235d5fab40831cf339680aa25560aeab2b8a68b528d46e11b71ad0f4d83f2"><div class="ttname"><a href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560aeab2b8a68b528d46e11b71ad0f4d83f2">eNvFlexFeatureModeSimpleFluids</a></div><div class="ttdoc">Simple single phase fluid-only particles (no solids) </div><div class="ttdef"><b>Definition:</b> NvFlex.h:358</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a0506ae712f846087b8647ea389ac26baae22144512ae098865c6725af16a68ad3"><div class="ttname"><a href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baae22144512ae098865c6725af16a68ad3">eNvFlexShapeSphere</a></div><div class="ttdoc">A sphere shape, see FlexSphereGeometry. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:909</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a0506ae712f846087b8647ea389ac26baa1fd78f8694b954f8d12fe7d911f17180"><div class="ttname"><a href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baa1fd78f8694b954f8d12fe7d911f17180">eNvFlexShapeSDF</a></div><div class="ttdoc">A signed distance field shape, see FlexSDFGeometry. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:914</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5890b9e46d626cfa19994976ea53c52e"><div class="ttname"><a href="_nv_flex_8h.html#a5890b9e46d626cfa19994976ea53c52e">NvFlexInitDesc::deviceIndex</a></div><div class="ttdeci">int deviceIndex</div><div class="ttdoc">The GPU device index that should be used, if there is already a CUDA context on the calling thread th...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:317</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a40f452b4edbf11b793f31286a0ae270e"><div class="ttname"><a href="_nv_flex_8h.html#a40f452b4edbf11b793f31286a0ae270e">NvFlexParams::viscosity</a></div><div class="ttdeci">float viscosity</div><div class="ttdoc">Smoothes particle velocities using XSPH viscosity. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:127</div></div>
+<div class="ttc" id="_nv_flex_8h_html_af6a50e64591866ae2390a57e3342566c"><div class="ttname"><a href="_nv_flex_8h.html#af6a50e64591866ae2390a57e3342566c">NvFlexTriangleMeshGeometry::mesh</a></div><div class="ttdeci">NvFlexTriangleMeshId mesh</div><div class="ttdoc">A triangle mesh pointer created by NvFlexCreateTriangleMesh() </div><div class="ttdef"><b>Definition:</b> NvFlex.h:880</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a8114a049f5e16f7d1b960f3ac4993fdb"><div class="ttname"><a href="_nv_flex_8h.html#a8114a049f5e16f7d1b960f3ac4993fdb">NvFlexParams::adhesion</a></div><div class="ttdeci">float adhesion</div><div class="ttdoc">Controls how strongly particles stick to surfaces they hit, default 0.0, range [0.0, +inf]. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:109</div></div>
<div class="ttc" id="_nv_flex_8h_html_a78045a8d4e856372df108dc616a94cd8"><div class="ttname"><a href="_nv_flex_8h.html#a78045a8d4e856372df108dc616a94cd8">NvFlexUnregisterOGLBuffer</a></div><div class="ttdeci">NV_FLEX_API void NvFlexUnregisterOGLBuffer(NvFlexBuffer *buf)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ab669c404607156367b09878870dbe30c"><div class="ttname"><a href="_nv_flex_8h.html#ab669c404607156367b09878870dbe30c">NvFlexBoxGeometry::halfExtents</a></div><div class="ttdeci">float halfExtents[3]</div><div class="ttdef"><b>Definition:</b> NvFlex.h:777</div></div>
-<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_box_geometry"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_box_geometry">NvFlexBoxGeometry</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:775</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a15b7a5449bee38bbe5dcaf23690f09f5"><div class="ttname"><a href="_nv_flex_8h.html#a15b7a5449bee38bbe5dcaf23690f09f5">NvFlexGetPhases</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetPhases(NvFlexSolver *solver, NvFlexBuffer *phases, int n)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ab669c404607156367b09878870dbe30c"><div class="ttname"><a href="_nv_flex_8h.html#ab669c404607156367b09878870dbe30c">NvFlexBoxGeometry::halfExtents</a></div><div class="ttdeci">float halfExtents[3]</div><div class="ttdef"><b>Definition:</b> NvFlex.h:862</div></div>
+<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_box_geometry"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_box_geometry">NvFlexBoxGeometry</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:860</div></div>
<div class="ttc" id="_nv_flex_8h_html_a5c28caf6d5d513c5adacd4fbc782f308"><div class="ttname"><a href="_nv_flex_8h.html#a5c28caf6d5d513c5adacd4fbc782f308">NvFlexCreateDistanceField</a></div><div class="ttdeci">NV_FLEX_API NvFlexDistanceFieldId NvFlexCreateDistanceField(NvFlexLibrary *lib)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a9e5f943053d43d7e1a6b149babe4fe44"><div class="ttname"><a href="_nv_flex_8h.html#a9e5f943053d43d7e1a6b149babe4fe44">NvFlexSolverCallbackParams::phases</a></div><div class="ttdeci">int * phases</div><div class="ttdoc">Device pointer to the active particle phase data. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:265</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a9e5f943053d43d7e1a6b149babe4fe44"><div class="ttname"><a href="_nv_flex_8h.html#a9e5f943053d43d7e1a6b149babe4fe44">NvFlexSolverCallbackParams::phases</a></div><div class="ttdeci">int * phases</div><div class="ttdoc">Device pointer to the active particle phase data. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:274</div></div>
<div class="ttc" id="_nv_flex_8h_html_a898eb8e66a456dd2266c694f29cab600"><div class="ttname"><a href="_nv_flex_8h.html#a898eb8e66a456dd2266c694f29cab600">NvFlexFlush</a></div><div class="ttdeci">NV_FLEX_API void NvFlexFlush(NvFlexLibrary *lib)</div></div>
<div class="ttc" id="_nv_flex_8h_html_ab1eec84a21b1872fba11c9b4cc1d1629"><div class="ttname"><a href="_nv_flex_8h.html#ab1eec84a21b1872fba11c9b4cc1d1629">NvFlexGetBounds</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetBounds(NvFlexSolver *solver, NvFlexBuffer *lower, NvFlexBuffer *upper)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8"><div class="ttname"><a href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8">eNvFlexBufferHost</a></div><div class="ttdoc">Host mappable buffer, pinned memory on CUDA, staging buffer on DX. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:79</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ac32019f7dd1f30ab8a7391a417ed02c9"><div class="ttname"><a href="_nv_flex_8h.html#ac32019f7dd1f30ab8a7391a417ed02c9">NvFlexSolverCallbackParams::numActive</a></div><div class="ttdeci">int numActive</div><div class="ttdoc">The number of active particles returned, the callback data only return pointers to active particle da...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:267</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8"><div class="ttname"><a href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8">eNvFlexBufferHost</a></div><div class="ttdoc">A host mappable buffer, pinned memory on CUDA, staging buffer on DX. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:78</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ac32019f7dd1f30ab8a7391a417ed02c9"><div class="ttname"><a href="_nv_flex_8h.html#ac32019f7dd1f30ab8a7391a417ed02c9">NvFlexSolverCallbackParams::numActive</a></div><div class="ttdeci">int numActive</div><div class="ttdoc">The number of active particles returned, the callback data only return pointers to active particle da...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:276</div></div>
<div class="ttc" id="_nv_flex_8h_html_ae0d57e4fc2b3b51ec08f7da0a28ff343"><div class="ttname"><a href="_nv_flex_8h.html#ae0d57e4fc2b3b51ec08f7da0a28ff343">NvFlexGetSolverLibrary</a></div><div class="ttdeci">NV_FLEX_API NvFlexLibrary * NvFlexGetSolverLibrary(NvFlexSolver *solver)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644a0679f1deab7afc547900e30aae0b711a"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a0679f1deab7afc547900e30aae0b711a">eNvFlexPhaseShapeChannel7</a></div><div class="ttdoc">Particle will collide with shapes with channel 7 set (see NvFlexMakeShapeFlags()) ...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:178</div></div>
<div class="ttc" id="_nv_flex_8h_html_a50a3933d3f7b77d0500c702b1fa9ba9a"><div class="ttname"><a href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a></div><div class="ttdeci">struct NvFlexBuffer NvFlexBuffer</div><div class="ttdef"><b>Definition:</b> NvFlex.h:62</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ae45cb18deec2db8ff44d181e80f24695"><div class="ttname"><a href="_nv_flex_8h.html#ae45cb18deec2db8ff44d181e80f24695">NvFlexTimers::sortCellIndices</a></div><div class="ttdeci">float sortCellIndices</div><div class="ttdoc">Time spent sorting grid indices. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:188</div></div>
-<div class="ttc" id="_nv_flex_8h_html_aa6eddaa3a6eb35917c093dcabf69a200"><div class="ttname"><a href="_nv_flex_8h.html#aa6eddaa3a6eb35917c093dcabf69a200">NvFlexParams::radius</a></div><div class="ttdeci">float radius</div><div class="ttdoc">The maximum interaction radius for particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:101</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ae45cb18deec2db8ff44d181e80f24695"><div class="ttname"><a href="_nv_flex_8h.html#ae45cb18deec2db8ff44d181e80f24695">NvFlexTimers::sortCellIndices</a></div><div class="ttdeci">float sortCellIndices</div><div class="ttdoc">Time spent sorting grid indices. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:205</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ae01bc8c45cf48f5faed2a8e78df1c678"><div class="ttname"><a href="_nv_flex_8h.html#ae01bc8c45cf48f5faed2a8e78df1c678">NvFlexCopyDesc::srcOffset</a></div><div class="ttdeci">int srcOffset</div><div class="ttdef"><b>Definition:</b> NvFlex.h:502</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aedf73c7aa1f4df92c7724d58f4dcb266"><div class="ttname"><a href="_nv_flex_8h.html#aedf73c7aa1f4df92c7724d58f4dcb266">NvFlexSolverDesc::maxParticles</a></div><div class="ttdeci">int maxParticles</div><div class="ttdoc">Maximum number of regular particles in the solver. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:368</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aafc89f87307602fb9bfa8f6668122121"><div class="ttname"><a href="_nv_flex_8h.html#aafc89f87307602fb9bfa8f6668122121">NvFlexGetRestParticles</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetRestParticles(NvFlexSolver *solver, NvFlexBuffer *p, const NvFlexCopyDesc *desc)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ad1d0256dac295346120fda40f6eea7e2"><div class="ttname"><a href="_nv_flex_8h.html#ad1d0256dac295346120fda40f6eea7e2">NvFlexInitDesc::computeContext</a></div><div class="ttdeci">void * computeContext</div><div class="ttdoc">Direct3D context to use for simulation, if none is specified a new context will be created...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:321</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aa6eddaa3a6eb35917c093dcabf69a200"><div class="ttname"><a href="_nv_flex_8h.html#aa6eddaa3a6eb35917c093dcabf69a200">NvFlexParams::radius</a></div><div class="ttdeci">float radius</div><div class="ttdoc">The maximum interaction radius for particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:100</div></div>
<div class="ttc" id="_nv_flex_8h_html_a7edac9cf450917147b83e98f5cb09f5d"><div class="ttname"><a href="_nv_flex_8h.html#a7edac9cf450917147b83e98f5cb09f5d">NvFlexGetContacts</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetContacts(NvFlexSolver *solver, NvFlexBuffer *planes, NvFlexBuffer *velocities, NvFlexBuffer *indices, NvFlexBuffer *counts)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a53e827707abaf2e03b78c3c88469d7bf"><div class="ttname"><a href="_nv_flex_8h.html#a53e827707abaf2e03b78c3c88469d7bf">NvFlexCollisionGeometry::box</a></div><div class="ttdeci">NvFlexBoxGeometry box</div><div class="ttdef"><b>Definition:</b> NvFlex.h:816</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ac48a490fa3d62cc678c309dd4b8cbf18"><div class="ttname"><a href="_nv_flex_8h.html#ac48a490fa3d62cc678c309dd4b8cbf18">NvFlexSolverCallbackParams::velocities</a></div><div class="ttdeci">float * velocities</div><div class="ttdoc">Device pointer to the active particle velocity data in the form x,y,z,w (last component is not used) ...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:264</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ab136ae1511a39ef570c010f321eff206"><div class="ttname"><a href="_nv_flex_8h.html#ab136ae1511a39ef570c010f321eff206">NvFlexParams::anisotropyMin</a></div><div class="ttdeci">float anisotropyMin</div><div class="ttdoc">Clamp the anisotropy scale to this fraction of the radius. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:132</div></div>
-<div class="ttc" id="_nv_flex_8h_html_afc5d58e7f591213c3fe1c31b4d440eb6"><div class="ttname"><a href="_nv_flex_8h.html#afc5d58e7f591213c3fe1c31b4d440eb6">NvFlexTimers::applyDeltas</a></div><div class="ttdeci">float applyDeltas</div><div class="ttdoc">Time spent adding position deltas to particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:202</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a0a6936f3cb0544ad624f1dea6b7eb50c"><div class="ttname"><a href="_nv_flex_8h.html#a0a6936f3cb0544ad624f1dea6b7eb50c">NvFlexSDFGeometry::field</a></div><div class="ttdeci">NvFlexDistanceFieldId field</div><div class="ttdoc">A signed distance field pointer created by NvFlexCreateDistanceField() </div><div class="ttdef"><b>Definition:</b> NvFlex.h:805</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a49f7117a457a716e7790904209f68707"><div class="ttname"><a href="_nv_flex_8h.html#a49f7117a457a716e7790904209f68707">NvFlexTimers::calculateDensity</a></div><div class="ttdeci">float calculateDensity</div><div class="ttdoc">Time spent calculating fluid density. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:195</div></div>
-<div class="ttc" id="struct_nv_flex_solver_callback_html_a2878301f697313b3ef3ad1bc2410c915"><div class="ttname"><a href="struct_nv_flex_solver_callback.html#a2878301f697313b3ef3ad1bc2410c915">NvFlexSolverCallback::userData</a></div><div class="ttdeci">void * userData</div><div class="ttdef"><b>Definition:</b> NvFlex.h:292</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a0506ae712f846087b8647ea389ac26baa1724c140b583fbf2c11c14a24dd3764a"><div class="ttname"><a href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baa1724c140b583fbf2c11c14a24dd3764a">eNvFlexShapeCapsule</a></div><div class="ttdoc">A capsule shape, see FlexCapsuleGeometry. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:825</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a53e827707abaf2e03b78c3c88469d7bf"><div class="ttname"><a href="_nv_flex_8h.html#a53e827707abaf2e03b78c3c88469d7bf">NvFlexCollisionGeometry::box</a></div><div class="ttdeci">NvFlexBoxGeometry box</div><div class="ttdef"><b>Definition:</b> NvFlex.h:901</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ac48a490fa3d62cc678c309dd4b8cbf18"><div class="ttname"><a href="_nv_flex_8h.html#ac48a490fa3d62cc678c309dd4b8cbf18">NvFlexSolverCallbackParams::velocities</a></div><div class="ttdeci">float * velocities</div><div class="ttdoc">Device pointer to the active particle velocity data in the form x,y,z,w (last component is not used) ...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:273</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644a1de4e956764950e501bcb8376a70f5a9"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a1de4e956764950e501bcb8376a70f5a9">eNvFlexPhaseShapeChannel1</a></div><div class="ttdoc">Particle will collide with shapes with channel 1 set (see NvFlexMakeShapeFlags()) ...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:172</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aa77d2a4edd4ccd79c9389854dca80613"><div class="ttname"><a href="_nv_flex_8h.html#aa77d2a4edd4ccd79c9389854dca80613">NvFlexGetDeviceLatency</a></div><div class="ttdeci">NV_FLEX_API float NvFlexGetDeviceLatency(NvFlexSolver *solver, unsigned long long *begin, unsigned long long *end, unsigned long long *frequency)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ab136ae1511a39ef570c010f321eff206"><div class="ttname"><a href="_nv_flex_8h.html#ab136ae1511a39ef570c010f321eff206">NvFlexParams::anisotropyMin</a></div><div class="ttdeci">float anisotropyMin</div><div class="ttdoc">Clamp the anisotropy scale to this fraction of the radius. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:130</div></div>
+<div class="ttc" id="_nv_flex_8h_html_afc5d58e7f591213c3fe1c31b4d440eb6"><div class="ttname"><a href="_nv_flex_8h.html#afc5d58e7f591213c3fe1c31b4d440eb6">NvFlexTimers::applyDeltas</a></div><div class="ttdeci">float applyDeltas</div><div class="ttdoc">Time spent adding position deltas to particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:219</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a0a6936f3cb0544ad624f1dea6b7eb50c"><div class="ttname"><a href="_nv_flex_8h.html#a0a6936f3cb0544ad624f1dea6b7eb50c">NvFlexSDFGeometry::field</a></div><div class="ttdeci">NvFlexDistanceFieldId field</div><div class="ttdoc">A signed distance field pointer created by NvFlexCreateDistanceField() </div><div class="ttdef"><b>Definition:</b> NvFlex.h:890</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a49f7117a457a716e7790904209f68707"><div class="ttname"><a href="_nv_flex_8h.html#a49f7117a457a716e7790904209f68707">NvFlexTimers::calculateDensity</a></div><div class="ttdeci">float calculateDensity</div><div class="ttdoc">Time spent calculating fluid density. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:212</div></div>
+<div class="ttc" id="struct_nv_flex_solver_callback_html_a2878301f697313b3ef3ad1bc2410c915"><div class="ttname"><a href="struct_nv_flex_solver_callback.html#a2878301f697313b3ef3ad1bc2410c915">NvFlexSolverCallback::userData</a></div><div class="ttdeci">void * userData</div><div class="ttdef"><b>Definition:</b> NvFlex.h:289</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a0506ae712f846087b8647ea389ac26baa1724c140b583fbf2c11c14a24dd3764a"><div class="ttname"><a href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baa1724c140b583fbf2c11c14a24dd3764a">eNvFlexShapeCapsule</a></div><div class="ttdoc">A capsule shape, see FlexCapsuleGeometry. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:910</div></div>
<div class="ttc" id="_nv_flex_8h_html_afdda5a5210938a1e8a7c3a8218ad468e"><div class="ttname"><a href="_nv_flex_8h.html#afdda5a5210938a1e8a7c3a8218ad468e">NvFlexCreateTriangleMesh</a></div><div class="ttdeci">NV_FLEX_API NvFlexTriangleMeshId NvFlexCreateTriangleMesh(NvFlexLibrary *lib)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_aa457096286567a37d4f1d5f4857d9296"><div class="ttname"><a href="_nv_flex_8h.html#aa457096286567a37d4f1d5f4857d9296">NvFlexSetRestParticles</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetRestParticles(NvFlexSolver *solver, NvFlexBuffer *p, int n)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a0999d825c8760e19ba4c980d2eb097ac"><div class="ttname"><a href="_nv_flex_8h.html#a0999d825c8760e19ba4c980d2eb097ac">NvFlexSolverDesc::featureMode</a></div><div class="ttdeci">NvFlexFeatureMode featureMode</div><div class="ttdoc">Control which features are enabled. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:366</div></div>
<div class="ttc" id="_nv_flex_8h_html_aaf59e45ada57c7f958a8030099cbe211"><div class="ttname"><a href="_nv_flex_8h.html#aaf59e45ada57c7f958a8030099cbe211">NvFlexShutdown</a></div><div class="ttdeci">NV_FLEX_API void NvFlexShutdown(NvFlexLibrary *lib)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a3974e1e608d9f532d5520dc158b47903"><div class="ttname"><a href="_nv_flex_8h.html#a3974e1e608d9f532d5520dc158b47903">NvFlexSolverCallbackParams::solver</a></div><div class="ttdeci">NvFlexSolver * solver</div><div class="ttdoc">Pointer to the solver that the callback is registered to. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:260</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644a1728772beb1746ace4c549b2ed8f1d74"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a1728772beb1746ace4c549b2ed8f1d74">eNvFlexPhaseFluid</a></div><div class="ttdoc">If set this particle will generate fluid density constraints for its overlapping neighbors. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:172</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644">NvFlexPhase</a></div><div class="ttdeci">NvFlexPhase</div><div class="ttdef"><b>Definition:</b> NvFlex.h:166</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a3974e1e608d9f532d5520dc158b47903"><div class="ttname"><a href="_nv_flex_8h.html#a3974e1e608d9f532d5520dc158b47903">NvFlexSolverCallbackParams::solver</a></div><div class="ttdeci">NvFlexSolver * solver</div><div class="ttdoc">Pointer to the solver that the callback is registered to. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:269</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644a1728772beb1746ace4c549b2ed8f1d74"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a1728772beb1746ace4c549b2ed8f1d74">eNvFlexPhaseFluid</a></div><div class="ttdoc">If set this particle will generate fluid density constraints for its overlapping neighbors. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:168</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aee5c235d5fab40831cf339680aa25560"><div class="ttname"><a href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560">NvFlexFeatureMode</a></div><div class="ttdeci">NvFlexFeatureMode</div><div class="ttdef"><b>Definition:</b> NvFlex.h:354</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644">NvFlexPhase</a></div><div class="ttdeci">NvFlexPhase</div><div class="ttdef"><b>Definition:</b> NvFlex.h:160</div></div>
<div class="ttc" id="_nv_flex_8h_html_ad607e7916e5d76b384a61f1c1f94ab32"><div class="ttname"><a href="_nv_flex_8h.html#ad607e7916e5d76b384a61f1c1f94ab32">NvFlexUnregisterD3DBuffer</a></div><div class="ttdeci">NV_FLEX_API void NvFlexUnregisterD3DBuffer(NvFlexBuffer *buf)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a533a78227b462a268c905f9c307c4bd6"><div class="ttname"><a href="_nv_flex_8h.html#a533a78227b462a268c905f9c307c4bd6">NvFlexParams::sleepThreshold</a></div><div class="ttdeci">float sleepThreshold</div><div class="ttdoc">Particles with a velocity magnitude < this threshold will be considered fixed. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:111</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a6f6f14e625dc744a127be81e6dc4cb74"><div class="ttname"><a href="_nv_flex_8h.html#a6f6f14e625dc744a127be81e6dc4cb74">NvFlexGetDensities</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetDensities(NvFlexSolver *solver, NvFlexBuffer *densities, int n)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a77687a448947946483c73f7cc94932c6"><div class="ttname"><a href="_nv_flex_8h.html#a77687a448947946483c73f7cc94932c6">NvFlexInitDesc::useComputeQueue</a></div><div class="ttdeci">bool useComputeQueue</div><div class="ttdoc">If true, run Flex on a D3D12 compute queue, or vendor specific D3D11 compute queue. This allows compute and graphics to run in parallel on some GPUs. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:322</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a533a78227b462a268c905f9c307c4bd6"><div class="ttname"><a href="_nv_flex_8h.html#a533a78227b462a268c905f9c307c4bd6">NvFlexParams::sleepThreshold</a></div><div class="ttdeci">float sleepThreshold</div><div class="ttdoc">Particles with a velocity magnitude < this threshold will be considered fixed. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:110</div></div>
<div class="ttc" id="_nv_flex_8h_html_ac25ec5de38c177db51198bb620644d36"><div class="ttname"><a href="_nv_flex_8h.html#ac25ec5de38c177db51198bb620644d36">NvFlexGetVersion</a></div><div class="ttdeci">NV_FLEX_API int NvFlexGetVersion()</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a5e37444b8c96e0880a428d9ea58dbf54"><div class="ttname"><a href="_nv_flex_8h.html#a5e37444b8c96e0880a428d9ea58dbf54">NvFlexParams::anisotropyMax</a></div><div class="ttdeci">float anisotropyMax</div><div class="ttdoc">Clamp the anisotropy scale to this fraction of the radius. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:133</div></div>
-<div class="ttc" id="_nv_flex_8h_html_afc20d27121f49b61be9cc6bd4c25f547"><div class="ttname"><a href="_nv_flex_8h.html#afc20d27121f49b61be9cc6bd4c25f547">NvFlexTimers::collideTriangles</a></div><div class="ttdeci">float collideTriangles</div><div class="ttdoc">Time spent colliding triangle shapes. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:193</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5e37444b8c96e0880a428d9ea58dbf54"><div class="ttname"><a href="_nv_flex_8h.html#a5e37444b8c96e0880a428d9ea58dbf54">NvFlexParams::anisotropyMax</a></div><div class="ttdeci">float anisotropyMax</div><div class="ttdoc">Clamp the anisotropy scale to this fraction of the radius. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:131</div></div>
+<div class="ttc" id="_nv_flex_8h_html_afc20d27121f49b61be9cc6bd4c25f547"><div class="ttname"><a href="_nv_flex_8h.html#afc20d27121f49b61be9cc6bd4c25f547">NvFlexTimers::collideTriangles</a></div><div class="ttdeci">float collideTriangles</div><div class="ttdoc">Time spent colliding triangle shapes. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:210</div></div>
<div class="ttc" id="_nv_flex_8h_html_ab1efb6764f65900cb09f0188ad6da08a"><div class="ttname"><a href="_nv_flex_8h.html#ab1efb6764f65900cb09f0188ad6da08a">NvFlexGetDetailTimers</a></div><div class="ttdeci">NV_FLEX_API int NvFlexGetDetailTimers(NvFlexSolver *solver, NvFlexDetailTimer **timers)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_afe09e63d22c5156fe24cd2d2bc069c04"><div class="ttname"><a href="_nv_flex_8h.html#afe09e63d22c5156fe24cd2d2bc069c04">NvFlexSetVelocities</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetVelocities(NvFlexSolver *solver, NvFlexBuffer *v, int n)</div></div>
<div class="ttc" id="_nv_flex_8h_html_ad56e661161763579afb375b3841eb5ff"><div class="ttname"><a href="_nv_flex_8h.html#ad56e661161763579afb375b3841eb5ff">NvFlexGetConvexMeshBounds</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetConvexMeshBounds(NvFlexLibrary *lib, NvFlexConvexMeshId mesh, float *lower, float *upper)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a31c31ea4f96cd4fdadc6b7317691304cadc6740cf6d829fba159d92e43ffb5992"><div class="ttname"><a href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304cadc6740cf6d829fba159d92e43ffb5992">eNvFlexShapeFlagDynamic</a></div><div class="ttdoc">Indicates the shape is dynamic and should have lower priority over static collision shapes...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:835</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a31c31ea4f96cd4fdadc6b7317691304cadc6740cf6d829fba159d92e43ffb5992"><div class="ttname"><a href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304cadc6740cf6d829fba159d92e43ffb5992">eNvFlexShapeFlagDynamic</a></div><div class="ttdoc">Indicates the shape is dynamic and should have lower priority over static collision shapes...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:920</div></div>
<div class="ttc" id="_nv_flex_8h_html_a6541b33eaca7b2323e73b30cea34d16ca1bd450ab65ccc06288fae95e23d5e6f1"><div class="ttname"><a href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16ca1bd450ab65ccc06288fae95e23d5e6f1">eNvFlexMapDoNotWait</a></div><div class="ttdoc">Calling thread will check if buffer is ready for access, if not ready then the method will return NUL...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:70</div></div>
-<div class="ttc" id="_nv_flex_8h_html_aadb2a0cf125e4a6b2f3443ab7dcbd3d4"><div class="ttname"><a href="_nv_flex_8h.html#aadb2a0cf125e4a6b2f3443ab7dcbd3d4">NvFlexGetNormals</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetNormals(NvFlexSolver *solver, NvFlexBuffer *normals, int n)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ab98a2aba477ab4d4178bf677852bf544"><div class="ttname"><a href="_nv_flex_8h.html#ab98a2aba477ab4d4178bf677852bf544">NvFlexParams::shockPropagation</a></div><div class="ttdeci">float shockPropagation</div><div class="ttdoc">Artificially decrease the mass of particles based on height from a fixed reference point...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:116</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a615e8070212c24a70e7a849120c13353"><div class="ttname"><a href="_nv_flex_8h.html#a615e8070212c24a70e7a849120c13353">NvFlexMakePhaseWithChannels</a></div><div class="ttdeci">NV_FLEX_API int NvFlexMakePhaseWithChannels(int group, int particleFlags, int shapeChannels)</div><div class="ttdef"><b>Definition:</b> NvFlex.h:190</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ab43db5f28808f8038cfc9330d4b47d57"><div class="ttname"><a href="_nv_flex_8h.html#ab43db5f28808f8038cfc9330d4b47d57">NvFlexMakePhase</a></div><div class="ttdeci">NV_FLEX_API int NvFlexMakePhase(int group, int particleFlags)</div><div class="ttdef"><b>Definition:</b> NvFlex.h:195</div></div>
+<div class="ttc" id="_nv_flex_8h_html_adc0c97635cdbb3da7b571574a3b38990"><div class="ttname"><a href="_nv_flex_8h.html#adc0c97635cdbb3da7b571574a3b38990">NvFlexSetActive</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetActive(NvFlexSolver *solver, NvFlexBuffer *indices, const NvFlexCopyDesc *desc)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ab98a2aba477ab4d4178bf677852bf544"><div class="ttname"><a href="_nv_flex_8h.html#ab98a2aba477ab4d4178bf677852bf544">NvFlexParams::shockPropagation</a></div><div class="ttdeci">float shockPropagation</div><div class="ttdoc">Artificially decrease the mass of particles based on height from a fixed reference point...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:115</div></div>
<div class="ttc" id="_nv_flex_8h_html_a4c451971259524c6878b6b1ed4023ada"><div class="ttname"><a href="_nv_flex_8h.html#a4c451971259524c6878b6b1ed4023ada">NvFlexGetDeviceName</a></div><div class="ttdeci">NV_FLEX_API const char * NvFlexGetDeviceName(NvFlexLibrary *lib)</div></div>
<div class="ttc" id="_nv_flex_8h_html_ac85b6372e5c7bfc508ecb7b8c59c72a0"><div class="ttname"><a href="_nv_flex_8h.html#ac85b6372e5c7bfc508ecb7b8c59c72a0">NvFlexDestroyConvexMesh</a></div><div class="ttdeci">NV_FLEX_API void NvFlexDestroyConvexMesh(NvFlexLibrary *lib, NvFlexConvexMeshId convex)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_aaa36ba5ee44e34e762167fb0b8b3292e"><div class="ttname"><a href="_nv_flex_8h.html#aaa36ba5ee44e34e762167fb0b8b3292e">NvFlexTimers::collideFields</a></div><div class="ttdeci">float collideFields</div><div class="ttdoc">Time spent colliding signed distance field shapes. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:194</div></div>
-<div class="ttc" id="_nv_flex_8h_html_af9b72d2909ef335b12a46cdbd4b71f57"><div class="ttname"><a href="_nv_flex_8h.html#af9b72d2909ef335b12a46cdbd4b71f57">NvFlexTimers::calculateAnisotropy</a></div><div class="ttdeci">float calculateAnisotropy</div><div class="ttdoc">Time spent calculating particle anisotropy for fluid. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:203</div></div>
-<div class="ttc" id="_nv_flex_8h_html_abf304d5c1f8f041fa46a2bfb0bdf56fe"><div class="ttname"><a href="_nv_flex_8h.html#abf304d5c1f8f041fa46a2bfb0bdf56fe">NvFlexInitDesc::renderContext</a></div><div class="ttdeci">void * renderContext</div><div class="ttdoc">Direct3D context to use for simulation, if none is specified a new context will be created...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:282</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aaa36ba5ee44e34e762167fb0b8b3292e"><div class="ttname"><a href="_nv_flex_8h.html#aaa36ba5ee44e34e762167fb0b8b3292e">NvFlexTimers::collideFields</a></div><div class="ttdeci">float collideFields</div><div class="ttdoc">Time spent colliding signed distance field shapes. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:211</div></div>
+<div class="ttc" id="_nv_flex_8h_html_af9b72d2909ef335b12a46cdbd4b71f57"><div class="ttname"><a href="_nv_flex_8h.html#af9b72d2909ef335b12a46cdbd4b71f57">NvFlexTimers::calculateAnisotropy</a></div><div class="ttdeci">float calculateAnisotropy</div><div class="ttdoc">Time spent calculating particle anisotropy for fluid. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:220</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644a0c8d08e646d2713e34d7e2dd6e7b21f2"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a0c8d08e646d2713e34d7e2dd6e7b21f2">eNvFlexPhaseShapeChannel6</a></div><div class="ttdoc">Particle will collide with shapes with channel 6 set (see NvFlexMakeShapeFlags()) ...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:177</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aaff62cfd50431d82af5d04a6c9ac4ffd"><div class="ttname"><a href="_nv_flex_8h.html#aaff62cfd50431d82af5d04a6c9ac4ffd">NvFlexGetParticles</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetParticles(NvFlexSolver *solver, NvFlexBuffer *p, const NvFlexCopyDesc *desc)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_abf304d5c1f8f041fa46a2bfb0bdf56fe"><div class="ttname"><a href="_nv_flex_8h.html#abf304d5c1f8f041fa46a2bfb0bdf56fe">NvFlexInitDesc::renderContext</a></div><div class="ttdeci">void * renderContext</div><div class="ttdoc">Direct3D context that the app is using for rendering. In DirectX 12 this should be a ID3D12CommandQue...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:320</div></div>
<div class="ttc" id="_nv_flex_8h_html_a3078976e98f370a9fbdb11db80f1f318"><div class="ttname"><a href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a></div><div class="ttdeci">struct NvFlexLibrary NvFlexLibrary</div><div class="ttdef"><b>Definition:</b> NvFlex.h:52</div></div>
<div class="ttc" id="_nv_flex_8h_html_a42ec7b30c79d4733e6a756b5d9b15ee6"><div class="ttname"><a href="_nv_flex_8h.html#a42ec7b30c79d4733e6a756b5d9b15ee6">NvFlexAcquireContext</a></div><div class="ttdeci">NV_FLEX_API void NvFlexAcquireContext(NvFlexLibrary *lib)</div></div>
<div class="ttc" id="_nv_flex_8h_html_a687e5ec141948f779faa9183b68cb743"><div class="ttname"><a href="_nv_flex_8h.html#a687e5ec141948f779faa9183b68cb743">NvFlexInit</a></div><div class="ttdeci">NV_FLEX_API NvFlexLibrary * NvFlexInit(int version=NV_FLEX_VERSION, NvFlexErrorCallback errorFunc=0, NvFlexInitDesc *desc=0)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a05f92015449662f5a2f5d5e9ecdc2c6e"><div class="ttname"><a href="_nv_flex_8h.html#a05f92015449662f5a2f5d5e9ecdc2c6e">NvFlexParams::freeSurfaceDrag</a></div><div class="ttdeci">float freeSurfaceDrag</div><div class="ttdoc">Drag force applied to boundary fluid particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:136</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a221a4621ab98eca6ecd3368d288154a4"><div class="ttname"><a href="_nv_flex_8h.html#a221a4621ab98eca6ecd3368d288154a4">NvFlexGetDeviceLatency</a></div><div class="ttdeci">NV_FLEX_API float NvFlexGetDeviceLatency(NvFlexSolver *solver)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ac0049037dcff7a769030acd567eac6cd"><div class="ttname"><a href="_nv_flex_8h.html#ac0049037dcff7a769030acd567eac6cd">NvFlexCollisionGeometry::sdf</a></div><div class="ttdeci">NvFlexSDFGeometry sdf</div><div class="ttdef"><b>Definition:</b> NvFlex.h:819</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a0def9c3ceff57bbae5bcec15f6d64b36"><div class="ttname"><a href="_nv_flex_8h.html#a0def9c3ceff57bbae5bcec15f6d64b36">NvFlexParams::maxAcceleration</a></div><div class="ttdeci">float maxAcceleration</div><div class="ttdoc">The magnitude of particle acceleration will be clamped to this value at the end of each step (limits ...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:114</div></div>
-<div class="ttc" id="_nv_flex_8h_html_aafb92c4fa45ce9614cdfd349b3722c8a"><div class="ttname"><a href="_nv_flex_8h.html#aafb92c4fa45ce9614cdfd349b3722c8a">NvFlexParams::wind</a></div><div class="ttdeci">float wind[3]</div><div class="ttdoc">Constant acceleration applied to particles that belong to dynamic triangles, drag needs to be > 0 for...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:121</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a05f92015449662f5a2f5d5e9ecdc2c6e"><div class="ttname"><a href="_nv_flex_8h.html#a05f92015449662f5a2f5d5e9ecdc2c6e">NvFlexParams::freeSurfaceDrag</a></div><div class="ttdeci">float freeSurfaceDrag</div><div class="ttdoc">Drag force applied to boundary fluid particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:134</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a32e8fdb39029a2564c129bd493c52058"><div class="ttname"><a href="_nv_flex_8h.html#a32e8fdb39029a2564c129bd493c52058">NvFlexSetNormals</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetNormals(NvFlexSolver *solver, NvFlexBuffer *normals, const NvFlexCopyDesc *desc)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ac0049037dcff7a769030acd567eac6cd"><div class="ttname"><a href="_nv_flex_8h.html#ac0049037dcff7a769030acd567eac6cd">NvFlexCollisionGeometry::sdf</a></div><div class="ttdeci">NvFlexSDFGeometry sdf</div><div class="ttdef"><b>Definition:</b> NvFlex.h:904</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a0def9c3ceff57bbae5bcec15f6d64b36"><div class="ttname"><a href="_nv_flex_8h.html#a0def9c3ceff57bbae5bcec15f6d64b36">NvFlexParams::maxAcceleration</a></div><div class="ttdeci">float maxAcceleration</div><div class="ttdoc">The magnitude of particle acceleration will be clamped to this value at the end of each step (limits ...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:113</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aafb92c4fa45ce9614cdfd349b3722c8a"><div class="ttname"><a href="_nv_flex_8h.html#aafb92c4fa45ce9614cdfd349b3722c8a">NvFlexParams::wind</a></div><div class="ttdeci">float wind[3]</div><div class="ttdoc">Constant acceleration applied to particles that belong to dynamic triangles, drag needs to be > 0 for...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:120</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644a92bbb75d47ea0058a9a89deb0abec67f"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a92bbb75d47ea0058a9a89deb0abec67f">eNvFlexPhaseShapeChannel5</a></div><div class="ttdoc">Particle will collide with shapes with channel 5 set (see NvFlexMakeShapeFlags()) ...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:176</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a9e925acbc34675dfe247da017cbd855f"><div class="ttname"><a href="_nv_flex_8h.html#a9e925acbc34675dfe247da017cbd855f">NvFlexCreateSolver</a></div><div class="ttdeci">NV_FLEX_API NvFlexSolver * NvFlexCreateSolver(NvFlexLibrary *lib, const NvFlexSolverDesc *desc)</div></div>
<div class="ttc" id="_nv_flex_8h_html_a584ffb275b9986fd5444ed1a7ea247d9"><div class="ttname"><a href="_nv_flex_8h.html#a584ffb275b9986fd5444ed1a7ea247d9">NvFlexUpdateDistanceField</a></div><div class="ttdeci">NV_FLEX_API void NvFlexUpdateDistanceField(NvFlexLibrary *lib, NvFlexDistanceFieldId sdf, int dimx, int dimy, int dimz, NvFlexBuffer *field)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_timers"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_timers">NvFlexTimers</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:184</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a5628f890f4ae070e405feaf1f81a7b85"><div class="ttname"><a href="_nv_flex_8h.html#a5628f890f4ae070e405feaf1f81a7b85">NvFlexParams::surfaceTension</a></div><div class="ttdeci">float surfaceTension</div><div class="ttdoc">Controls how strongly particles attempt to minimize surface area, default: 0.0, range: [0...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:128</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a843360ebf23cd00e5eff72d19e796dd9"><div class="ttname"><a href="_nv_flex_8h.html#a843360ebf23cd00e5eff72d19e796dd9">NvFlexSolverCallbackParams::dt</a></div><div class="ttdeci">float dt</div><div class="ttdoc">The per-update time-step, this is the value passed to NvFlexUpdateSolver() </div><div class="ttdef"><b>Definition:</b> NvFlex.h:269</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a7bed2ff24c30c76aed0923809fc16d8c"><div class="ttname"><a href="_nv_flex_8h.html#a7bed2ff24c30c76aed0923809fc16d8c">NvFlexParams::diffuseSortAxis</a></div><div class="ttdeci">float diffuseSortAxis[3]</div><div class="ttdoc">Diffuse particles will be sorted by depth along this axis if non-zero. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:144</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ad019ad1901bc33d43e3a60df0dfe9b09"><div class="ttname"><a href="_nv_flex_8h.html#ad019ad1901bc33d43e3a60df0dfe9b09">NvFlexParams::fluidRestDistance</a></div><div class="ttdeci">float fluidRestDistance</div><div class="ttdoc">The distance fluid particles are spaced at the rest density, must be in the range (0...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:103</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a6071050991cf71a8d9ff28ea968479af"><div class="ttname"><a href="_nv_flex_8h.html#a6071050991cf71a8d9ff28ea968479af">NvFlexTimers::reorder</a></div><div class="ttdeci">float reorder</div><div class="ttdoc">Time spent reordering particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:190</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a56e990c5bfbc89677988cbf2471c0ade"><div class="ttname"><a href="_nv_flex_8h.html#a56e990c5bfbc89677988cbf2471c0ade">NvFlexDistanceFieldId</a></div><div class="ttdeci">unsigned int NvFlexDistanceFieldId</div><div class="ttdef"><b>Definition:</b> NvFlex.h:638</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a0506ae712f846087b8647ea389ac26baa315488da382a5e9794c83358385f7ae1"><div class="ttname"><a href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baa315488da382a5e9794c83358385f7ae1">eNvFlexShapeTriangleMesh</a></div><div class="ttdoc">A triangle mesh shape, see FlexTriangleMeshGeometry. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:828</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644a76a62d3a5df428f18e01f8b37573a7b1"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a76a62d3a5df428f18e01f8b37573a7b1">eNvFlexPhaseSelfCollideFilter</a></div><div class="ttdoc">If set this particle will ignore collisions with particles closer than the radius in the rest pose...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:171</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ae28167c680ad56dcff600ce0a223cec5"><div class="ttname"><a href="_nv_flex_8h.html#ae28167c680ad56dcff600ce0a223cec5">NvFlexGetAnisotropy</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetAnisotropy(NvFlexSolver *solver, NvFlexBuffer *q1, NvFlexBuffer *q2, NvFlexBuffer *q3)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_timers"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_timers">NvFlexTimers</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:201</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5628f890f4ae070e405feaf1f81a7b85"><div class="ttname"><a href="_nv_flex_8h.html#a5628f890f4ae070e405feaf1f81a7b85">NvFlexParams::surfaceTension</a></div><div class="ttdeci">float surfaceTension</div><div class="ttdoc">Controls how strongly particles attempt to minimize surface area, default: 0.0, range: [0...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:126</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644a66aa70953a97744621e2afa41d0e32d2"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a66aa70953a97744621e2afa41d0e32d2">eNvFlexPhaseShapeChannel0</a></div><div class="ttdoc">Particle will collide with shapes with channel 0 set (see NvFlexMakeShapeFlags()) ...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:171</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a843360ebf23cd00e5eff72d19e796dd9"><div class="ttname"><a href="_nv_flex_8h.html#a843360ebf23cd00e5eff72d19e796dd9">NvFlexSolverCallbackParams::dt</a></div><div class="ttdeci">float dt</div><div class="ttdoc">The per-update time-step, this is the value passed to NvFlexUpdateSolver() </div><div class="ttdef"><b>Definition:</b> NvFlex.h:278</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ad019ad1901bc33d43e3a60df0dfe9b09"><div class="ttname"><a href="_nv_flex_8h.html#ad019ad1901bc33d43e3a60df0dfe9b09">NvFlexParams::fluidRestDistance</a></div><div class="ttdeci">float fluidRestDistance</div><div class="ttdoc">The distance fluid particles are spaced at the rest density, must be in the range (0...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:102</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a6071050991cf71a8d9ff28ea968479af"><div class="ttname"><a href="_nv_flex_8h.html#a6071050991cf71a8d9ff28ea968479af">NvFlexTimers::reorder</a></div><div class="ttdeci">float reorder</div><div class="ttdoc">Time spent reordering particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:207</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a56e990c5bfbc89677988cbf2471c0ade"><div class="ttname"><a href="_nv_flex_8h.html#a56e990c5bfbc89677988cbf2471c0ade">NvFlexDistanceFieldId</a></div><div class="ttdeci">unsigned int NvFlexDistanceFieldId</div><div class="ttdef"><b>Definition:</b> NvFlex.h:723</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a0506ae712f846087b8647ea389ac26baa315488da382a5e9794c83358385f7ae1"><div class="ttname"><a href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baa315488da382a5e9794c83358385f7ae1">eNvFlexShapeTriangleMesh</a></div><div class="ttdoc">A triangle mesh shape, see FlexTriangleMeshGeometry. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:913</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644a76a62d3a5df428f18e01f8b37573a7b1"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a76a62d3a5df428f18e01f8b37573a7b1">eNvFlexPhaseSelfCollideFilter</a></div><div class="ttdoc">If set this particle will ignore collisions with particles closer than the radius in the rest pose...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:167</div></div>
<div class="ttc" id="_nv_flex_8h_html_ab16b6d2e11e0ab417ee6c4cf16f0a27d"><div class="ttname"><a href="_nv_flex_8h.html#ab16b6d2e11e0ab417ee6c4cf16f0a27d">NvFlexGetTimers</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetTimers(NvFlexSolver *solver, NvFlexTimers *timers)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_abdc984644770fec15d7af740c9730186"><div class="ttname"><a href="_nv_flex_8h.html#abdc984644770fec15d7af740c9730186">NvFlexConvexMeshGeometry::mesh</a></div><div class="ttdeci">NvFlexConvexMeshId mesh</div><div class="ttdef"><b>Definition:</b> NvFlex.h:786</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ae701fdcc0e7bf26c1dfc54d400ffb3d2"><div class="ttname"><a href="_nv_flex_8h.html#ae701fdcc0e7bf26c1dfc54d400ffb3d2">NvFlexCollisionGeometry::convexMesh</a></div><div class="ttdeci">NvFlexConvexMeshGeometry convexMesh</div><div class="ttdef"><b>Definition:</b> NvFlex.h:817</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a4f80c8bcfa6de99a52983adb13d80db9"><div class="ttname"><a href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9">NvFlexSolverCallbackStage</a></div><div class="ttdeci">NvFlexSolverCallbackStage</div><div class="ttdef"><b>Definition:</b> NvFlex.h:227</div></div>
-<div class="ttc" id="_nv_flex_8h_html_aeff62427426510eeb1cf5625e14ff585"><div class="ttname"><a href="_nv_flex_8h.html#aeff62427426510eeb1cf5625e14ff585">NvFlexParams::dissipation</a></div><div class="ttdeci">float dissipation</div><div class="ttdoc">Damps particle velocity based on how many particle contacts it has. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:117</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a0506ae712f846087b8647ea389ac26ba"><div class="ttname"><a href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26ba">NvFlexCollisionShapeType</a></div><div class="ttdeci">NvFlexCollisionShapeType</div><div class="ttdef"><b>Definition:</b> NvFlex.h:822</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ab4435b3857752360375fe52fc992cfcaa77b51759e33d60b2caf327bb4835351e"><div class="ttname"><a href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa77b51759e33d60b2caf327bb4835351e">eNvFlexLogDebug</a></div><div class="ttdoc">Used only in debug version of dll. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:220</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a9b2d3dc5ac42011aeec4e13be2e14252ad0c27f7aafdc4fe569722025c8eb2178"><div class="ttname"><a href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252ad0c27f7aafdc4fe569722025c8eb2178">eNvFlexCUDA</a></div><div class="ttdoc">Use CUDA compute for Flex, the application must link against the CUDA libraries. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:241</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ac2f8dff9857a86683aa6e55c058888d7"><div class="ttname"><a href="_nv_flex_8h.html#ac2f8dff9857a86683aa6e55c058888d7">NvFlexParams::relaxationMode</a></div><div class="ttdeci">NvFlexRelaxationMode relaxationMode</div><div class="ttdoc">How the relaxation is applied inside the solver. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:159</div></div>
-<div class="ttc" id="_nv_flex_8h_html_af9bb710afb22ec5ed50679aef8717777"><div class="ttname"><a href="_nv_flex_8h.html#af9bb710afb22ec5ed50679aef8717777">NvFlexParams::lift</a></div><div class="ttdeci">float lift</div><div class="ttdoc">Lift force applied to particles belonging to dynamic triangles, proportional to velocity^2*area in th...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:123</div></div>
+<div class="ttc" id="_nv_flex_8h_html_abdc984644770fec15d7af740c9730186"><div class="ttname"><a href="_nv_flex_8h.html#abdc984644770fec15d7af740c9730186">NvFlexConvexMeshGeometry::mesh</a></div><div class="ttdeci">NvFlexConvexMeshId mesh</div><div class="ttdef"><b>Definition:</b> NvFlex.h:871</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ab5cc56e228374b1da0910356b3172b4e"><div class="ttname"><a href="_nv_flex_8h.html#ab5cc56e228374b1da0910356b3172b4e">NvFlexGetRigids</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetRigids(NvFlexSolver *solver, NvFlexBuffer *offsets, NvFlexBuffer *indices, NvFlexBuffer *restPositions, NvFlexBuffer *restNormals, NvFlexBuffer *stiffness, NvFlexBuffer *thresholds, NvFlexBuffer *creeps, NvFlexBuffer *rotations, NvFlexBuffer *translations)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ae701fdcc0e7bf26c1dfc54d400ffb3d2"><div class="ttname"><a href="_nv_flex_8h.html#ae701fdcc0e7bf26c1dfc54d400ffb3d2">NvFlexCollisionGeometry::convexMesh</a></div><div class="ttdeci">NvFlexConvexMeshGeometry convexMesh</div><div class="ttdef"><b>Definition:</b> NvFlex.h:902</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a4f80c8bcfa6de99a52983adb13d80db9"><div class="ttname"><a href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9">NvFlexSolverCallbackStage</a></div><div class="ttdeci">NvFlexSolverCallbackStage</div><div class="ttdef"><b>Definition:</b> NvFlex.h:244</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aeff62427426510eeb1cf5625e14ff585"><div class="ttname"><a href="_nv_flex_8h.html#aeff62427426510eeb1cf5625e14ff585">NvFlexParams::dissipation</a></div><div class="ttdeci">float dissipation</div><div class="ttdoc">Damps particle velocity based on how many particle contacts it has. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:116</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a0506ae712f846087b8647ea389ac26ba"><div class="ttname"><a href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26ba">NvFlexCollisionShapeType</a></div><div class="ttdeci">NvFlexCollisionShapeType</div><div class="ttdef"><b>Definition:</b> NvFlex.h:907</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ab4435b3857752360375fe52fc992cfcaa77b51759e33d60b2caf327bb4835351e"><div class="ttname"><a href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa77b51759e33d60b2caf327bb4835351e">eNvFlexLogDebug</a></div><div class="ttdoc">Used only in debug version of dll. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:237</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a9b2d3dc5ac42011aeec4e13be2e14252ad0c27f7aafdc4fe569722025c8eb2178"><div class="ttname"><a href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252ad0c27f7aafdc4fe569722025c8eb2178">eNvFlexCUDA</a></div><div class="ttdoc">Use CUDA compute for Flex, the application must link against the CUDA libraries. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:307</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ab452c355f92dda050d4b4dafb8e71b03"><div class="ttname"><a href="_nv_flex_8h.html#ab452c355f92dda050d4b4dafb8e71b03">NvFlexUpdateConvexMesh</a></div><div class="ttdeci">NV_FLEX_API void NvFlexUpdateConvexMesh(NvFlexLibrary *lib, NvFlexConvexMeshId convex, NvFlexBuffer *planes, int numPlanes, const float *lower, const float *upper)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ac2f8dff9857a86683aa6e55c058888d7"><div class="ttname"><a href="_nv_flex_8h.html#ac2f8dff9857a86683aa6e55c058888d7">NvFlexParams::relaxationMode</a></div><div class="ttdeci">NvFlexRelaxationMode relaxationMode</div><div class="ttdoc">How the relaxation is applied inside the solver. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:152</div></div>
+<div class="ttc" id="_nv_flex_8h_html_af9bb710afb22ec5ed50679aef8717777"><div class="ttname"><a href="_nv_flex_8h.html#af9bb710afb22ec5ed50679aef8717777">NvFlexParams::lift</a></div><div class="ttdeci">float lift</div><div class="ttdoc">Lift force applied to particles belonging to dynamic triangles, proportional to velocity^2*area in th...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:122</div></div>
<div class="ttc" id="_nv_flex_8h_html_a2ac0a898a565a2cdf13b80acd4a3555c"><div class="ttname"><a href="_nv_flex_8h.html#a2ac0a898a565a2cdf13b80acd4a3555c">NvFlexGetDeviceAndContext</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetDeviceAndContext(NvFlexLibrary *lib, void **device, void **context)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a7e760844341b78a547ca4e29abf48806"><div class="ttname"><a href="_nv_flex_8h.html#a7e760844341b78a547ca4e29abf48806">NvFlexInitDesc::renderDevice</a></div><div class="ttdeci">void * renderDevice</div><div class="ttdoc">Direct3D device to use for simulation, if none is specified a new device and context will be created...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:281</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a0506ae712f846087b8647ea389ac26baab17c8dd4f9500016b77a9b49de3c48e7"><div class="ttname"><a href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baab17c8dd4f9500016b77a9b49de3c48e7">eNvFlexShapeBox</a></div><div class="ttdoc">A box shape, see FlexBoxGeometry. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:826</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a6198445df7f341ec75f37e1dfb44830c"><div class="ttname"><a href="_nv_flex_8h.html#a6198445df7f341ec75f37e1dfb44830c">NvFlexParams::damping</a></div><div class="ttdeci">float damping</div><div class="ttdoc">Viscous drag force, applies a force proportional, and opposite to the particle velocity. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:118</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a7e760844341b78a547ca4e29abf48806"><div class="ttname"><a href="_nv_flex_8h.html#a7e760844341b78a547ca4e29abf48806">NvFlexInitDesc::renderDevice</a></div><div class="ttdeci">void * renderDevice</div><div class="ttdoc">Direct3D device to use for simulation, if none is specified a new device and context will be created...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:319</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a0506ae712f846087b8647ea389ac26baab17c8dd4f9500016b77a9b49de3c48e7"><div class="ttname"><a href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baab17c8dd4f9500016b77a9b49de3c48e7">eNvFlexShapeBox</a></div><div class="ttdoc">A box shape, see FlexBoxGeometry. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:911</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a6198445df7f341ec75f37e1dfb44830c"><div class="ttname"><a href="_nv_flex_8h.html#a6198445df7f341ec75f37e1dfb44830c">NvFlexParams::damping</a></div><div class="ttdeci">float damping</div><div class="ttdoc">Viscous drag force, applies a force proportional, and opposite to the particle velocity. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:117</div></div>
<div class="ttc" id="_nv_flex_8h_html_aa03d94be697cdc3aaa56e469d87255a4"><div class="ttname"><a href="_nv_flex_8h.html#aa03d94be697cdc3aaa56e469d87255a4">NvFlexSetDynamicTriangles</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetDynamicTriangles(NvFlexSolver *solver, NvFlexBuffer *indices, NvFlexBuffer *normals, int numTris)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a31c31ea4f96cd4fdadc6b7317691304c"><div class="ttname"><a href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304c">NvFlexCollisionShapeFlags</a></div><div class="ttdeci">NvFlexCollisionShapeFlags</div><div class="ttdef"><b>Definition:</b> NvFlex.h:832</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ab4f2eb16c8aba6371fbae51a991eaaa5"><div class="ttname"><a href="_nv_flex_8h.html#ab4f2eb16c8aba6371fbae51a991eaaa5">NvFlexParams::numPlanes</a></div><div class="ttdeci">int numPlanes</div><div class="ttdoc">Num collision planes. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:157</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a69289002a6f8ecd697118f0ec6572f5d"><div class="ttname"><a href="_nv_flex_8h.html#a69289002a6f8ecd697118f0ec6572f5d">NvFlexUpdateConvexMesh</a></div><div class="ttdeci">NV_FLEX_API void NvFlexUpdateConvexMesh(NvFlexLibrary *lib, NvFlexConvexMeshId convex, NvFlexBuffer *planes, int numPlanes, float *lower, float *upper)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a31c31ea4f96cd4fdadc6b7317691304c"><div class="ttname"><a href="_nv_flex_8h.html#a31c31ea4f96cd4fdadc6b7317691304c">NvFlexCollisionShapeFlags</a></div><div class="ttdeci">NvFlexCollisionShapeFlags</div><div class="ttdef"><b>Definition:</b> NvFlex.h:917</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ab4f2eb16c8aba6371fbae51a991eaaa5"><div class="ttname"><a href="_nv_flex_8h.html#ab4f2eb16c8aba6371fbae51a991eaaa5">NvFlexParams::numPlanes</a></div><div class="ttdeci">int numPlanes</div><div class="ttdoc">Num collision planes. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:150</div></div>
<div class="ttc" id="_nv_flex_8h_html_ad48f83b8442323687d2268206e913496"><div class="ttname"><a href="_nv_flex_8h.html#ad48f83b8442323687d2268206e913496">NvFlexAllocBuffer</a></div><div class="ttdeci">NV_FLEX_API NvFlexBuffer * NvFlexAllocBuffer(NvFlexLibrary *lib, int elementCount, int elementByteStride, NvFlexBufferType type)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_params"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_params">NvFlexParams</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:96</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ae4203fb9cf4772c3186f96cc2d9f6ea8"><div class="ttname"><a href="_nv_flex_8h.html#ae4203fb9cf4772c3186f96cc2d9f6ea8">NvFlexTimers::collideShapes</a></div><div class="ttdeci">float collideShapes</div><div class="ttdoc">Time spent colliding convex shapes. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:192</div></div>
-<div class="ttc" id="_nv_flex_8h_html_af7a56fc54644e7020e105f2ff41dfb60"><div class="ttname"><a href="_nv_flex_8h.html#af7a56fc54644e7020e105f2ff41dfb60">NvFlexParams::particleFriction</a></div><div class="ttdeci">float particleFriction</div><div class="ttdoc">Coefficient of friction used when colliding particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:108</div></div>
+<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_params"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_params">NvFlexParams</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:95</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ae4203fb9cf4772c3186f96cc2d9f6ea8"><div class="ttname"><a href="_nv_flex_8h.html#ae4203fb9cf4772c3186f96cc2d9f6ea8">NvFlexTimers::collideShapes</a></div><div class="ttdeci">float collideShapes</div><div class="ttdoc">Time spent colliding convex shapes. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:209</div></div>
+<div class="ttc" id="_nv_flex_8h_html_af7a56fc54644e7020e105f2ff41dfb60"><div class="ttname"><a href="_nv_flex_8h.html#af7a56fc54644e7020e105f2ff41dfb60">NvFlexParams::particleFriction</a></div><div class="ttdeci">float particleFriction</div><div class="ttdoc">Coefficient of friction used when colliding particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:107</div></div>
<div class="ttc" id="_nv_flex_8h_html_ac75370f005fd453fe8a324fe62be1b5c"><div class="ttname"><a href="_nv_flex_8h.html#ac75370f005fd453fe8a324fe62be1b5c">NvFlexUpdateSolver</a></div><div class="ttdeci">NV_FLEX_API void NvFlexUpdateSolver(NvFlexSolver *solver, float dt, int substeps, bool enableTimers)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_add03fd357383845f07e0596290faf316"><div class="ttname"><a href="_nv_flex_8h.html#add03fd357383845f07e0596290faf316">NvFlexSetNormals</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetNormals(NvFlexSolver *solver, NvFlexBuffer *normals, int n)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a3eafe7fe6b200c757c7402eca7d13f6d"><div class="ttname"><a href="_nv_flex_8h.html#a3eafe7fe6b200c757c7402eca7d13f6d">NvFlexGetRigidTransforms</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetRigidTransforms(NvFlexSolver *solver, NvFlexBuffer *rotations, NvFlexBuffer *translations)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a98b4df3721709c862ef5d09edcc6d4c3"><div class="ttname"><a href="_nv_flex_8h.html#a98b4df3721709c862ef5d09edcc6d4c3">NvFlexTimers::createGrid</a></div><div class="ttdeci">float createGrid</div><div class="ttdoc">Time spent creating grid. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:189</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644ad108f6ebf28346813cfd3602d984bb32"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ad108f6ebf28346813cfd3602d984bb32">eNvFlexPhaseGroupMask</a></div><div class="ttdoc">Low 24 bits represent the particle group for controlling collisions. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:168</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a84f06fff995d8eb034cff81c811fa312"><div class="ttname"><a href="_nv_flex_8h.html#a84f06fff995d8eb034cff81c811fa312">NvFlexGetParticles</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetParticles(NvFlexSolver *solver, NvFlexBuffer *p, int n)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ae2e480822cc06ec249ee2557f6cc8ee1"><div class="ttname"><a href="_nv_flex_8h.html#ae2e480822cc06ec249ee2557f6cc8ee1">NvFlexParams::buoyancy</a></div><div class="ttdeci">float buoyancy</div><div class="ttdoc">Gravity is scaled by this value for fluid particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:137</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ab4435b3857752360375fe52fc992cfcaa8feff72c0b0391e8adf3ddb6c39ef10e"><div class="ttname"><a href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa8feff72c0b0391e8adf3ddb6c39ef10e">eNvFlexLogAll</a></div><div class="ttdoc">All log types. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:221</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a98b4df3721709c862ef5d09edcc6d4c3"><div class="ttname"><a href="_nv_flex_8h.html#a98b4df3721709c862ef5d09edcc6d4c3">NvFlexTimers::createGrid</a></div><div class="ttdeci">float createGrid</div><div class="ttdoc">Time spent creating grid. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:206</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644ad108f6ebf28346813cfd3602d984bb32"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ad108f6ebf28346813cfd3602d984bb32">eNvFlexPhaseGroupMask</a></div><div class="ttdoc">Bits [ 0, 19] represent the particle group for controlling collisions. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:162</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ae2e480822cc06ec249ee2557f6cc8ee1"><div class="ttname"><a href="_nv_flex_8h.html#ae2e480822cc06ec249ee2557f6cc8ee1">NvFlexParams::buoyancy</a></div><div class="ttdeci">float buoyancy</div><div class="ttdoc">Gravity is scaled by this value for fluid particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:135</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ab4435b3857752360375fe52fc992cfcaa8feff72c0b0391e8adf3ddb6c39ef10e"><div class="ttname"><a href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa8feff72c0b0391e8adf3ddb6c39ef10e">eNvFlexLogAll</a></div><div class="ttdoc">All log types. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:238</div></div>
<div class="ttc" id="_nv_flex_8h_html_aea4e7117722df53dfe44c676496117fa"><div class="ttname"><a href="_nv_flex_8h.html#aea4e7117722df53dfe44c676496117fa">NvFlexSetShapes</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetShapes(NvFlexSolver *solver, NvFlexBuffer *geometry, NvFlexBuffer *shapePositions, NvFlexBuffer *shapeRotations, NvFlexBuffer *shapePrevPositions, NvFlexBuffer *shapePrevRotations, NvFlexBuffer *shapeFlags, int numShapes)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_abef057ac89ba5cf1cd71f0084f9313de"><div class="ttname"><a href="_nv_flex_8h.html#abef057ac89ba5cf1cd71f0084f9313de">NvFlexSetParticles</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetParticles(NvFlexSolver *solver, NvFlexBuffer *p, int n)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a9b2d3dc5ac42011aeec4e13be2e14252a15e78a7baf13cc7fd73f255ac84f0943"><div class="ttname"><a href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252a15e78a7baf13cc7fd73f255ac84f0943">eNvFlexD3D12</a></div><div class="ttdoc">Use DirectX 12 compute for Flex, the application must link against the D3D libraries. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:243</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ab6e2aa06b69e92cbd3b2bca19f18e794"><div class="ttname"><a href="_nv_flex_8h.html#ab6e2aa06b69e92cbd3b2bca19f18e794">NvFlexTriangleMeshGeometry::scale</a></div><div class="ttdeci">float scale[3]</div><div class="ttdoc">The scale of the object from local space to world space. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:794</div></div>
-<div class="ttc" id="_nv_flex_8h_html_abe52b62e7af361f387d67414b9e2cf9b"><div class="ttname"><a href="_nv_flex_8h.html#abe52b62e7af361f387d67414b9e2cf9b">NvFlexTimers::solveDensities</a></div><div class="ttdeci">float solveDensities</div><div class="ttdoc">Time spent solving density constraints. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:196</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a3a1f5e2ba6c8cad0bc3f3eebd27415f0"><div class="ttname"><a href="_nv_flex_8h.html#a3a1f5e2ba6c8cad0bc3f3eebd27415f0">NvFlexParams::plasticThreshold</a></div><div class="ttdeci">float plasticThreshold</div><div class="ttdoc">Particles belonging to rigid shapes that move with a position delta magnitude > threshold will be per...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:148</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a9b2d3dc5ac42011aeec4e13be2e14252a15e78a7baf13cc7fd73f255ac84f0943"><div class="ttname"><a href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252a15e78a7baf13cc7fd73f255ac84f0943">eNvFlexD3D12</a></div><div class="ttdoc">Use DirectX 12 compute for Flex, the application must link against the D3D libraries. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:309</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ab6e2aa06b69e92cbd3b2bca19f18e794"><div class="ttname"><a href="_nv_flex_8h.html#ab6e2aa06b69e92cbd3b2bca19f18e794">NvFlexTriangleMeshGeometry::scale</a></div><div class="ttdeci">float scale[3]</div><div class="ttdoc">The scale of the object from local space to world space. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:879</div></div>
+<div class="ttc" id="_nv_flex_8h_html_abe52b62e7af361f387d67414b9e2cf9b"><div class="ttname"><a href="_nv_flex_8h.html#abe52b62e7af361f387d67414b9e2cf9b">NvFlexTimers::solveDensities</a></div><div class="ttdeci">float solveDensities</div><div class="ttdoc">Time spent solving density constraints. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:213</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a96a771dd328d019e6164e5f23d29ffcb"><div class="ttname"><a href="_nv_flex_8h.html#a96a771dd328d019e6164e5f23d29ffcb">NvFlexGetSmoothParticles</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetSmoothParticles(NvFlexSolver *solver, NvFlexBuffer *p, const NvFlexCopyDesc *desc)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aef768edc8e4df1a78a94a6c971541550"><div class="ttname"><a href="_nv_flex_8h.html#aef768edc8e4df1a78a94a6c971541550">NvFlexGetAnisotropy</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetAnisotropy(NvFlexSolver *solver, NvFlexBuffer *q1, NvFlexBuffer *q2, NvFlexBuffer *q3, const NvFlexCopyDesc *desc)</div></div>
<div class="ttc" id="_nv_flex_8h_html_a4cb4462803ebff105d151fd45b4efad6"><div class="ttname"><a href="_nv_flex_8h.html#a4cb4462803ebff105d151fd45b4efad6">NvFlexDestroyTriangleMesh</a></div><div class="ttdeci">NV_FLEX_API void NvFlexDestroyTriangleMesh(NvFlexLibrary *lib, NvFlexTriangleMeshId mesh)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a482a7c3b197c4df656e9509fbd04032c"><div class="ttname"><a href="_nv_flex_8h.html#a482a7c3b197c4df656e9509fbd04032c">NvFlexParams::gravity</a></div><div class="ttdeci">float gravity[3]</div><div class="ttdoc">Constant acceleration applied to all particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:100</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a4f80c8bcfa6de99a52983adb13d80db9ab75a912c3990b0fbd6b06a6741a20e69"><div class="ttname"><a href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9ab75a912c3990b0fbd6b06a6741a20e69">eNvFlexStageIterationEnd</a></div><div class="ttdoc">Called at the end of each constraint iteration. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:230</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ab4435b3857752360375fe52fc992cfcaa8aed6496f033604148138299fa075edd"><div class="ttname"><a href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa8aed6496f033604148138299fa075edd">eNvFlexLogError</a></div><div class="ttdoc">Error messages. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:217</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a482a7c3b197c4df656e9509fbd04032c"><div class="ttname"><a href="_nv_flex_8h.html#a482a7c3b197c4df656e9509fbd04032c">NvFlexParams::gravity</a></div><div class="ttdeci">float gravity[3]</div><div class="ttdoc">Constant acceleration applied to all particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:99</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a4f80c8bcfa6de99a52983adb13d80db9ab75a912c3990b0fbd6b06a6741a20e69"><div class="ttname"><a href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9ab75a912c3990b0fbd6b06a6741a20e69">eNvFlexStageIterationEnd</a></div><div class="ttdoc">Called at the end of each constraint iteration. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:247</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ab4435b3857752360375fe52fc992cfcaa8aed6496f033604148138299fa075edd"><div class="ttname"><a href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa8aed6496f033604148138299fa075edd">eNvFlexLogError</a></div><div class="ttdoc">Error messages. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:234</div></div>
<div class="ttc" id="_nv_flex_8h_html_ab559759820a4322aff061745ef26c867"><div class="ttname"><a href="_nv_flex_8h.html#ab559759820a4322aff061745ef26c867">NvFlexFreeBuffer</a></div><div class="ttdeci">NV_FLEX_API void NvFlexFreeBuffer(NvFlexBuffer *buf)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a75eade1512d023cb19da5b7ebbad10f3"><div class="ttname"><a href="_nv_flex_8h.html#a75eade1512d023cb19da5b7ebbad10f3">NvFlexTimers::solveInflatables</a></div><div class="ttdeci">float solveInflatables</div><div class="ttdoc">Time spent solving pressure constraints. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:201</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a4f80c8bcfa6de99a52983adb13d80db9a79ce9005dbc92198a1f180c6afde6a44"><div class="ttname"><a href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a79ce9005dbc92198a1f180c6afde6a44">eNvFlexStageSubstepBegin</a></div><div class="ttdoc">Called at the beginning of each substep after the prediction step has been completed. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:231</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a3117f92571613709936291c48414e521"><div class="ttname"><a href="_nv_flex_8h.html#a3117f92571613709936291c48414e521">NvFlexSetPhases</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetPhases(NvFlexSolver *solver, NvFlexBuffer *phases, int n)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_init_desc"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_init_desc">NvFlexInitDesc</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:277</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a46f5d35902f7da40628247175a174f3ba33711a4b466d606d68dee43918f819db"><div class="ttname"><a href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3ba33711a4b466d606d68dee43918f819db">eNvFlexRelaxationGlobal</a></div><div class="ttdoc">The relaxation factor is a fixed multiplier on each constraint&#39;s position delta. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:88</div></div>
-<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_capsule_geometry"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_capsule_geometry">NvFlexCapsuleGeometry</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:766</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a3c4d2aa395ff8d0f70a6380448943be2"><div class="ttname"><a href="_nv_flex_8h.html#a3c4d2aa395ff8d0f70a6380448943be2">NvFlexTimers::total</a></div><div class="ttdeci">float total</div><div class="ttdoc">Sum of all timers above. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:209</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a5b9af9cf4d889b4772cb61cefda92a87"><div class="ttname"><a href="_nv_flex_8h.html#a5b9af9cf4d889b4772cb61cefda92a87">NvFlexSolverCallbackParams::userData</a></div><div class="ttdeci">void * userData</div><div class="ttdoc">Pointer to the user data provided to NvFlexRegisterSolverCallback() </div><div class="ttdef"><b>Definition:</b> NvFlex.h:261</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a1241ff3522eafac4b402370a7a6525d8"><div class="ttname"><a href="_nv_flex_8h.html#a1241ff3522eafac4b402370a7a6525d8">NvFlexCapsuleGeometry::radius</a></div><div class="ttdeci">float radius</div><div class="ttdef"><b>Definition:</b> NvFlex.h:768</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644ae4ea43366942f719f40e8526ad21a038"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ae4ea43366942f719f40e8526ad21a038">eNvFlexPhaseShapeChannelMask</a></div><div class="ttdoc">Bits [24, 31] hold flags representing what shape collision channels particles will collide with...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:164</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a75eade1512d023cb19da5b7ebbad10f3"><div class="ttname"><a href="_nv_flex_8h.html#a75eade1512d023cb19da5b7ebbad10f3">NvFlexTimers::solveInflatables</a></div><div class="ttdeci">float solveInflatables</div><div class="ttdoc">Time spent solving pressure constraints. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:218</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a4f80c8bcfa6de99a52983adb13d80db9a79ce9005dbc92198a1f180c6afde6a44"><div class="ttname"><a href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a79ce9005dbc92198a1f180c6afde6a44">eNvFlexStageSubstepBegin</a></div><div class="ttdoc">Called at the beginning of each substep after the prediction step has been completed. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:248</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aee5c235d5fab40831cf339680aa25560a421fe1e1bb00fc41e9b32208cd9155f5"><div class="ttname"><a href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560a421fe1e1bb00fc41e9b32208cd9155f5">eNvFlexFeatureModeSimpleSolids</a></div><div class="ttdoc">Simple per-particle collision (no per-particle SDF normals, no fluids) </div><div class="ttdef"><b>Definition:</b> NvFlex.h:357</div></div>
+<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_init_desc"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_init_desc">NvFlexInitDesc</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:315</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a46f5d35902f7da40628247175a174f3ba33711a4b466d606d68dee43918f819db"><div class="ttname"><a href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3ba33711a4b466d606d68dee43918f819db">eNvFlexRelaxationGlobal</a></div><div class="ttdoc">The relaxation factor is a fixed multiplier on each constraint&#39;s position delta. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:87</div></div>
+<div class="ttc" id="_nv_flex_8h_html_afbcbff4e4865105514c194398ab3a7b0"><div class="ttname"><a href="_nv_flex_8h.html#afbcbff4e4865105514c194398ab3a7b0">NvFlexGetVelocities</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetVelocities(NvFlexSolver *solver, NvFlexBuffer *v, const NvFlexCopyDesc *desc)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_capsule_geometry"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_capsule_geometry">NvFlexCapsuleGeometry</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:851</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a3c4d2aa395ff8d0f70a6380448943be2"><div class="ttname"><a href="_nv_flex_8h.html#a3c4d2aa395ff8d0f70a6380448943be2">NvFlexTimers::total</a></div><div class="ttdeci">float total</div><div class="ttdoc">Sum of all timers above. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:226</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5b9af9cf4d889b4772cb61cefda92a87"><div class="ttname"><a href="_nv_flex_8h.html#a5b9af9cf4d889b4772cb61cefda92a87">NvFlexSolverCallbackParams::userData</a></div><div class="ttdeci">void * userData</div><div class="ttdoc">Pointer to the user data provided to NvFlexRegisterSolverCallback() </div><div class="ttdef"><b>Definition:</b> NvFlex.h:270</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a3a20cc2539983a009caaf77ec9ceab82"><div class="ttname"><a href="_nv_flex_8h.html#a3a20cc2539983a009caaf77ec9ceab82">NvFlexGetDensities</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetDensities(NvFlexSolver *solver, NvFlexBuffer *densities, const NvFlexCopyDesc *desc)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a1241ff3522eafac4b402370a7a6525d8"><div class="ttname"><a href="_nv_flex_8h.html#a1241ff3522eafac4b402370a7a6525d8">NvFlexCapsuleGeometry::radius</a></div><div class="ttdeci">float radius</div><div class="ttdef"><b>Definition:</b> NvFlex.h:853</div></div>
<div class="ttc" id="_nv_flex_8h_html_abdfd0834422dd99154a27962614525e5"><div class="ttname"><a href="_nv_flex_8h.html#abdfd0834422dd99154a27962614525e5">NvFlexGetDynamicTriangles</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetDynamicTriangles(NvFlexSolver *solver, NvFlexBuffer *indices, NvFlexBuffer *normals, int numTris)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ad6ee1e23e0c49aad63df8f605182de3a"><div class="ttname"><a href="_nv_flex_8h.html#ad6ee1e23e0c49aad63df8f605182de3a">NvFlexMakeShapeFlags</a></div><div class="ttdeci">NV_FLEX_API int NvFlexMakeShapeFlags(NvFlexCollisionShapeType type, bool dynamic)</div><div class="ttdef"><b>Definition:</b> NvFlex.h:844</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ad6ee1e23e0c49aad63df8f605182de3a"><div class="ttname"><a href="_nv_flex_8h.html#ad6ee1e23e0c49aad63df8f605182de3a">NvFlexMakeShapeFlags</a></div><div class="ttdeci">NV_FLEX_API int NvFlexMakeShapeFlags(NvFlexCollisionShapeType type, bool dynamic)</div><div class="ttdef"><b>Definition:</b> NvFlex.h:938</div></div>
<div class="ttc" id="_nv_flex_8h_html_aab83daf46e5a9428a0ad76fb75e8ec7e"><div class="ttname"><a href="_nv_flex_8h.html#aab83daf46e5a9428a0ad76fb75e8ec7e">NvFlexRegisterOGLBuffer</a></div><div class="ttdeci">NV_FLEX_API NvFlexBuffer * NvFlexRegisterOGLBuffer(NvFlexLibrary *lib, int buf, int elementCount, int elementByteStride)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_detail_timer"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_detail_timer">NvFlexDetailTimer</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:990</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a8a1b3c24aa73606bcd47a72473db9629"><div class="ttname"><a href="_nv_flex_8h.html#a8a1b3c24aa73606bcd47a72473db9629">NvFlexParams::relaxationFactor</a></div><div class="ttdeci">float relaxationFactor</div><div class="ttdoc">Control the convergence rate of the parallel solver, default: 1, values greater than 1 may lead to in...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:160</div></div>
+<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_detail_timer"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_detail_timer">NvFlexDetailTimer</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:1134</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5ad2a7745fcb4d4afd5b5f1bda074644aa3a4fd0d5930b31199334e500ac2d7c8"><div class="ttname"><a href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644aa3a4fd0d5930b31199334e500ac2d7c8">eNvFlexPhaseShapeChannel2</a></div><div class="ttdoc">Particle will collide with shapes with channel 2 set (see NvFlexMakeShapeFlags()) ...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:173</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a8a1b3c24aa73606bcd47a72473db9629"><div class="ttname"><a href="_nv_flex_8h.html#a8a1b3c24aa73606bcd47a72473db9629">NvFlexParams::relaxationFactor</a></div><div class="ttdeci">float relaxationFactor</div><div class="ttdoc">Control the convergence rate of the parallel solver, default: 1, values greater than 1 may lead to in...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:153</div></div>
<div class="ttc" id="_nv_flex_8h_html_ae67c0cab2ecee8eb9485a26ef0fad6a9"><div class="ttname"><a href="_nv_flex_8h.html#ae67c0cab2ecee8eb9485a26ef0fad6a9">NvFlexSetSprings</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetSprings(NvFlexSolver *solver, NvFlexBuffer *indices, NvFlexBuffer *restLengths, NvFlexBuffer *stiffness, int numSprings)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a9d825db54bc9a0bca998b3654db3b20e"><div class="ttname"><a href="_nv_flex_8h.html#a9d825db54bc9a0bca998b3654db3b20e">NvFlexTimers::finalize</a></div><div class="ttdeci">float finalize</div><div class="ttdoc">Time spent finalizing state. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:207</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a9b65813d2a2d3f99db162d39a62481f8"><div class="ttname"><a href="_nv_flex_8h.html#a9b65813d2a2d3f99db162d39a62481f8">NvFlexSolverCallbackParams::sortedToOriginalMap</a></div><div class="ttdeci">const int * sortedToOriginalMap</div><div class="ttdoc">Device pointer that maps the original particle index to the index in the callback data structure...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:272</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a9b2d3dc5ac42011aeec4e13be2e14252"><div class="ttname"><a href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252">NvFlexComputeType</a></div><div class="ttdeci">NvFlexComputeType</div><div class="ttdef"><b>Definition:</b> NvFlex.h:239</div></div>
-<div class="ttc" id="_nv_flex_8h_html_aea2af336bdd96d7168c3acdce6d1875d"><div class="ttname"><a href="_nv_flex_8h.html#aea2af336bdd96d7168c3acdce6d1875d">NvFlexSetActive</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetActive(NvFlexSolver *solver, NvFlexBuffer *indices, int n)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a27a185172ad1951d40c476ade8307068"><div class="ttname"><a href="_nv_flex_8h.html#a27a185172ad1951d40c476ade8307068">NvFlexParams::dynamicFriction</a></div><div class="ttdeci">float dynamicFriction</div><div class="ttdoc">Coefficient of friction used when colliding against shapes. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:106</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a42346069505d3bba70bcdf0a94f0615c"><div class="ttname"><a href="_nv_flex_8h.html#a42346069505d3bba70bcdf0a94f0615c">NvFlexParams::plasticCreep</a></div><div class="ttdeci">float plasticCreep</div><div class="ttdoc">Controls the rate at which particles in the rest pose are deformed for particles passing the deformat...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:149</div></div>
-<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_s_d_f_geometry"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_s_d_f_geometry">NvFlexSDFGeometry</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:802</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a800620cc4888bbe5696c5f0e19b22bb9"><div class="ttname"><a href="_nv_flex_8h.html#a800620cc4888bbe5696c5f0e19b22bb9">NvFlexConvexMeshGeometry::scale</a></div><div class="ttdeci">float scale[3]</div><div class="ttdef"><b>Definition:</b> NvFlex.h:785</div></div>
-<div class="ttc" id="struct_nv_flex_solver_callback_html"><div class="ttname"><a href="struct_nv_flex_solver_callback.html">NvFlexSolverCallback</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:289</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a5be673031b100c3861fd9eb824fcf00f"><div class="ttname"><a href="_nv_flex_8h.html#a5be673031b100c3861fd9eb824fcf00f">NvFlexParams::diffuseBuoyancy</a></div><div class="ttdeci">float diffuseBuoyancy</div><div class="ttdoc">Scales force opposing gravity that diffuse particles receive. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:141</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a2f85189cbc3014b73164cf8c4eb87e0a"><div class="ttname"><a href="_nv_flex_8h.html#a2f85189cbc3014b73164cf8c4eb87e0a">NvFlexTimers::updateBounds</a></div><div class="ttdeci">float updateBounds</div><div class="ttdoc">Time spent updating particle bounds. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:208</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a3ddbb30a2fde4a2e9ccec7854300b1d4"><div class="ttname"><a href="_nv_flex_8h.html#a3ddbb30a2fde4a2e9ccec7854300b1d4">NvFlexDetailTimer::name</a></div><div class="ttdeci">char * name</div><div class="ttdef"><b>Definition:</b> NvFlex.h:992</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ab7c54d6c0b3d3595780e5179bf62ebc4"><div class="ttname"><a href="_nv_flex_8h.html#ab7c54d6c0b3d3595780e5179bf62ebc4">NvFlexParams::solidRestDistance</a></div><div class="ttdeci">float solidRestDistance</div><div class="ttdoc">The distance non-fluid particles attempt to maintain from each other, must be in the range (0...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:102</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a3f93fba688338576ff3258b034525dc5"><div class="ttname"><a href="_nv_flex_8h.html#a3f93fba688338576ff3258b034525dc5">NvFlexParams::solidPressure</a></div><div class="ttdeci">float solidPressure</div><div class="ttdoc">Add pressure from solid surfaces to particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:135</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a4d10188e917ae045e0e903f3db1c638d"><div class="ttname"><a href="_nv_flex_8h.html#a4d10188e917ae045e0e903f3db1c638d">NvFlexTimers::solveVelocities</a></div><div class="ttdeci">float solveVelocities</div><div class="ttdoc">Time spent solving velocity constraints. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:197</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a4f80c8bcfa6de99a52983adb13d80db9a1f2e7acff9b3b74922f90240d29fd1b3"><div class="ttname"><a href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a1f2e7acff9b3b74922f90240d29fd1b3">eNvFlexStageCount</a></div><div class="ttdoc">Number of stages. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:234</div></div>
-<div class="ttc" id="_nv_flex_8h_html_afc306cb48c313ee518461d60c1014485"><div class="ttname"><a href="_nv_flex_8h.html#afc306cb48c313ee518461d60c1014485">NvFlexParams::restitution</a></div><div class="ttdeci">float restitution</div><div class="ttdoc">Coefficient of restitution used when colliding against shapes, particle collisions are always inelast...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:109</div></div>
-<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_triangle_mesh_geometry"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_triangle_mesh_geometry">NvFlexTriangleMeshGeometry</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:792</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a572c9bf93128466e27d57f225f4d0188"><div class="ttname"><a href="_nv_flex_8h.html#a572c9bf93128466e27d57f225f4d0188">NvFlexParams::numIterations</a></div><div class="ttdeci">int numIterations</div><div class="ttdoc">Number of solver iterations to perform per-substep. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:98</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a9d825db54bc9a0bca998b3654db3b20e"><div class="ttname"><a href="_nv_flex_8h.html#a9d825db54bc9a0bca998b3654db3b20e">NvFlexTimers::finalize</a></div><div class="ttdeci">float finalize</div><div class="ttdoc">Time spent finalizing state. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:224</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a9b65813d2a2d3f99db162d39a62481f8"><div class="ttname"><a href="_nv_flex_8h.html#a9b65813d2a2d3f99db162d39a62481f8">NvFlexSolverCallbackParams::sortedToOriginalMap</a></div><div class="ttdeci">const int * sortedToOriginalMap</div><div class="ttdoc">Device pointer that maps the original particle index to the index in the callback data structure...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:281</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a9b2d3dc5ac42011aeec4e13be2e14252"><div class="ttname"><a href="_nv_flex_8h.html#a9b2d3dc5ac42011aeec4e13be2e14252">NvFlexComputeType</a></div><div class="ttdeci">NvFlexComputeType</div><div class="ttdef"><b>Definition:</b> NvFlex.h:305</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a27a185172ad1951d40c476ade8307068"><div class="ttname"><a href="_nv_flex_8h.html#a27a185172ad1951d40c476ade8307068">NvFlexParams::dynamicFriction</a></div><div class="ttdeci">float dynamicFriction</div><div class="ttdoc">Coefficient of friction used when colliding against shapes. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:105</div></div>
+<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_s_d_f_geometry"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_s_d_f_geometry">NvFlexSDFGeometry</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:887</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a800620cc4888bbe5696c5f0e19b22bb9"><div class="ttname"><a href="_nv_flex_8h.html#a800620cc4888bbe5696c5f0e19b22bb9">NvFlexConvexMeshGeometry::scale</a></div><div class="ttdeci">float scale[3]</div><div class="ttdef"><b>Definition:</b> NvFlex.h:870</div></div>
+<div class="ttc" id="struct_nv_flex_solver_callback_html"><div class="ttname"><a href="struct_nv_flex_solver_callback.html">NvFlexSolverCallback</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:286</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a5be673031b100c3861fd9eb824fcf00f"><div class="ttname"><a href="_nv_flex_8h.html#a5be673031b100c3861fd9eb824fcf00f">NvFlexParams::diffuseBuoyancy</a></div><div class="ttdeci">float diffuseBuoyancy</div><div class="ttdoc">Scales force opposing gravity that diffuse particles receive. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:139</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a2f85189cbc3014b73164cf8c4eb87e0a"><div class="ttname"><a href="_nv_flex_8h.html#a2f85189cbc3014b73164cf8c4eb87e0a">NvFlexTimers::updateBounds</a></div><div class="ttdeci">float updateBounds</div><div class="ttdoc">Time spent updating particle bounds. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:225</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a3ddbb30a2fde4a2e9ccec7854300b1d4"><div class="ttname"><a href="_nv_flex_8h.html#a3ddbb30a2fde4a2e9ccec7854300b1d4">NvFlexDetailTimer::name</a></div><div class="ttdeci">char * name</div><div class="ttdef"><b>Definition:</b> NvFlex.h:1136</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ab7c54d6c0b3d3595780e5179bf62ebc4"><div class="ttname"><a href="_nv_flex_8h.html#ab7c54d6c0b3d3595780e5179bf62ebc4">NvFlexParams::solidRestDistance</a></div><div class="ttdeci">float solidRestDistance</div><div class="ttdoc">The distance non-fluid particles attempt to maintain from each other, must be in the range (0...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:101</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a69a33d464c002a8916a5925c6ef32ae6"><div class="ttname"><a href="_nv_flex_8h.html#a69a33d464c002a8916a5925c6ef32ae6">NvFlexSetSolverDescDefaults</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetSolverDescDefaults(NvFlexSolverDesc *desc)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a3f93fba688338576ff3258b034525dc5"><div class="ttname"><a href="_nv_flex_8h.html#a3f93fba688338576ff3258b034525dc5">NvFlexParams::solidPressure</a></div><div class="ttdeci">float solidPressure</div><div class="ttdoc">Add pressure from solid surfaces to particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:133</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a4d10188e917ae045e0e903f3db1c638d"><div class="ttname"><a href="_nv_flex_8h.html#a4d10188e917ae045e0e903f3db1c638d">NvFlexTimers::solveVelocities</a></div><div class="ttdeci">float solveVelocities</div><div class="ttdoc">Time spent solving velocity constraints. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:214</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a4f80c8bcfa6de99a52983adb13d80db9a1f2e7acff9b3b74922f90240d29fd1b3"><div class="ttname"><a href="_nv_flex_8h.html#a4f80c8bcfa6de99a52983adb13d80db9a1f2e7acff9b3b74922f90240d29fd1b3">eNvFlexStageCount</a></div><div class="ttdoc">Number of stages. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:251</div></div>
+<div class="ttc" id="_nv_flex_8h_html_afc306cb48c313ee518461d60c1014485"><div class="ttname"><a href="_nv_flex_8h.html#afc306cb48c313ee518461d60c1014485">NvFlexParams::restitution</a></div><div class="ttdeci">float restitution</div><div class="ttdoc">Coefficient of restitution used when colliding against shapes, particle collisions are always inelast...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:108</div></div>
+<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_triangle_mesh_geometry"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_triangle_mesh_geometry">NvFlexTriangleMeshGeometry</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:877</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a572c9bf93128466e27d57f225f4d0188"><div class="ttname"><a href="_nv_flex_8h.html#a572c9bf93128466e27d57f225f4d0188">NvFlexParams::numIterations</a></div><div class="ttdeci">int numIterations</div><div class="ttdoc">Number of solver iterations to perform per-substep. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:97</div></div>
<div class="ttc" id="_nv_flex_8h_html_ae6671f352bd77e296609d0bc2a57fd11"><div class="ttname"><a href="_nv_flex_8h.html#ae6671f352bd77e296609d0bc2a57fd11">NvFlexRestoreContext</a></div><div class="ttdeci">NV_FLEX_API void NvFlexRestoreContext(NvFlexLibrary *lib)</div></div>
<div class="ttc" id="_nv_flex_8h_html_a581b458848039220203547af53de128f"><div class="ttname"><a href="_nv_flex_8h.html#a581b458848039220203547af53de128f">NvFlexGetParams</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetParams(NvFlexSolver *solver, NvFlexParams *params)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_af7f91fa47c779fcd8bee60061de6d31c"><div class="ttname"><a href="_nv_flex_8h.html#af7f91fa47c779fcd8bee60061de6d31c">NvFlexCreateSolver</a></div><div class="ttdeci">NV_FLEX_API NvFlexSolver * NvFlexCreateSolver(NvFlexLibrary *lib, int maxParticles, int maxDiffuseParticles, int maxNeighborsPerParticle=96)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a608af97e77a912e959b0e825082a9cd6"><div class="ttname"><a href="_nv_flex_8h.html#a608af97e77a912e959b0e825082a9cd6">NvFlexParams::anisotropyScale</a></div><div class="ttdeci">float anisotropyScale</div><div class="ttdoc">Control how much anisotropy is present in resulting ellipsoids for rendering, if zero then anisotropy...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:131</div></div>
-<div class="ttc" id="_nv_flex_8h_html_ae763dd9bfcfa4092c0165a506e32e18b"><div class="ttname"><a href="_nv_flex_8h.html#ae763dd9bfcfa4092c0165a506e32e18b">NvFlexParams::vorticityConfinement</a></div><div class="ttdeci">float vorticityConfinement</div><div class="ttdoc">Increases vorticity by applying rotational forces to particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:130</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a37ada4b95999cc253dfb049b99030d50"><div class="ttname"><a href="_nv_flex_8h.html#a37ada4b95999cc253dfb049b99030d50">NvFlexGetDiffuseParticles</a></div><div class="ttdeci">NV_FLEX_API int NvFlexGetDiffuseParticles(NvFlexSolver *solver, NvFlexBuffer *p, NvFlexBuffer *v, NvFlexBuffer *indices)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a469950744e0b7222969762a89b992255"><div class="ttname"><a href="_nv_flex_8h.html#a469950744e0b7222969762a89b992255">NvFlexParams::diffuseLifetime</a></div><div class="ttdeci">float diffuseLifetime</div><div class="ttdoc">Time in seconds that a diffuse particle will live for after being spawned, particles will be spawned ...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:145</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a4bf0ccff128c165560dba52afb748d7e"><div class="ttname"><a href="_nv_flex_8h.html#a4bf0ccff128c165560dba52afb748d7e">NvFlexParams::diffuseDrag</a></div><div class="ttdeci">float diffuseDrag</div><div class="ttdoc">Scales force diffuse particles receive in direction of neighbor fluid particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:142</div></div>
-<div class="ttc" id="_nv_flex_8h_html_aeecd11525503649b579ae262b671fbc8"><div class="ttname"><a href="_nv_flex_8h.html#aeecd11525503649b579ae262b671fbc8">NvFlexParams::particleCollisionMargin</a></div><div class="ttdeci">float particleCollisionMargin</div><div class="ttdoc">Increases the radius used during neighbor finding, this is useful if particles are expected to move s...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:153</div></div>
-<div class="ttc" id="_nv_flex_8h_html_acdde802d58e1558c03e449e04ae33f15"><div class="ttname"><a href="_nv_flex_8h.html#acdde802d58e1558c03e449e04ae33f15">NvFlexParams::diffuseThreshold</a></div><div class="ttdeci">float diffuseThreshold</div><div class="ttdoc">Particles with kinetic energy + divergence above this threshold will spawn new diffuse particles...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:140</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a169e4c126acf46bdebf76c36a44deca3a103255fa795b55a7f430a41493002576"><div class="ttname"><a href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3a103255fa795b55a7f430a41493002576">eNvFlexBufferDevice</a></div><div class="ttdoc">Device memory buffer, mapping this on CUDA will return a device memory pointer, and will return a buf...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:80</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a608af97e77a912e959b0e825082a9cd6"><div class="ttname"><a href="_nv_flex_8h.html#a608af97e77a912e959b0e825082a9cd6">NvFlexParams::anisotropyScale</a></div><div class="ttdeci">float anisotropyScale</div><div class="ttdoc">Control how much anisotropy is present in resulting ellipsoids for rendering, if zero then anisotropy...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:129</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ae763dd9bfcfa4092c0165a506e32e18b"><div class="ttname"><a href="_nv_flex_8h.html#ae763dd9bfcfa4092c0165a506e32e18b">NvFlexParams::vorticityConfinement</a></div><div class="ttdeci">float vorticityConfinement</div><div class="ttdoc">Increases vorticity by applying rotational forces to particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:128</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a469950744e0b7222969762a89b992255"><div class="ttname"><a href="_nv_flex_8h.html#a469950744e0b7222969762a89b992255">NvFlexParams::diffuseLifetime</a></div><div class="ttdeci">float diffuseLifetime</div><div class="ttdoc">Time in seconds that a diffuse particle will live for after being spawned, particles will be spawned ...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:142</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a4bf0ccff128c165560dba52afb748d7e"><div class="ttname"><a href="_nv_flex_8h.html#a4bf0ccff128c165560dba52afb748d7e">NvFlexParams::diffuseDrag</a></div><div class="ttdeci">float diffuseDrag</div><div class="ttdoc">Scales force diffuse particles receive in direction of neighbor fluid particles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:140</div></div>
+<div class="ttc" id="_nv_flex_8h_html_afd6aff58269d6c359df2453c96397840"><div class="ttname"><a href="_nv_flex_8h.html#afd6aff58269d6c359df2453c96397840">NvFlexGetSolverDesc</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetSolverDesc(NvFlexSolver *solver, NvFlexSolverDesc *desc)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_aeecd11525503649b579ae262b671fbc8"><div class="ttname"><a href="_nv_flex_8h.html#aeecd11525503649b579ae262b671fbc8">NvFlexParams::particleCollisionMargin</a></div><div class="ttdeci">float particleCollisionMargin</div><div class="ttdoc">Increases the radius used during neighbor finding, this is useful if particles are expected to move s...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:146</div></div>
+<div class="ttc" id="_nv_flex_8h_html_acdde802d58e1558c03e449e04ae33f15"><div class="ttname"><a href="_nv_flex_8h.html#acdde802d58e1558c03e449e04ae33f15">NvFlexParams::diffuseThreshold</a></div><div class="ttdeci">float diffuseThreshold</div><div class="ttdoc">Particles with kinetic energy + divergence above this threshold will spawn new diffuse particles...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:138</div></div>
+<div class="ttc" id="_nv_flex_8h_html_af842f041f92c608b3ebfa2092caea889"><div class="ttname"><a href="_nv_flex_8h.html#af842f041f92c608b3ebfa2092caea889">NvFlexCopyDesc::elementCount</a></div><div class="ttdeci">int elementCount</div><div class="ttdef"><b>Definition:</b> NvFlex.h:504</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a169e4c126acf46bdebf76c36a44deca3a103255fa795b55a7f430a41493002576"><div class="ttname"><a href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3a103255fa795b55a7f430a41493002576">eNvFlexBufferDevice</a></div><div class="ttdoc">A device memory buffer, mapping this on CUDA will return a device memory pointer, and will return a b...</div><div class="ttdef"><b>Definition:</b> NvFlex.h:79</div></div>
<div class="ttc" id="_nv_flex_8h_html_aab5f90f4024d71d08c3f9327c6d8c184"><div class="ttname"><a href="_nv_flex_8h.html#aab5f90f4024d71d08c3f9327c6d8c184">NvFlexGetSprings</a></div><div class="ttdeci">NV_FLEX_API void NvFlexGetSprings(NvFlexSolver *solver, NvFlexBuffer *indices, NvFlexBuffer *restLengths, NvFlexBuffer *stiffness, int numSprings)</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a0506ae712f846087b8647ea389ac26baaed52f0e803c6745ffc1a5f018a8756ce"><div class="ttname"><a href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baaed52f0e803c6745ffc1a5f018a8756ce">eNvFlexShapeConvexMesh</a></div><div class="ttdoc">A convex mesh shape, see FlexConvexMeshGeometry. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:827</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a8cb34cbcf9def6817d6d5d3c07177052"><div class="ttname"><a href="_nv_flex_8h.html#a8cb34cbcf9def6817d6d5d3c07177052">NvFlexTimers::updateTriangles</a></div><div class="ttdeci">float updateTriangles</div><div class="ttdoc">Time spent updating dynamic triangles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:205</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a169e4c126acf46bdebf76c36a44deca3"><div class="ttname"><a href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3">NvFlexBufferType</a></div><div class="ttdeci">NvFlexBufferType</div><div class="ttdef"><b>Definition:</b> NvFlex.h:77</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a23b8779c1516647ef5ed7f8010d619ff"><div class="ttname"><a href="_nv_flex_8h.html#a23b8779c1516647ef5ed7f8010d619ff">NvFlexInitDesc::enableExtensions</a></div><div class="ttdeci">bool enableExtensions</div><div class="ttdoc">Enable or disable NVIDIA/AMD extensions in DirectX, can lead to improved performance. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:280</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a7ab5aa68da7ca1f69211a900f1a1c586"><div class="ttname"><a href="_nv_flex_8h.html#a7ab5aa68da7ca1f69211a900f1a1c586">NvFlexConvexMeshId</a></div><div class="ttdeci">unsigned int NvFlexConvexMeshId</div><div class="ttdef"><b>Definition:</b> NvFlex.h:645</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a125cfd9817437bb4f4bcb9418efa3dda"><div class="ttname"><a href="_nv_flex_8h.html#a125cfd9817437bb4f4bcb9418efa3dda">NvFlexSetRestParticles</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetRestParticles(NvFlexSolver *solver, NvFlexBuffer *p, const NvFlexCopyDesc *desc)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_ae2b271f123db0054512936f2acc6467f"><div class="ttname"><a href="_nv_flex_8h.html#ae2b271f123db0054512936f2acc6467f">NvFlexSetVelocities</a></div><div class="ttdeci">NV_FLEX_API void NvFlexSetVelocities(NvFlexSolver *solver, NvFlexBuffer *v, const NvFlexCopyDesc *desc)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a0506ae712f846087b8647ea389ac26baaed52f0e803c6745ffc1a5f018a8756ce"><div class="ttname"><a href="_nv_flex_8h.html#a0506ae712f846087b8647ea389ac26baaed52f0e803c6745ffc1a5f018a8756ce">eNvFlexShapeConvexMesh</a></div><div class="ttdoc">A convex mesh shape, see FlexConvexMeshGeometry. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:912</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a8cb34cbcf9def6817d6d5d3c07177052"><div class="ttname"><a href="_nv_flex_8h.html#a8cb34cbcf9def6817d6d5d3c07177052">NvFlexTimers::updateTriangles</a></div><div class="ttdeci">float updateTriangles</div><div class="ttdoc">Time spent updating dynamic triangles. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:222</div></div>
+<div class="ttc" id="_nv_flex_8h_html_struct_nv_flex_copy_desc"><div class="ttname"><a href="_nv_flex_8h.html#struct_nv_flex_copy_desc">NvFlexCopyDesc</a></div><div class="ttdef"><b>Definition:</b> NvFlex.h:500</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a169e4c126acf46bdebf76c36a44deca3"><div class="ttname"><a href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3">NvFlexBufferType</a></div><div class="ttdeci">NvFlexBufferType</div><div class="ttdef"><b>Definition:</b> NvFlex.h:76</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a23b8779c1516647ef5ed7f8010d619ff"><div class="ttname"><a href="_nv_flex_8h.html#a23b8779c1516647ef5ed7f8010d619ff">NvFlexInitDesc::enableExtensions</a></div><div class="ttdeci">bool enableExtensions</div><div class="ttdoc">Enable or disable NVIDIA/AMD extensions in DirectX, can lead to improved performance. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:318</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a7ab5aa68da7ca1f69211a900f1a1c586"><div class="ttname"><a href="_nv_flex_8h.html#a7ab5aa68da7ca1f69211a900f1a1c586">NvFlexConvexMeshId</a></div><div class="ttdeci">unsigned int NvFlexConvexMeshId</div><div class="ttdef"><b>Definition:</b> NvFlex.h:730</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
-Generated on Wed Feb 22 2017 12:18:22 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
+Generated on Fri Jun 9 2017 09:57:25 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
diff --git a/doc/_static/api/_nv_flex_device_8h.html b/doc/_static/api/_nv_flex_device_8h.html
index 20f041b..9f0be26 100644
--- a/doc/_static/api/_nv_flex_device_8h.html
+++ b/doc/_static/api/_nv_flex_device_8h.html
@@ -20,7 +20,7 @@
<td id="projectlogo"><img alt="Logo" src="nvidia.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">FLEX
- &#160;<span id="projectnumber">1.1.0</span>
+ &#160;<span id="projectnumber">1.2.0</span>
</div>
</td>
</tr>
@@ -115,7 +115,7 @@ Functions</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
-Generated on Wed Feb 22 2017 12:18:22 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
+Generated on Fri Jun 9 2017 09:57:25 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
diff --git a/doc/_static/api/_nv_flex_device_8h_source.html b/doc/_static/api/_nv_flex_device_8h_source.html
index 42e8d54..8986294 100644
--- a/doc/_static/api/_nv_flex_device_8h_source.html
+++ b/doc/_static/api/_nv_flex_device_8h_source.html
@@ -20,7 +20,7 @@
<td id="projectlogo"><img alt="Logo" src="nvidia.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">FLEX
- &#160;<span id="projectnumber">1.1.0</span>
+ &#160;<span id="projectnumber">1.2.0</span>
</div>
</td>
</tr>
@@ -91,7 +91,7 @@
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
-Generated on Wed Feb 22 2017 12:18:22 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
+Generated on Fri Jun 9 2017 09:57:25 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
diff --git a/doc/_static/api/_nv_flex_ext_8h.html b/doc/_static/api/_nv_flex_ext_8h.html
index fc0433a..8b89124 100644
--- a/doc/_static/api/_nv_flex_ext_8h.html
+++ b/doc/_static/api/_nv_flex_ext_8h.html
@@ -20,7 +20,7 @@
<td id="projectlogo"><img alt="Logo" src="nvidia.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">FLEX
- &#160;<span id="projectnumber">1.1.0</span>
+ &#160;<span id="projectnumber">1.2.0</span>
</div>
</td>
</tr>
@@ -109,8 +109,8 @@ Functions</h2></td></tr>
<tr class="separator:a5efc0113d5432eb959437e6e3a98cc5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0a9c7e2f907e46b60f6bacf402987ce"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API <a class="el" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_ext_8h.html#ad0a9c7e2f907e46b60f6bacf402987ce">NvFlexExtCreateRigidFromMesh</a> (const float *vertices, int numVertices, const int *indices, int numTriangleIndices, float radius, float expand)</td></tr>
<tr class="separator:ad0a9c7e2f907e46b60f6bacf402987ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a9f2c0daf521df4920e44cca1cb30b42c"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API <a class="el" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_ext_8h.html#a9f2c0daf521df4920e44cca1cb30b42c">NvFlexExtCreateSoftFromMesh</a> (const float *vertices, int numVertices, const int *indices, int numTriangleIndices, float particleSpacing, float volumeSampling, float surfaceSampling, float clusterSpacing, float clusterRadius, float clusterStiffness, float linkRadius, float linkStiffness, float globalStiffness)</td></tr>
-<tr class="separator:a9f2c0daf521df4920e44cca1cb30b42c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3a9ce6bba709625f6c338bd3070bd012"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API <a class="el" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_ext_8h.html#a3a9ce6bba709625f6c338bd3070bd012">NvFlexExtCreateSoftFromMesh</a> (const float *vertices, int numVertices, const int *indices, int numTriangleIndices, float particleSpacing, float volumeSampling, float surfaceSampling, float clusterSpacing, float clusterRadius, float clusterStiffness, float linkRadius, float linkStiffness, float globalStiffness, float clusterPlasticThreshold, float clusterPlasticCreep)</td></tr>
+<tr class="separator:a3a9ce6bba709625f6c338bd3070bd012"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36c33fafe13c5fd5773bf9a2af2dd745"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_ext_8h.html#a36c33fafe13c5fd5773bf9a2af2dd745">NvFlexExtDestroyAsset</a> (<a class="el" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a> *asset)</td></tr>
<tr class="separator:a36c33fafe13c5fd5773bf9a2af2dd745"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e3f12e9e92abb31b115cf31b33e34bb"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_ext_8h.html#a6e3f12e9e92abb31b115cf31b33e34bb">NvFlexExtCreateSoftMeshSkinning</a> (const float *vertices, int numVertices, const float *bones, int numBones, float falloff, float maxDistance, float *skinningWeights, int *skinningIndices)</td></tr>
@@ -310,6 +310,18 @@ numShapes</td>
<td class="fielddoc">
The number of shape matching constraints. </td></tr>
<tr><td class="fieldtype">
+<a class="anchor" id="aac7ec52c127730c381d4b8cbac8134bf"></a>float *</td>
+<td class="fieldname">
+shapePlasticThresholds</td>
+<td class="fielddoc">
+The plastic threshold coefficient for each shape. </td></tr>
+<tr><td class="fieldtype">
+<a class="anchor" id="a9342d21bf875d0f1a9d287ced08c087a"></a>float *</td>
+<td class="fieldname">
+shapePlasticCreeps</td>
+<td class="fielddoc">
+The plastic creep coefficient for each shape. </td></tr>
+<tr><td class="fieldtype">
<a class="anchor" id="aeee311155e99ce95c506078964a7dc3c"></a>int *</td>
<td class="fieldname">
triangleIndices</td>
@@ -1232,7 +1244,7 @@ Linear or no falloff. </td></tr>
</div>
</div>
-<a class="anchor" id="a9f2c0daf521df4920e44cca1cb30b42c"></a>
+<a class="anchor" id="a3a9ce6bba709625f6c338bd3070bd012"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -1312,7 +1324,19 @@ Linear or no falloff. </td></tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
- <td class="paramname"><em>globalStiffness</em>&#160;</td>
+ <td class="paramname"><em>globalStiffness</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">float&#160;</td>
+ <td class="paramname"><em>clusterPlasticThreshold</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">float&#160;</td>
+ <td class="paramname"><em>clusterPlasticCreep</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -1337,6 +1361,8 @@ Linear or no falloff. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">linkRadius</td><td>Any particles below this distance will have additional distance constraints created between them </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">linkStiffness</td><td>The stiffness of distance links </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">globalStiffness</td><td>If this parameter is &gt; 0.0f, adds an additional global cluster that consists of all particles in the shape. The stiffness of this cluster is the globalStiffness. </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">clusterPlasticThreshold</td><td>Particles belonging to rigid shapes that move with a position delta magnitude &gt; threshold will be permanently deformed in the rest pose, if clusterPlasticCreep &gt; 0.0f </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">clusterPlasticCreep</td><td>Controls the rate at which particles in the rest pose are deformed for particles passing the deformation threshold </td></tr>
</table>
</dd>
</dl>
@@ -1879,7 +1905,7 @@ Linear or no falloff. </td></tr>
</tr>
</table>
</div><div class="memdoc">
-<p>Notifies the container that asset data has changed and needs to be sent to the GPU this should be called if the constrains for an existing asset are modified by the user</p>
+<p>Notifies the container that asset data has changed and needs to be sent to the GPU this should be called if the constraints for an existing asset are modified by the user</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">container</td><td>The container the instance referencing the asset belongs to </td></tr>
@@ -2038,7 +2064,7 @@ Linear or no falloff. </td></tr>
<p>Create a NvFlexExtForceFieldCallback structure, each callback is associated with the passed in solver once the <a class="el" href="_nv_flex_ext_8h.html#aa36d43b9e53b9b66d43c2bc5eb5abf98">NvFlexExtSetForceFields()</a> is called.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
- <tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver created with <a class="el" href="_nv_flex_8h.html#af7f91fa47c779fcd8bee60061de6d31c">NvFlexCreateSolver()</a> </td></tr>
+ <tr><td class="paramdir">[in]</td><td class="paramname">solver</td><td>A valid solver created with <a class="el" href="_nv_flex_8h.html#a9e925acbc34675dfe247da017cbd855f">NvFlexCreateSolver()</a> </td></tr>
</table>
</dd>
</dl>
@@ -2113,7 +2139,7 @@ Linear or no falloff. </td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
-Generated on Wed Feb 22 2017 12:18:22 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
+Generated on Fri Jun 9 2017 09:57:25 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
diff --git a/doc/_static/api/_nv_flex_ext_8h_source.html b/doc/_static/api/_nv_flex_ext_8h_source.html
index d704ded..18c994b 100644
--- a/doc/_static/api/_nv_flex_ext_8h_source.html
+++ b/doc/_static/api/_nv_flex_ext_8h_source.html
@@ -20,7 +20,7 @@
<td id="projectlogo"><img alt="Logo" src="nvidia.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">FLEX
- &#160;<span id="projectnumber">1.1.0</span>
+ &#160;<span id="projectnumber">1.2.0</span>
</div>
</td>
</tr>
@@ -80,7 +80,7 @@
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html"> 45</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_nv_flex_vector.html">NvFlexVector</a></div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;{</div>
-<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a9d7ff86aeebc0fcfa5c125d7872e2e3b"> 47</a></span>&#160; <a class="code" href="struct_nv_flex_vector.html#a9d7ff86aeebc0fcfa5c125d7872e2e3b">NvFlexVector</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* l, <span class="keywordtype">int</span> <a class="code" href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0">size</a>=0) : <a class="code" href="struct_nv_flex_vector.html#ab08ce71766df91fc9201a61a48054d0c">lib</a>(l), <a class="code" href="struct_nv_flex_vector.html#aa408aa5327d07f69fc12314df2d5dcfb">buffer</a>(NULL), <a class="code" href="struct_nv_flex_vector.html#aa4422fcaa24d5bbd71aa7772639512b9">mappedPtr</a>(NULL), <a class="code" href="struct_nv_flex_vector.html#ad462ae46f0270161c79572762b558124">count</a>(0), <a class="code" href="struct_nv_flex_vector.html#ac28b5fd10fd519265c66cf4a0ce8e6ae">capacity</a>(0)</div>
+<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a51edbab41cc249bc117c7ce17651007c"> 47</a></span>&#160; <a class="code" href="struct_nv_flex_vector.html#a51edbab41cc249bc117c7ce17651007c">NvFlexVector</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* l, <span class="keywordtype">int</span> <a class="code" href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0">size</a> = 0, <a class="code" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3">NvFlexBufferType</a> <a class="code" href="struct_nv_flex_vector.html#a24fa4e3807b492cd5fbdc6c1c235062b">type</a> = <a class="code" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8">eNvFlexBufferHost</a>) : <a class="code" href="struct_nv_flex_vector.html#ab08ce71766df91fc9201a61a48054d0c">lib</a>(l), <a class="code" href="struct_nv_flex_vector.html#aa408aa5327d07f69fc12314df2d5dcfb">buffer</a>(NULL), <a class="code" href="struct_nv_flex_vector.html#aa4422fcaa24d5bbd71aa7772639512b9">mappedPtr</a>(NULL), <a class="code" href="struct_nv_flex_vector.html#ad462ae46f0270161c79572762b558124">count</a>(0), <a class="code" href="struct_nv_flex_vector.html#ac28b5fd10fd519265c66cf4a0ce8e6ae">capacity</a>(0), <a class="code" href="struct_nv_flex_vector.html#a24fa4e3807b492cd5fbdc6c1c235062b">type</a>(<a class="code" href="struct_nv_flex_vector.html#a24fa4e3807b492cd5fbdc6c1c235062b">type</a>)</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; {</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; <span class="keywordflow">if</span> (<a class="code" href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0">size</a>)</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; {</div>
@@ -91,7 +91,7 @@
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; } </div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; }</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; </div>
-<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a026d8fcd71bb256610401cc861345428"> 58</a></span>&#160; <a class="code" href="struct_nv_flex_vector.html#a026d8fcd71bb256610401cc861345428">NvFlexVector</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* l, <span class="keyword">const</span> T* ptr, <span class="keywordtype">int</span> <a class="code" href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0">size</a>) : <a class="code" href="struct_nv_flex_vector.html#ab08ce71766df91fc9201a61a48054d0c">lib</a>(l), <a class="code" href="struct_nv_flex_vector.html#aa408aa5327d07f69fc12314df2d5dcfb">buffer</a>(NULL), <a class="code" href="struct_nv_flex_vector.html#aa4422fcaa24d5bbd71aa7772639512b9">mappedPtr</a>(NULL), <a class="code" href="struct_nv_flex_vector.html#ad462ae46f0270161c79572762b558124">count</a>(0), <a class="code" href="struct_nv_flex_vector.html#ac28b5fd10fd519265c66cf4a0ce8e6ae">capacity</a>(0)</div>
+<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#ae5818b10d20083ee9ed0aa7826ea7ab8"> 58</a></span>&#160; <a class="code" href="struct_nv_flex_vector.html#ae5818b10d20083ee9ed0aa7826ea7ab8">NvFlexVector</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* l, <span class="keyword">const</span> T* ptr, <span class="keywordtype">int</span> <a class="code" href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0">size</a>, <a class="code" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3">NvFlexBufferType</a> <a class="code" href="struct_nv_flex_vector.html#a24fa4e3807b492cd5fbdc6c1c235062b">type</a> = <a class="code" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8">eNvFlexBufferHost</a>) : <a class="code" href="struct_nv_flex_vector.html#ab08ce71766df91fc9201a61a48054d0c">lib</a>(l), <a class="code" href="struct_nv_flex_vector.html#aa408aa5327d07f69fc12314df2d5dcfb">buffer</a>(NULL), <a class="code" href="struct_nv_flex_vector.html#aa4422fcaa24d5bbd71aa7772639512b9">mappedPtr</a>(NULL), <a class="code" href="struct_nv_flex_vector.html#ad462ae46f0270161c79572762b558124">count</a>(0), <a class="code" href="struct_nv_flex_vector.html#ac28b5fd10fd519265c66cf4a0ce8e6ae">capacity</a>(0), <a class="code" href="struct_nv_flex_vector.html#a24fa4e3807b492cd5fbdc6c1c235062b">type</a>(<a class="code" href="struct_nv_flex_vector.html#a24fa4e3807b492cd5fbdc6c1c235062b">type</a>)</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; {</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <a class="code" href="struct_nv_flex_vector.html#acd29b9b2b27e53e3640c24da6959e3cd">assign</a>(ptr, size);</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <a class="code" href="struct_nv_flex_vector.html#afca9914468beb61f6c98bc052e2af5e0">unmap</a>();</div>
@@ -109,515 +109,524 @@
<div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#aa4422fcaa24d5bbd71aa7772639512b9"> 73</a></span>&#160; T* <a class="code" href="struct_nv_flex_vector.html#aa4422fcaa24d5bbd71aa7772639512b9">mappedPtr</a>;</div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#ad462ae46f0270161c79572762b558124"> 74</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="struct_nv_flex_vector.html#ad462ae46f0270161c79572762b558124">count</a>;</div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#ac28b5fd10fd519265c66cf4a0ce8e6ae"> 75</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="struct_nv_flex_vector.html#ac28b5fd10fd519265c66cf4a0ce8e6ae">capacity</a>;</div>
-<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;</div>
-<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; <span class="comment">// reinitialize the vector leaving it unmapped</span></div>
-<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a0309d584abbe900d3af3823a79e89ee7"> 78</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#a0309d584abbe900d3af3823a79e89ee7">init</a>(<span class="keywordtype">int</span> <a class="code" href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0">size</a>)</div>
-<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; {</div>
-<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <a class="code" href="struct_nv_flex_vector.html#ade3c494ee6e75e54a6ba73d6bc100bd9">destroy</a>();</div>
-<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <a class="code" href="struct_nv_flex_vector.html#a6c4a1f4acb4d6275c9e1ac01d4e35ab1">resize</a>(size);</div>
-<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <a class="code" href="struct_nv_flex_vector.html#afca9914468beb61f6c98bc052e2af5e0">unmap</a>();</div>
-<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; }</div>
-<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;</div>
-<div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#ade3c494ee6e75e54a6ba73d6bc100bd9"> 85</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#ade3c494ee6e75e54a6ba73d6bc100bd9">destroy</a>()</div>
-<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; { </div>
-<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="keywordflow">if</span> (mappedPtr)</div>
-<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <a class="code" href="_nv_flex_8h.html#a054cb27646a389ea257d1bbde46a6e97">NvFlexUnmap</a>(buffer);</div>
-<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;</div>
-<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <span class="keywordflow">if</span> (buffer)</div>
-<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <a class="code" href="_nv_flex_8h.html#ab559759820a4322aff061745ef26c867">NvFlexFreeBuffer</a>(buffer);</div>
-<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;</div>
-<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; mappedPtr = NULL;</div>
-<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; buffer = NULL;</div>
-<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; capacity = 0; </div>
-<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; count = 0;</div>
-<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; }</div>
-<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;</div>
-<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a56640fd10b06a4024a4bf01c306c436b"> 99</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#a56640fd10b06a4024a4bf01c306c436b">map</a>(<span class="keywordtype">int</span> flags=<a class="code" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16ca11adf517d180983daec217e761acc3d6">eNvFlexMapWait</a>)</div>
-<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; {</div>
-<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <span class="keywordflow">if</span> (!buffer)</div>
-<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="keywordflow">return</span>;</div>
-<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;</div>
-<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; assert(!mappedPtr);</div>
-<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; mappedPtr = (T*)<a class="code" href="_nv_flex_8h.html#a0898bb9210440b159688d4647f6eb083">NvFlexMap</a>(buffer, flags);</div>
-<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; }</div>
-<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; </div>
-<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#afca9914468beb61f6c98bc052e2af5e0"> 108</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#afca9914468beb61f6c98bc052e2af5e0">unmap</a>()</div>
-<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; {</div>
-<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="keywordflow">if</span> (!buffer)</div>
-<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <span class="keywordflow">return</span>;</div>
-<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;</div>
-<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; assert(mappedPtr);</div>
-<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;</div>
-<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <a class="code" href="_nv_flex_8h.html#a054cb27646a389ea257d1bbde46a6e97">NvFlexUnmap</a>(buffer);</div>
-<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; mappedPtr = 0;</div>
-<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; }</div>
-<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;</div>
-<div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a3871fbd5422c9b3f41bd5dc2046e1aa7"> 119</a></span>&#160; <span class="keyword">const</span> T&amp; <a class="code" href="struct_nv_flex_vector.html#a3871fbd5422c9b3f41bd5dc2046e1aa7">operator[]</a>(<span class="keywordtype">int</span> index)<span class="keyword"> const</span></div>
-<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;<span class="keyword"> </span>{ </div>
-<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; assert(mappedPtr);</div>
-<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; assert(index &lt; count);</div>
-<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;</div>
-<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="keywordflow">return</span> mappedPtr[index];</div>
-<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; }</div>
-<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;</div>
-<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a769d5ad0723a3fceac7951967e8b4d03"> 127</a></span>&#160; T&amp; <a class="code" href="struct_nv_flex_vector.html#a769d5ad0723a3fceac7951967e8b4d03">operator[]</a>(<span class="keywordtype">int</span> index)</div>
-<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; {</div>
-<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; assert(mappedPtr);</div>
-<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; assert(index &lt; count);</div>
-<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;</div>
-<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="keywordflow">return</span> mappedPtr[index];</div>
-<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; }</div>
-<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;</div>
-<div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a98584303358b70fd12ead231cd750335"> 135</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#a98584303358b70fd12ead231cd750335">push_back</a>(<span class="keyword">const</span> T&amp; t)</div>
-<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; {</div>
-<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; assert(mappedPtr || !buffer);</div>
-<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;</div>
-<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <a class="code" href="struct_nv_flex_vector.html#ae0e6ce694fb95a50c2974c6c2cc0ffc8">reserve</a>(count+1);</div>
-<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;</div>
-<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="comment">// copy element</span></div>
-<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; mappedPtr[count++] = t; </div>
-<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; }</div>
-<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;</div>
-<div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#acd29b9b2b27e53e3640c24da6959e3cd"> 145</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#acd29b9b2b27e53e3640c24da6959e3cd">assign</a>(<span class="keyword">const</span> T* srcPtr, <span class="keywordtype">int</span> newCount)</div>
-<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; {</div>
-<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; assert(mappedPtr || !buffer);</div>
-<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160;</div>
-<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <a class="code" href="struct_nv_flex_vector.html#a6c4a1f4acb4d6275c9e1ac01d4e35ab1">resize</a>(newCount);</div>
-<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160;</div>
-<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; memcpy(mappedPtr, srcPtr, newCount*<span class="keyword">sizeof</span>(T));</div>
-<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; }</div>
-<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;</div>
-<div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a225da2c753ca0bb95b570c303f0cd761"> 154</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#a225da2c753ca0bb95b570c303f0cd761">copyto</a>(T* dest, <span class="keywordtype">int</span> count) </div>
-<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; {</div>
-<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; assert(mappedPtr);</div>
-<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;</div>
-<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; memcpy(dest, mappedPtr, <span class="keyword">sizeof</span>(T)*count);</div>
-<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; }</div>
-<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160;</div>
-<div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0"> 161</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0">size</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="struct_nv_flex_vector.html#ad462ae46f0270161c79572762b558124">count</a>; }</div>
-<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160;</div>
-<div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a73f78b1efc76c96666a96a79064670c5"> 163</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="struct_nv_flex_vector.html#a73f78b1efc76c96666a96a79064670c5">empty</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0">size</a>() == 0; }</div>
-<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160;</div>
-<div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a37fbf38300ea57635af4b60c934e9f46"> 165</a></span>&#160; <span class="keyword">const</span> T&amp; <a class="code" href="struct_nv_flex_vector.html#a37fbf38300ea57635af4b60c934e9f46">back</a>()<span class="keyword"> const</span></div>
-<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;<span class="keyword"> </span>{</div>
-<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; assert(mappedPtr);</div>
-<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; assert(!<a class="code" href="struct_nv_flex_vector.html#a73f78b1efc76c96666a96a79064670c5">empty</a>());</div>
-<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;</div>
-<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <span class="keywordflow">return</span> mappedPtr[count-1];</div>
-<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; }</div>
-<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160;</div>
-<div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#ae0e6ce694fb95a50c2974c6c2cc0ffc8"> 173</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#ae0e6ce694fb95a50c2974c6c2cc0ffc8">reserve</a>(<span class="keywordtype">int</span> minCapacity)</div>
-<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; {</div>
-<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; <span class="keywordflow">if</span> (minCapacity &gt; capacity)</div>
-<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; {</div>
-<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="comment">// growth factor of 1.5</span></div>
-<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> newCapacity = minCapacity*3/2;</div>
-<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160;</div>
-<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* newBuf = <a class="code" href="_nv_flex_8h.html#ad48f83b8442323687d2268206e913496">NvFlexAllocBuffer</a>(lib, newCapacity, <span class="keyword">sizeof</span>(T), <a class="code" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8">eNvFlexBufferHost</a>);</div>
-<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160;</div>
-<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; <span class="comment">// copy contents to new buffer </span></div>
-<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; <span class="keywordtype">void</span>* newPtr = <a class="code" href="_nv_flex_8h.html#a0898bb9210440b159688d4647f6eb083">NvFlexMap</a>(newBuf, <a class="code" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16ca11adf517d180983daec217e761acc3d6">eNvFlexMapWait</a>);</div>
-<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; memcpy(newPtr, mappedPtr, count*<span class="keyword">sizeof</span>(T));</div>
-<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160;</div>
-<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; <span class="comment">// unmap old buffer, but leave new buffer mapped</span></div>
-<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <a class="code" href="struct_nv_flex_vector.html#afca9914468beb61f6c98bc052e2af5e0">unmap</a>();</div>
-<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; </div>
-<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <span class="keywordflow">if</span> (buffer)</div>
-<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; <a class="code" href="_nv_flex_8h.html#ab559759820a4322aff061745ef26c867">NvFlexFreeBuffer</a>(buffer);</div>
-<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160;</div>
-<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <span class="comment">// swap</span></div>
-<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; buffer = newBuf;</div>
-<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; mappedPtr = (T*)newPtr;</div>
-<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; capacity = newCapacity; </div>
-<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; }</div>
-<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; }</div>
-<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160;</div>
-<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; <span class="comment">// resizes mapped buffer and leaves new buffer mapped </span></div>
-<div class="line"><a name="l00200"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a6c4a1f4acb4d6275c9e1ac01d4e35ab1"> 200</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#a6c4a1f4acb4d6275c9e1ac01d4e35ab1">resize</a>(<span class="keywordtype">int</span> newCount)</div>
-<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; {</div>
-<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; assert(mappedPtr || !buffer);</div>
-<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;</div>
-<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; <a class="code" href="struct_nv_flex_vector.html#ae0e6ce694fb95a50c2974c6c2cc0ffc8">reserve</a>(newCount); </div>
-<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160;</div>
-<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; <span class="comment">// resize but do not initialize new entries</span></div>
-<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; count = newCount;</div>
-<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; }</div>
-<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160;</div>
-<div class="line"><a name="l00210"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a36a3fd5e42c5d8005f72bcc43217cf37"> 210</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#a36a3fd5e42c5d8005f72bcc43217cf37">resize</a>(<span class="keywordtype">int</span> newCount, <span class="keyword">const</span> T&amp; val)</div>
-<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; {</div>
-<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; assert(mappedPtr || !buffer);</div>
-<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160;</div>
-<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> startInit = <a class="code" href="struct_nv_flex_vector.html#ad462ae46f0270161c79572762b558124">count</a>;</div>
-<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> endInit = newCount;</div>
-<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160;</div>
-<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; <a class="code" href="struct_nv_flex_vector.html#a6c4a1f4acb4d6275c9e1ac01d4e35ab1">resize</a>(newCount);</div>
-<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160;</div>
-<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; <span class="comment">// init any new entries</span></div>
-<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=startInit; i &lt; endInit; ++i)</div>
-<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; mappedPtr[i] = val;</div>
-<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; }</div>
-<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160;};</div>
-<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160;</div>
-<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
-<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160;</div>
-<div class="line"><a name="l00230"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html"> 230</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_moving_frame">NvFlexExtMovingFrame</a></div>
-<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160;{</div>
-<div class="line"><a name="l00232"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a7d35ea2def3a05a5f85a5cdfd5abdc56"> 232</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#a7d35ea2def3a05a5f85a5cdfd5abdc56">position</a>[3];</div>
-<div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#ad1af111e19f7ca92fd913c25c4d9288b"> 233</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#ad1af111e19f7ca92fd913c25c4d9288b">rotation</a>[4];</div>
-<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160;</div>
-<div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#acc246770a0f65f1e50b43c618955dc84"> 235</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#acc246770a0f65f1e50b43c618955dc84">velocity</a>[3];</div>
-<div class="line"><a name="l00236"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a95fbd8d303fe90992b95b63a29eb5344"> 236</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#a95fbd8d303fe90992b95b63a29eb5344">omega</a>[3];</div>
-<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160;</div>
-<div class="line"><a name="l00238"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a0705c9d2b5960057b37f097083d96f33"> 238</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#a0705c9d2b5960057b37f097083d96f33">acceleration</a>[3];</div>
-<div class="line"><a name="l00239"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#aab0ea63bac05cd6aee5054d369687fb0"> 239</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#aab0ea63bac05cd6aee5054d369687fb0">tau</a>[3];</div>
-<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160;</div>
-<div class="line"><a name="l00241"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#ae03f4690a66ba4e06e4b2519c688aaba"> 241</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#ae03f4690a66ba4e06e4b2519c688aaba">delta</a>[4][4];</div>
-<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160;};</div>
-<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160;</div>
-<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a6a20d814e3b083b069daa0f20a3e756e">NvFlexExtMovingFrameInit</a>(<a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_moving_frame">NvFlexExtMovingFrame</a>* frame, <span class="keyword">const</span> <span class="keywordtype">float</span>* worldTranslation, <span class="keyword">const</span> <span class="keywordtype">float</span>* worldRotation);</div>
-<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160;</div>
-<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160;<span class="comment">/* Update a frame to a new position, this will automatically update the velocity and acceleration of</span></div>
-<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160;<span class="comment"> * the frame, which can then be used to calculate inertial forces. This should be called once per-frame</span></div>
-<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160;<span class="comment"> * with the new position and time-step used when moving the frame.</span></div>
-<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160;<span class="comment"> *</span></div>
-<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160;<span class="comment"> * @param[in] frame A pointer to a user-allocated NvFlexExtMovingFrame struct</span></div>
-<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160;<span class="comment"> * @param[in] worldTranslation A pointer to a vec3 storing the frame&#39;s initial translation in world space</span></div>
-<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160;<span class="comment"> * @param[in] worldRotation A pointer to a quaternion storing the frame&#39;s initial rotation in world space</span></div>
-<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160;<span class="comment"> * @param[in] dt The time that elapsed since the last call to the frame update</span></div>
-<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160;<span class="comment"> */</span></div>
-<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a780022c1b8425074ce08328e8e8c35cc">NvFlexExtMovingFrameUpdate</a>(<a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_moving_frame">NvFlexExtMovingFrame</a>* frame, <span class="keyword">const</span> <span class="keywordtype">float</span>* worldTranslation, <span class="keyword">const</span> <span class="keywordtype">float</span>* worldRotation, <span class="keywordtype">float</span> dt);</div>
-<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160;</div>
-<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160;<span class="comment">/* Teleport particles to the frame&#39;s new position and apply the inertial forces</span></div>
-<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160;<span class="comment"> *</span></div>
-<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160;<span class="comment"> * @param[in] frame A pointer to a user-allocated NvFlexExtMovingFrame struct</span></div>
-<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160;<span class="comment"> * @param[in] positions A pointer to an array of particle positions in (x, y, z, 1/m) format</span></div>
-<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160;<span class="comment"> * @param[in] velocities A pointer to an array of particle velocities in (vx, vy, vz) format</span></div>
-<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160;<span class="comment"> * @param[in] numParticles The number of particles to update</span></div>
-<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160;<span class="comment"> * @param[in] linearScale How strongly the translational inertial forces should be applied, 0.0 corresponds to a purely local space simulation removing all inertial forces, 1.0 corresponds to no inertial damping and has no benefit over regular world space simulation</span></div>
-<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160;<span class="comment"> * @param[in] angularScale How strongly the angular inertial forces should be applied, 0.0 corresponds to a purely local space simulation, 1.0 corresponds to no inertial damping</span></div>
-<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160;<span class="comment"> * @param[in] dt The time that elapsed since the last call to the frame update, should match the value passed to NvFlexExtMovingFrameUpdate()</span></div>
-<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160;<span class="comment"> */</span></div>
-<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a4ffe9bcd59a6cfc8900ac136f5123304">NvFlexExtMovingFrameApply</a>(<a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_moving_frame">NvFlexExtMovingFrame</a>* frame, <span class="keywordtype">float</span>* positions, <span class="keywordtype">float</span>* velocities, <span class="keywordtype">int</span> numParticles, <span class="keywordtype">float</span> linearScale, <span class="keywordtype">float</span> angularScale, <span class="keywordtype">float</span> dt);</div>
-<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160;</div>
+<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a24fa4e3807b492cd5fbdc6c1c235062b"> 76</a></span>&#160; <a class="code" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3">NvFlexBufferType</a> <a class="code" href="struct_nv_flex_vector.html#a24fa4e3807b492cd5fbdc6c1c235062b">type</a>;</div>
+<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;</div>
+<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="comment">// reinitialize the vector leaving it unmapped</span></div>
+<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a0309d584abbe900d3af3823a79e89ee7"> 79</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#a0309d584abbe900d3af3823a79e89ee7">init</a>(<span class="keywordtype">int</span> <a class="code" href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0">size</a>)</div>
+<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; {</div>
+<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <a class="code" href="struct_nv_flex_vector.html#ade3c494ee6e75e54a6ba73d6bc100bd9">destroy</a>();</div>
+<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <a class="code" href="struct_nv_flex_vector.html#a6c4a1f4acb4d6275c9e1ac01d4e35ab1">resize</a>(size);</div>
+<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <a class="code" href="struct_nv_flex_vector.html#afca9914468beb61f6c98bc052e2af5e0">unmap</a>();</div>
+<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; }</div>
+<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;</div>
+<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#ade3c494ee6e75e54a6ba73d6bc100bd9"> 86</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#ade3c494ee6e75e54a6ba73d6bc100bd9">destroy</a>()</div>
+<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; { </div>
+<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="keywordflow">if</span> (mappedPtr)</div>
+<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <a class="code" href="_nv_flex_8h.html#a054cb27646a389ea257d1bbde46a6e97">NvFlexUnmap</a>(buffer);</div>
+<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;</div>
+<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="keywordflow">if</span> (buffer)</div>
+<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <a class="code" href="_nv_flex_8h.html#ab559759820a4322aff061745ef26c867">NvFlexFreeBuffer</a>(buffer);</div>
+<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;</div>
+<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; mappedPtr = NULL;</div>
+<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; buffer = NULL;</div>
+<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; capacity = 0; </div>
+<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; count = 0;</div>
+<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; }</div>
+<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;</div>
+<div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a56640fd10b06a4024a4bf01c306c436b"> 100</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#a56640fd10b06a4024a4bf01c306c436b">map</a>(<span class="keywordtype">int</span> flags=<a class="code" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16ca11adf517d180983daec217e761acc3d6">eNvFlexMapWait</a>)</div>
+<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; {</div>
+<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="keywordflow">if</span> (!buffer)</div>
+<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;</div>
+<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; assert(!mappedPtr);</div>
+<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; mappedPtr = (T*)<a class="code" href="_nv_flex_8h.html#a0898bb9210440b159688d4647f6eb083">NvFlexMap</a>(buffer, flags);</div>
+<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; }</div>
+<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; </div>
+<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#afca9914468beb61f6c98bc052e2af5e0"> 109</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#afca9914468beb61f6c98bc052e2af5e0">unmap</a>()</div>
+<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; {</div>
+<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <span class="keywordflow">if</span> (!buffer)</div>
+<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <span class="keywordflow">return</span>;</div>
+<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;</div>
+<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; assert(mappedPtr);</div>
+<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;</div>
+<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <a class="code" href="_nv_flex_8h.html#a054cb27646a389ea257d1bbde46a6e97">NvFlexUnmap</a>(buffer);</div>
+<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; mappedPtr = 0;</div>
+<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; }</div>
+<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;</div>
+<div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a3871fbd5422c9b3f41bd5dc2046e1aa7"> 120</a></span>&#160; <span class="keyword">const</span> T&amp; <a class="code" href="struct_nv_flex_vector.html#a3871fbd5422c9b3f41bd5dc2046e1aa7">operator[]</a>(<span class="keywordtype">int</span> index)<span class="keyword"> const</span></div>
+<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;<span class="keyword"> </span>{ </div>
+<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; assert(mappedPtr);</div>
+<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; assert(index &lt; count);</div>
+<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;</div>
+<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <span class="keywordflow">return</span> mappedPtr[index];</div>
+<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; }</div>
+<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;</div>
+<div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a769d5ad0723a3fceac7951967e8b4d03"> 128</a></span>&#160; T&amp; <a class="code" href="struct_nv_flex_vector.html#a769d5ad0723a3fceac7951967e8b4d03">operator[]</a>(<span class="keywordtype">int</span> index)</div>
+<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; {</div>
+<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; assert(mappedPtr);</div>
+<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; assert(index &lt; count);</div>
+<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;</div>
+<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="keywordflow">return</span> mappedPtr[index];</div>
+<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; }</div>
+<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;</div>
+<div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a98584303358b70fd12ead231cd750335"> 136</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#a98584303358b70fd12ead231cd750335">push_back</a>(<span class="keyword">const</span> T&amp; t)</div>
+<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; {</div>
+<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; assert(mappedPtr || !buffer);</div>
+<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;</div>
+<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <a class="code" href="struct_nv_flex_vector.html#ae0e6ce694fb95a50c2974c6c2cc0ffc8">reserve</a>(count+1);</div>
+<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;</div>
+<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="comment">// copy element</span></div>
+<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; mappedPtr[count++] = t; </div>
+<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; }</div>
+<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;</div>
+<div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#acd29b9b2b27e53e3640c24da6959e3cd"> 146</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#acd29b9b2b27e53e3640c24da6959e3cd">assign</a>(<span class="keyword">const</span> T* srcPtr, <span class="keywordtype">int</span> newCount)</div>
+<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; {</div>
+<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; assert(mappedPtr || !buffer);</div>
+<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160;</div>
+<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <a class="code" href="struct_nv_flex_vector.html#a6c4a1f4acb4d6275c9e1ac01d4e35ab1">resize</a>(newCount);</div>
+<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160;</div>
+<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; memcpy(mappedPtr, srcPtr, newCount*<span class="keyword">sizeof</span>(T));</div>
+<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; }</div>
+<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;</div>
+<div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a225da2c753ca0bb95b570c303f0cd761"> 155</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#a225da2c753ca0bb95b570c303f0cd761">copyto</a>(T* dest, <span class="keywordtype">int</span> count) </div>
+<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; {</div>
+<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; assert(mappedPtr);</div>
+<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;</div>
+<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; memcpy(dest, mappedPtr, <span class="keyword">sizeof</span>(T)*count);</div>
+<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; }</div>
+<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;</div>
+<div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0"> 162</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0">size</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="struct_nv_flex_vector.html#ad462ae46f0270161c79572762b558124">count</a>; }</div>
+<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160;</div>
+<div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a73f78b1efc76c96666a96a79064670c5"> 164</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="struct_nv_flex_vector.html#a73f78b1efc76c96666a96a79064670c5">empty</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0">size</a>() == 0; }</div>
+<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160;</div>
+<div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a37fbf38300ea57635af4b60c934e9f46"> 166</a></span>&#160; <span class="keyword">const</span> T&amp; <a class="code" href="struct_nv_flex_vector.html#a37fbf38300ea57635af4b60c934e9f46">back</a>()<span class="keyword"> const</span></div>
+<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160;<span class="keyword"> </span>{</div>
+<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; assert(mappedPtr);</div>
+<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; assert(!<a class="code" href="struct_nv_flex_vector.html#a73f78b1efc76c96666a96a79064670c5">empty</a>());</div>
+<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160;</div>
+<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <span class="keywordflow">return</span> mappedPtr[count-1];</div>
+<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; }</div>
+<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160;</div>
+<div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#ae0e6ce694fb95a50c2974c6c2cc0ffc8"> 174</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#ae0e6ce694fb95a50c2974c6c2cc0ffc8">reserve</a>(<span class="keywordtype">int</span> minCapacity)</div>
+<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; {</div>
+<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <span class="keywordflow">if</span> (minCapacity &gt; capacity)</div>
+<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; {</div>
+<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <span class="comment">// growth factor of 1.5</span></div>
+<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> newCapacity = minCapacity*3/2;</div>
+<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160;</div>
+<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; <a class="code" href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a>* newBuf = <a class="code" href="_nv_flex_8h.html#ad48f83b8442323687d2268206e913496">NvFlexAllocBuffer</a>(lib, newCapacity, <span class="keyword">sizeof</span>(T), type);</div>
+<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160;</div>
+<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; <span class="comment">// copy contents to new buffer </span></div>
+<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <span class="keywordtype">void</span>* newPtr = <a class="code" href="_nv_flex_8h.html#a0898bb9210440b159688d4647f6eb083">NvFlexMap</a>(newBuf, <a class="code" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16ca11adf517d180983daec217e761acc3d6">eNvFlexMapWait</a>);</div>
+<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; memcpy(newPtr, mappedPtr, count*<span class="keyword">sizeof</span>(T));</div>
+<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160;</div>
+<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <span class="comment">// unmap old buffer, but leave new buffer mapped</span></div>
+<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <a class="code" href="struct_nv_flex_vector.html#afca9914468beb61f6c98bc052e2af5e0">unmap</a>();</div>
+<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; </div>
+<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; <span class="keywordflow">if</span> (buffer)</div>
+<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; <a class="code" href="_nv_flex_8h.html#ab559759820a4322aff061745ef26c867">NvFlexFreeBuffer</a>(buffer);</div>
+<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160;</div>
+<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; <span class="comment">// swap</span></div>
+<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; buffer = newBuf;</div>
+<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; mappedPtr = (T*)newPtr;</div>
+<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; capacity = newCapacity; </div>
+<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; }</div>
+<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; }</div>
+<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160;</div>
+<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; <span class="comment">// resizes mapped buffer and leaves new buffer mapped </span></div>
+<div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a6c4a1f4acb4d6275c9e1ac01d4e35ab1"> 201</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#a6c4a1f4acb4d6275c9e1ac01d4e35ab1">resize</a>(<span class="keywordtype">int</span> newCount)</div>
+<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; {</div>
+<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; assert(mappedPtr || !buffer);</div>
+<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;</div>
+<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <a class="code" href="struct_nv_flex_vector.html#ae0e6ce694fb95a50c2974c6c2cc0ffc8">reserve</a>(newCount); </div>
+<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160;</div>
+<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; <span class="comment">// resize but do not initialize new entries</span></div>
+<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; count = newCount;</div>
+<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; }</div>
+<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160;</div>
+<div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="struct_nv_flex_vector.html#a36a3fd5e42c5d8005f72bcc43217cf37"> 211</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="struct_nv_flex_vector.html#a36a3fd5e42c5d8005f72bcc43217cf37">resize</a>(<span class="keywordtype">int</span> newCount, <span class="keyword">const</span> T&amp; val)</div>
+<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; {</div>
+<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; assert(mappedPtr || !buffer);</div>
+<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160;</div>
+<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> startInit = <a class="code" href="struct_nv_flex_vector.html#ad462ae46f0270161c79572762b558124">count</a>;</div>
+<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> endInit = newCount;</div>
+<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160;</div>
+<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; <a class="code" href="struct_nv_flex_vector.html#a6c4a1f4acb4d6275c9e1ac01d4e35ab1">resize</a>(newCount);</div>
+<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160;</div>
+<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; <span class="comment">// init any new entries</span></div>
+<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=startInit; i &lt; endInit; ++i)</div>
+<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; mappedPtr[i] = val;</div>
+<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; }</div>
+<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160;};</div>
+<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160;</div>
+<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
+<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160;</div>
+<div class="line"><a name="l00231"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html"> 231</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_moving_frame">NvFlexExtMovingFrame</a></div>
+<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160;{</div>
+<div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a7d35ea2def3a05a5f85a5cdfd5abdc56"> 233</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#a7d35ea2def3a05a5f85a5cdfd5abdc56">position</a>[3];</div>
+<div class="line"><a name="l00234"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#ad1af111e19f7ca92fd913c25c4d9288b"> 234</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#ad1af111e19f7ca92fd913c25c4d9288b">rotation</a>[4];</div>
+<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160;</div>
+<div class="line"><a name="l00236"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#acc246770a0f65f1e50b43c618955dc84"> 236</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#acc246770a0f65f1e50b43c618955dc84">velocity</a>[3];</div>
+<div class="line"><a name="l00237"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a95fbd8d303fe90992b95b63a29eb5344"> 237</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#a95fbd8d303fe90992b95b63a29eb5344">omega</a>[3];</div>
+<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160;</div>
+<div class="line"><a name="l00239"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a0705c9d2b5960057b37f097083d96f33"> 239</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#a0705c9d2b5960057b37f097083d96f33">acceleration</a>[3];</div>
+<div class="line"><a name="l00240"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#aab0ea63bac05cd6aee5054d369687fb0"> 240</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#aab0ea63bac05cd6aee5054d369687fb0">tau</a>[3];</div>
+<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160;</div>
+<div class="line"><a name="l00242"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#ae03f4690a66ba4e06e4b2519c688aaba"> 242</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#ae03f4690a66ba4e06e4b2519c688aaba">delta</a>[4][4];</div>
+<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160;};</div>
+<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160;</div>
+<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a6a20d814e3b083b069daa0f20a3e756e">NvFlexExtMovingFrameInit</a>(<a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_moving_frame">NvFlexExtMovingFrame</a>* frame, <span class="keyword">const</span> <span class="keywordtype">float</span>* worldTranslation, <span class="keyword">const</span> <span class="keywordtype">float</span>* worldRotation);</div>
+<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160;</div>
+<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160;<span class="comment">/* Update a frame to a new position, this will automatically update the velocity and acceleration of</span></div>
+<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160;<span class="comment"> * the frame, which can then be used to calculate inertial forces. This should be called once per-frame</span></div>
+<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160;<span class="comment"> * with the new position and time-step used when moving the frame.</span></div>
+<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160;<span class="comment"> *</span></div>
+<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160;<span class="comment"> * @param[in] frame A pointer to a user-allocated NvFlexExtMovingFrame struct</span></div>
+<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160;<span class="comment"> * @param[in] worldTranslation A pointer to a vec3 storing the frame&#39;s initial translation in world space</span></div>
+<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160;<span class="comment"> * @param[in] worldRotation A pointer to a quaternion storing the frame&#39;s initial rotation in world space</span></div>
+<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160;<span class="comment"> * @param[in] dt The time that elapsed since the last call to the frame update</span></div>
+<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160;<span class="comment"> */</span></div>
+<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a780022c1b8425074ce08328e8e8c35cc">NvFlexExtMovingFrameUpdate</a>(<a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_moving_frame">NvFlexExtMovingFrame</a>* frame, <span class="keyword">const</span> <span class="keywordtype">float</span>* worldTranslation, <span class="keyword">const</span> <span class="keywordtype">float</span>* worldRotation, <span class="keywordtype">float</span> dt);</div>
+<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160;</div>
+<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160;<span class="comment">/* Teleport particles to the frame&#39;s new position and apply the inertial forces</span></div>
+<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160;<span class="comment"> *</span></div>
+<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160;<span class="comment"> * @param[in] frame A pointer to a user-allocated NvFlexExtMovingFrame struct</span></div>
+<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160;<span class="comment"> * @param[in] positions A pointer to an array of particle positions in (x, y, z, 1/m) format</span></div>
+<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160;<span class="comment"> * @param[in] velocities A pointer to an array of particle velocities in (vx, vy, vz) format</span></div>
+<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160;<span class="comment"> * @param[in] numParticles The number of particles to update</span></div>
+<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160;<span class="comment"> * @param[in] linearScale How strongly the translational inertial forces should be applied, 0.0 corresponds to a purely local space simulation removing all inertial forces, 1.0 corresponds to no inertial damping and has no benefit over regular world space simulation</span></div>
+<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160;<span class="comment"> * @param[in] angularScale How strongly the angular inertial forces should be applied, 0.0 corresponds to a purely local space simulation, 1.0 corresponds to no inertial damping</span></div>
+<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160;<span class="comment"> * @param[in] dt The time that elapsed since the last call to the frame update, should match the value passed to NvFlexExtMovingFrameUpdate()</span></div>
+<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160;<span class="comment"> */</span></div>
+<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a4ffe9bcd59a6cfc8900ac136f5123304">NvFlexExtMovingFrameApply</a>(<a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_moving_frame">NvFlexExtMovingFrame</a>* frame, <span class="keywordtype">float</span>* positions, <span class="keywordtype">float</span>* velocities, <span class="keywordtype">int</span> numParticles, <span class="keywordtype">float</span> linearScale, <span class="keywordtype">float</span> angularScale, <span class="keywordtype">float</span> dt);</div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160;</div>
-<div class="line"><a name="l00310"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html"> 310</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a></div>
-<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160;{ </div>
-<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; <span class="comment">// particles</span></div>
-<div class="line"><a name="l00313"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a0ac3c8cc1bb87eaa50690f44e56a74da"> 313</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a0ac3c8cc1bb87eaa50690f44e56a74da">particles</a>; </div>
-<div class="line"><a name="l00314"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a4eceb2845977219379afdd06397a6706"> 314</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a4eceb2845977219379afdd06397a6706">numParticles</a>; </div>
-<div class="line"><a name="l00315"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#ab421c4d72574f468af6827c18c36a387"> 315</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#ab421c4d72574f468af6827c18c36a387">maxParticles</a>; </div>
-<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160;</div>
-<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160; <span class="comment">// springs</span></div>
-<div class="line"><a name="l00318"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a8b7a9bd9cbd2f33c6b3da02687a6bd9d"> 318</a></span>&#160; <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_ext_8h.html#a8b7a9bd9cbd2f33c6b3da02687a6bd9d">springIndices</a>; </div>
-<div class="line"><a name="l00319"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a1e8252d5e5f66b3d8920c1371f23cc05"> 319</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a1e8252d5e5f66b3d8920c1371f23cc05">springCoefficients</a>; </div>
-<div class="line"><a name="l00320"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a9020959583f85486e060a7b5e611476d"> 320</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a9020959583f85486e060a7b5e611476d">springRestLengths</a>; </div>
-<div class="line"><a name="l00321"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#ae5f81891f59382b133319dc3bcea8ba0"> 321</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#ae5f81891f59382b133319dc3bcea8ba0">numSprings</a>; </div>
-<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160;</div>
-<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160; <span class="comment">// shapes</span></div>
-<div class="line"><a name="l00324"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a8a4a122a0a95b8262fc4673298a5cb1c"> 324</a></span>&#160; <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_ext_8h.html#a8a4a122a0a95b8262fc4673298a5cb1c">shapeIndices</a>; </div>
-<div class="line"><a name="l00325"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a4810f46c27fd0cfacfb1f4be9dff0479"> 325</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a4810f46c27fd0cfacfb1f4be9dff0479">numShapeIndices</a>; </div>
-<div class="line"><a name="l00326"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a96b73b81c5db272d950efe3f03a8cef8"> 326</a></span>&#160; <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_ext_8h.html#a96b73b81c5db272d950efe3f03a8cef8">shapeOffsets</a>; </div>
-<div class="line"><a name="l00327"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a0fd9407aad5001d3a9fe90e989da1aad"> 327</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a0fd9407aad5001d3a9fe90e989da1aad">shapeCoefficients</a>; </div>
-<div class="line"><a name="l00328"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a24866c3fe2c482073325062c9c80d043"> 328</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a24866c3fe2c482073325062c9c80d043">shapeCenters</a>; </div>
-<div class="line"><a name="l00329"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#afc07cf2edbf4d5bf504890b312a98bd7"> 329</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#afc07cf2edbf4d5bf504890b312a98bd7">numShapes</a>; </div>
-<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160;</div>
-<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160; <span class="comment">// faces for cloth</span></div>
-<div class="line"><a name="l00332"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#aeee311155e99ce95c506078964a7dc3c"> 332</a></span>&#160; <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_ext_8h.html#aeee311155e99ce95c506078964a7dc3c">triangleIndices</a>; </div>
-<div class="line"><a name="l00333"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#ad858d4df98a4300668f2b8048881c0d5"> 333</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#ad858d4df98a4300668f2b8048881c0d5">numTriangles</a>; </div>
-<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160;</div>
-<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160; <span class="comment">// inflatable params</span></div>
-<div class="line"><a name="l00336"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a960073478e49b229d1d19ac64c5b23f7"> 336</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="_nv_flex_ext_8h.html#a960073478e49b229d1d19ac64c5b23f7">inflatable</a>; </div>
-<div class="line"><a name="l00337"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a3fc55581814cbab90a0c4167428893df"> 337</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#a3fc55581814cbab90a0c4167428893df">inflatableVolume</a>; </div>
-<div class="line"><a name="l00338"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#ab556b9c29acfda73e14c68edc43be7e3"> 338</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#ab556b9c29acfda73e14c68edc43be7e3">inflatablePressure</a>; </div>
-<div class="line"><a name="l00339"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#ad4d5551b97bd31b9e1ca5c57f2c82452"> 339</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#ad4d5551b97bd31b9e1ca5c57f2c82452">inflatableStiffness</a>; </div>
-<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>&#160;};</div>
-<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>&#160;</div>
-<div class="line"><a name="l00345"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html"> 345</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_instance">NvFlexExtInstance</a></div>
-<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>&#160;{</div>
-<div class="line"><a name="l00347"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a1a0c7a0c03148b1586c4fb48f14a565f"> 347</a></span>&#160; <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_ext_8h.html#a1a0c7a0c03148b1586c4fb48f14a565f">particleIndices</a>; </div>
-<div class="line"><a name="l00348"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#aca9a5ecc1fd26fedf90f8f17e87e3ca8"> 348</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#aca9a5ecc1fd26fedf90f8f17e87e3ca8">numParticles</a>; </div>
-<div class="line"><a name="l00349"></a><span class="lineno"> 349</span>&#160; </div>
-<div class="line"><a name="l00350"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a3288fee0b909e9e768d9abc9b8da74cf"> 350</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a3288fee0b909e9e768d9abc9b8da74cf">triangleIndex</a>; </div>
-<div class="line"><a name="l00351"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#aa67489d3beb86e2b566e0fa2e978ed11"> 351</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#aa67489d3beb86e2b566e0fa2e978ed11">shapeIndex</a>; </div>
-<div class="line"><a name="l00352"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#ac2ef832cadd91e257ba80eb97d936340"> 352</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#ac2ef832cadd91e257ba80eb97d936340">inflatableIndex</a>; </div>
-<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>&#160;</div>
-<div class="line"><a name="l00354"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#aa6fb48cb1199af96a29de7616f7a4d18"> 354</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#aa6fb48cb1199af96a29de7616f7a4d18">shapeTranslations</a>; </div>
-<div class="line"><a name="l00355"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a3d0a712689ce07a5652d48ea25fa05b9"> 355</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a3d0a712689ce07a5652d48ea25fa05b9">shapeRotations</a>; </div>
-<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>&#160;</div>
-<div class="line"><a name="l00357"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#aa4f19c17fa4ae35ceda90c8b3d1fcca4"> 357</a></span>&#160; <span class="keyword">const</span> <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* <a class="code" href="_nv_flex_ext_8h.html#aa4f19c17fa4ae35ceda90c8b3d1fcca4">asset</a>; </div>
-<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>&#160; </div>
-<div class="line"><a name="l00359"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a8000e722ce864bbfbce0f303f39186d7"> 359</a></span>&#160; <span class="keywordtype">void</span>* <a class="code" href="_nv_flex_ext_8h.html#a8000e722ce864bbfbce0f303f39186d7">userData</a>; </div>
-<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>&#160;};</div>
+<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160;</div>
+<div class="line"><a name="l00311"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html"> 311</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a></div>
+<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160;{ </div>
+<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; <span class="comment">// particles</span></div>
+<div class="line"><a name="l00314"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a0ac3c8cc1bb87eaa50690f44e56a74da"> 314</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a0ac3c8cc1bb87eaa50690f44e56a74da">particles</a>; </div>
+<div class="line"><a name="l00315"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a4eceb2845977219379afdd06397a6706"> 315</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a4eceb2845977219379afdd06397a6706">numParticles</a>; </div>
+<div class="line"><a name="l00316"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#ab421c4d72574f468af6827c18c36a387"> 316</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#ab421c4d72574f468af6827c18c36a387">maxParticles</a>; </div>
+<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160;</div>
+<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160; <span class="comment">// springs</span></div>
+<div class="line"><a name="l00319"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a8b7a9bd9cbd2f33c6b3da02687a6bd9d"> 319</a></span>&#160; <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_ext_8h.html#a8b7a9bd9cbd2f33c6b3da02687a6bd9d">springIndices</a>; </div>
+<div class="line"><a name="l00320"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a1e8252d5e5f66b3d8920c1371f23cc05"> 320</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a1e8252d5e5f66b3d8920c1371f23cc05">springCoefficients</a>; </div>
+<div class="line"><a name="l00321"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a9020959583f85486e060a7b5e611476d"> 321</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a9020959583f85486e060a7b5e611476d">springRestLengths</a>; </div>
+<div class="line"><a name="l00322"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#ae5f81891f59382b133319dc3bcea8ba0"> 322</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#ae5f81891f59382b133319dc3bcea8ba0">numSprings</a>; </div>
+<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160;</div>
+<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160; <span class="comment">// shapes</span></div>
+<div class="line"><a name="l00325"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a8a4a122a0a95b8262fc4673298a5cb1c"> 325</a></span>&#160; <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_ext_8h.html#a8a4a122a0a95b8262fc4673298a5cb1c">shapeIndices</a>; </div>
+<div class="line"><a name="l00326"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a4810f46c27fd0cfacfb1f4be9dff0479"> 326</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a4810f46c27fd0cfacfb1f4be9dff0479">numShapeIndices</a>; </div>
+<div class="line"><a name="l00327"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a96b73b81c5db272d950efe3f03a8cef8"> 327</a></span>&#160; <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_ext_8h.html#a96b73b81c5db272d950efe3f03a8cef8">shapeOffsets</a>; </div>
+<div class="line"><a name="l00328"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a0fd9407aad5001d3a9fe90e989da1aad"> 328</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a0fd9407aad5001d3a9fe90e989da1aad">shapeCoefficients</a>; </div>
+<div class="line"><a name="l00329"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a24866c3fe2c482073325062c9c80d043"> 329</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a24866c3fe2c482073325062c9c80d043">shapeCenters</a>; </div>
+<div class="line"><a name="l00330"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#afc07cf2edbf4d5bf504890b312a98bd7"> 330</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#afc07cf2edbf4d5bf504890b312a98bd7">numShapes</a>; </div>
+<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160;</div>
+<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160; <span class="comment">// plastic deformation</span></div>
+<div class="line"><a name="l00333"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#aac7ec52c127730c381d4b8cbac8134bf"> 333</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#aac7ec52c127730c381d4b8cbac8134bf">shapePlasticThresholds</a>; </div>
+<div class="line"><a name="l00334"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a9342d21bf875d0f1a9d287ced08c087a"> 334</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a9342d21bf875d0f1a9d287ced08c087a">shapePlasticCreeps</a>; </div>
+<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160;</div>
+<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160; <span class="comment">// faces for cloth</span></div>
+<div class="line"><a name="l00337"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#aeee311155e99ce95c506078964a7dc3c"> 337</a></span>&#160; <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_ext_8h.html#aeee311155e99ce95c506078964a7dc3c">triangleIndices</a>; </div>
+<div class="line"><a name="l00338"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#ad858d4df98a4300668f2b8048881c0d5"> 338</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#ad858d4df98a4300668f2b8048881c0d5">numTriangles</a>; </div>
+<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160;</div>
+<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>&#160; <span class="comment">// inflatable params</span></div>
+<div class="line"><a name="l00341"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a960073478e49b229d1d19ac64c5b23f7"> 341</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="_nv_flex_ext_8h.html#a960073478e49b229d1d19ac64c5b23f7">inflatable</a>; </div>
+<div class="line"><a name="l00342"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a3fc55581814cbab90a0c4167428893df"> 342</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#a3fc55581814cbab90a0c4167428893df">inflatableVolume</a>; </div>
+<div class="line"><a name="l00343"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#ab556b9c29acfda73e14c68edc43be7e3"> 343</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#ab556b9c29acfda73e14c68edc43be7e3">inflatablePressure</a>; </div>
+<div class="line"><a name="l00344"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#ad4d5551b97bd31b9e1ca5c57f2c82452"> 344</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#ad4d5551b97bd31b9e1ca5c57f2c82452">inflatableStiffness</a>; </div>
+<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160;};</div>
+<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>&#160;</div>
+<div class="line"><a name="l00350"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html"> 350</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_instance">NvFlexExtInstance</a></div>
+<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>&#160;{</div>
+<div class="line"><a name="l00352"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a1a0c7a0c03148b1586c4fb48f14a565f"> 352</a></span>&#160; <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_ext_8h.html#a1a0c7a0c03148b1586c4fb48f14a565f">particleIndices</a>; </div>
+<div class="line"><a name="l00353"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#aca9a5ecc1fd26fedf90f8f17e87e3ca8"> 353</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#aca9a5ecc1fd26fedf90f8f17e87e3ca8">numParticles</a>; </div>
+<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>&#160; </div>
+<div class="line"><a name="l00355"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a3288fee0b909e9e768d9abc9b8da74cf"> 355</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a3288fee0b909e9e768d9abc9b8da74cf">triangleIndex</a>; </div>
+<div class="line"><a name="l00356"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#aa67489d3beb86e2b566e0fa2e978ed11"> 356</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#aa67489d3beb86e2b566e0fa2e978ed11">shapeIndex</a>; </div>
+<div class="line"><a name="l00357"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#ac2ef832cadd91e257ba80eb97d936340"> 357</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#ac2ef832cadd91e257ba80eb97d936340">inflatableIndex</a>; </div>
+<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>&#160;</div>
+<div class="line"><a name="l00359"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#aa6fb48cb1199af96a29de7616f7a4d18"> 359</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#aa6fb48cb1199af96a29de7616f7a4d18">shapeTranslations</a>; </div>
+<div class="line"><a name="l00360"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a3d0a712689ce07a5652d48ea25fa05b9"> 360</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a3d0a712689ce07a5652d48ea25fa05b9">shapeRotations</a>; </div>
<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>&#160;</div>
-<div class="line"><a name="l00365"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4"> 365</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a> <a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>;</div>
+<div class="line"><a name="l00362"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#aa4f19c17fa4ae35ceda90c8b3d1fcca4"> 362</a></span>&#160; <span class="keyword">const</span> <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* <a class="code" href="_nv_flex_ext_8h.html#aa4f19c17fa4ae35ceda90c8b3d1fcca4">asset</a>; </div>
+<div class="line"><a name="l00363"></a><span class="lineno"> 363</span>&#160; </div>
+<div class="line"><a name="l00364"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a8000e722ce864bbfbce0f303f39186d7"> 364</a></span>&#160; <span class="keywordtype">void</span>* <a class="code" href="_nv_flex_ext_8h.html#a8000e722ce864bbfbce0f303f39186d7">userData</a>; </div>
+<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>&#160;};</div>
<div class="line"><a name="l00366"></a><span class="lineno"> 366</span>&#160;</div>
-<div class="line"><a name="l00378"></a><span class="lineno"> 378</span>&#160;NV_FLEX_API <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a82a15dfd40b338a07cf4517f55f16720">NvFlexExtCreateWeldedMeshIndices</a>(<span class="keyword">const</span> <span class="keywordtype">float</span>* vertices, <span class="keywordtype">int</span> numVertices, <span class="keywordtype">int</span>* uniqueVerts, <span class="keywordtype">int</span>* originalToUniqueMap, <span class="keywordtype">float</span> threshold);</div>
-<div class="line"><a name="l00379"></a><span class="lineno"> 379</span>&#160;</div>
-<div class="line"><a name="l00395"></a><span class="lineno"> 395</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* <a class="code" href="_nv_flex_ext_8h.html#a8bef033b2a8567dfcc954e22534147ee">NvFlexExtCreateClothFromMesh</a>(<span class="keyword">const</span> <span class="keywordtype">float</span>* particles, <span class="keywordtype">int</span> numParticles, <span class="keyword">const</span> <span class="keywordtype">int</span>* indices, <span class="keywordtype">int</span> numTriangles, <span class="keywordtype">float</span> stretchStiffness, <span class="keywordtype">float</span> bendStiffness, <span class="keywordtype">float</span> tetherStiffness, <span class="keywordtype">float</span> tetherGive, <span class="keywordtype">float</span> pressure);</div>
-<div class="line"><a name="l00396"></a><span class="lineno"> 396</span>&#160;</div>
-<div class="line"><a name="l00415"></a><span class="lineno"> 415</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* <a class="code" href="_nv_flex_ext_8h.html#addad82b3598059ffde7b3b5babe17bd4">NvFlexExtCreateTearingClothFromMesh</a>(<span class="keyword">const</span> <span class="keywordtype">float</span>* particles, <span class="keywordtype">int</span> numParticles, <span class="keywordtype">int</span> maxParticles, <span class="keyword">const</span> <span class="keywordtype">int</span>* indices, <span class="keywordtype">int</span> numTriangles, <span class="keywordtype">float</span> stretchStiffness, <span class="keywordtype">float</span> bendStiffness, <span class="keywordtype">float</span> pressure);</div>
-<div class="line"><a name="l00416"></a><span class="lineno"> 416</span>&#160;</div>
-<div class="line"><a name="l00421"></a><span class="lineno"> 421</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a88054283907d3386f1a30cdc4475acb0">NvFlexExtDestroyTearingCloth</a>(<a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* asset);</div>
-<div class="line"><a name="l00422"></a><span class="lineno"> 422</span>&#160;</div>
-<div class="line"><a name="l00428"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html"> 428</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_tearing_particle_clone">NvFlexExtTearingParticleClone</a></div>
-<div class="line"><a name="l00429"></a><span class="lineno"> 429</span>&#160;{</div>
-<div class="line"><a name="l00430"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a431c97a2756c45752dd7508f0810a397"> 430</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a431c97a2756c45752dd7508f0810a397">srcIndex</a>; </div>
-<div class="line"><a name="l00431"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a9034efff0f1b158a12a9ed6991d620fa"> 431</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a9034efff0f1b158a12a9ed6991d620fa">destIndex</a>;</div>
-<div class="line"><a name="l00432"></a><span class="lineno"> 432</span>&#160;};</div>
-<div class="line"><a name="l00433"></a><span class="lineno"> 433</span>&#160;</div>
-<div class="line"><a name="l00441"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html"> 441</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_tearing_mesh_edit">NvFlexExtTearingMeshEdit</a></div>
-<div class="line"><a name="l00442"></a><span class="lineno"> 442</span>&#160;{</div>
-<div class="line"><a name="l00443"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a46b80c02097ebc40bf777708e8f17ed4"> 443</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a46b80c02097ebc40bf777708e8f17ed4">triIndex</a>; <span class="comment">// index into the triangle indices array to update</span></div>
-<div class="line"><a name="l00444"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a8cf124de0fc370757cb890f83984ced8"> 444</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a8cf124de0fc370757cb890f83984ced8">newParticleIndex</a>; <span class="comment">// new value for the index</span></div>
-<div class="line"><a name="l00445"></a><span class="lineno"> 445</span>&#160;};</div>
-<div class="line"><a name="l00446"></a><span class="lineno"> 446</span>&#160;</div>
-<div class="line"><a name="l00461"></a><span class="lineno"> 461</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a5efc0113d5432eb959437e6e3a98cc5f">NvFlexExtTearClothMesh</a>(<a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* asset, <span class="keywordtype">float</span> maxStrain, <span class="keywordtype">int</span> maxSplits, <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_tearing_particle_clone">NvFlexExtTearingParticleClone</a>* particleCopies, <span class="keywordtype">int</span>* numParticleCopies, <span class="keywordtype">int</span> maxCopies, <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_tearing_mesh_edit">NvFlexExtTearingMeshEdit</a>* triangleEdits, <span class="keywordtype">int</span>* numTriangleEdits, <span class="keywordtype">int</span> maxEdits);</div>
-<div class="line"><a name="l00462"></a><span class="lineno"> 462</span>&#160;</div>
-<div class="line"><a name="l00474"></a><span class="lineno"> 474</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* <a class="code" href="_nv_flex_ext_8h.html#ad0a9c7e2f907e46b60f6bacf402987ce">NvFlexExtCreateRigidFromMesh</a>(<span class="keyword">const</span> <span class="keywordtype">float</span>* vertices, <span class="keywordtype">int</span> numVertices, <span class="keyword">const</span> <span class="keywordtype">int</span>* indices, <span class="keywordtype">int</span> numTriangleIndices, <span class="keywordtype">float</span> radius, <span class="keywordtype">float</span> expand);</div>
-<div class="line"><a name="l00475"></a><span class="lineno"> 475</span>&#160;</div>
-<div class="line"><a name="l00494"></a><span class="lineno"> 494</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* <a class="code" href="_nv_flex_ext_8h.html#a9f2c0daf521df4920e44cca1cb30b42c">NvFlexExtCreateSoftFromMesh</a>(<span class="keyword">const</span> <span class="keywordtype">float</span>* vertices, <span class="keywordtype">int</span> numVertices, <span class="keyword">const</span> <span class="keywordtype">int</span>* indices, <span class="keywordtype">int</span> numTriangleIndices, <span class="keywordtype">float</span> particleSpacing, <span class="keywordtype">float</span> volumeSampling, <span class="keywordtype">float</span> surfaceSampling, <span class="keywordtype">float</span> clusterSpacing, <span class="keywordtype">float</span> clusterRadius, <span class="keywordtype">float</span> clusterStiffness, <span class="keywordtype">float</span> linkRadius, <span class="keywordtype">float</span> linkStiffness, <span class="keywordtype">float</span> globalStiffness);</div>
-<div class="line"><a name="l00495"></a><span class="lineno"> 495</span>&#160;</div>
-<div class="line"><a name="l00500"></a><span class="lineno"> 500</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a36c33fafe13c5fd5773bf9a2af2dd745">NvFlexExtDestroyAsset</a>(<a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* asset);</div>
-<div class="line"><a name="l00501"></a><span class="lineno"> 501</span>&#160;</div>
-<div class="line"><a name="l00514"></a><span class="lineno"> 514</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a6e3f12e9e92abb31b115cf31b33e34bb">NvFlexExtCreateSoftMeshSkinning</a>(<span class="keyword">const</span> <span class="keywordtype">float</span>* vertices, <span class="keywordtype">int</span> numVertices, <span class="keyword">const</span> <span class="keywordtype">float</span>* bones, <span class="keywordtype">int</span> numBones, <span class="keywordtype">float</span> falloff, <span class="keywordtype">float</span> maxDistance, <span class="keywordtype">float</span>* skinningWeights, <span class="keywordtype">int</span>* skinningIndices);</div>
-<div class="line"><a name="l00515"></a><span class="lineno"> 515</span>&#160;</div>
-<div class="line"><a name="l00524"></a><span class="lineno"> 524</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* <a class="code" href="_nv_flex_ext_8h.html#a49906c9e3466d40383cddf627fe26658">NvFlexExtCreateContainer</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, <a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <span class="keywordtype">int</span> maxParticles);</div>
-<div class="line"><a name="l00525"></a><span class="lineno"> 525</span>&#160;</div>
-<div class="line"><a name="l00531"></a><span class="lineno"> 531</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a2509137d9fb8ab6818f35ab7761da7a5">NvFlexExtDestroyContainer</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
+<div class="line"><a name="l00370"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4"> 370</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a> <a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>;</div>
+<div class="line"><a name="l00371"></a><span class="lineno"> 371</span>&#160;</div>
+<div class="line"><a name="l00383"></a><span class="lineno"> 383</span>&#160;NV_FLEX_API <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a82a15dfd40b338a07cf4517f55f16720">NvFlexExtCreateWeldedMeshIndices</a>(<span class="keyword">const</span> <span class="keywordtype">float</span>* vertices, <span class="keywordtype">int</span> numVertices, <span class="keywordtype">int</span>* uniqueVerts, <span class="keywordtype">int</span>* originalToUniqueMap, <span class="keywordtype">float</span> threshold);</div>
+<div class="line"><a name="l00384"></a><span class="lineno"> 384</span>&#160;</div>
+<div class="line"><a name="l00400"></a><span class="lineno"> 400</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* <a class="code" href="_nv_flex_ext_8h.html#a8bef033b2a8567dfcc954e22534147ee">NvFlexExtCreateClothFromMesh</a>(<span class="keyword">const</span> <span class="keywordtype">float</span>* particles, <span class="keywordtype">int</span> numParticles, <span class="keyword">const</span> <span class="keywordtype">int</span>* indices, <span class="keywordtype">int</span> numTriangles, <span class="keywordtype">float</span> stretchStiffness, <span class="keywordtype">float</span> bendStiffness, <span class="keywordtype">float</span> tetherStiffness, <span class="keywordtype">float</span> tetherGive, <span class="keywordtype">float</span> pressure);</div>
+<div class="line"><a name="l00401"></a><span class="lineno"> 401</span>&#160;</div>
+<div class="line"><a name="l00420"></a><span class="lineno"> 420</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* <a class="code" href="_nv_flex_ext_8h.html#addad82b3598059ffde7b3b5babe17bd4">NvFlexExtCreateTearingClothFromMesh</a>(<span class="keyword">const</span> <span class="keywordtype">float</span>* particles, <span class="keywordtype">int</span> numParticles, <span class="keywordtype">int</span> maxParticles, <span class="keyword">const</span> <span class="keywordtype">int</span>* indices, <span class="keywordtype">int</span> numTriangles, <span class="keywordtype">float</span> stretchStiffness, <span class="keywordtype">float</span> bendStiffness, <span class="keywordtype">float</span> pressure);</div>
+<div class="line"><a name="l00421"></a><span class="lineno"> 421</span>&#160;</div>
+<div class="line"><a name="l00426"></a><span class="lineno"> 426</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a88054283907d3386f1a30cdc4475acb0">NvFlexExtDestroyTearingCloth</a>(<a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* asset);</div>
+<div class="line"><a name="l00427"></a><span class="lineno"> 427</span>&#160;</div>
+<div class="line"><a name="l00433"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html"> 433</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_tearing_particle_clone">NvFlexExtTearingParticleClone</a></div>
+<div class="line"><a name="l00434"></a><span class="lineno"> 434</span>&#160;{</div>
+<div class="line"><a name="l00435"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a431c97a2756c45752dd7508f0810a397"> 435</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a431c97a2756c45752dd7508f0810a397">srcIndex</a>; </div>
+<div class="line"><a name="l00436"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a9034efff0f1b158a12a9ed6991d620fa"> 436</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a9034efff0f1b158a12a9ed6991d620fa">destIndex</a>;</div>
+<div class="line"><a name="l00437"></a><span class="lineno"> 437</span>&#160;};</div>
+<div class="line"><a name="l00438"></a><span class="lineno"> 438</span>&#160;</div>
+<div class="line"><a name="l00446"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html"> 446</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_tearing_mesh_edit">NvFlexExtTearingMeshEdit</a></div>
+<div class="line"><a name="l00447"></a><span class="lineno"> 447</span>&#160;{</div>
+<div class="line"><a name="l00448"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a46b80c02097ebc40bf777708e8f17ed4"> 448</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a46b80c02097ebc40bf777708e8f17ed4">triIndex</a>; <span class="comment">// index into the triangle indices array to update</span></div>
+<div class="line"><a name="l00449"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a8cf124de0fc370757cb890f83984ced8"> 449</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a8cf124de0fc370757cb890f83984ced8">newParticleIndex</a>; <span class="comment">// new value for the index</span></div>
+<div class="line"><a name="l00450"></a><span class="lineno"> 450</span>&#160;};</div>
+<div class="line"><a name="l00451"></a><span class="lineno"> 451</span>&#160;</div>
+<div class="line"><a name="l00466"></a><span class="lineno"> 466</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a5efc0113d5432eb959437e6e3a98cc5f">NvFlexExtTearClothMesh</a>(<a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* asset, <span class="keywordtype">float</span> maxStrain, <span class="keywordtype">int</span> maxSplits, <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_tearing_particle_clone">NvFlexExtTearingParticleClone</a>* particleCopies, <span class="keywordtype">int</span>* numParticleCopies, <span class="keywordtype">int</span> maxCopies, <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_tearing_mesh_edit">NvFlexExtTearingMeshEdit</a>* triangleEdits, <span class="keywordtype">int</span>* numTriangleEdits, <span class="keywordtype">int</span> maxEdits);</div>
+<div class="line"><a name="l00467"></a><span class="lineno"> 467</span>&#160;</div>
+<div class="line"><a name="l00479"></a><span class="lineno"> 479</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* <a class="code" href="_nv_flex_ext_8h.html#ad0a9c7e2f907e46b60f6bacf402987ce">NvFlexExtCreateRigidFromMesh</a>(<span class="keyword">const</span> <span class="keywordtype">float</span>* vertices, <span class="keywordtype">int</span> numVertices, <span class="keyword">const</span> <span class="keywordtype">int</span>* indices, <span class="keywordtype">int</span> numTriangleIndices, <span class="keywordtype">float</span> radius, <span class="keywordtype">float</span> expand);</div>
+<div class="line"><a name="l00480"></a><span class="lineno"> 480</span>&#160;</div>
+<div class="line"><a name="l00501"></a><span class="lineno"> 501</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* <a class="code" href="_nv_flex_ext_8h.html#a3a9ce6bba709625f6c338bd3070bd012">NvFlexExtCreateSoftFromMesh</a>(<span class="keyword">const</span> <span class="keywordtype">float</span>* vertices, <span class="keywordtype">int</span> numVertices, <span class="keyword">const</span> <span class="keywordtype">int</span>* indices, <span class="keywordtype">int</span> numTriangleIndices, <span class="keywordtype">float</span> particleSpacing, <span class="keywordtype">float</span> volumeSampling, <span class="keywordtype">float</span> surfaceSampling, <span class="keywordtype">float</span> clusterSpacing, <span class="keywordtype">float</span> clusterRadius, <span class="keywordtype">float</span> clusterStiffness, <span class="keywordtype">float</span> linkRadius, <span class="keywordtype">float</span> linkStiffness, <span class="keywordtype">float</span> globalStiffness, <span class="keywordtype">float</span> clusterPlasticThreshold, <span class="keywordtype">float</span> clusterPlasticCreep);</div>
+<div class="line"><a name="l00502"></a><span class="lineno"> 502</span>&#160;</div>
+<div class="line"><a name="l00507"></a><span class="lineno"> 507</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a36c33fafe13c5fd5773bf9a2af2dd745">NvFlexExtDestroyAsset</a>(<a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* asset);</div>
+<div class="line"><a name="l00508"></a><span class="lineno"> 508</span>&#160;</div>
+<div class="line"><a name="l00521"></a><span class="lineno"> 521</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a6e3f12e9e92abb31b115cf31b33e34bb">NvFlexExtCreateSoftMeshSkinning</a>(<span class="keyword">const</span> <span class="keywordtype">float</span>* vertices, <span class="keywordtype">int</span> numVertices, <span class="keyword">const</span> <span class="keywordtype">float</span>* bones, <span class="keywordtype">int</span> numBones, <span class="keywordtype">float</span> falloff, <span class="keywordtype">float</span> maxDistance, <span class="keywordtype">float</span>* skinningWeights, <span class="keywordtype">int</span>* skinningIndices);</div>
+<div class="line"><a name="l00522"></a><span class="lineno"> 522</span>&#160;</div>
+<div class="line"><a name="l00531"></a><span class="lineno"> 531</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* <a class="code" href="_nv_flex_ext_8h.html#a49906c9e3466d40383cddf627fe26658">NvFlexExtCreateContainer</a>(<a class="code" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a>* lib, <a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver, <span class="keywordtype">int</span> maxParticles);</div>
<div class="line"><a name="l00532"></a><span class="lineno"> 532</span>&#160;</div>
-<div class="line"><a name="l00540"></a><span class="lineno"> 540</span>&#160;NV_FLEX_API <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a7c036ccca83df3659529858068e0593d">NvFlexExtAllocParticles</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container, <span class="keywordtype">int</span> n, <span class="keywordtype">int</span>* indices);</div>
-<div class="line"><a name="l00541"></a><span class="lineno"> 541</span>&#160;</div>
-<div class="line"><a name="l00549"></a><span class="lineno"> 549</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#ab0a259d159116b7fba9b229784b02c70">NvFlexExtFreeParticles</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container, <span class="keywordtype">int</span> n, <span class="keyword">const</span> <span class="keywordtype">int</span>* indices);</div>
-<div class="line"><a name="l00550"></a><span class="lineno"> 550</span>&#160;</div>
-<div class="line"><a name="l00551"></a><span class="lineno"> 551</span>&#160;</div>
-<div class="line"><a name="l00559"></a><span class="lineno"> 559</span>&#160;NV_FLEX_API <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a7fc268a27306f6fc68dd1c106cfa62db">NvFlexExtGetActiveList</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container, <span class="keywordtype">int</span>* indices);</div>
-<div class="line"><a name="l00560"></a><span class="lineno"> 560</span>&#160;</div>
-<div class="line"><a name="l00561"></a><span class="lineno"> 561</span>&#160;</div>
-<div class="line"><a name="l00562"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html"> 562</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_particle_data">NvFlexExtParticleData</a></div>
-<div class="line"><a name="l00563"></a><span class="lineno"> 563</span>&#160;{</div>
-<div class="line"><a name="l00564"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a780c0bac62cc5dd8d04da11cff07eeba"> 564</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a780c0bac62cc5dd8d04da11cff07eeba">particles</a>; </div>
-<div class="line"><a name="l00565"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a69962fe23c7fef594fb5f36a175ff148"> 565</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a69962fe23c7fef594fb5f36a175ff148">restParticles</a>; </div>
-<div class="line"><a name="l00566"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#adbb39b1f8b0705bb3e19d2cb6145640f"> 566</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#adbb39b1f8b0705bb3e19d2cb6145640f">velocities</a>; </div>
-<div class="line"><a name="l00567"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a7fa35a822a4e856fee45b3263e679270"> 567</a></span>&#160; <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_ext_8h.html#a7fa35a822a4e856fee45b3263e679270">phases</a>; </div>
-<div class="line"><a name="l00568"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#afcacbd584e2041855af50eae3f287779"> 568</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#afcacbd584e2041855af50eae3f287779">normals</a>; </div>
-<div class="line"><a name="l00569"></a><span class="lineno"> 569</span>&#160;</div>
-<div class="line"><a name="l00570"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#af911b47ddb538a0542f6e2c38a82d701"> 570</a></span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#af911b47ddb538a0542f6e2c38a82d701">lower</a>; </div>
-<div class="line"><a name="l00571"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#ad722c319fe60d8a0933df217ba04b2ac"> 571</a></span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#ad722c319fe60d8a0933df217ba04b2ac">upper</a>; </div>
-<div class="line"><a name="l00572"></a><span class="lineno"> 572</span>&#160;};</div>
-<div class="line"><a name="l00573"></a><span class="lineno"> 573</span>&#160;</div>
-<div class="line"><a name="l00580"></a><span class="lineno"> 580</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_particle_data">NvFlexExtParticleData</a> <a class="code" href="_nv_flex_ext_8h.html#a3fa8bd4b7d4096602e611faf0bb62dfb">NvFlexExtMapParticleData</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
-<div class="line"><a name="l00581"></a><span class="lineno"> 581</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#af0cd639c21be28640fe5e1dd94931d59">NvFlexExtUnmapParticleData</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
-<div class="line"><a name="l00582"></a><span class="lineno"> 582</span>&#160;</div>
-<div class="line"><a name="l00583"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html"> 583</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_triangle_data">NvFlexExtTriangleData</a></div>
-<div class="line"><a name="l00584"></a><span class="lineno"> 584</span>&#160;{</div>
-<div class="line"><a name="l00585"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a806a707d6b32c41ab561a4893f43ddde"> 585</a></span>&#160; <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_ext_8h.html#a806a707d6b32c41ab561a4893f43ddde">indices</a>; </div>
-<div class="line"><a name="l00586"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a56bf3b1fe603c79b871ead2efb65cc78"> 586</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a56bf3b1fe603c79b871ead2efb65cc78">normals</a>; </div>
-<div class="line"><a name="l00587"></a><span class="lineno"> 587</span>&#160;};</div>
-<div class="line"><a name="l00588"></a><span class="lineno"> 588</span>&#160;</div>
-<div class="line"><a name="l00594"></a><span class="lineno"> 594</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_triangle_data">NvFlexExtTriangleData</a> <a class="code" href="_nv_flex_ext_8h.html#a1646bf409084777cd0ff5d4fcccf07de">NvFlexExtMapTriangleData</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
+<div class="line"><a name="l00538"></a><span class="lineno"> 538</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a2509137d9fb8ab6818f35ab7761da7a5">NvFlexExtDestroyContainer</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
+<div class="line"><a name="l00539"></a><span class="lineno"> 539</span>&#160;</div>
+<div class="line"><a name="l00547"></a><span class="lineno"> 547</span>&#160;NV_FLEX_API <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a7c036ccca83df3659529858068e0593d">NvFlexExtAllocParticles</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container, <span class="keywordtype">int</span> n, <span class="keywordtype">int</span>* indices);</div>
+<div class="line"><a name="l00548"></a><span class="lineno"> 548</span>&#160;</div>
+<div class="line"><a name="l00556"></a><span class="lineno"> 556</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#ab0a259d159116b7fba9b229784b02c70">NvFlexExtFreeParticles</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container, <span class="keywordtype">int</span> n, <span class="keyword">const</span> <span class="keywordtype">int</span>* indices);</div>
+<div class="line"><a name="l00557"></a><span class="lineno"> 557</span>&#160;</div>
+<div class="line"><a name="l00558"></a><span class="lineno"> 558</span>&#160;</div>
+<div class="line"><a name="l00566"></a><span class="lineno"> 566</span>&#160;NV_FLEX_API <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a7fc268a27306f6fc68dd1c106cfa62db">NvFlexExtGetActiveList</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container, <span class="keywordtype">int</span>* indices);</div>
+<div class="line"><a name="l00567"></a><span class="lineno"> 567</span>&#160;</div>
+<div class="line"><a name="l00568"></a><span class="lineno"> 568</span>&#160;</div>
+<div class="line"><a name="l00569"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html"> 569</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_particle_data">NvFlexExtParticleData</a></div>
+<div class="line"><a name="l00570"></a><span class="lineno"> 570</span>&#160;{</div>
+<div class="line"><a name="l00571"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a780c0bac62cc5dd8d04da11cff07eeba"> 571</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a780c0bac62cc5dd8d04da11cff07eeba">particles</a>; </div>
+<div class="line"><a name="l00572"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a69962fe23c7fef594fb5f36a175ff148"> 572</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a69962fe23c7fef594fb5f36a175ff148">restParticles</a>; </div>
+<div class="line"><a name="l00573"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#adbb39b1f8b0705bb3e19d2cb6145640f"> 573</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#adbb39b1f8b0705bb3e19d2cb6145640f">velocities</a>; </div>
+<div class="line"><a name="l00574"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a7fa35a822a4e856fee45b3263e679270"> 574</a></span>&#160; <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_ext_8h.html#a7fa35a822a4e856fee45b3263e679270">phases</a>; </div>
+<div class="line"><a name="l00575"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#afcacbd584e2041855af50eae3f287779"> 575</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#afcacbd584e2041855af50eae3f287779">normals</a>; </div>
+<div class="line"><a name="l00576"></a><span class="lineno"> 576</span>&#160;</div>
+<div class="line"><a name="l00577"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#af911b47ddb538a0542f6e2c38a82d701"> 577</a></span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#af911b47ddb538a0542f6e2c38a82d701">lower</a>; </div>
+<div class="line"><a name="l00578"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#ad722c319fe60d8a0933df217ba04b2ac"> 578</a></span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#ad722c319fe60d8a0933df217ba04b2ac">upper</a>; </div>
+<div class="line"><a name="l00579"></a><span class="lineno"> 579</span>&#160;};</div>
+<div class="line"><a name="l00580"></a><span class="lineno"> 580</span>&#160;</div>
+<div class="line"><a name="l00587"></a><span class="lineno"> 587</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_particle_data">NvFlexExtParticleData</a> <a class="code" href="_nv_flex_ext_8h.html#a3fa8bd4b7d4096602e611faf0bb62dfb">NvFlexExtMapParticleData</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
+<div class="line"><a name="l00588"></a><span class="lineno"> 588</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#af0cd639c21be28640fe5e1dd94931d59">NvFlexExtUnmapParticleData</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
+<div class="line"><a name="l00589"></a><span class="lineno"> 589</span>&#160;</div>
+<div class="line"><a name="l00590"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html"> 590</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_triangle_data">NvFlexExtTriangleData</a></div>
+<div class="line"><a name="l00591"></a><span class="lineno"> 591</span>&#160;{</div>
+<div class="line"><a name="l00592"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a806a707d6b32c41ab561a4893f43ddde"> 592</a></span>&#160; <span class="keywordtype">int</span>* <a class="code" href="_nv_flex_ext_8h.html#a806a707d6b32c41ab561a4893f43ddde">indices</a>; </div>
+<div class="line"><a name="l00593"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a56bf3b1fe603c79b871ead2efb65cc78"> 593</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a56bf3b1fe603c79b871ead2efb65cc78">normals</a>; </div>
+<div class="line"><a name="l00594"></a><span class="lineno"> 594</span>&#160;};</div>
<div class="line"><a name="l00595"></a><span class="lineno"> 595</span>&#160;</div>
-<div class="line"><a name="l00599"></a><span class="lineno"> 599</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a89e582ae93e0256b06f22d9abf361783">NvFlexExtUnmapTriangleData</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
-<div class="line"><a name="l00600"></a><span class="lineno"> 600</span>&#160;</div>
-<div class="line"><a name="l00601"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html"> 601</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_shape_data">NvFlexExtShapeData</a></div>
-<div class="line"><a name="l00602"></a><span class="lineno"> 602</span>&#160;{</div>
-<div class="line"><a name="l00603"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a6517fee9c5e151673ecd5ad91cbf2ae2"> 603</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a6517fee9c5e151673ecd5ad91cbf2ae2">rotations</a>; </div>
-<div class="line"><a name="l00604"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#acd73f347463a114da73bb1ab5eff00b4"> 604</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#acd73f347463a114da73bb1ab5eff00b4">positions</a>; </div>
-<div class="line"><a name="l00605"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a4e845f47484e00a272ad351b4bf28e95"> 605</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a4e845f47484e00a272ad351b4bf28e95">n</a>; </div>
-<div class="line"><a name="l00606"></a><span class="lineno"> 606</span>&#160;};</div>
+<div class="line"><a name="l00601"></a><span class="lineno"> 601</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_triangle_data">NvFlexExtTriangleData</a> <a class="code" href="_nv_flex_ext_8h.html#a1646bf409084777cd0ff5d4fcccf07de">NvFlexExtMapTriangleData</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
+<div class="line"><a name="l00602"></a><span class="lineno"> 602</span>&#160;</div>
+<div class="line"><a name="l00606"></a><span class="lineno"> 606</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a89e582ae93e0256b06f22d9abf361783">NvFlexExtUnmapTriangleData</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
<div class="line"><a name="l00607"></a><span class="lineno"> 607</span>&#160;</div>
-<div class="line"><a name="l00613"></a><span class="lineno"> 613</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_shape_data">NvFlexExtShapeData</a> <a class="code" href="_nv_flex_ext_8h.html#a90f2d3ba5be20e70e7efead911ee7acc">NvFlexExtMapShapeData</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
+<div class="line"><a name="l00608"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html"> 608</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_shape_data">NvFlexExtShapeData</a></div>
+<div class="line"><a name="l00609"></a><span class="lineno"> 609</span>&#160;{</div>
+<div class="line"><a name="l00610"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a6517fee9c5e151673ecd5ad91cbf2ae2"> 610</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#a6517fee9c5e151673ecd5ad91cbf2ae2">rotations</a>; </div>
+<div class="line"><a name="l00611"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#acd73f347463a114da73bb1ab5eff00b4"> 611</a></span>&#160; <span class="keywordtype">float</span>* <a class="code" href="_nv_flex_ext_8h.html#acd73f347463a114da73bb1ab5eff00b4">positions</a>; </div>
+<div class="line"><a name="l00612"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a4e845f47484e00a272ad351b4bf28e95"> 612</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="_nv_flex_ext_8h.html#a4e845f47484e00a272ad351b4bf28e95">n</a>; </div>
+<div class="line"><a name="l00613"></a><span class="lineno"> 613</span>&#160;};</div>
<div class="line"><a name="l00614"></a><span class="lineno"> 614</span>&#160;</div>
-<div class="line"><a name="l00618"></a><span class="lineno"> 618</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#ab51f04114586b5bf0f6fc5816fda9c69">NvFlexExtUnmapShapeData</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
-<div class="line"><a name="l00619"></a><span class="lineno"> 619</span>&#160;</div>
-<div class="line"><a name="l00635"></a><span class="lineno"> 635</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_instance">NvFlexExtInstance</a>* <a class="code" href="_nv_flex_ext_8h.html#a3bf10e2c9370602142b7be01e920f973">NvFlexExtCreateInstance</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container, <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_particle_data">NvFlexExtParticleData</a>* particleData, <span class="keyword">const</span> <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* asset, <span class="keyword">const</span> <span class="keywordtype">float</span>* transform, <span class="keywordtype">float</span> vx, <span class="keywordtype">float</span> vy, <span class="keywordtype">float</span> vz, <span class="keywordtype">int</span> phase, <span class="keywordtype">float</span> invMassScale);</div>
-<div class="line"><a name="l00636"></a><span class="lineno"> 636</span>&#160;</div>
-<div class="line"><a name="l00642"></a><span class="lineno"> 642</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a2b5634f64bd0d8d86f894885a1c16a33">NvFlexExtDestroyInstance</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container, <span class="keyword">const</span> <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_instance">NvFlexExtInstance</a>* instance);</div>
+<div class="line"><a name="l00620"></a><span class="lineno"> 620</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_shape_data">NvFlexExtShapeData</a> <a class="code" href="_nv_flex_ext_8h.html#a90f2d3ba5be20e70e7efead911ee7acc">NvFlexExtMapShapeData</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
+<div class="line"><a name="l00621"></a><span class="lineno"> 621</span>&#160;</div>
+<div class="line"><a name="l00625"></a><span class="lineno"> 625</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#ab51f04114586b5bf0f6fc5816fda9c69">NvFlexExtUnmapShapeData</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
+<div class="line"><a name="l00626"></a><span class="lineno"> 626</span>&#160;</div>
+<div class="line"><a name="l00642"></a><span class="lineno"> 642</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_instance">NvFlexExtInstance</a>* <a class="code" href="_nv_flex_ext_8h.html#a3bf10e2c9370602142b7be01e920f973">NvFlexExtCreateInstance</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container, <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_particle_data">NvFlexExtParticleData</a>* particleData, <span class="keyword">const</span> <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* asset, <span class="keyword">const</span> <span class="keywordtype">float</span>* transform, <span class="keywordtype">float</span> vx, <span class="keywordtype">float</span> vy, <span class="keywordtype">float</span> vz, <span class="keywordtype">int</span> phase, <span class="keywordtype">float</span> invMassScale);</div>
<div class="line"><a name="l00643"></a><span class="lineno"> 643</span>&#160;</div>
-<div class="line"><a name="l00650"></a><span class="lineno"> 650</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#ad9343d07f49098ee205a1ed48dc9db34">NvFlexExtNotifyAssetChanged</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container, <span class="keyword">const</span> <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* asset);</div>
-<div class="line"><a name="l00651"></a><span class="lineno"> 651</span>&#160;</div>
-<div class="line"><a name="l00681"></a><span class="lineno"> 681</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#ab4caadf5a6b19674849bfce91d986e7b">NvFlexExtTickContainer</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container, <span class="keywordtype">float</span> dt, <span class="keywordtype">int</span> numSubsteps, <span class="keywordtype">bool</span> enableTimers=<span class="keyword">false</span>);</div>
-<div class="line"><a name="l00682"></a><span class="lineno"> 682</span>&#160;</div>
-<div class="line"><a name="l00688"></a><span class="lineno"> 688</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a425f4e472bb83797498c904ab228209c">NvFlexExtPushToDevice</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
+<div class="line"><a name="l00649"></a><span class="lineno"> 649</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a2b5634f64bd0d8d86f894885a1c16a33">NvFlexExtDestroyInstance</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container, <span class="keyword">const</span> <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_instance">NvFlexExtInstance</a>* instance);</div>
+<div class="line"><a name="l00650"></a><span class="lineno"> 650</span>&#160;</div>
+<div class="line"><a name="l00657"></a><span class="lineno"> 657</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#ad9343d07f49098ee205a1ed48dc9db34">NvFlexExtNotifyAssetChanged</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container, <span class="keyword">const</span> <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a>* asset);</div>
+<div class="line"><a name="l00658"></a><span class="lineno"> 658</span>&#160;</div>
+<div class="line"><a name="l00688"></a><span class="lineno"> 688</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#ab4caadf5a6b19674849bfce91d986e7b">NvFlexExtTickContainer</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container, <span class="keywordtype">float</span> dt, <span class="keywordtype">int</span> numSubsteps, <span class="keywordtype">bool</span> enableTimers=<span class="keyword">false</span>);</div>
<div class="line"><a name="l00689"></a><span class="lineno"> 689</span>&#160;</div>
-<div class="line"><a name="l00695"></a><span class="lineno"> 695</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a89ea7bbd26bec46f1b82d84257de1f58">NvFlexExtPullFromDevice</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
+<div class="line"><a name="l00695"></a><span class="lineno"> 695</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a425f4e472bb83797498c904ab228209c">NvFlexExtPushToDevice</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
<div class="line"><a name="l00696"></a><span class="lineno"> 696</span>&#160;</div>
-<div class="line"><a name="l00702"></a><span class="lineno"> 702</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a4695d37db8b61495f200bfd88a2be628">NvFlexExtUpdateInstances</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
+<div class="line"><a name="l00702"></a><span class="lineno"> 702</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a89ea7bbd26bec46f1b82d84257de1f58">NvFlexExtPullFromDevice</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
<div class="line"><a name="l00703"></a><span class="lineno"> 703</span>&#160;</div>
-<div class="line"><a name="l00704"></a><span class="lineno"> 704</span>&#160;</div>
-<div class="line"><a name="l00708"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68e"> 708</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68e">NvFlexExtForceMode</a></div>
-<div class="line"><a name="l00709"></a><span class="lineno"> 709</span>&#160;{</div>
-<div class="line"><a name="l00711"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea9d4e8413b628837f9d1982897fd1f4a2"> 711</a></span>&#160; <a class="code" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea9d4e8413b628837f9d1982897fd1f4a2">eNvFlexExtModeForce</a> = 0,</div>
-<div class="line"><a name="l00712"></a><span class="lineno"> 712</span>&#160;</div>
-<div class="line"><a name="l00714"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea92265f22fc2a724baf640fdace8f8ea0"> 714</a></span>&#160; <a class="code" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea92265f22fc2a724baf640fdace8f8ea0">eNvFlexExtModeImpulse</a> = 1,</div>
-<div class="line"><a name="l00715"></a><span class="lineno"> 715</span>&#160;</div>
-<div class="line"><a name="l00717"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea6a2e4817b1e86764147c81e8d5e5070c"> 717</a></span>&#160; <a class="code" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea6a2e4817b1e86764147c81e8d5e5070c">eNvFlexExtModeVelocityChange</a> = 2,</div>
-<div class="line"><a name="l00718"></a><span class="lineno"> 718</span>&#160;};</div>
+<div class="line"><a name="l00709"></a><span class="lineno"> 709</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#a4695d37db8b61495f200bfd88a2be628">NvFlexExtUpdateInstances</a>(<a class="code" href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a>* container);</div>
+<div class="line"><a name="l00710"></a><span class="lineno"> 710</span>&#160;</div>
+<div class="line"><a name="l00711"></a><span class="lineno"> 711</span>&#160;</div>
+<div class="line"><a name="l00715"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68e"> 715</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68e">NvFlexExtForceMode</a></div>
+<div class="line"><a name="l00716"></a><span class="lineno"> 716</span>&#160;{</div>
+<div class="line"><a name="l00718"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea9d4e8413b628837f9d1982897fd1f4a2"> 718</a></span>&#160; <a class="code" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea9d4e8413b628837f9d1982897fd1f4a2">eNvFlexExtModeForce</a> = 0,</div>
<div class="line"><a name="l00719"></a><span class="lineno"> 719</span>&#160;</div>
-<div class="line"><a name="l00723"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html"> 723</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_force_field">NvFlexExtForceField</a></div>
-<div class="line"><a name="l00724"></a><span class="lineno"> 724</span>&#160;{</div>
-<div class="line"><a name="l00725"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a9e6134ffeca22636dcd467fa4dee1ba0"> 725</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#a9e6134ffeca22636dcd467fa4dee1ba0">mPosition</a>[3]; </div>
-<div class="line"><a name="l00726"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a7ad225a762dcf91b7155c7229dd08d38"> 726</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#a7ad225a762dcf91b7155c7229dd08d38">mRadius</a>; </div>
-<div class="line"><a name="l00727"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a0b9729f9896faba45c861a1e8d15290b"> 727</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#a0b9729f9896faba45c861a1e8d15290b">mStrength</a>; </div>
-<div class="line"><a name="l00728"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a3d7dba5a4d9fce7230bc20a8bb567951"> 728</a></span>&#160; <a class="code" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68e">NvFlexExtForceMode</a> <a class="code" href="_nv_flex_ext_8h.html#a3d7dba5a4d9fce7230bc20a8bb567951">mMode</a>; </div>
-<div class="line"><a name="l00729"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a785f5a041fb93cf460cde7153f87fa02"> 729</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="_nv_flex_ext_8h.html#a785f5a041fb93cf460cde7153f87fa02">mLinearFalloff</a>; </div>
-<div class="line"><a name="l00730"></a><span class="lineno"> 730</span>&#160;};</div>
-<div class="line"><a name="l00731"></a><span class="lineno"> 731</span>&#160;</div>
-<div class="line"><a name="l00736"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a1117ce527b6b483cc756ab5352f6dc3f"> 736</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#a1117ce527b6b483cc756ab5352f6dc3f">NvFlexExtForceFieldCallback</a> <a class="code" href="_nv_flex_ext_8h.html#a1117ce527b6b483cc756ab5352f6dc3f">NvFlexExtForceFieldCallback</a>;</div>
-<div class="line"><a name="l00737"></a><span class="lineno"> 737</span>&#160;</div>
-<div class="line"><a name="l00745"></a><span class="lineno"> 745</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#a1117ce527b6b483cc756ab5352f6dc3f">NvFlexExtForceFieldCallback</a>* <a class="code" href="_nv_flex_ext_8h.html#ac1ed9ff49120d0691352399c8173bdcf">NvFlexExtCreateForceFieldCallback</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver);</div>
-<div class="line"><a name="l00746"></a><span class="lineno"> 746</span>&#160;</div>
-<div class="line"><a name="l00752"></a><span class="lineno"> 752</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#ad08da77f432ca56bc59647bf73da86cb">NvFlexExtDestroyForceFieldCallback</a>(<a class="code" href="_nv_flex_ext_8h.html#a1117ce527b6b483cc756ab5352f6dc3f">NvFlexExtForceFieldCallback</a>* callback);</div>
+<div class="line"><a name="l00721"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea92265f22fc2a724baf640fdace8f8ea0"> 721</a></span>&#160; <a class="code" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea92265f22fc2a724baf640fdace8f8ea0">eNvFlexExtModeImpulse</a> = 1,</div>
+<div class="line"><a name="l00722"></a><span class="lineno"> 722</span>&#160;</div>
+<div class="line"><a name="l00724"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea6a2e4817b1e86764147c81e8d5e5070c"> 724</a></span>&#160; <a class="code" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea6a2e4817b1e86764147c81e8d5e5070c">eNvFlexExtModeVelocityChange</a> = 2,</div>
+<div class="line"><a name="l00725"></a><span class="lineno"> 725</span>&#160;};</div>
+<div class="line"><a name="l00726"></a><span class="lineno"> 726</span>&#160;</div>
+<div class="line"><a name="l00730"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html"> 730</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_force_field">NvFlexExtForceField</a></div>
+<div class="line"><a name="l00731"></a><span class="lineno"> 731</span>&#160;{</div>
+<div class="line"><a name="l00732"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a9e6134ffeca22636dcd467fa4dee1ba0"> 732</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#a9e6134ffeca22636dcd467fa4dee1ba0">mPosition</a>[3]; </div>
+<div class="line"><a name="l00733"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a7ad225a762dcf91b7155c7229dd08d38"> 733</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#a7ad225a762dcf91b7155c7229dd08d38">mRadius</a>; </div>
+<div class="line"><a name="l00734"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a0b9729f9896faba45c861a1e8d15290b"> 734</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="_nv_flex_ext_8h.html#a0b9729f9896faba45c861a1e8d15290b">mStrength</a>; </div>
+<div class="line"><a name="l00735"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a3d7dba5a4d9fce7230bc20a8bb567951"> 735</a></span>&#160; <a class="code" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68e">NvFlexExtForceMode</a> <a class="code" href="_nv_flex_ext_8h.html#a3d7dba5a4d9fce7230bc20a8bb567951">mMode</a>; </div>
+<div class="line"><a name="l00736"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a785f5a041fb93cf460cde7153f87fa02"> 736</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="_nv_flex_ext_8h.html#a785f5a041fb93cf460cde7153f87fa02">mLinearFalloff</a>; </div>
+<div class="line"><a name="l00737"></a><span class="lineno"> 737</span>&#160;};</div>
+<div class="line"><a name="l00738"></a><span class="lineno"> 738</span>&#160;</div>
+<div class="line"><a name="l00743"></a><span class="lineno"><a class="line" href="_nv_flex_ext_8h.html#a1117ce527b6b483cc756ab5352f6dc3f"> 743</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="_nv_flex_ext_8h.html#a1117ce527b6b483cc756ab5352f6dc3f">NvFlexExtForceFieldCallback</a> <a class="code" href="_nv_flex_ext_8h.html#a1117ce527b6b483cc756ab5352f6dc3f">NvFlexExtForceFieldCallback</a>;</div>
+<div class="line"><a name="l00744"></a><span class="lineno"> 744</span>&#160;</div>
+<div class="line"><a name="l00752"></a><span class="lineno"> 752</span>&#160;NV_FLEX_API <a class="code" href="_nv_flex_ext_8h.html#a1117ce527b6b483cc756ab5352f6dc3f">NvFlexExtForceFieldCallback</a>* <a class="code" href="_nv_flex_ext_8h.html#ac1ed9ff49120d0691352399c8173bdcf">NvFlexExtCreateForceFieldCallback</a>(<a class="code" href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a>* solver);</div>
<div class="line"><a name="l00753"></a><span class="lineno"> 753</span>&#160;</div>
-<div class="line"><a name="l00761"></a><span class="lineno"> 761</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#aa36d43b9e53b9b66d43c2bc5eb5abf98">NvFlexExtSetForceFields</a>(<a class="code" href="_nv_flex_ext_8h.html#a1117ce527b6b483cc756ab5352f6dc3f">NvFlexExtForceFieldCallback</a>* callback, <span class="keyword">const</span> <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_force_field">NvFlexExtForceField</a>* forceFields, <span class="keywordtype">int</span> numForceFields);</div>
-<div class="line"><a name="l00762"></a><span class="lineno"> 762</span>&#160;</div>
-<div class="line"><a name="l00763"></a><span class="lineno"> 763</span>&#160;</div>
-<div class="line"><a name="l00764"></a><span class="lineno"> 764</span>&#160;</div>
-<div class="line"><a name="l00765"></a><span class="lineno"> 765</span>&#160;} <span class="comment">// extern &quot;C&quot;</span></div>
-<div class="line"><a name="l00766"></a><span class="lineno"> 766</span>&#160;</div>
-<div class="line"><a name="l00767"></a><span class="lineno"> 767</span>&#160;<span class="preprocessor">#endif // NV_FLEX_EXT_H</span></div>
-<div class="line"><a name="l00768"></a><span class="lineno"> 768</span>&#160;</div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a785f5a041fb93cf460cde7153f87fa02"><div class="ttname"><a href="_nv_flex_ext_8h.html#a785f5a041fb93cf460cde7153f87fa02">NvFlexExtForceField::mLinearFalloff</a></div><div class="ttdeci">bool mLinearFalloff</div><div class="ttdoc">Linear or no falloff. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:729</div></div>
-<div class="ttc" id="struct_nv_flex_vector_html_ade3c494ee6e75e54a6ba73d6bc100bd9"><div class="ttname"><a href="struct_nv_flex_vector.html#ade3c494ee6e75e54a6ba73d6bc100bd9">NvFlexVector::destroy</a></div><div class="ttdeci">void destroy()</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:85</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a4eceb2845977219379afdd06397a6706"><div class="ttname"><a href="_nv_flex_ext_8h.html#a4eceb2845977219379afdd06397a6706">NvFlexExtAsset::numParticles</a></div><div class="ttdeci">int numParticles</div><div class="ttdoc">Number of particles. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:314</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a24866c3fe2c482073325062c9c80d043"><div class="ttname"><a href="_nv_flex_ext_8h.html#a24866c3fe2c482073325062c9c80d043">NvFlexExtAsset::shapeCenters</a></div><div class="ttdeci">float * shapeCenters</div><div class="ttdoc">The position of the center of mass of each shape, an array of vec3s mNumShapes in length...</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:328</div></div>
+<div class="line"><a name="l00759"></a><span class="lineno"> 759</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#ad08da77f432ca56bc59647bf73da86cb">NvFlexExtDestroyForceFieldCallback</a>(<a class="code" href="_nv_flex_ext_8h.html#a1117ce527b6b483cc756ab5352f6dc3f">NvFlexExtForceFieldCallback</a>* callback);</div>
+<div class="line"><a name="l00760"></a><span class="lineno"> 760</span>&#160;</div>
+<div class="line"><a name="l00768"></a><span class="lineno"> 768</span>&#160;NV_FLEX_API <span class="keywordtype">void</span> <a class="code" href="_nv_flex_ext_8h.html#aa36d43b9e53b9b66d43c2bc5eb5abf98">NvFlexExtSetForceFields</a>(<a class="code" href="_nv_flex_ext_8h.html#a1117ce527b6b483cc756ab5352f6dc3f">NvFlexExtForceFieldCallback</a>* callback, <span class="keyword">const</span> <a class="code" href="_nv_flex_ext_8h.html#struct_nv_flex_ext_force_field">NvFlexExtForceField</a>* forceFields, <span class="keywordtype">int</span> numForceFields);</div>
+<div class="line"><a name="l00769"></a><span class="lineno"> 769</span>&#160;</div>
+<div class="line"><a name="l00770"></a><span class="lineno"> 770</span>&#160;</div>
+<div class="line"><a name="l00771"></a><span class="lineno"> 771</span>&#160;</div>
+<div class="line"><a name="l00772"></a><span class="lineno"> 772</span>&#160;} <span class="comment">// extern &quot;C&quot;</span></div>
+<div class="line"><a name="l00773"></a><span class="lineno"> 773</span>&#160;</div>
+<div class="line"><a name="l00774"></a><span class="lineno"> 774</span>&#160;<span class="preprocessor">#endif // NV_FLEX_EXT_H</span></div>
+<div class="line"><a name="l00775"></a><span class="lineno"> 775</span>&#160;</div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a785f5a041fb93cf460cde7153f87fa02"><div class="ttname"><a href="_nv_flex_ext_8h.html#a785f5a041fb93cf460cde7153f87fa02">NvFlexExtForceField::mLinearFalloff</a></div><div class="ttdeci">bool mLinearFalloff</div><div class="ttdoc">Linear or no falloff. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:736</div></div>
+<div class="ttc" id="struct_nv_flex_vector_html_ade3c494ee6e75e54a6ba73d6bc100bd9"><div class="ttname"><a href="struct_nv_flex_vector.html#ade3c494ee6e75e54a6ba73d6bc100bd9">NvFlexVector::destroy</a></div><div class="ttdeci">void destroy()</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:86</div></div>
+<div class="ttc" id="struct_nv_flex_vector_html_a24fa4e3807b492cd5fbdc6c1c235062b"><div class="ttname"><a href="struct_nv_flex_vector.html#a24fa4e3807b492cd5fbdc6c1c235062b">NvFlexVector::type</a></div><div class="ttdeci">NvFlexBufferType type</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:76</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a4eceb2845977219379afdd06397a6706"><div class="ttname"><a href="_nv_flex_ext_8h.html#a4eceb2845977219379afdd06397a6706">NvFlexExtAsset::numParticles</a></div><div class="ttdeci">int numParticles</div><div class="ttdoc">Number of particles. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:315</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a24866c3fe2c482073325062c9c80d043"><div class="ttname"><a href="_nv_flex_ext_8h.html#a24866c3fe2c482073325062c9c80d043">NvFlexExtAsset::shapeCenters</a></div><div class="ttdeci">float * shapeCenters</div><div class="ttdoc">The position of the center of mass of each shape, an array of vec3s mNumShapes in length...</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:329</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_aa36d43b9e53b9b66d43c2bc5eb5abf98"><div class="ttname"><a href="_nv_flex_ext_8h.html#aa36d43b9e53b9b66d43c2bc5eb5abf98">NvFlexExtSetForceFields</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtSetForceFields(NvFlexExtForceFieldCallback *callback, const NvFlexExtForceField *forceFields, int numForceFields)</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a4ffe9bcd59a6cfc8900ac136f5123304"><div class="ttname"><a href="_nv_flex_ext_8h.html#a4ffe9bcd59a6cfc8900ac136f5123304">NvFlexExtMovingFrameApply</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtMovingFrameApply(NvFlexExtMovingFrame *frame, float *positions, float *velocities, int numParticles, float linearScale, float angularScale, float dt)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a9f2c0daf521df4920e44cca1cb30b42c"><div class="ttname"><a href="_nv_flex_ext_8h.html#a9f2c0daf521df4920e44cca1cb30b42c">NvFlexExtCreateSoftFromMesh</a></div><div class="ttdeci">NV_FLEX_API NvFlexExtAsset * NvFlexExtCreateSoftFromMesh(const float *vertices, int numVertices, const int *indices, int numTriangleIndices, float particleSpacing, float volumeSampling, float surfaceSampling, float clusterSpacing, float clusterRadius, float clusterStiffness, float linkRadius, float linkStiffness, float globalStiffness)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a3d0a712689ce07a5652d48ea25fa05b9"><div class="ttname"><a href="_nv_flex_ext_8h.html#a3d0a712689ce07a5652d48ea25fa05b9">NvFlexExtInstance::shapeRotations</a></div><div class="ttdeci">float * shapeRotations</div><div class="ttdoc">Shape matching group rotations (quaternions) </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:355</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a4e845f47484e00a272ad351b4bf28e95"><div class="ttname"><a href="_nv_flex_ext_8h.html#a4e845f47484e00a272ad351b4bf28e95">NvFlexExtShapeData::n</a></div><div class="ttdeci">int n</div><div class="ttdoc">Number of valid tranforms. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:605</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a3d0a712689ce07a5652d48ea25fa05b9"><div class="ttname"><a href="_nv_flex_ext_8h.html#a3d0a712689ce07a5652d48ea25fa05b9">NvFlexExtInstance::shapeRotations</a></div><div class="ttdeci">float * shapeRotations</div><div class="ttdoc">Shape matching group rotations (quaternions) </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:360</div></div>
+<div class="ttc" id="struct_nv_flex_vector_html_ae5818b10d20083ee9ed0aa7826ea7ab8"><div class="ttname"><a href="struct_nv_flex_vector.html#ae5818b10d20083ee9ed0aa7826ea7ab8">NvFlexVector::NvFlexVector</a></div><div class="ttdeci">NvFlexVector(NvFlexLibrary *l, const T *ptr, int size, NvFlexBufferType type=eNvFlexBufferHost)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:58</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a4e845f47484e00a272ad351b4bf28e95"><div class="ttname"><a href="_nv_flex_ext_8h.html#a4e845f47484e00a272ad351b4bf28e95">NvFlexExtShapeData::n</a></div><div class="ttdeci">int n</div><div class="ttdoc">Number of valid tranforms. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:612</div></div>
<div class="ttc" id="struct_nv_flex_vector_html_ab08ce71766df91fc9201a61a48054d0c"><div class="ttname"><a href="struct_nv_flex_vector.html#ab08ce71766df91fc9201a61a48054d0c">NvFlexVector::lib</a></div><div class="ttdeci">NvFlexLibrary * lib</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:70</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a0ac3c8cc1bb87eaa50690f44e56a74da"><div class="ttname"><a href="_nv_flex_ext_8h.html#a0ac3c8cc1bb87eaa50690f44e56a74da">NvFlexExtAsset::particles</a></div><div class="ttdeci">float * particles</div><div class="ttdoc">Local space particle positions, x,y,z,1/mass. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:313</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a96b73b81c5db272d950efe3f03a8cef8"><div class="ttname"><a href="_nv_flex_ext_8h.html#a96b73b81c5db272d950efe3f03a8cef8">NvFlexExtAsset::shapeOffsets</a></div><div class="ttdeci">int * shapeOffsets</div><div class="ttdoc">Each entry stores the end of the shape&#39;s indices in the indices array (exclusive prefix sum of shape ...</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:326</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a8cf124de0fc370757cb890f83984ced8"><div class="ttname"><a href="_nv_flex_ext_8h.html#a8cf124de0fc370757cb890f83984ced8">NvFlexExtTearingMeshEdit::newParticleIndex</a></div><div class="ttdeci">int newParticleIndex</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:444</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a0ac3c8cc1bb87eaa50690f44e56a74da"><div class="ttname"><a href="_nv_flex_ext_8h.html#a0ac3c8cc1bb87eaa50690f44e56a74da">NvFlexExtAsset::particles</a></div><div class="ttdeci">float * particles</div><div class="ttdoc">Local space particle positions, x,y,z,1/mass. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:314</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a96b73b81c5db272d950efe3f03a8cef8"><div class="ttname"><a href="_nv_flex_ext_8h.html#a96b73b81c5db272d950efe3f03a8cef8">NvFlexExtAsset::shapeOffsets</a></div><div class="ttdeci">int * shapeOffsets</div><div class="ttdoc">Each entry stores the end of the shape&#39;s indices in the indices array (exclusive prefix sum of shape ...</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:327</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a8cf124de0fc370757cb890f83984ced8"><div class="ttname"><a href="_nv_flex_ext_8h.html#a8cf124de0fc370757cb890f83984ced8">NvFlexExtTearingMeshEdit::newParticleIndex</a></div><div class="ttdeci">int newParticleIndex</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:449</div></div>
<div class="ttc" id="_nv_flex_8h_html_a054cb27646a389ea257d1bbde46a6e97"><div class="ttname"><a href="_nv_flex_8h.html#a054cb27646a389ea257d1bbde46a6e97">NvFlexUnmap</a></div><div class="ttdeci">NV_FLEX_API void NvFlexUnmap(NvFlexBuffer *buffer)</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a2b5634f64bd0d8d86f894885a1c16a33"><div class="ttname"><a href="_nv_flex_ext_8h.html#a2b5634f64bd0d8d86f894885a1c16a33">NvFlexExtDestroyInstance</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtDestroyInstance(NvFlexExtContainer *container, const NvFlexExtInstance *instance)</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a780022c1b8425074ce08328e8e8c35cc"><div class="ttname"><a href="_nv_flex_ext_8h.html#a780022c1b8425074ce08328e8e8c35cc">NvFlexExtMovingFrameUpdate</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtMovingFrameUpdate(NvFlexExtMovingFrame *frame, const float *worldTranslation, const float *worldRotation, float dt)</div></div>
-<div class="ttc" id="struct_nv_flex_vector_html_a0309d584abbe900d3af3823a79e89ee7"><div class="ttname"><a href="struct_nv_flex_vector.html#a0309d584abbe900d3af3823a79e89ee7">NvFlexVector::init</a></div><div class="ttdeci">void init(int size)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:78</div></div>
+<div class="ttc" id="struct_nv_flex_vector_html_a0309d584abbe900d3af3823a79e89ee7"><div class="ttname"><a href="struct_nv_flex_vector.html#a0309d584abbe900d3af3823a79e89ee7">NvFlexVector::init</a></div><div class="ttdeci">void init(int size)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:79</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_ad0a9c7e2f907e46b60f6bacf402987ce"><div class="ttname"><a href="_nv_flex_ext_8h.html#ad0a9c7e2f907e46b60f6bacf402987ce">NvFlexExtCreateRigidFromMesh</a></div><div class="ttdeci">NV_FLEX_API NvFlexExtAsset * NvFlexExtCreateRigidFromMesh(const float *vertices, int numVertices, const int *indices, int numTriangleIndices, float radius, float expand)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a9020959583f85486e060a7b5e611476d"><div class="ttname"><a href="_nv_flex_ext_8h.html#a9020959583f85486e060a7b5e611476d">NvFlexExtAsset::springRestLengths</a></div><div class="ttdeci">float * springRestLengths</div><div class="ttdoc">Spring rest-lengths. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:320</div></div>
-<div class="ttc" id="struct_nv_flex_vector_html_a1933b633e9055d9adf8b62c4aa8a3bc0"><div class="ttname"><a href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0">NvFlexVector::size</a></div><div class="ttdeci">int size() const </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:161</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a9020959583f85486e060a7b5e611476d"><div class="ttname"><a href="_nv_flex_ext_8h.html#a9020959583f85486e060a7b5e611476d">NvFlexExtAsset::springRestLengths</a></div><div class="ttdeci">float * springRestLengths</div><div class="ttdoc">Spring rest-lengths. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:321</div></div>
+<div class="ttc" id="struct_nv_flex_vector_html_a1933b633e9055d9adf8b62c4aa8a3bc0"><div class="ttname"><a href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0">NvFlexVector::size</a></div><div class="ttdeci">int size() const </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:162</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_ab4caadf5a6b19674849bfce91d986e7b"><div class="ttname"><a href="_nv_flex_ext_8h.html#ab4caadf5a6b19674849bfce91d986e7b">NvFlexExtTickContainer</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtTickContainer(NvFlexExtContainer *container, float dt, int numSubsteps, bool enableTimers=false)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_struct_nv_flex_ext_particle_data"><div class="ttname"><a href="_nv_flex_ext_8h.html#struct_nv_flex_ext_particle_data">NvFlexExtParticleData</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:562</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_aca9a5ecc1fd26fedf90f8f17e87e3ca8"><div class="ttname"><a href="_nv_flex_ext_8h.html#aca9a5ecc1fd26fedf90f8f17e87e3ca8">NvFlexExtInstance::numParticles</a></div><div class="ttdeci">int numParticles</div><div class="ttdoc">Number of simulation particles. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:348</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_struct_nv_flex_ext_particle_data"><div class="ttname"><a href="_nv_flex_ext_8h.html#struct_nv_flex_ext_particle_data">NvFlexExtParticleData</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:569</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_aca9a5ecc1fd26fedf90f8f17e87e3ca8"><div class="ttname"><a href="_nv_flex_ext_8h.html#aca9a5ecc1fd26fedf90f8f17e87e3ca8">NvFlexExtInstance::numParticles</a></div><div class="ttdeci">int numParticles</div><div class="ttdoc">Number of simulation particles. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:353</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_af0cd639c21be28640fe5e1dd94931d59"><div class="ttname"><a href="_nv_flex_ext_8h.html#af0cd639c21be28640fe5e1dd94931d59">NvFlexExtUnmapParticleData</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtUnmapParticleData(NvFlexExtContainer *container)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_afaf84632a42346a718009bcda5efc8b4"><div class="ttname"><a href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a></div><div class="ttdeci">struct NvFlexExtContainer NvFlexExtContainer</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:365</div></div>
-<div class="ttc" id="struct_nv_flex_vector_html_a769d5ad0723a3fceac7951967e8b4d03"><div class="ttname"><a href="struct_nv_flex_vector.html#a769d5ad0723a3fceac7951967e8b4d03">NvFlexVector::operator[]</a></div><div class="ttdeci">T &amp; operator[](int index)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:127</div></div>
-<div class="ttc" id="struct_nv_flex_vector_html_a026d8fcd71bb256610401cc861345428"><div class="ttname"><a href="struct_nv_flex_vector.html#a026d8fcd71bb256610401cc861345428">NvFlexVector::NvFlexVector</a></div><div class="ttdeci">NvFlexVector(NvFlexLibrary *l, const T *ptr, int size)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:58</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a8000e722ce864bbfbce0f303f39186d7"><div class="ttname"><a href="_nv_flex_ext_8h.html#a8000e722ce864bbfbce0f303f39186d7">NvFlexExtInstance::userData</a></div><div class="ttdeci">void * userData</div><div class="ttdoc">User data pointer. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:359</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_afaf84632a42346a718009bcda5efc8b4"><div class="ttname"><a href="_nv_flex_ext_8h.html#afaf84632a42346a718009bcda5efc8b4">NvFlexExtContainer</a></div><div class="ttdeci">struct NvFlexExtContainer NvFlexExtContainer</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:370</div></div>
+<div class="ttc" id="struct_nv_flex_vector_html_a769d5ad0723a3fceac7951967e8b4d03"><div class="ttname"><a href="struct_nv_flex_vector.html#a769d5ad0723a3fceac7951967e8b4d03">NvFlexVector::operator[]</a></div><div class="ttdeci">T &amp; operator[](int index)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:128</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a8000e722ce864bbfbce0f303f39186d7"><div class="ttname"><a href="_nv_flex_ext_8h.html#a8000e722ce864bbfbce0f303f39186d7">NvFlexExtInstance::userData</a></div><div class="ttdeci">void * userData</div><div class="ttdoc">User data pointer. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:364</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a89ea7bbd26bec46f1b82d84257de1f58"><div class="ttname"><a href="_nv_flex_ext_8h.html#a89ea7bbd26bec46f1b82d84257de1f58">NvFlexExtPullFromDevice</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtPullFromDevice(NvFlexExtContainer *container)</div></div>
-<div class="ttc" id="struct_nv_flex_vector_html_a36a3fd5e42c5d8005f72bcc43217cf37"><div class="ttname"><a href="struct_nv_flex_vector.html#a36a3fd5e42c5d8005f72bcc43217cf37">NvFlexVector::resize</a></div><div class="ttdeci">void resize(int newCount, const T &amp;val)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:210</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_aeee311155e99ce95c506078964a7dc3c"><div class="ttname"><a href="_nv_flex_ext_8h.html#aeee311155e99ce95c506078964a7dc3c">NvFlexExtAsset::triangleIndices</a></div><div class="ttdeci">int * triangleIndices</div><div class="ttdoc">Indexed triangle mesh indices for clothing. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:332</div></div>
+<div class="ttc" id="struct_nv_flex_vector_html_a36a3fd5e42c5d8005f72bcc43217cf37"><div class="ttname"><a href="struct_nv_flex_vector.html#a36a3fd5e42c5d8005f72bcc43217cf37">NvFlexVector::resize</a></div><div class="ttdeci">void resize(int newCount, const T &amp;val)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:211</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_aeee311155e99ce95c506078964a7dc3c"><div class="ttname"><a href="_nv_flex_ext_8h.html#aeee311155e99ce95c506078964a7dc3c">NvFlexExtAsset::triangleIndices</a></div><div class="ttdeci">int * triangleIndices</div><div class="ttdoc">Indexed triangle mesh indices for clothing. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:337</div></div>
<div class="ttc" id="struct_nv_flex_vector_html_ac28b5fd10fd519265c66cf4a0ce8e6ae"><div class="ttname"><a href="struct_nv_flex_vector.html#ac28b5fd10fd519265c66cf4a0ce8e6ae">NvFlexVector::capacity</a></div><div class="ttdeci">int capacity</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:75</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a1a0c7a0c03148b1586c4fb48f14a565f"><div class="ttname"><a href="_nv_flex_ext_8h.html#a1a0c7a0c03148b1586c4fb48f14a565f">NvFlexExtInstance::particleIndices</a></div><div class="ttdeci">int * particleIndices</div><div class="ttdoc">Simulation particle indices. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:347</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a7ad225a762dcf91b7155c7229dd08d38"><div class="ttname"><a href="_nv_flex_ext_8h.html#a7ad225a762dcf91b7155c7229dd08d38">NvFlexExtForceField::mRadius</a></div><div class="ttdeci">float mRadius</div><div class="ttdoc">Radius of the force field. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:726</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_ad858d4df98a4300668f2b8048881c0d5"><div class="ttname"><a href="_nv_flex_ext_8h.html#ad858d4df98a4300668f2b8048881c0d5">NvFlexExtAsset::numTriangles</a></div><div class="ttdeci">int numTriangles</div><div class="ttdoc">Number of triangles. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:333</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a1a0c7a0c03148b1586c4fb48f14a565f"><div class="ttname"><a href="_nv_flex_ext_8h.html#a1a0c7a0c03148b1586c4fb48f14a565f">NvFlexExtInstance::particleIndices</a></div><div class="ttdeci">int * particleIndices</div><div class="ttdoc">Simulation particle indices. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:352</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a7ad225a762dcf91b7155c7229dd08d38"><div class="ttname"><a href="_nv_flex_ext_8h.html#a7ad225a762dcf91b7155c7229dd08d38">NvFlexExtForceField::mRadius</a></div><div class="ttdeci">float mRadius</div><div class="ttdoc">Radius of the force field. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:733</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_ad858d4df98a4300668f2b8048881c0d5"><div class="ttname"><a href="_nv_flex_ext_8h.html#ad858d4df98a4300668f2b8048881c0d5">NvFlexExtAsset::numTriangles</a></div><div class="ttdeci">int numTriangles</div><div class="ttdoc">Number of triangles. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:338</div></div>
<div class="ttc" id="_nv_flex_8h_html_a6541b33eaca7b2323e73b30cea34d16ca11adf517d180983daec217e761acc3d6"><div class="ttname"><a href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16ca11adf517d180983daec217e761acc3d6">eNvFlexMapWait</a></div><div class="ttdoc">Calling thread will be blocked until buffer is ready for access, default. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:69</div></div>
<div class="ttc" id="_nv_flex_8h_html_afaeb57f4ee7e54b1ae1b912a465ed39e"><div class="ttname"><a href="_nv_flex_8h.html#afaeb57f4ee7e54b1ae1b912a465ed39e">NvFlexSolver</a></div><div class="ttdeci">struct NvFlexSolver NvFlexSolver</div><div class="ttdef"><b>Definition:</b> NvFlex.h:57</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a8bef033b2a8567dfcc954e22534147ee"><div class="ttname"><a href="_nv_flex_ext_8h.html#a8bef033b2a8567dfcc954e22534147ee">NvFlexExtCreateClothFromMesh</a></div><div class="ttdeci">NV_FLEX_API NvFlexExtAsset * NvFlexExtCreateClothFromMesh(const float *particles, int numParticles, const int *indices, int numTriangles, float stretchStiffness, float bendStiffness, float tetherStiffness, float tetherGive, float pressure)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_struct_nv_flex_ext_force_field"><div class="ttname"><a href="_nv_flex_ext_8h.html#struct_nv_flex_ext_force_field">NvFlexExtForceField</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:723</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a4810f46c27fd0cfacfb1f4be9dff0479"><div class="ttname"><a href="_nv_flex_ext_8h.html#a4810f46c27fd0cfacfb1f4be9dff0479">NvFlexExtAsset::numShapeIndices</a></div><div class="ttdeci">int numShapeIndices</div><div class="ttdoc">Total number of indices for shape constraints. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:325</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_struct_nv_flex_ext_force_field"><div class="ttname"><a href="_nv_flex_ext_8h.html#struct_nv_flex_ext_force_field">NvFlexExtForceField</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:730</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a4810f46c27fd0cfacfb1f4be9dff0479"><div class="ttname"><a href="_nv_flex_ext_8h.html#a4810f46c27fd0cfacfb1f4be9dff0479">NvFlexExtAsset::numShapeIndices</a></div><div class="ttdeci">int numShapeIndices</div><div class="ttdoc">Total number of indices for shape constraints. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:326</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a88054283907d3386f1a30cdc4475acb0"><div class="ttname"><a href="_nv_flex_ext_8h.html#a88054283907d3386f1a30cdc4475acb0">NvFlexExtDestroyTearingCloth</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtDestroyTearingCloth(NvFlexExtAsset *asset)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a6517fee9c5e151673ecd5ad91cbf2ae2"><div class="ttname"><a href="_nv_flex_ext_8h.html#a6517fee9c5e151673ecd5ad91cbf2ae2">NvFlexExtShapeData::rotations</a></div><div class="ttdeci">float * rotations</div><div class="ttdoc">Receives a pointer to the array quaternion rotation data in [x, y z, w] format. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:603</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a6517fee9c5e151673ecd5ad91cbf2ae2"><div class="ttname"><a href="_nv_flex_ext_8h.html#a6517fee9c5e151673ecd5ad91cbf2ae2">NvFlexExtShapeData::rotations</a></div><div class="ttdeci">float * rotations</div><div class="ttdoc">Receives a pointer to the array quaternion rotation data in [x, y z, w] format. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:610</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a7fc268a27306f6fc68dd1c106cfa62db"><div class="ttname"><a href="_nv_flex_ext_8h.html#a7fc268a27306f6fc68dd1c106cfa62db">NvFlexExtGetActiveList</a></div><div class="ttdeci">NV_FLEX_API int NvFlexExtGetActiveList(NvFlexExtContainer *container, int *indices)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_aa67489d3beb86e2b566e0fa2e978ed11"><div class="ttname"><a href="_nv_flex_ext_8h.html#aa67489d3beb86e2b566e0fa2e978ed11">NvFlexExtInstance::shapeIndex</a></div><div class="ttdeci">int shapeIndex</div><div class="ttdoc">Index in the container&#39;s shape body constraints array. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:351</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_aa67489d3beb86e2b566e0fa2e978ed11"><div class="ttname"><a href="_nv_flex_ext_8h.html#aa67489d3beb86e2b566e0fa2e978ed11">NvFlexExtInstance::shapeIndex</a></div><div class="ttdeci">int shapeIndex</div><div class="ttdoc">Index in the container&#39;s shape body constraints array. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:356</div></div>
<div class="ttc" id="struct_nv_flex_vector_html"><div class="ttname"><a href="struct_nv_flex_vector.html">NvFlexVector</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:45</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_ad08da77f432ca56bc59647bf73da86cb"><div class="ttname"><a href="_nv_flex_ext_8h.html#ad08da77f432ca56bc59647bf73da86cb">NvFlexExtDestroyForceFieldCallback</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtDestroyForceFieldCallback(NvFlexExtForceFieldCallback *callback)</div></div>
<div class="ttc" id="_nv_flex_8h_html_a0898bb9210440b159688d4647f6eb083"><div class="ttname"><a href="_nv_flex_8h.html#a0898bb9210440b159688d4647f6eb083">NvFlexMap</a></div><div class="ttdeci">NV_FLEX_API void * NvFlexMap(NvFlexBuffer *buffer, int flags)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a8b7a9bd9cbd2f33c6b3da02687a6bd9d"><div class="ttname"><a href="_nv_flex_ext_8h.html#a8b7a9bd9cbd2f33c6b3da02687a6bd9d">NvFlexExtAsset::springIndices</a></div><div class="ttdeci">int * springIndices</div><div class="ttdoc">Spring indices. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:318</div></div>
-<div class="ttc" id="struct_nv_flex_vector_html_ae0e6ce694fb95a50c2974c6c2cc0ffc8"><div class="ttname"><a href="struct_nv_flex_vector.html#ae0e6ce694fb95a50c2974c6c2cc0ffc8">NvFlexVector::reserve</a></div><div class="ttdeci">void reserve(int minCapacity)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:173</div></div>
+<div class="ttc" id="struct_nv_flex_vector_html_a51edbab41cc249bc117c7ce17651007c"><div class="ttname"><a href="struct_nv_flex_vector.html#a51edbab41cc249bc117c7ce17651007c">NvFlexVector::NvFlexVector</a></div><div class="ttdeci">NvFlexVector(NvFlexLibrary *l, int size=0, NvFlexBufferType type=eNvFlexBufferHost)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:47</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a8b7a9bd9cbd2f33c6b3da02687a6bd9d"><div class="ttname"><a href="_nv_flex_ext_8h.html#a8b7a9bd9cbd2f33c6b3da02687a6bd9d">NvFlexExtAsset::springIndices</a></div><div class="ttdeci">int * springIndices</div><div class="ttdoc">Spring indices. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:319</div></div>
+<div class="ttc" id="struct_nv_flex_vector_html_ae0e6ce694fb95a50c2974c6c2cc0ffc8"><div class="ttname"><a href="struct_nv_flex_vector.html#ae0e6ce694fb95a50c2974c6c2cc0ffc8">NvFlexVector::reserve</a></div><div class="ttdeci">void reserve(int minCapacity)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:174</div></div>
<div class="ttc" id="struct_nv_flex_vector_html_afb9c0f47544c0cdebe21efb6908dd3a0"><div class="ttname"><a href="struct_nv_flex_vector.html#afb9c0f47544c0cdebe21efb6908dd3a0">NvFlexVector::~NvFlexVector</a></div><div class="ttdeci">~NvFlexVector()</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:65</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_ab421c4d72574f468af6827c18c36a387"><div class="ttname"><a href="_nv_flex_ext_8h.html#ab421c4d72574f468af6827c18c36a387">NvFlexExtAsset::maxParticles</a></div><div class="ttdeci">int maxParticles</div><div class="ttdoc">Maximum number of particles, allows extra space for tearable assets which duplicate particles...</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:315</div></div>
-<div class="ttc" id="struct_nv_flex_vector_html_a98584303358b70fd12ead231cd750335"><div class="ttname"><a href="struct_nv_flex_vector.html#a98584303358b70fd12ead231cd750335">NvFlexVector::push_back</a></div><div class="ttdeci">void push_back(const T &amp;t)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:135</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_ab421c4d72574f468af6827c18c36a387"><div class="ttname"><a href="_nv_flex_ext_8h.html#ab421c4d72574f468af6827c18c36a387">NvFlexExtAsset::maxParticles</a></div><div class="ttdeci">int maxParticles</div><div class="ttdoc">Maximum number of particles, allows extra space for tearable assets which duplicate particles...</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:316</div></div>
+<div class="ttc" id="struct_nv_flex_vector_html_a98584303358b70fd12ead231cd750335"><div class="ttname"><a href="struct_nv_flex_vector.html#a98584303358b70fd12ead231cd750335">NvFlexVector::push_back</a></div><div class="ttdeci">void push_back(const T &amp;t)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:136</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a2509137d9fb8ab6818f35ab7761da7a5"><div class="ttname"><a href="_nv_flex_ext_8h.html#a2509137d9fb8ab6818f35ab7761da7a5">NvFlexExtDestroyContainer</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtDestroyContainer(NvFlexExtContainer *container)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_aab0ea63bac05cd6aee5054d369687fb0"><div class="ttname"><a href="_nv_flex_ext_8h.html#aab0ea63bac05cd6aee5054d369687fb0">NvFlexExtMovingFrame::tau</a></div><div class="ttdeci">float tau[3]</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:239</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a95fbd8d303fe90992b95b63a29eb5344"><div class="ttname"><a href="_nv_flex_ext_8h.html#a95fbd8d303fe90992b95b63a29eb5344">NvFlexExtMovingFrame::omega</a></div><div class="ttdeci">float omega[3]</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:236</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_aab0ea63bac05cd6aee5054d369687fb0"><div class="ttname"><a href="_nv_flex_ext_8h.html#aab0ea63bac05cd6aee5054d369687fb0">NvFlexExtMovingFrame::tau</a></div><div class="ttdeci">float tau[3]</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:240</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a95fbd8d303fe90992b95b63a29eb5344"><div class="ttname"><a href="_nv_flex_ext_8h.html#a95fbd8d303fe90992b95b63a29eb5344">NvFlexExtMovingFrame::omega</a></div><div class="ttdeci">float omega[3]</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:237</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a6e3f12e9e92abb31b115cf31b33e34bb"><div class="ttname"><a href="_nv_flex_ext_8h.html#a6e3f12e9e92abb31b115cf31b33e34bb">NvFlexExtCreateSoftMeshSkinning</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtCreateSoftMeshSkinning(const float *vertices, int numVertices, const float *bones, int numBones, float falloff, float maxDistance, float *skinningWeights, int *skinningIndices)</div></div>
-<div class="ttc" id="struct_nv_flex_vector_html_a73f78b1efc76c96666a96a79064670c5"><div class="ttname"><a href="struct_nv_flex_vector.html#a73f78b1efc76c96666a96a79064670c5">NvFlexVector::empty</a></div><div class="ttdeci">bool empty() const </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:163</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_struct_nv_flex_ext_tearing_mesh_edit"><div class="ttname"><a href="_nv_flex_ext_8h.html#struct_nv_flex_ext_tearing_mesh_edit">NvFlexExtTearingMeshEdit</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:441</div></div>
+<div class="ttc" id="struct_nv_flex_vector_html_a73f78b1efc76c96666a96a79064670c5"><div class="ttname"><a href="struct_nv_flex_vector.html#a73f78b1efc76c96666a96a79064670c5">NvFlexVector::empty</a></div><div class="ttdeci">bool empty() const </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:164</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_struct_nv_flex_ext_tearing_mesh_edit"><div class="ttname"><a href="_nv_flex_ext_8h.html#struct_nv_flex_ext_tearing_mesh_edit">NvFlexExtTearingMeshEdit</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:446</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a49906c9e3466d40383cddf627fe26658"><div class="ttname"><a href="_nv_flex_ext_8h.html#a49906c9e3466d40383cddf627fe26658">NvFlexExtCreateContainer</a></div><div class="ttdeci">NV_FLEX_API NvFlexExtContainer * NvFlexExtCreateContainer(NvFlexLibrary *lib, NvFlexSolver *solver, int maxParticles)</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a3bf10e2c9370602142b7be01e920f973"><div class="ttname"><a href="_nv_flex_ext_8h.html#a3bf10e2c9370602142b7be01e920f973">NvFlexExtCreateInstance</a></div><div class="ttdeci">NV_FLEX_API NvFlexExtInstance * NvFlexExtCreateInstance(NvFlexExtContainer *container, NvFlexExtParticleData *particleData, const NvFlexExtAsset *asset, const float *transform, float vx, float vy, float vz, int phase, float invMassScale)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_ad1af111e19f7ca92fd913c25c4d9288b"><div class="ttname"><a href="_nv_flex_ext_8h.html#ad1af111e19f7ca92fd913c25c4d9288b">NvFlexExtMovingFrame::rotation</a></div><div class="ttdeci">float rotation[4]</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:233</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a3fc55581814cbab90a0c4167428893df"><div class="ttname"><a href="_nv_flex_ext_8h.html#a3fc55581814cbab90a0c4167428893df">NvFlexExtAsset::inflatableVolume</a></div><div class="ttdeci">float inflatableVolume</div><div class="ttdoc">The rest volume for the inflatable constraint. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:337</div></div>
-<div class="ttc" id="_nv_flex_8h_html_a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8"><div class="ttname"><a href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8">eNvFlexBufferHost</a></div><div class="ttdoc">Host mappable buffer, pinned memory on CUDA, staging buffer on DX. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:79</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_ad1af111e19f7ca92fd913c25c4d9288b"><div class="ttname"><a href="_nv_flex_ext_8h.html#ad1af111e19f7ca92fd913c25c4d9288b">NvFlexExtMovingFrame::rotation</a></div><div class="ttdeci">float rotation[4]</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:234</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a3fc55581814cbab90a0c4167428893df"><div class="ttname"><a href="_nv_flex_ext_8h.html#a3fc55581814cbab90a0c4167428893df">NvFlexExtAsset::inflatableVolume</a></div><div class="ttdeci">float inflatableVolume</div><div class="ttdoc">The rest volume for the inflatable constraint. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:342</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8"><div class="ttname"><a href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8">eNvFlexBufferHost</a></div><div class="ttdoc">A host mappable buffer, pinned memory on CUDA, staging buffer on DX. </div><div class="ttdef"><b>Definition:</b> NvFlex.h:78</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_ab51f04114586b5bf0f6fc5816fda9c69"><div class="ttname"><a href="_nv_flex_ext_8h.html#ab51f04114586b5bf0f6fc5816fda9c69">NvFlexExtUnmapShapeData</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtUnmapShapeData(NvFlexExtContainer *container)</div></div>
<div class="ttc" id="_nv_flex_8h_html_a50a3933d3f7b77d0500c702b1fa9ba9a"><div class="ttname"><a href="_nv_flex_8h.html#a50a3933d3f7b77d0500c702b1fa9ba9a">NvFlexBuffer</a></div><div class="ttdeci">struct NvFlexBuffer NvFlexBuffer</div><div class="ttdef"><b>Definition:</b> NvFlex.h:62</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a90f2d3ba5be20e70e7efead911ee7acc"><div class="ttname"><a href="_nv_flex_ext_8h.html#a90f2d3ba5be20e70e7efead911ee7acc">NvFlexExtMapShapeData</a></div><div class="ttdeci">NV_FLEX_API NvFlexExtShapeData NvFlexExtMapShapeData(NvFlexExtContainer *container)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a502acd5c1db4ba6eef61eba25f26d68ea92265f22fc2a724baf640fdace8f8ea0"><div class="ttname"><a href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea92265f22fc2a724baf640fdace8f8ea0">eNvFlexExtModeImpulse</a></div><div class="ttdoc">Apply field value as an impulse. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:714</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a780c0bac62cc5dd8d04da11cff07eeba"><div class="ttname"><a href="_nv_flex_ext_8h.html#a780c0bac62cc5dd8d04da11cff07eeba">NvFlexExtParticleData::particles</a></div><div class="ttdeci">float * particles</div><div class="ttdoc">Receives a pointer to the particle position / mass data. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:564</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a1e8252d5e5f66b3d8920c1371f23cc05"><div class="ttname"><a href="_nv_flex_ext_8h.html#a1e8252d5e5f66b3d8920c1371f23cc05">NvFlexExtAsset::springCoefficients</a></div><div class="ttdeci">float * springCoefficients</div><div class="ttdoc">Spring coefficients. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:319</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a69962fe23c7fef594fb5f36a175ff148"><div class="ttname"><a href="_nv_flex_ext_8h.html#a69962fe23c7fef594fb5f36a175ff148">NvFlexExtParticleData::restParticles</a></div><div class="ttdeci">float * restParticles</div><div class="ttdoc">Receives a pointer to the particle&#39;s rest position (used for self collision culling) ...</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:565</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_acd73f347463a114da73bb1ab5eff00b4"><div class="ttname"><a href="_nv_flex_ext_8h.html#acd73f347463a114da73bb1ab5eff00b4">NvFlexExtShapeData::positions</a></div><div class="ttdeci">float * positions</div><div class="ttdoc">Receives a pointer to an array of shape body translations in [x, y, z] format. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:604</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_struct_nv_flex_ext_moving_frame"><div class="ttname"><a href="_nv_flex_ext_8h.html#struct_nv_flex_ext_moving_frame">NvFlexExtMovingFrame</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:230</div></div>
-<div class="ttc" id="struct_nv_flex_vector_html_a3871fbd5422c9b3f41bd5dc2046e1aa7"><div class="ttname"><a href="struct_nv_flex_vector.html#a3871fbd5422c9b3f41bd5dc2046e1aa7">NvFlexVector::operator[]</a></div><div class="ttdeci">const T &amp; operator[](int index) const </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:119</div></div>
-<div class="ttc" id="struct_nv_flex_vector_html_afca9914468beb61f6c98bc052e2af5e0"><div class="ttname"><a href="struct_nv_flex_vector.html#afca9914468beb61f6c98bc052e2af5e0">NvFlexVector::unmap</a></div><div class="ttdeci">void unmap()</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:108</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_struct_nv_flex_ext_instance"><div class="ttname"><a href="_nv_flex_ext_8h.html#struct_nv_flex_ext_instance">NvFlexExtInstance</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:345</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a502acd5c1db4ba6eef61eba25f26d68ea92265f22fc2a724baf640fdace8f8ea0"><div class="ttname"><a href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea92265f22fc2a724baf640fdace8f8ea0">eNvFlexExtModeImpulse</a></div><div class="ttdoc">Apply field value as an impulse. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:721</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a780c0bac62cc5dd8d04da11cff07eeba"><div class="ttname"><a href="_nv_flex_ext_8h.html#a780c0bac62cc5dd8d04da11cff07eeba">NvFlexExtParticleData::particles</a></div><div class="ttdeci">float * particles</div><div class="ttdoc">Receives a pointer to the particle position / mass data. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:571</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a1e8252d5e5f66b3d8920c1371f23cc05"><div class="ttname"><a href="_nv_flex_ext_8h.html#a1e8252d5e5f66b3d8920c1371f23cc05">NvFlexExtAsset::springCoefficients</a></div><div class="ttdeci">float * springCoefficients</div><div class="ttdoc">Spring coefficients. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:320</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a3a9ce6bba709625f6c338bd3070bd012"><div class="ttname"><a href="_nv_flex_ext_8h.html#a3a9ce6bba709625f6c338bd3070bd012">NvFlexExtCreateSoftFromMesh</a></div><div class="ttdeci">NV_FLEX_API NvFlexExtAsset * NvFlexExtCreateSoftFromMesh(const float *vertices, int numVertices, const int *indices, int numTriangleIndices, float particleSpacing, float volumeSampling, float surfaceSampling, float clusterSpacing, float clusterRadius, float clusterStiffness, float linkRadius, float linkStiffness, float globalStiffness, float clusterPlasticThreshold, float clusterPlasticCreep)</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a69962fe23c7fef594fb5f36a175ff148"><div class="ttname"><a href="_nv_flex_ext_8h.html#a69962fe23c7fef594fb5f36a175ff148">NvFlexExtParticleData::restParticles</a></div><div class="ttdeci">float * restParticles</div><div class="ttdoc">Receives a pointer to the particle&#39;s rest position (used for self collision culling) ...</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:572</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_acd73f347463a114da73bb1ab5eff00b4"><div class="ttname"><a href="_nv_flex_ext_8h.html#acd73f347463a114da73bb1ab5eff00b4">NvFlexExtShapeData::positions</a></div><div class="ttdeci">float * positions</div><div class="ttdoc">Receives a pointer to an array of shape body translations in [x, y, z] format. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:611</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_struct_nv_flex_ext_moving_frame"><div class="ttname"><a href="_nv_flex_ext_8h.html#struct_nv_flex_ext_moving_frame">NvFlexExtMovingFrame</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:231</div></div>
+<div class="ttc" id="struct_nv_flex_vector_html_a3871fbd5422c9b3f41bd5dc2046e1aa7"><div class="ttname"><a href="struct_nv_flex_vector.html#a3871fbd5422c9b3f41bd5dc2046e1aa7">NvFlexVector::operator[]</a></div><div class="ttdeci">const T &amp; operator[](int index) const </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:120</div></div>
+<div class="ttc" id="struct_nv_flex_vector_html_afca9914468beb61f6c98bc052e2af5e0"><div class="ttname"><a href="struct_nv_flex_vector.html#afca9914468beb61f6c98bc052e2af5e0">NvFlexVector::unmap</a></div><div class="ttdeci">void unmap()</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:109</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_struct_nv_flex_ext_instance"><div class="ttname"><a href="_nv_flex_ext_8h.html#struct_nv_flex_ext_instance">NvFlexExtInstance</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:350</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a4695d37db8b61495f200bfd88a2be628"><div class="ttname"><a href="_nv_flex_ext_8h.html#a4695d37db8b61495f200bfd88a2be628">NvFlexExtUpdateInstances</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtUpdateInstances(NvFlexExtContainer *container)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a9e6134ffeca22636dcd467fa4dee1ba0"><div class="ttname"><a href="_nv_flex_ext_8h.html#a9e6134ffeca22636dcd467fa4dee1ba0">NvFlexExtForceField::mPosition</a></div><div class="ttdeci">float mPosition[3]</div><div class="ttdoc">Center of force field. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:725</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a806a707d6b32c41ab561a4893f43ddde"><div class="ttname"><a href="_nv_flex_ext_8h.html#a806a707d6b32c41ab561a4893f43ddde">NvFlexExtTriangleData::indices</a></div><div class="ttdeci">int * indices</div><div class="ttdoc">Receives a pointer to the array of triangle index data. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:585</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a56bf3b1fe603c79b871ead2efb65cc78"><div class="ttname"><a href="_nv_flex_ext_8h.html#a56bf3b1fe603c79b871ead2efb65cc78">NvFlexExtTriangleData::normals</a></div><div class="ttdeci">float * normals</div><div class="ttdoc">Receives a pointer to an array of triangle normal data stored with 16 byte stride, i.e.: [nx, ny, nz]. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:586</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a9e6134ffeca22636dcd467fa4dee1ba0"><div class="ttname"><a href="_nv_flex_ext_8h.html#a9e6134ffeca22636dcd467fa4dee1ba0">NvFlexExtForceField::mPosition</a></div><div class="ttdeci">float mPosition[3]</div><div class="ttdoc">Center of force field. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:732</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a806a707d6b32c41ab561a4893f43ddde"><div class="ttname"><a href="_nv_flex_ext_8h.html#a806a707d6b32c41ab561a4893f43ddde">NvFlexExtTriangleData::indices</a></div><div class="ttdeci">int * indices</div><div class="ttdoc">Receives a pointer to the array of triangle index data. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:592</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a56bf3b1fe603c79b871ead2efb65cc78"><div class="ttname"><a href="_nv_flex_ext_8h.html#a56bf3b1fe603c79b871ead2efb65cc78">NvFlexExtTriangleData::normals</a></div><div class="ttdeci">float * normals</div><div class="ttdoc">Receives a pointer to an array of triangle normal data stored with 16 byte stride, i.e.: [nx, ny, nz]. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:593</div></div>
<div class="ttc" id="_nv_flex_8h_html"><div class="ttname"><a href="_nv_flex_8h.html">NvFlex.h</a></div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a5efc0113d5432eb959437e6e3a98cc5f"><div class="ttname"><a href="_nv_flex_ext_8h.html#a5efc0113d5432eb959437e6e3a98cc5f">NvFlexExtTearClothMesh</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtTearClothMesh(NvFlexExtAsset *asset, float maxStrain, int maxSplits, NvFlexExtTearingParticleClone *particleCopies, int *numParticleCopies, int maxCopies, NvFlexExtTearingMeshEdit *triangleEdits, int *numTriangleEdits, int maxEdits)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a0705c9d2b5960057b37f097083d96f33"><div class="ttname"><a href="_nv_flex_ext_8h.html#a0705c9d2b5960057b37f097083d96f33">NvFlexExtMovingFrame::acceleration</a></div><div class="ttdeci">float acceleration[3]</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:238</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a502acd5c1db4ba6eef61eba25f26d68ea9d4e8413b628837f9d1982897fd1f4a2"><div class="ttname"><a href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea9d4e8413b628837f9d1982897fd1f4a2">eNvFlexExtModeForce</a></div><div class="ttdoc">Apply field value as a force. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:711</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_ad4d5551b97bd31b9e1ca5c57f2c82452"><div class="ttname"><a href="_nv_flex_ext_8h.html#ad4d5551b97bd31b9e1ca5c57f2c82452">NvFlexExtAsset::inflatableStiffness</a></div><div class="ttdeci">float inflatableStiffness</div><div class="ttdoc">How stiff the inflatable is. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:339</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a0705c9d2b5960057b37f097083d96f33"><div class="ttname"><a href="_nv_flex_ext_8h.html#a0705c9d2b5960057b37f097083d96f33">NvFlexExtMovingFrame::acceleration</a></div><div class="ttdeci">float acceleration[3]</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:239</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a502acd5c1db4ba6eef61eba25f26d68ea9d4e8413b628837f9d1982897fd1f4a2"><div class="ttname"><a href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea9d4e8413b628837f9d1982897fd1f4a2">eNvFlexExtModeForce</a></div><div class="ttdoc">Apply field value as a force. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:718</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_ad4d5551b97bd31b9e1ca5c57f2c82452"><div class="ttname"><a href="_nv_flex_ext_8h.html#ad4d5551b97bd31b9e1ca5c57f2c82452">NvFlexExtAsset::inflatableStiffness</a></div><div class="ttdeci">float inflatableStiffness</div><div class="ttdoc">How stiff the inflatable is. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:344</div></div>
<div class="ttc" id="_nv_flex_8h_html_a3078976e98f370a9fbdb11db80f1f318"><div class="ttname"><a href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a></div><div class="ttdeci">struct NvFlexLibrary NvFlexLibrary</div><div class="ttdef"><b>Definition:</b> NvFlex.h:52</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a46b80c02097ebc40bf777708e8f17ed4"><div class="ttname"><a href="_nv_flex_ext_8h.html#a46b80c02097ebc40bf777708e8f17ed4">NvFlexExtTearingMeshEdit::triIndex</a></div><div class="ttdeci">int triIndex</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:443</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_afcacbd584e2041855af50eae3f287779"><div class="ttname"><a href="_nv_flex_ext_8h.html#afcacbd584e2041855af50eae3f287779">NvFlexExtParticleData::normals</a></div><div class="ttdeci">float * normals</div><div class="ttdoc">Receives a pointer to the particle normal data with 16 byte stride in format [nx, ny...</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:568</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a46b80c02097ebc40bf777708e8f17ed4"><div class="ttname"><a href="_nv_flex_ext_8h.html#a46b80c02097ebc40bf777708e8f17ed4">NvFlexExtTearingMeshEdit::triIndex</a></div><div class="ttdeci">int triIndex</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:448</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_afcacbd584e2041855af50eae3f287779"><div class="ttname"><a href="_nv_flex_ext_8h.html#afcacbd584e2041855af50eae3f287779">NvFlexExtParticleData::normals</a></div><div class="ttdeci">float * normals</div><div class="ttdoc">Receives a pointer to the particle normal data with 16 byte stride in format [nx, ny...</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:575</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a1646bf409084777cd0ff5d4fcccf07de"><div class="ttname"><a href="_nv_flex_ext_8h.html#a1646bf409084777cd0ff5d4fcccf07de">NvFlexExtMapTriangleData</a></div><div class="ttdeci">NV_FLEX_API NvFlexExtTriangleData NvFlexExtMapTriangleData(NvFlexExtContainer *container)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a9034efff0f1b158a12a9ed6991d620fa"><div class="ttname"><a href="_nv_flex_ext_8h.html#a9034efff0f1b158a12a9ed6991d620fa">NvFlexExtTearingParticleClone::destIndex</a></div><div class="ttdeci">int destIndex</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:431</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a0b9729f9896faba45c861a1e8d15290b"><div class="ttname"><a href="_nv_flex_ext_8h.html#a0b9729f9896faba45c861a1e8d15290b">NvFlexExtForceField::mStrength</a></div><div class="ttdeci">float mStrength</div><div class="ttdoc">Strength of the force field. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:727</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a7d35ea2def3a05a5f85a5cdfd5abdc56"><div class="ttname"><a href="_nv_flex_ext_8h.html#a7d35ea2def3a05a5f85a5cdfd5abdc56">NvFlexExtMovingFrame::position</a></div><div class="ttdeci">float position[3]</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:232</div></div>
-<div class="ttc" id="struct_nv_flex_vector_html_a6c4a1f4acb4d6275c9e1ac01d4e35ab1"><div class="ttname"><a href="struct_nv_flex_vector.html#a6c4a1f4acb4d6275c9e1ac01d4e35ab1">NvFlexVector::resize</a></div><div class="ttdeci">void resize(int newCount)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:200</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_struct_nv_flex_ext_asset"><div class="ttname"><a href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:310</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a9034efff0f1b158a12a9ed6991d620fa"><div class="ttname"><a href="_nv_flex_ext_8h.html#a9034efff0f1b158a12a9ed6991d620fa">NvFlexExtTearingParticleClone::destIndex</a></div><div class="ttdeci">int destIndex</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:436</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a0b9729f9896faba45c861a1e8d15290b"><div class="ttname"><a href="_nv_flex_ext_8h.html#a0b9729f9896faba45c861a1e8d15290b">NvFlexExtForceField::mStrength</a></div><div class="ttdeci">float mStrength</div><div class="ttdoc">Strength of the force field. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:734</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a7d35ea2def3a05a5f85a5cdfd5abdc56"><div class="ttname"><a href="_nv_flex_ext_8h.html#a7d35ea2def3a05a5f85a5cdfd5abdc56">NvFlexExtMovingFrame::position</a></div><div class="ttdeci">float position[3]</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:233</div></div>
+<div class="ttc" id="struct_nv_flex_vector_html_a6c4a1f4acb4d6275c9e1ac01d4e35ab1"><div class="ttname"><a href="struct_nv_flex_vector.html#a6c4a1f4acb4d6275c9e1ac01d4e35ab1">NvFlexVector::resize</a></div><div class="ttdeci">void resize(int newCount)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:201</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_struct_nv_flex_ext_asset"><div class="ttname"><a href="_nv_flex_ext_8h.html#struct_nv_flex_ext_asset">NvFlexExtAsset</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:311</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a425f4e472bb83797498c904ab228209c"><div class="ttname"><a href="_nv_flex_ext_8h.html#a425f4e472bb83797498c904ab228209c">NvFlexExtPushToDevice</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtPushToDevice(NvFlexExtContainer *container)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a1117ce527b6b483cc756ab5352f6dc3f"><div class="ttname"><a href="_nv_flex_ext_8h.html#a1117ce527b6b483cc756ab5352f6dc3f">NvFlexExtForceFieldCallback</a></div><div class="ttdeci">struct NvFlexExtForceFieldCallback NvFlexExtForceFieldCallback</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:736</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a1117ce527b6b483cc756ab5352f6dc3f"><div class="ttname"><a href="_nv_flex_ext_8h.html#a1117ce527b6b483cc756ab5352f6dc3f">NvFlexExtForceFieldCallback</a></div><div class="ttdeci">struct NvFlexExtForceFieldCallback NvFlexExtForceFieldCallback</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:743</div></div>
<div class="ttc" id="struct_nv_flex_vector_html_ad462ae46f0270161c79572762b558124"><div class="ttname"><a href="struct_nv_flex_vector.html#ad462ae46f0270161c79572762b558124">NvFlexVector::count</a></div><div class="ttdeci">int count</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:74</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a502acd5c1db4ba6eef61eba25f26d68e"><div class="ttname"><a href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68e">NvFlexExtForceMode</a></div><div class="ttdeci">NvFlexExtForceMode</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:708</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a0fd9407aad5001d3a9fe90e989da1aad"><div class="ttname"><a href="_nv_flex_ext_8h.html#a0fd9407aad5001d3a9fe90e989da1aad">NvFlexExtAsset::shapeCoefficients</a></div><div class="ttdeci">float * shapeCoefficients</div><div class="ttdoc">The stiffness coefficient for each shape. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:327</div></div>
-<div class="ttc" id="struct_nv_flex_vector_html_a56640fd10b06a4024a4bf01c306c436b"><div class="ttname"><a href="struct_nv_flex_vector.html#a56640fd10b06a4024a4bf01c306c436b">NvFlexVector::map</a></div><div class="ttdeci">void map(int flags=eNvFlexMapWait)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:99</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a502acd5c1db4ba6eef61eba25f26d68ea6a2e4817b1e86764147c81e8d5e5070c"><div class="ttname"><a href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea6a2e4817b1e86764147c81e8d5e5070c">eNvFlexExtModeVelocityChange</a></div><div class="ttdoc">Apply field value as a velocity change. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:717</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a502acd5c1db4ba6eef61eba25f26d68e"><div class="ttname"><a href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68e">NvFlexExtForceMode</a></div><div class="ttdeci">NvFlexExtForceMode</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:715</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a0fd9407aad5001d3a9fe90e989da1aad"><div class="ttname"><a href="_nv_flex_ext_8h.html#a0fd9407aad5001d3a9fe90e989da1aad">NvFlexExtAsset::shapeCoefficients</a></div><div class="ttdeci">float * shapeCoefficients</div><div class="ttdoc">The stiffness coefficient for each shape. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:328</div></div>
+<div class="ttc" id="struct_nv_flex_vector_html_a56640fd10b06a4024a4bf01c306c436b"><div class="ttname"><a href="struct_nv_flex_vector.html#a56640fd10b06a4024a4bf01c306c436b">NvFlexVector::map</a></div><div class="ttdeci">void map(int flags=eNvFlexMapWait)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:100</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a502acd5c1db4ba6eef61eba25f26d68ea6a2e4817b1e86764147c81e8d5e5070c"><div class="ttname"><a href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea6a2e4817b1e86764147c81e8d5e5070c">eNvFlexExtModeVelocityChange</a></div><div class="ttdoc">Apply field value as a velocity change. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:724</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_addad82b3598059ffde7b3b5babe17bd4"><div class="ttname"><a href="_nv_flex_ext_8h.html#addad82b3598059ffde7b3b5babe17bd4">NvFlexExtCreateTearingClothFromMesh</a></div><div class="ttdeci">NV_FLEX_API NvFlexExtAsset * NvFlexExtCreateTearingClothFromMesh(const float *particles, int numParticles, int maxParticles, const int *indices, int numTriangles, float stretchStiffness, float bendStiffness, float pressure)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_struct_nv_flex_ext_shape_data"><div class="ttname"><a href="_nv_flex_ext_8h.html#struct_nv_flex_ext_shape_data">NvFlexExtShapeData</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:601</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_struct_nv_flex_ext_shape_data"><div class="ttname"><a href="_nv_flex_ext_8h.html#struct_nv_flex_ext_shape_data">NvFlexExtShapeData</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:608</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a6a20d814e3b083b069daa0f20a3e756e"><div class="ttname"><a href="_nv_flex_ext_8h.html#a6a20d814e3b083b069daa0f20a3e756e">NvFlexExtMovingFrameInit</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtMovingFrameInit(NvFlexExtMovingFrame *frame, const float *worldTranslation, const float *worldRotation)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_ab556b9c29acfda73e14c68edc43be7e3"><div class="ttname"><a href="_nv_flex_ext_8h.html#ab556b9c29acfda73e14c68edc43be7e3">NvFlexExtAsset::inflatablePressure</a></div><div class="ttdeci">float inflatablePressure</div><div class="ttdoc">How much over the rest volume the inflatable should attempt to maintain. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:338</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_ad722c319fe60d8a0933df217ba04b2ac"><div class="ttname"><a href="_nv_flex_ext_8h.html#ad722c319fe60d8a0933df217ba04b2ac">NvFlexExtParticleData::upper</a></div><div class="ttdeci">const float * upper</div><div class="ttdoc">Receive a pointer to the particle upper bounds [x, y, z]. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:571</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_ab556b9c29acfda73e14c68edc43be7e3"><div class="ttname"><a href="_nv_flex_ext_8h.html#ab556b9c29acfda73e14c68edc43be7e3">NvFlexExtAsset::inflatablePressure</a></div><div class="ttdeci">float inflatablePressure</div><div class="ttdoc">How much over the rest volume the inflatable should attempt to maintain. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:343</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_ad722c319fe60d8a0933df217ba04b2ac"><div class="ttname"><a href="_nv_flex_ext_8h.html#ad722c319fe60d8a0933df217ba04b2ac">NvFlexExtParticleData::upper</a></div><div class="ttdeci">const float * upper</div><div class="ttdoc">Receive a pointer to the particle upper bounds [x, y, z]. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:578</div></div>
<div class="ttc" id="_nv_flex_8h_html_ad48f83b8442323687d2268206e913496"><div class="ttname"><a href="_nv_flex_8h.html#ad48f83b8442323687d2268206e913496">NvFlexAllocBuffer</a></div><div class="ttdeci">NV_FLEX_API NvFlexBuffer * NvFlexAllocBuffer(NvFlexLibrary *lib, int elementCount, int elementByteStride, NvFlexBufferType type)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_ac2ef832cadd91e257ba80eb97d936340"><div class="ttname"><a href="_nv_flex_ext_8h.html#ac2ef832cadd91e257ba80eb97d936340">NvFlexExtInstance::inflatableIndex</a></div><div class="ttdeci">int inflatableIndex</div><div class="ttdoc">Index in the container&#39;s inflatables array. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:352</div></div>
-<div class="ttc" id="struct_nv_flex_vector_html_a9d7ff86aeebc0fcfa5c125d7872e2e3b"><div class="ttname"><a href="struct_nv_flex_vector.html#a9d7ff86aeebc0fcfa5c125d7872e2e3b">NvFlexVector::NvFlexVector</a></div><div class="ttdeci">NvFlexVector(NvFlexLibrary *l, int size=0)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:47</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_ac2ef832cadd91e257ba80eb97d936340"><div class="ttname"><a href="_nv_flex_ext_8h.html#ac2ef832cadd91e257ba80eb97d936340">NvFlexExtInstance::inflatableIndex</a></div><div class="ttdeci">int inflatableIndex</div><div class="ttdoc">Index in the container&#39;s inflatables array. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:357</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_ab0a259d159116b7fba9b229784b02c70"><div class="ttname"><a href="_nv_flex_ext_8h.html#ab0a259d159116b7fba9b229784b02c70">NvFlexExtFreeParticles</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtFreeParticles(NvFlexExtContainer *container, int n, const int *indices)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a8a4a122a0a95b8262fc4673298a5cb1c"><div class="ttname"><a href="_nv_flex_ext_8h.html#a8a4a122a0a95b8262fc4673298a5cb1c">NvFlexExtAsset::shapeIndices</a></div><div class="ttdeci">int * shapeIndices</div><div class="ttdoc">The indices of the shape matching constraints. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:324</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a8a4a122a0a95b8262fc4673298a5cb1c"><div class="ttname"><a href="_nv_flex_ext_8h.html#a8a4a122a0a95b8262fc4673298a5cb1c">NvFlexExtAsset::shapeIndices</a></div><div class="ttdeci">int * shapeIndices</div><div class="ttdoc">The indices of the shape matching constraints. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:325</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a82a15dfd40b338a07cf4517f55f16720"><div class="ttname"><a href="_nv_flex_ext_8h.html#a82a15dfd40b338a07cf4517f55f16720">NvFlexExtCreateWeldedMeshIndices</a></div><div class="ttdeci">NV_FLEX_API int NvFlexExtCreateWeldedMeshIndices(const float *vertices, int numVertices, int *uniqueVerts, int *originalToUniqueMap, float threshold)</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a3fa8bd4b7d4096602e611faf0bb62dfb"><div class="ttname"><a href="_nv_flex_ext_8h.html#a3fa8bd4b7d4096602e611faf0bb62dfb">NvFlexExtMapParticleData</a></div><div class="ttdeci">NV_FLEX_API NvFlexExtParticleData NvFlexExtMapParticleData(NvFlexExtContainer *container)</div></div>
-<div class="ttc" id="struct_nv_flex_vector_html_acd29b9b2b27e53e3640c24da6959e3cd"><div class="ttname"><a href="struct_nv_flex_vector.html#acd29b9b2b27e53e3640c24da6959e3cd">NvFlexVector::assign</a></div><div class="ttdeci">void assign(const T *srcPtr, int newCount)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:145</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_aa4f19c17fa4ae35ceda90c8b3d1fcca4"><div class="ttname"><a href="_nv_flex_ext_8h.html#aa4f19c17fa4ae35ceda90c8b3d1fcca4">NvFlexExtInstance::asset</a></div><div class="ttdeci">const NvFlexExtAsset * asset</div><div class="ttdoc">Source asset used to create this instance. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:357</div></div>
+<div class="ttc" id="struct_nv_flex_vector_html_acd29b9b2b27e53e3640c24da6959e3cd"><div class="ttname"><a href="struct_nv_flex_vector.html#acd29b9b2b27e53e3640c24da6959e3cd">NvFlexVector::assign</a></div><div class="ttdeci">void assign(const T *srcPtr, int newCount)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:146</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_aac7ec52c127730c381d4b8cbac8134bf"><div class="ttname"><a href="_nv_flex_ext_8h.html#aac7ec52c127730c381d4b8cbac8134bf">NvFlexExtAsset::shapePlasticThresholds</a></div><div class="ttdeci">float * shapePlasticThresholds</div><div class="ttdoc">The plastic threshold coefficient for each shape. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:333</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_aa4f19c17fa4ae35ceda90c8b3d1fcca4"><div class="ttname"><a href="_nv_flex_ext_8h.html#aa4f19c17fa4ae35ceda90c8b3d1fcca4">NvFlexExtInstance::asset</a></div><div class="ttdeci">const NvFlexExtAsset * asset</div><div class="ttdoc">Source asset used to create this instance. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:362</div></div>
<div class="ttc" id="struct_nv_flex_vector_html_aa4422fcaa24d5bbd71aa7772639512b9"><div class="ttname"><a href="struct_nv_flex_vector.html#aa4422fcaa24d5bbd71aa7772639512b9">NvFlexVector::mappedPtr</a></div><div class="ttdeci">T * mappedPtr</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:73</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_ae03f4690a66ba4e06e4b2519c688aaba"><div class="ttname"><a href="_nv_flex_ext_8h.html#ae03f4690a66ba4e06e4b2519c688aaba">NvFlexExtMovingFrame::delta</a></div><div class="ttdeci">float delta[4][4]</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:241</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_af911b47ddb538a0542f6e2c38a82d701"><div class="ttname"><a href="_nv_flex_ext_8h.html#af911b47ddb538a0542f6e2c38a82d701">NvFlexExtParticleData::lower</a></div><div class="ttdeci">const float * lower</div><div class="ttdoc">Receive a pointer to the particle lower bounds [x, y, z]. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:570</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a3288fee0b909e9e768d9abc9b8da74cf"><div class="ttname"><a href="_nv_flex_ext_8h.html#a3288fee0b909e9e768d9abc9b8da74cf">NvFlexExtInstance::triangleIndex</a></div><div class="ttdeci">int triangleIndex</div><div class="ttdoc">Index in the container&#39;s triangle array. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:350</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_struct_nv_flex_ext_triangle_data"><div class="ttname"><a href="_nv_flex_ext_8h.html#struct_nv_flex_ext_triangle_data">NvFlexExtTriangleData</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:583</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a3d7dba5a4d9fce7230bc20a8bb567951"><div class="ttname"><a href="_nv_flex_ext_8h.html#a3d7dba5a4d9fce7230bc20a8bb567951">NvFlexExtForceField::mMode</a></div><div class="ttdeci">NvFlexExtForceMode mMode</div><div class="ttdoc">Mode of field application. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:728</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_ae03f4690a66ba4e06e4b2519c688aaba"><div class="ttname"><a href="_nv_flex_ext_8h.html#ae03f4690a66ba4e06e4b2519c688aaba">NvFlexExtMovingFrame::delta</a></div><div class="ttdeci">float delta[4][4]</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:242</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_af911b47ddb538a0542f6e2c38a82d701"><div class="ttname"><a href="_nv_flex_ext_8h.html#af911b47ddb538a0542f6e2c38a82d701">NvFlexExtParticleData::lower</a></div><div class="ttdeci">const float * lower</div><div class="ttdoc">Receive a pointer to the particle lower bounds [x, y, z]. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:577</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a3288fee0b909e9e768d9abc9b8da74cf"><div class="ttname"><a href="_nv_flex_ext_8h.html#a3288fee0b909e9e768d9abc9b8da74cf">NvFlexExtInstance::triangleIndex</a></div><div class="ttdeci">int triangleIndex</div><div class="ttdoc">Index in the container&#39;s triangle array. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:355</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_struct_nv_flex_ext_triangle_data"><div class="ttname"><a href="_nv_flex_ext_8h.html#struct_nv_flex_ext_triangle_data">NvFlexExtTriangleData</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:590</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a3d7dba5a4d9fce7230bc20a8bb567951"><div class="ttname"><a href="_nv_flex_ext_8h.html#a3d7dba5a4d9fce7230bc20a8bb567951">NvFlexExtForceField::mMode</a></div><div class="ttdeci">NvFlexExtForceMode mMode</div><div class="ttdoc">Mode of field application. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:735</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a7c036ccca83df3659529858068e0593d"><div class="ttname"><a href="_nv_flex_ext_8h.html#a7c036ccca83df3659529858068e0593d">NvFlexExtAllocParticles</a></div><div class="ttdeci">NV_FLEX_API int NvFlexExtAllocParticles(NvFlexExtContainer *container, int n, int *indices)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a7fa35a822a4e856fee45b3263e679270"><div class="ttname"><a href="_nv_flex_ext_8h.html#a7fa35a822a4e856fee45b3263e679270">NvFlexExtParticleData::phases</a></div><div class="ttdeci">int * phases</div><div class="ttdoc">Receives a pointer to the particle phase data. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:567</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a7fa35a822a4e856fee45b3263e679270"><div class="ttname"><a href="_nv_flex_ext_8h.html#a7fa35a822a4e856fee45b3263e679270">NvFlexExtParticleData::phases</a></div><div class="ttdeci">int * phases</div><div class="ttdoc">Receives a pointer to the particle phase data. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:574</div></div>
<div class="ttc" id="_nv_flex_8h_html_ab559759820a4322aff061745ef26c867"><div class="ttname"><a href="_nv_flex_8h.html#ab559759820a4322aff061745ef26c867">NvFlexFreeBuffer</a></div><div class="ttdeci">NV_FLEX_API void NvFlexFreeBuffer(NvFlexBuffer *buf)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_afc07cf2edbf4d5bf504890b312a98bd7"><div class="ttname"><a href="_nv_flex_ext_8h.html#afc07cf2edbf4d5bf504890b312a98bd7">NvFlexExtAsset::numShapes</a></div><div class="ttdeci">int numShapes</div><div class="ttdoc">The number of shape matching constraints. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:329</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_afc07cf2edbf4d5bf504890b312a98bd7"><div class="ttname"><a href="_nv_flex_ext_8h.html#afc07cf2edbf4d5bf504890b312a98bd7">NvFlexExtAsset::numShapes</a></div><div class="ttdeci">int numShapes</div><div class="ttdoc">The number of shape matching constraints. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:330</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a89e582ae93e0256b06f22d9abf361783"><div class="ttname"><a href="_nv_flex_ext_8h.html#a89e582ae93e0256b06f22d9abf361783">NvFlexExtUnmapTriangleData</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtUnmapTriangleData(NvFlexExtContainer *container)</div></div>
-<div class="ttc" id="struct_nv_flex_vector_html_a225da2c753ca0bb95b570c303f0cd761"><div class="ttname"><a href="struct_nv_flex_vector.html#a225da2c753ca0bb95b570c303f0cd761">NvFlexVector::copyto</a></div><div class="ttdeci">void copyto(T *dest, int count)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:154</div></div>
+<div class="ttc" id="struct_nv_flex_vector_html_a225da2c753ca0bb95b570c303f0cd761"><div class="ttname"><a href="struct_nv_flex_vector.html#a225da2c753ca0bb95b570c303f0cd761">NvFlexVector::copyto</a></div><div class="ttdeci">void copyto(T *dest, int count)</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:155</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_a36c33fafe13c5fd5773bf9a2af2dd745"><div class="ttname"><a href="_nv_flex_ext_8h.html#a36c33fafe13c5fd5773bf9a2af2dd745">NvFlexExtDestroyAsset</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtDestroyAsset(NvFlexExtAsset *asset)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a431c97a2756c45752dd7508f0810a397"><div class="ttname"><a href="_nv_flex_ext_8h.html#a431c97a2756c45752dd7508f0810a397">NvFlexExtTearingParticleClone::srcIndex</a></div><div class="ttdeci">int srcIndex</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:430</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_aa6fb48cb1199af96a29de7616f7a4d18"><div class="ttname"><a href="_nv_flex_ext_8h.html#aa6fb48cb1199af96a29de7616f7a4d18">NvFlexExtInstance::shapeTranslations</a></div><div class="ttdeci">float * shapeTranslations</div><div class="ttdoc">Shape matching group translations (vec3s) </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:354</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_acc246770a0f65f1e50b43c618955dc84"><div class="ttname"><a href="_nv_flex_ext_8h.html#acc246770a0f65f1e50b43c618955dc84">NvFlexExtMovingFrame::velocity</a></div><div class="ttdeci">float velocity[3]</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:235</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_struct_nv_flex_ext_tearing_particle_clone"><div class="ttname"><a href="_nv_flex_ext_8h.html#struct_nv_flex_ext_tearing_particle_clone">NvFlexExtTearingParticleClone</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:428</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a9342d21bf875d0f1a9d287ced08c087a"><div class="ttname"><a href="_nv_flex_ext_8h.html#a9342d21bf875d0f1a9d287ced08c087a">NvFlexExtAsset::shapePlasticCreeps</a></div><div class="ttdeci">float * shapePlasticCreeps</div><div class="ttdoc">The plastic creep coefficient for each shape. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:334</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a431c97a2756c45752dd7508f0810a397"><div class="ttname"><a href="_nv_flex_ext_8h.html#a431c97a2756c45752dd7508f0810a397">NvFlexExtTearingParticleClone::srcIndex</a></div><div class="ttdeci">int srcIndex</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:435</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_aa6fb48cb1199af96a29de7616f7a4d18"><div class="ttname"><a href="_nv_flex_ext_8h.html#aa6fb48cb1199af96a29de7616f7a4d18">NvFlexExtInstance::shapeTranslations</a></div><div class="ttdeci">float * shapeTranslations</div><div class="ttdoc">Shape matching group translations (vec3s) </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:359</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_acc246770a0f65f1e50b43c618955dc84"><div class="ttname"><a href="_nv_flex_ext_8h.html#acc246770a0f65f1e50b43c618955dc84">NvFlexExtMovingFrame::velocity</a></div><div class="ttdeci">float velocity[3]</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:236</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_struct_nv_flex_ext_tearing_particle_clone"><div class="ttname"><a href="_nv_flex_ext_8h.html#struct_nv_flex_ext_tearing_particle_clone">NvFlexExtTearingParticleClone</a></div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:433</div></div>
<div class="ttc" id="struct_nv_flex_vector_html_aa408aa5327d07f69fc12314df2d5dcfb"><div class="ttname"><a href="struct_nv_flex_vector.html#aa408aa5327d07f69fc12314df2d5dcfb">NvFlexVector::buffer</a></div><div class="ttdeci">NvFlexBuffer * buffer</div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:71</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_adbb39b1f8b0705bb3e19d2cb6145640f"><div class="ttname"><a href="_nv_flex_ext_8h.html#adbb39b1f8b0705bb3e19d2cb6145640f">NvFlexExtParticleData::velocities</a></div><div class="ttdeci">float * velocities</div><div class="ttdoc">Receives a pointer to the particle velocity data. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:566</div></div>
-<div class="ttc" id="struct_nv_flex_vector_html_a37fbf38300ea57635af4b60c934e9f46"><div class="ttname"><a href="struct_nv_flex_vector.html#a37fbf38300ea57635af4b60c934e9f46">NvFlexVector::back</a></div><div class="ttdeci">const T &amp; back() const </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:165</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_adbb39b1f8b0705bb3e19d2cb6145640f"><div class="ttname"><a href="_nv_flex_ext_8h.html#adbb39b1f8b0705bb3e19d2cb6145640f">NvFlexExtParticleData::velocities</a></div><div class="ttdeci">float * velocities</div><div class="ttdoc">Receives a pointer to the particle velocity data. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:573</div></div>
+<div class="ttc" id="struct_nv_flex_vector_html_a37fbf38300ea57635af4b60c934e9f46"><div class="ttname"><a href="struct_nv_flex_vector.html#a37fbf38300ea57635af4b60c934e9f46">NvFlexVector::back</a></div><div class="ttdeci">const T &amp; back() const </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:166</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_ac1ed9ff49120d0691352399c8173bdcf"><div class="ttname"><a href="_nv_flex_ext_8h.html#ac1ed9ff49120d0691352399c8173bdcf">NvFlexExtCreateForceFieldCallback</a></div><div class="ttdeci">NV_FLEX_API NvFlexExtForceFieldCallback * NvFlexExtCreateForceFieldCallback(NvFlexSolver *solver)</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_a960073478e49b229d1d19ac64c5b23f7"><div class="ttname"><a href="_nv_flex_ext_8h.html#a960073478e49b229d1d19ac64c5b23f7">NvFlexExtAsset::inflatable</a></div><div class="ttdeci">bool inflatable</div><div class="ttdoc">Whether an inflatable constraint should be added. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:336</div></div>
-<div class="ttc" id="_nv_flex_ext_8h_html_ae5f81891f59382b133319dc3bcea8ba0"><div class="ttname"><a href="_nv_flex_ext_8h.html#ae5f81891f59382b133319dc3bcea8ba0">NvFlexExtAsset::numSprings</a></div><div class="ttdeci">int numSprings</div><div class="ttdoc">Number of springs. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:321</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_a960073478e49b229d1d19ac64c5b23f7"><div class="ttname"><a href="_nv_flex_ext_8h.html#a960073478e49b229d1d19ac64c5b23f7">NvFlexExtAsset::inflatable</a></div><div class="ttdeci">bool inflatable</div><div class="ttdoc">Whether an inflatable constraint should be added. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:341</div></div>
+<div class="ttc" id="_nv_flex_ext_8h_html_ae5f81891f59382b133319dc3bcea8ba0"><div class="ttname"><a href="_nv_flex_ext_8h.html#ae5f81891f59382b133319dc3bcea8ba0">NvFlexExtAsset::numSprings</a></div><div class="ttdeci">int numSprings</div><div class="ttdoc">Number of springs. </div><div class="ttdef"><b>Definition:</b> NvFlexExt.h:322</div></div>
<div class="ttc" id="_nv_flex_ext_8h_html_ad9343d07f49098ee205a1ed48dc9db34"><div class="ttname"><a href="_nv_flex_ext_8h.html#ad9343d07f49098ee205a1ed48dc9db34">NvFlexExtNotifyAssetChanged</a></div><div class="ttdeci">NV_FLEX_API void NvFlexExtNotifyAssetChanged(NvFlexExtContainer *container, const NvFlexExtAsset *asset)</div></div>
+<div class="ttc" id="_nv_flex_8h_html_a169e4c126acf46bdebf76c36a44deca3"><div class="ttname"><a href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3">NvFlexBufferType</a></div><div class="ttdeci">NvFlexBufferType</div><div class="ttdef"><b>Definition:</b> NvFlex.h:76</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
-Generated on Wed Feb 22 2017 12:18:22 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
+Generated on Fri Jun 9 2017 09:57:25 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
diff --git a/doc/_static/api/dir_d44c64559bbebec7f509842c48db8b23.html b/doc/_static/api/dir_d44c64559bbebec7f509842c48db8b23.html
index e2f9475..3f3697d 100644
--- a/doc/_static/api/dir_d44c64559bbebec7f509842c48db8b23.html
+++ b/doc/_static/api/dir_d44c64559bbebec7f509842c48db8b23.html
@@ -20,7 +20,7 @@
<td id="projectlogo"><img alt="Logo" src="nvidia.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">FLEX
- &#160;<span id="projectnumber">1.1.0</span>
+ &#160;<span id="projectnumber">1.2.0</span>
</div>
</td>
</tr>
@@ -52,7 +52,7 @@ Files</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
-Generated on Wed Feb 22 2017 12:18:22 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
+Generated on Fri Jun 9 2017 09:57:25 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
diff --git a/doc/_static/api/files.html b/doc/_static/api/files.html
index 53ff079..7f6b61c 100644
--- a/doc/_static/api/files.html
+++ b/doc/_static/api/files.html
@@ -20,7 +20,7 @@
<td id="projectlogo"><img alt="Logo" src="nvidia.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">FLEX
- &#160;<span id="projectnumber">1.1.0</span>
+ &#160;<span id="projectnumber">1.2.0</span>
</div>
</td>
</tr>
@@ -45,7 +45,7 @@
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
-Generated on Wed Feb 22 2017 12:18:22 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
+Generated on Fri Jun 9 2017 09:57:25 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
diff --git a/doc/_static/api/globals.html b/doc/_static/api/globals.html
index 42e1ec0..6039eb7 100644
--- a/doc/_static/api/globals.html
+++ b/doc/_static/api/globals.html
@@ -20,7 +20,7 @@
<td id="projectlogo"><img alt="Logo" src="nvidia.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">FLEX
- &#160;<span id="projectnumber">1.1.0</span>
+ &#160;<span id="projectnumber">1.2.0</span>
</div>
</td>
</tr>
@@ -58,6 +58,15 @@
<li>eNvFlexExtModeVelocityChange
: <a class="el" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea6a2e4817b1e86764147c81e8d5e5070c">NvFlexExt.h</a>
</li>
+<li>eNvFlexFeatureModeDefault
+: <a class="el" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560a3ab06dc4cd4aa073ab0f2d96a56c499d">NvFlex.h</a>
+</li>
+<li>eNvFlexFeatureModeSimpleFluids
+: <a class="el" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560aeab2b8a68b528d46e11b71ad0f4d83f2">NvFlex.h</a>
+</li>
+<li>eNvFlexFeatureModeSimpleSolids
+: <a class="el" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560a421fe1e1bb00fc41e9b32208cd9155f5">NvFlex.h</a>
+</li>
<li>eNvFlexLogAll
: <a class="el" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa8feff72c0b0391e8adf3ddb6c39ef10e">NvFlex.h</a>
</li>
@@ -73,15 +82,15 @@
<li>eNvFlexLogWarning
: <a class="el" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa5538835c4767004ba5fd443ada08ea61">NvFlex.h</a>
</li>
-<li>eNvFlexMapDiscard
-: <a class="el" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16caa01c2dce3aa1e0d9d151060e1786c706">NvFlex.h</a>
-</li>
<li>eNvFlexMapDoNotWait
: <a class="el" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16ca1bd450ab65ccc06288fae95e23d5e6f1">NvFlex.h</a>
</li>
<li>eNvFlexMapWait
: <a class="el" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16ca11adf517d180983daec217e761acc3d6">NvFlex.h</a>
</li>
+<li>eNvFlexPhaseFlagsMask
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a7b776084468bae4e3566484cf34d0154">NvFlex.h</a>
+</li>
<li>eNvFlexPhaseFluid
: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a1728772beb1746ace4c549b2ed8f1d74">NvFlex.h</a>
</li>
@@ -94,6 +103,36 @@
<li>eNvFlexPhaseSelfCollideFilter
: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a76a62d3a5df428f18e01f8b37573a7b1">NvFlex.h</a>
</li>
+<li>eNvFlexPhaseShapeChannel0
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a66aa70953a97744621e2afa41d0e32d2">NvFlex.h</a>
+</li>
+<li>eNvFlexPhaseShapeChannel1
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a1de4e956764950e501bcb8376a70f5a9">NvFlex.h</a>
+</li>
+<li>eNvFlexPhaseShapeChannel2
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644aa3a4fd0d5930b31199334e500ac2d7c8">NvFlex.h</a>
+</li>
+<li>eNvFlexPhaseShapeChannel3
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ab4034dbf78d6045ee13278531ee21c2b">NvFlex.h</a>
+</li>
+<li>eNvFlexPhaseShapeChannel4
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644af309316efb695be38a4e15986be21ef9">NvFlex.h</a>
+</li>
+<li>eNvFlexPhaseShapeChannel5
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a92bbb75d47ea0058a9a89deb0abec67f">NvFlex.h</a>
+</li>
+<li>eNvFlexPhaseShapeChannel6
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a0c8d08e646d2713e34d7e2dd6e7b21f2">NvFlex.h</a>
+</li>
+<li>eNvFlexPhaseShapeChannel7
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a0679f1deab7afc547900e30aae0b711a">NvFlex.h</a>
+</li>
+<li>eNvFlexPhaseShapeChannelMask
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ae4ea43366942f719f40e8526ad21a038">NvFlex.h</a>
+</li>
+<li>eNvFlexPhaseUnused
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a52ee05f3e425c336856277774bc9f69f">NvFlex.h</a>
+</li>
<li>eNvFlexRelaxationGlobal
: <a class="el" href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3ba33711a4b466d606d68dee43918f819db">NvFlex.h</a>
</li>
@@ -183,7 +222,7 @@
: <a class="el" href="_nv_flex_8h.html#a5c28caf6d5d513c5adacd4fbc782f308">NvFlex.h</a>
</li>
<li>NvFlexCreateSolver()
-: <a class="el" href="_nv_flex_8h.html#af7f91fa47c779fcd8bee60061de6d31c">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#a9e925acbc34675dfe247da017cbd855f">NvFlex.h</a>
</li>
<li>NvFlexCreateTriangleMesh()
: <a class="el" href="_nv_flex_8h.html#afdda5a5210938a1e8a7c3a8218ad468e">NvFlex.h</a>
@@ -240,7 +279,7 @@
: <a class="el" href="_nv_flex_ext_8h.html#ad0a9c7e2f907e46b60f6bacf402987ce">NvFlexExt.h</a>
</li>
<li>NvFlexExtCreateSoftFromMesh()
-: <a class="el" href="_nv_flex_ext_8h.html#a9f2c0daf521df4920e44cca1cb30b42c">NvFlexExt.h</a>
+: <a class="el" href="_nv_flex_ext_8h.html#a3a9ce6bba709625f6c338bd3070bd012">NvFlexExt.h</a>
</li>
<li>NvFlexExtCreateSoftMeshSkinning()
: <a class="el" href="_nv_flex_ext_8h.html#a6e3f12e9e92abb31b115cf31b33e34bb">NvFlexExt.h</a>
@@ -326,6 +365,9 @@
<li>NvFlexExtUpdateInstances()
: <a class="el" href="_nv_flex_ext_8h.html#a4695d37db8b61495f200bfd88a2be628">NvFlexExt.h</a>
</li>
+<li>NvFlexFeatureMode
+: <a class="el" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560">NvFlex.h</a>
+</li>
<li>NvFlexFlush()
: <a class="el" href="_nv_flex_8h.html#a898eb8e66a456dd2266c694f29cab600">NvFlex.h</a>
</li>
@@ -333,13 +375,13 @@
: <a class="el" href="_nv_flex_8h.html#ab559759820a4322aff061745ef26c867">NvFlex.h</a>
</li>
<li>NvFlexGetActive()
-: <a class="el" href="_nv_flex_8h.html#aeed8fe87fa073067af1a45560cc54a79">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#a1bd4b70e0118abe18ca5fe85157299b6">NvFlex.h</a>
</li>
<li>NvFlexGetActiveCount()
: <a class="el" href="_nv_flex_8h.html#a2345372dea2ad4f043153a84e7a2c407">NvFlex.h</a>
</li>
<li>NvFlexGetAnisotropy()
-: <a class="el" href="_nv_flex_8h.html#ae28167c680ad56dcff600ce0a223cec5">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#aef768edc8e4df1a78a94a6c971541550">NvFlex.h</a>
</li>
<li>NvFlexGetBounds()
: <a class="el" href="_nv_flex_8h.html#ab1eec84a21b1872fba11c9b4cc1d1629">NvFlex.h</a>
@@ -351,7 +393,7 @@
: <a class="el" href="_nv_flex_8h.html#ad56e661161763579afb375b3841eb5ff">NvFlex.h</a>
</li>
<li>NvFlexGetDensities()
-: <a class="el" href="_nv_flex_8h.html#a6f6f14e625dc744a127be81e6dc4cb74">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#a3a20cc2539983a009caaf77ec9ceab82">NvFlex.h</a>
</li>
<li>NvFlexGetDetailTimers()
: <a class="el" href="_nv_flex_8h.html#ab1efb6764f65900cb09f0188ad6da08a">NvFlex.h</a>
@@ -360,37 +402,43 @@
: <a class="el" href="_nv_flex_8h.html#a2ac0a898a565a2cdf13b80acd4a3555c">NvFlex.h</a>
</li>
<li>NvFlexGetDeviceLatency()
-: <a class="el" href="_nv_flex_8h.html#a221a4621ab98eca6ecd3368d288154a4">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#aa77d2a4edd4ccd79c9389854dca80613">NvFlex.h</a>
</li>
<li>NvFlexGetDeviceName()
: <a class="el" href="_nv_flex_8h.html#a4c451971259524c6878b6b1ed4023ada">NvFlex.h</a>
</li>
<li>NvFlexGetDiffuseParticles()
-: <a class="el" href="_nv_flex_8h.html#a37ada4b95999cc253dfb049b99030d50">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#afa458a6eec8b0d117e53c40c13788fd9">NvFlex.h</a>
</li>
<li>NvFlexGetDynamicTriangles()
: <a class="el" href="_nv_flex_8h.html#abdfd0834422dd99154a27962614525e5">NvFlex.h</a>
</li>
+<li>NvFlexGetNeighbors()
+: <a class="el" href="_nv_flex_8h.html#ade1ef600ada4d7567e515258b289e209">NvFlex.h</a>
+</li>
<li>NvFlexGetNormals()
-: <a class="el" href="_nv_flex_8h.html#aadb2a0cf125e4a6b2f3443ab7dcbd3d4">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#a73d87b460a34c52ff4b616e97a53ade7">NvFlex.h</a>
</li>
<li>NvFlexGetParams()
: <a class="el" href="_nv_flex_8h.html#a581b458848039220203547af53de128f">NvFlex.h</a>
</li>
<li>NvFlexGetParticles()
-: <a class="el" href="_nv_flex_8h.html#a84f06fff995d8eb034cff81c811fa312">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#aaff62cfd50431d82af5d04a6c9ac4ffd">NvFlex.h</a>
</li>
<li>NvFlexGetPhases()
-: <a class="el" href="_nv_flex_8h.html#a15b7a5449bee38bbe5dcaf23690f09f5">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#accc944f0e76ee2e5d67c3f977b150806">NvFlex.h</a>
</li>
<li>NvFlexGetRestParticles()
-: <a class="el" href="_nv_flex_8h.html#affb884bcf3e7e389812d0b52b0fc0490">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#aafc89f87307602fb9bfa8f6668122121">NvFlex.h</a>
</li>
-<li>NvFlexGetRigidTransforms()
-: <a class="el" href="_nv_flex_8h.html#a3eafe7fe6b200c757c7402eca7d13f6d">NvFlex.h</a>
+<li>NvFlexGetRigids()
+: <a class="el" href="_nv_flex_8h.html#ab5cc56e228374b1da0910356b3172b4e">NvFlex.h</a>
</li>
<li>NvFlexGetSmoothParticles()
-: <a class="el" href="_nv_flex_8h.html#abfa62e01c4f4511d3f6a00ab6a0f257a">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#a96a771dd328d019e6164e5f23d29ffcb">NvFlex.h</a>
+</li>
+<li>NvFlexGetSolverDesc()
+: <a class="el" href="_nv_flex_8h.html#afd6aff58269d6c359df2453c96397840">NvFlex.h</a>
</li>
<li>NvFlexGetSolverLibrary()
: <a class="el" href="_nv_flex_8h.html#ae0d57e4fc2b3b51ec08f7da0a28ff343">NvFlex.h</a>
@@ -405,7 +453,7 @@
: <a class="el" href="_nv_flex_8h.html#a60794d849b4184335e2a0ddec0a9e6a2">NvFlex.h</a>
</li>
<li>NvFlexGetVelocities()
-: <a class="el" href="_nv_flex_8h.html#a67bd9669086e823ebe33d08d14f5b2b9">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#afbcbff4e4865105514c194398ab3a7b0">NvFlex.h</a>
</li>
<li>NvFlexGetVersion()
: <a class="el" href="_nv_flex_8h.html#ac25ec5de38c177db51198bb620644d36">NvFlex.h</a>
@@ -417,11 +465,17 @@
: <a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlex.h</a>
</li>
<li>NvFlexMakePhase()
-: <a class="el" href="_nv_flex_8h.html#af53fa9d7caef50db346475065504848d">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#ab43db5f28808f8038cfc9330d4b47d57">NvFlex.h</a>
+</li>
+<li>NvFlexMakePhaseWithChannels()
+: <a class="el" href="_nv_flex_8h.html#a615e8070212c24a70e7a849120c13353">NvFlex.h</a>
</li>
<li>NvFlexMakeShapeFlags()
: <a class="el" href="_nv_flex_8h.html#ad6ee1e23e0c49aad63df8f605182de3a">NvFlex.h</a>
</li>
+<li>NvFlexMakeShapeFlagsWithChannels()
+: <a class="el" href="_nv_flex_8h.html#ad83b7fb561a91467a3094771bb682b96">NvFlex.h</a>
+</li>
<li>NvFlexMap()
: <a class="el" href="_nv_flex_8h.html#a0898bb9210440b159688d4647f6eb083">NvFlex.h</a>
</li>
@@ -447,7 +501,10 @@
: <a class="el" href="_nv_flex_8h.html#ae6671f352bd77e296609d0bc2a57fd11">NvFlex.h</a>
</li>
<li>NvFlexSetActive()
-: <a class="el" href="_nv_flex_8h.html#aea2af336bdd96d7168c3acdce6d1875d">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#adc0c97635cdbb3da7b571574a3b38990">NvFlex.h</a>
+</li>
+<li>NvFlexSetActiveCount()
+: <a class="el" href="_nv_flex_8h.html#a677dc591fe443ae058701966c52d1316">NvFlex.h</a>
</li>
<li>NvFlexSetDiffuseParticles()
: <a class="el" href="_nv_flex_8h.html#a5a7213593dd9a23d9d67f8517d1da9de">NvFlex.h</a>
@@ -459,31 +516,34 @@
: <a class="el" href="_nv_flex_8h.html#a7f2b59fba77c60ce116e1eac57d63e50">NvFlex.h</a>
</li>
<li>NvFlexSetNormals()
-: <a class="el" href="_nv_flex_8h.html#add03fd357383845f07e0596290faf316">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#a32e8fdb39029a2564c129bd493c52058">NvFlex.h</a>
</li>
<li>NvFlexSetParams()
: <a class="el" href="_nv_flex_8h.html#ae2db6ad8006027c1acf2315a0d15fe71">NvFlex.h</a>
</li>
<li>NvFlexSetParticles()
-: <a class="el" href="_nv_flex_8h.html#abef057ac89ba5cf1cd71f0084f9313de">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#a7ec5ebe3e98a44a2058d6be74b2cb633">NvFlex.h</a>
</li>
<li>NvFlexSetPhases()
-: <a class="el" href="_nv_flex_8h.html#a3117f92571613709936291c48414e521">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#aa1d44495e442f8cae874c635ef847478">NvFlex.h</a>
</li>
<li>NvFlexSetRestParticles()
-: <a class="el" href="_nv_flex_8h.html#aa457096286567a37d4f1d5f4857d9296">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#a125cfd9817437bb4f4bcb9418efa3dda">NvFlex.h</a>
</li>
<li>NvFlexSetRigids()
-: <a class="el" href="_nv_flex_8h.html#a89c872e761a53c87375f536a0ef597d8">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#aa8b7bfeffb0fa7dc6dbd291fee87edc9">NvFlex.h</a>
</li>
<li>NvFlexSetShapes()
: <a class="el" href="_nv_flex_8h.html#aea4e7117722df53dfe44c676496117fa">NvFlex.h</a>
</li>
+<li>NvFlexSetSolverDescDefaults()
+: <a class="el" href="_nv_flex_8h.html#a69a33d464c002a8916a5925c6ef32ae6">NvFlex.h</a>
+</li>
<li>NvFlexSetSprings()
: <a class="el" href="_nv_flex_8h.html#ae67c0cab2ecee8eb9485a26ef0fad6a9">NvFlex.h</a>
</li>
<li>NvFlexSetVelocities()
-: <a class="el" href="_nv_flex_8h.html#afe09e63d22c5156fe24cd2d2bc069c04">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#ae2b271f123db0054512936f2acc6467f">NvFlex.h</a>
</li>
<li>NvFlexShutdown()
: <a class="el" href="_nv_flex_8h.html#aaf59e45ada57c7f958a8030099cbe211">NvFlex.h</a>
@@ -507,7 +567,7 @@
: <a class="el" href="_nv_flex_8h.html#a78045a8d4e856372df108dc616a94cd8">NvFlex.h</a>
</li>
<li>NvFlexUpdateConvexMesh()
-: <a class="el" href="_nv_flex_8h.html#a69289002a6f8ecd697118f0ec6572f5d">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#ab452c355f92dda050d4b4dafb8e71b03">NvFlex.h</a>
</li>
<li>NvFlexUpdateDistanceField()
: <a class="el" href="_nv_flex_8h.html#a584ffb275b9986fd5444ed1a7ea247d9">NvFlex.h</a>
@@ -518,11 +578,14 @@
<li>NvFlexUpdateTriangleMesh()
: <a class="el" href="_nv_flex_8h.html#a4958c555f0ed65dee54c37af32529356">NvFlex.h</a>
</li>
+<li>NvFlexWait()
+: <a class="el" href="_nv_flex_8h.html#a615d2e6eec2486a5db815d929f9c642c">NvFlex.h</a>
+</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
-Generated on Wed Feb 22 2017 12:18:22 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
+Generated on Fri Jun 9 2017 09:57:25 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
diff --git a/doc/_static/api/globals_enum.html b/doc/_static/api/globals_enum.html
index c693fe9..99f3b98 100644
--- a/doc/_static/api/globals_enum.html
+++ b/doc/_static/api/globals_enum.html
@@ -20,7 +20,7 @@
<td id="projectlogo"><img alt="Logo" src="nvidia.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">FLEX
- &#160;<span id="projectnumber">1.1.0</span>
+ &#160;<span id="projectnumber">1.2.0</span>
</div>
</td>
</tr>
@@ -50,6 +50,9 @@
<li>NvFlexExtForceMode
: <a class="el" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68e">NvFlexExt.h</a>
</li>
+<li>NvFlexFeatureMode
+: <a class="el" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560">NvFlex.h</a>
+</li>
<li>NvFlexMapFlags
: <a class="el" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16c">NvFlex.h</a>
</li>
@@ -66,7 +69,7 @@
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
-Generated on Wed Feb 22 2017 12:18:22 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
+Generated on Fri Jun 9 2017 09:57:25 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
diff --git a/doc/_static/api/globals_eval.html b/doc/_static/api/globals_eval.html
index 465a0cb..22e284d 100644
--- a/doc/_static/api/globals_eval.html
+++ b/doc/_static/api/globals_eval.html
@@ -20,7 +20,7 @@
<td id="projectlogo"><img alt="Logo" src="nvidia.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">FLEX
- &#160;<span id="projectnumber">1.1.0</span>
+ &#160;<span id="projectnumber">1.2.0</span>
</div>
</td>
</tr>
@@ -58,6 +58,15 @@
<li>eNvFlexExtModeVelocityChange
: <a class="el" href="_nv_flex_ext_8h.html#a502acd5c1db4ba6eef61eba25f26d68ea6a2e4817b1e86764147c81e8d5e5070c">NvFlexExt.h</a>
</li>
+<li>eNvFlexFeatureModeDefault
+: <a class="el" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560a3ab06dc4cd4aa073ab0f2d96a56c499d">NvFlex.h</a>
+</li>
+<li>eNvFlexFeatureModeSimpleFluids
+: <a class="el" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560aeab2b8a68b528d46e11b71ad0f4d83f2">NvFlex.h</a>
+</li>
+<li>eNvFlexFeatureModeSimpleSolids
+: <a class="el" href="_nv_flex_8h.html#aee5c235d5fab40831cf339680aa25560a421fe1e1bb00fc41e9b32208cd9155f5">NvFlex.h</a>
+</li>
<li>eNvFlexLogAll
: <a class="el" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa8feff72c0b0391e8adf3ddb6c39ef10e">NvFlex.h</a>
</li>
@@ -73,15 +82,15 @@
<li>eNvFlexLogWarning
: <a class="el" href="_nv_flex_8h.html#ab4435b3857752360375fe52fc992cfcaa5538835c4767004ba5fd443ada08ea61">NvFlex.h</a>
</li>
-<li>eNvFlexMapDiscard
-: <a class="el" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16caa01c2dce3aa1e0d9d151060e1786c706">NvFlex.h</a>
-</li>
<li>eNvFlexMapDoNotWait
: <a class="el" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16ca1bd450ab65ccc06288fae95e23d5e6f1">NvFlex.h</a>
</li>
<li>eNvFlexMapWait
: <a class="el" href="_nv_flex_8h.html#a6541b33eaca7b2323e73b30cea34d16ca11adf517d180983daec217e761acc3d6">NvFlex.h</a>
</li>
+<li>eNvFlexPhaseFlagsMask
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a7b776084468bae4e3566484cf34d0154">NvFlex.h</a>
+</li>
<li>eNvFlexPhaseFluid
: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a1728772beb1746ace4c549b2ed8f1d74">NvFlex.h</a>
</li>
@@ -94,6 +103,36 @@
<li>eNvFlexPhaseSelfCollideFilter
: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a76a62d3a5df428f18e01f8b37573a7b1">NvFlex.h</a>
</li>
+<li>eNvFlexPhaseShapeChannel0
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a66aa70953a97744621e2afa41d0e32d2">NvFlex.h</a>
+</li>
+<li>eNvFlexPhaseShapeChannel1
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a1de4e956764950e501bcb8376a70f5a9">NvFlex.h</a>
+</li>
+<li>eNvFlexPhaseShapeChannel2
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644aa3a4fd0d5930b31199334e500ac2d7c8">NvFlex.h</a>
+</li>
+<li>eNvFlexPhaseShapeChannel3
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ab4034dbf78d6045ee13278531ee21c2b">NvFlex.h</a>
+</li>
+<li>eNvFlexPhaseShapeChannel4
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644af309316efb695be38a4e15986be21ef9">NvFlex.h</a>
+</li>
+<li>eNvFlexPhaseShapeChannel5
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a92bbb75d47ea0058a9a89deb0abec67f">NvFlex.h</a>
+</li>
+<li>eNvFlexPhaseShapeChannel6
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a0c8d08e646d2713e34d7e2dd6e7b21f2">NvFlex.h</a>
+</li>
+<li>eNvFlexPhaseShapeChannel7
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a0679f1deab7afc547900e30aae0b711a">NvFlex.h</a>
+</li>
+<li>eNvFlexPhaseShapeChannelMask
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644ae4ea43366942f719f40e8526ad21a038">NvFlex.h</a>
+</li>
+<li>eNvFlexPhaseUnused
+: <a class="el" href="_nv_flex_8h.html#a5ad2a7745fcb4d4afd5b5f1bda074644a52ee05f3e425c336856277774bc9f69f">NvFlex.h</a>
+</li>
<li>eNvFlexRelaxationGlobal
: <a class="el" href="_nv_flex_8h.html#a46f5d35902f7da40628247175a174f3ba33711a4b466d606d68dee43918f819db">NvFlex.h</a>
</li>
@@ -152,7 +191,7 @@
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
-Generated on Wed Feb 22 2017 12:18:22 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
+Generated on Fri Jun 9 2017 09:57:25 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
diff --git a/doc/_static/api/globals_func.html b/doc/_static/api/globals_func.html
index 2766e2e..2ede00b 100644
--- a/doc/_static/api/globals_func.html
+++ b/doc/_static/api/globals_func.html
@@ -20,7 +20,7 @@
<td id="projectlogo"><img alt="Logo" src="nvidia.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">FLEX
- &#160;<span id="projectnumber">1.1.0</span>
+ &#160;<span id="projectnumber">1.2.0</span>
</div>
</td>
</tr>
@@ -47,7 +47,7 @@
: <a class="el" href="_nv_flex_8h.html#a5c28caf6d5d513c5adacd4fbc782f308">NvFlex.h</a>
</li>
<li>NvFlexCreateSolver()
-: <a class="el" href="_nv_flex_8h.html#af7f91fa47c779fcd8bee60061de6d31c">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#a9e925acbc34675dfe247da017cbd855f">NvFlex.h</a>
</li>
<li>NvFlexCreateTriangleMesh()
: <a class="el" href="_nv_flex_8h.html#afdda5a5210938a1e8a7c3a8218ad468e">NvFlex.h</a>
@@ -92,7 +92,7 @@
: <a class="el" href="_nv_flex_ext_8h.html#ad0a9c7e2f907e46b60f6bacf402987ce">NvFlexExt.h</a>
</li>
<li>NvFlexExtCreateSoftFromMesh()
-: <a class="el" href="_nv_flex_ext_8h.html#a9f2c0daf521df4920e44cca1cb30b42c">NvFlexExt.h</a>
+: <a class="el" href="_nv_flex_ext_8h.html#a3a9ce6bba709625f6c338bd3070bd012">NvFlexExt.h</a>
</li>
<li>NvFlexExtCreateSoftMeshSkinning()
: <a class="el" href="_nv_flex_ext_8h.html#a6e3f12e9e92abb31b115cf31b33e34bb">NvFlexExt.h</a>
@@ -179,13 +179,13 @@
: <a class="el" href="_nv_flex_8h.html#ab559759820a4322aff061745ef26c867">NvFlex.h</a>
</li>
<li>NvFlexGetActive()
-: <a class="el" href="_nv_flex_8h.html#aeed8fe87fa073067af1a45560cc54a79">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#a1bd4b70e0118abe18ca5fe85157299b6">NvFlex.h</a>
</li>
<li>NvFlexGetActiveCount()
: <a class="el" href="_nv_flex_8h.html#a2345372dea2ad4f043153a84e7a2c407">NvFlex.h</a>
</li>
<li>NvFlexGetAnisotropy()
-: <a class="el" href="_nv_flex_8h.html#ae28167c680ad56dcff600ce0a223cec5">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#aef768edc8e4df1a78a94a6c971541550">NvFlex.h</a>
</li>
<li>NvFlexGetBounds()
: <a class="el" href="_nv_flex_8h.html#ab1eec84a21b1872fba11c9b4cc1d1629">NvFlex.h</a>
@@ -197,7 +197,7 @@
: <a class="el" href="_nv_flex_8h.html#ad56e661161763579afb375b3841eb5ff">NvFlex.h</a>
</li>
<li>NvFlexGetDensities()
-: <a class="el" href="_nv_flex_8h.html#a6f6f14e625dc744a127be81e6dc4cb74">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#a3a20cc2539983a009caaf77ec9ceab82">NvFlex.h</a>
</li>
<li>NvFlexGetDetailTimers()
: <a class="el" href="_nv_flex_8h.html#ab1efb6764f65900cb09f0188ad6da08a">NvFlex.h</a>
@@ -206,37 +206,43 @@
: <a class="el" href="_nv_flex_8h.html#a2ac0a898a565a2cdf13b80acd4a3555c">NvFlex.h</a>
</li>
<li>NvFlexGetDeviceLatency()
-: <a class="el" href="_nv_flex_8h.html#a221a4621ab98eca6ecd3368d288154a4">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#aa77d2a4edd4ccd79c9389854dca80613">NvFlex.h</a>
</li>
<li>NvFlexGetDeviceName()
: <a class="el" href="_nv_flex_8h.html#a4c451971259524c6878b6b1ed4023ada">NvFlex.h</a>
</li>
<li>NvFlexGetDiffuseParticles()
-: <a class="el" href="_nv_flex_8h.html#a37ada4b95999cc253dfb049b99030d50">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#afa458a6eec8b0d117e53c40c13788fd9">NvFlex.h</a>
</li>
<li>NvFlexGetDynamicTriangles()
: <a class="el" href="_nv_flex_8h.html#abdfd0834422dd99154a27962614525e5">NvFlex.h</a>
</li>
+<li>NvFlexGetNeighbors()
+: <a class="el" href="_nv_flex_8h.html#ade1ef600ada4d7567e515258b289e209">NvFlex.h</a>
+</li>
<li>NvFlexGetNormals()
-: <a class="el" href="_nv_flex_8h.html#aadb2a0cf125e4a6b2f3443ab7dcbd3d4">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#a73d87b460a34c52ff4b616e97a53ade7">NvFlex.h</a>
</li>
<li>NvFlexGetParams()
: <a class="el" href="_nv_flex_8h.html#a581b458848039220203547af53de128f">NvFlex.h</a>
</li>
<li>NvFlexGetParticles()
-: <a class="el" href="_nv_flex_8h.html#a84f06fff995d8eb034cff81c811fa312">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#aaff62cfd50431d82af5d04a6c9ac4ffd">NvFlex.h</a>
</li>
<li>NvFlexGetPhases()
-: <a class="el" href="_nv_flex_8h.html#a15b7a5449bee38bbe5dcaf23690f09f5">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#accc944f0e76ee2e5d67c3f977b150806">NvFlex.h</a>
</li>
<li>NvFlexGetRestParticles()
-: <a class="el" href="_nv_flex_8h.html#affb884bcf3e7e389812d0b52b0fc0490">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#aafc89f87307602fb9bfa8f6668122121">NvFlex.h</a>
</li>
-<li>NvFlexGetRigidTransforms()
-: <a class="el" href="_nv_flex_8h.html#a3eafe7fe6b200c757c7402eca7d13f6d">NvFlex.h</a>
+<li>NvFlexGetRigids()
+: <a class="el" href="_nv_flex_8h.html#ab5cc56e228374b1da0910356b3172b4e">NvFlex.h</a>
</li>
<li>NvFlexGetSmoothParticles()
-: <a class="el" href="_nv_flex_8h.html#abfa62e01c4f4511d3f6a00ab6a0f257a">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#a96a771dd328d019e6164e5f23d29ffcb">NvFlex.h</a>
+</li>
+<li>NvFlexGetSolverDesc()
+: <a class="el" href="_nv_flex_8h.html#afd6aff58269d6c359df2453c96397840">NvFlex.h</a>
</li>
<li>NvFlexGetSolverLibrary()
: <a class="el" href="_nv_flex_8h.html#ae0d57e4fc2b3b51ec08f7da0a28ff343">NvFlex.h</a>
@@ -251,7 +257,7 @@
: <a class="el" href="_nv_flex_8h.html#a60794d849b4184335e2a0ddec0a9e6a2">NvFlex.h</a>
</li>
<li>NvFlexGetVelocities()
-: <a class="el" href="_nv_flex_8h.html#a67bd9669086e823ebe33d08d14f5b2b9">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#afbcbff4e4865105514c194398ab3a7b0">NvFlex.h</a>
</li>
<li>NvFlexGetVersion()
: <a class="el" href="_nv_flex_8h.html#ac25ec5de38c177db51198bb620644d36">NvFlex.h</a>
@@ -260,11 +266,17 @@
: <a class="el" href="_nv_flex_8h.html#a687e5ec141948f779faa9183b68cb743">NvFlex.h</a>
</li>
<li>NvFlexMakePhase()
-: <a class="el" href="_nv_flex_8h.html#af53fa9d7caef50db346475065504848d">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#ab43db5f28808f8038cfc9330d4b47d57">NvFlex.h</a>
+</li>
+<li>NvFlexMakePhaseWithChannels()
+: <a class="el" href="_nv_flex_8h.html#a615e8070212c24a70e7a849120c13353">NvFlex.h</a>
</li>
<li>NvFlexMakeShapeFlags()
: <a class="el" href="_nv_flex_8h.html#ad6ee1e23e0c49aad63df8f605182de3a">NvFlex.h</a>
</li>
+<li>NvFlexMakeShapeFlagsWithChannels()
+: <a class="el" href="_nv_flex_8h.html#ad83b7fb561a91467a3094771bb682b96">NvFlex.h</a>
+</li>
<li>NvFlexMap()
: <a class="el" href="_nv_flex_8h.html#a0898bb9210440b159688d4647f6eb083">NvFlex.h</a>
</li>
@@ -281,7 +293,10 @@
: <a class="el" href="_nv_flex_8h.html#ae6671f352bd77e296609d0bc2a57fd11">NvFlex.h</a>
</li>
<li>NvFlexSetActive()
-: <a class="el" href="_nv_flex_8h.html#aea2af336bdd96d7168c3acdce6d1875d">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#adc0c97635cdbb3da7b571574a3b38990">NvFlex.h</a>
+</li>
+<li>NvFlexSetActiveCount()
+: <a class="el" href="_nv_flex_8h.html#a677dc591fe443ae058701966c52d1316">NvFlex.h</a>
</li>
<li>NvFlexSetDiffuseParticles()
: <a class="el" href="_nv_flex_8h.html#a5a7213593dd9a23d9d67f8517d1da9de">NvFlex.h</a>
@@ -293,31 +308,34 @@
: <a class="el" href="_nv_flex_8h.html#a7f2b59fba77c60ce116e1eac57d63e50">NvFlex.h</a>
</li>
<li>NvFlexSetNormals()
-: <a class="el" href="_nv_flex_8h.html#add03fd357383845f07e0596290faf316">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#a32e8fdb39029a2564c129bd493c52058">NvFlex.h</a>
</li>
<li>NvFlexSetParams()
: <a class="el" href="_nv_flex_8h.html#ae2db6ad8006027c1acf2315a0d15fe71">NvFlex.h</a>
</li>
<li>NvFlexSetParticles()
-: <a class="el" href="_nv_flex_8h.html#abef057ac89ba5cf1cd71f0084f9313de">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#a7ec5ebe3e98a44a2058d6be74b2cb633">NvFlex.h</a>
</li>
<li>NvFlexSetPhases()
-: <a class="el" href="_nv_flex_8h.html#a3117f92571613709936291c48414e521">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#aa1d44495e442f8cae874c635ef847478">NvFlex.h</a>
</li>
<li>NvFlexSetRestParticles()
-: <a class="el" href="_nv_flex_8h.html#aa457096286567a37d4f1d5f4857d9296">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#a125cfd9817437bb4f4bcb9418efa3dda">NvFlex.h</a>
</li>
<li>NvFlexSetRigids()
-: <a class="el" href="_nv_flex_8h.html#a89c872e761a53c87375f536a0ef597d8">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#aa8b7bfeffb0fa7dc6dbd291fee87edc9">NvFlex.h</a>
</li>
<li>NvFlexSetShapes()
: <a class="el" href="_nv_flex_8h.html#aea4e7117722df53dfe44c676496117fa">NvFlex.h</a>
</li>
+<li>NvFlexSetSolverDescDefaults()
+: <a class="el" href="_nv_flex_8h.html#a69a33d464c002a8916a5925c6ef32ae6">NvFlex.h</a>
+</li>
<li>NvFlexSetSprings()
: <a class="el" href="_nv_flex_8h.html#ae67c0cab2ecee8eb9485a26ef0fad6a9">NvFlex.h</a>
</li>
<li>NvFlexSetVelocities()
-: <a class="el" href="_nv_flex_8h.html#afe09e63d22c5156fe24cd2d2bc069c04">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#ae2b271f123db0054512936f2acc6467f">NvFlex.h</a>
</li>
<li>NvFlexShutdown()
: <a class="el" href="_nv_flex_8h.html#aaf59e45ada57c7f958a8030099cbe211">NvFlex.h</a>
@@ -332,7 +350,7 @@
: <a class="el" href="_nv_flex_8h.html#a78045a8d4e856372df108dc616a94cd8">NvFlex.h</a>
</li>
<li>NvFlexUpdateConvexMesh()
-: <a class="el" href="_nv_flex_8h.html#a69289002a6f8ecd697118f0ec6572f5d">NvFlex.h</a>
+: <a class="el" href="_nv_flex_8h.html#ab452c355f92dda050d4b4dafb8e71b03">NvFlex.h</a>
</li>
<li>NvFlexUpdateDistanceField()
: <a class="el" href="_nv_flex_8h.html#a584ffb275b9986fd5444ed1a7ea247d9">NvFlex.h</a>
@@ -343,11 +361,14 @@
<li>NvFlexUpdateTriangleMesh()
: <a class="el" href="_nv_flex_8h.html#a4958c555f0ed65dee54c37af32529356">NvFlex.h</a>
</li>
+<li>NvFlexWait()
+: <a class="el" href="_nv_flex_8h.html#a615d2e6eec2486a5db815d929f9c642c">NvFlex.h</a>
+</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
-Generated on Wed Feb 22 2017 12:18:22 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
+Generated on Fri Jun 9 2017 09:57:25 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
diff --git a/doc/_static/api/globals_type.html b/doc/_static/api/globals_type.html
index 3ba1e90..1e6db85 100644
--- a/doc/_static/api/globals_type.html
+++ b/doc/_static/api/globals_type.html
@@ -20,7 +20,7 @@
<td id="projectlogo"><img alt="Logo" src="nvidia.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">FLEX
- &#160;<span id="projectnumber">1.1.0</span>
+ &#160;<span id="projectnumber">1.2.0</span>
</div>
</td>
</tr>
@@ -63,7 +63,7 @@
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
-Generated on Wed Feb 22 2017 12:18:22 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
+Generated on Fri Jun 9 2017 09:57:25 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
diff --git a/doc/_static/api/index.html b/doc/_static/api/index.html
index 3130b0d..4066cf8 100644
--- a/doc/_static/api/index.html
+++ b/doc/_static/api/index.html
@@ -20,7 +20,7 @@
<td id="projectlogo"><img alt="Logo" src="nvidia.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">FLEX
- &#160;<span id="projectnumber">1.1.0</span>
+ &#160;<span id="projectnumber">1.2.0</span>
</div>
</td>
</tr>
@@ -43,7 +43,7 @@
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
-Generated on Wed Feb 22 2017 12:18:22 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
+Generated on Fri Jun 9 2017 09:57:25 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
diff --git a/doc/_static/api/struct_nv_flex_solver_callback.html b/doc/_static/api/struct_nv_flex_solver_callback.html
index d96d2d2..041be39 100644
--- a/doc/_static/api/struct_nv_flex_solver_callback.html
+++ b/doc/_static/api/struct_nv_flex_solver_callback.html
@@ -20,7 +20,7 @@
<td id="projectlogo"><img alt="Logo" src="nvidia.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">FLEX
- &#160;<span id="projectnumber">1.1.0</span>
+ &#160;<span id="projectnumber">1.2.0</span>
</div>
</td>
</tr>
@@ -77,7 +77,7 @@ Data Fields</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
-Generated on Wed Feb 22 2017 12:18:22 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
+Generated on Fri Jun 9 2017 09:57:25 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
diff --git a/doc/_static/api/struct_nv_flex_vector.html b/doc/_static/api/struct_nv_flex_vector.html
index fa3a3d8..135150d 100644
--- a/doc/_static/api/struct_nv_flex_vector.html
+++ b/doc/_static/api/struct_nv_flex_vector.html
@@ -20,7 +20,7 @@
<td id="projectlogo"><img alt="Logo" src="nvidia.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">FLEX
- &#160;<span id="projectnumber">1.1.0</span>
+ &#160;<span id="projectnumber">1.2.0</span>
</div>
</td>
</tr>
@@ -41,10 +41,10 @@
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
-<tr class="memitem:a9d7ff86aeebc0fcfa5c125d7872e2e3b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_nv_flex_vector.html#a9d7ff86aeebc0fcfa5c125d7872e2e3b">NvFlexVector</a> (<a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *l, int <a class="el" href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0">size</a>=0)</td></tr>
-<tr class="separator:a9d7ff86aeebc0fcfa5c125d7872e2e3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a026d8fcd71bb256610401cc861345428"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_nv_flex_vector.html#a026d8fcd71bb256610401cc861345428">NvFlexVector</a> (<a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *l, const T *ptr, int <a class="el" href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0">size</a>)</td></tr>
-<tr class="separator:a026d8fcd71bb256610401cc861345428"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a51edbab41cc249bc117c7ce17651007c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_nv_flex_vector.html#a51edbab41cc249bc117c7ce17651007c">NvFlexVector</a> (<a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *l, int <a class="el" href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0">size</a>=0, <a class="el" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3">NvFlexBufferType</a> <a class="el" href="struct_nv_flex_vector.html#a24fa4e3807b492cd5fbdc6c1c235062b">type</a>=<a class="el" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8">eNvFlexBufferHost</a>)</td></tr>
+<tr class="separator:a51edbab41cc249bc117c7ce17651007c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae5818b10d20083ee9ed0aa7826ea7ab8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_nv_flex_vector.html#ae5818b10d20083ee9ed0aa7826ea7ab8">NvFlexVector</a> (<a class="el" href="_nv_flex_8h.html#a3078976e98f370a9fbdb11db80f1f318">NvFlexLibrary</a> *l, const T *ptr, int <a class="el" href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0">size</a>, <a class="el" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3">NvFlexBufferType</a> <a class="el" href="struct_nv_flex_vector.html#a24fa4e3807b492cd5fbdc6c1c235062b">type</a>=<a class="el" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8">eNvFlexBufferHost</a>)</td></tr>
+<tr class="separator:ae5818b10d20083ee9ed0aa7826ea7ab8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb9c0f47544c0cdebe21efb6908dd3a0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_nv_flex_vector.html#afb9c0f47544c0cdebe21efb6908dd3a0">~NvFlexVector</a> ()</td></tr>
<tr class="separator:afb9c0f47544c0cdebe21efb6908dd3a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0309d584abbe900d3af3823a79e89ee7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_nv_flex_vector.html#a0309d584abbe900d3af3823a79e89ee7">init</a> (int <a class="el" href="struct_nv_flex_vector.html#a1933b633e9055d9adf8b62c4aa8a3bc0">size</a>)</td></tr>
@@ -90,9 +90,11 @@ Data Fields</h2></td></tr>
<tr class="separator:ad462ae46f0270161c79572762b558124"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac28b5fd10fd519265c66cf4a0ce8e6ae"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_nv_flex_vector.html#ac28b5fd10fd519265c66cf4a0ce8e6ae">capacity</a></td></tr>
<tr class="separator:ac28b5fd10fd519265c66cf4a0ce8e6ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a24fa4e3807b492cd5fbdc6c1c235062b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3">NvFlexBufferType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_nv_flex_vector.html#a24fa4e3807b492cd5fbdc6c1c235062b">type</a></td></tr>
+<tr class="separator:a24fa4e3807b492cd5fbdc6c1c235062b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" id="a9d7ff86aeebc0fcfa5c125d7872e2e3b"></a>
+<a class="anchor" id="a51edbab41cc249bc117c7ce17651007c"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
@@ -111,7 +113,13 @@ template&lt;typename T &gt; </div>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
- <td class="paramname"><em>size</em> = <code>0</code>&#160;</td>
+ <td class="paramname"><em>size</em> = <code>0</code>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3">NvFlexBufferType</a>&#160;</td>
+ <td class="paramname"><em>type</em> = <code><a class="el" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8">eNvFlexBufferHost</a></code>&#160;</td>
</tr>
<tr>
<td></td>
@@ -128,7 +136,7 @@ template&lt;typename T &gt; </div>
</div>
</div>
-<a class="anchor" id="a026d8fcd71bb256610401cc861345428"></a>
+<a class="anchor" id="ae5818b10d20083ee9ed0aa7826ea7ab8"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
@@ -153,7 +161,13 @@ template&lt;typename T &gt; </div>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
- <td class="paramname"><em>size</em>&#160;</td>
+ <td class="paramname"><em>size</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3">NvFlexBufferType</a>&#160;</td>
+ <td class="paramname"><em>type</em> = <code><a class="el" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3aec63221ddc1b13eff4db55fbf6cd85f8">eNvFlexBufferHost</a></code>&#160;</td>
</tr>
<tr>
<td></td>
@@ -682,10 +696,24 @@ template&lt;typename T &gt; </div>
</div>
</div>
+<a class="anchor" id="a24fa4e3807b492cd5fbdc6c1c235062b"></a>
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename T &gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="_nv_flex_8h.html#a169e4c126acf46bdebf76c36a44deca3">NvFlexBufferType</a> <a class="el" href="struct_nv_flex_vector.html">NvFlexVector</a>&lt; T &gt;::type</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+</div>
+</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
-Generated on Wed Feb 22 2017 12:18:22 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
+Generated on Fri Jun 9 2017 09:57:25 for FLEX by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
diff --git a/doc/genindex.html b/doc/genindex.html
index 008ed9b..c055e44 100644
--- a/doc/genindex.html
+++ b/doc/genindex.html
@@ -8,7 +8,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=Edge"/>
- <title>Index &mdash; NVIDIA Flex 1.1.0 documentation</title>
+ <title>Index &mdash; NVIDIA Flex 1.2.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -19,7 +19,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
- VERSION: '1.1.0',
+ VERSION: '1.2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -32,7 +32,7 @@
<script type="text/javascript" src="_static/bootstrap.js"></script>
<script type="text/javascript" src="_static/jquery.cookie.js"></script>
<script type="text/javascript" src="_static/jquery.storageapi.js"></script>
- <link rel="top" title="NVIDIA Flex 1.1.0 documentation" href="index.html" />
+ <link rel="top" title="NVIDIA Flex 1.2.0 documentation" href="index.html" />
</head>
<body>
<nav class="navbar navbar-inverse navbar-default">
@@ -56,7 +56,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="index.html">NVIDIA Flex 1.1.0 documentation</a></li>
+ <li><a href="index.html">NVIDIA Flex 1.2.0 documentation</a></li>
</ul>
</div>
</div>
@@ -114,17 +114,18 @@
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="releasenotes.html">Release Notes</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id1">1.1.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id2">1.0.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id3">0.9.5</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id4">0.9.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id5">0.8.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id6">0.2.5</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id7">0.2.3</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id8">0.2.2</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id9">0.2.1</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id10">0.2.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id11">0.1.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id1">1.2.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id2">1.1.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id3">1.0.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id4">0.9.5</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id5">0.9.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id6">0.8.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id7">0.2.5</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id8">0.2.3</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id9">0.2.2</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id10">0.2.1</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id11">0.2.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id12">0.1.0</a></li>
</ul>
</li>
</ul>
@@ -169,7 +170,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="index.html">NVIDIA Flex 1.1.0 documentation</a></li>
+ <li><a href="index.html">NVIDIA Flex 1.2.0 documentation</a></li>
</ul>
</div>
</div>
diff --git a/doc/index.html b/doc/index.html
index 455befb..b7003c8 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -7,7 +7,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=Edge"/>
- <title>NVIDIA Flex &mdash; NVIDIA Flex 1.1.0 documentation</title>
+ <title>NVIDIA Flex &mdash; NVIDIA Flex 1.2.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -18,7 +18,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
- VERSION: '1.1.0',
+ VERSION: '1.2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -31,7 +31,7 @@
<script type="text/javascript" src="_static/bootstrap.js"></script>
<script type="text/javascript" src="_static/jquery.cookie.js"></script>
<script type="text/javascript" src="_static/jquery.storageapi.js"></script>
- <link rel="top" title="NVIDIA Flex 1.1.0 documentation" href="#" />
+ <link rel="top" title="NVIDIA Flex 1.2.0 documentation" href="#" />
<link rel="next" title="Manual" href="manual.html" />
</head>
<body>
@@ -56,7 +56,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="#">NVIDIA Flex 1.1.0 documentation</a></li>
+ <li><a href="#">NVIDIA Flex 1.2.0 documentation</a></li>
</ul>
</div>
</div>
@@ -114,17 +114,18 @@
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="releasenotes.html">Release Notes</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id1">1.1.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id2">1.0.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id3">0.9.5</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id4">0.9.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id5">0.8.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id6">0.2.5</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id7">0.2.3</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id8">0.2.2</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id9">0.2.1</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id10">0.2.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id11">0.1.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id1">1.2.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id2">1.1.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id3">1.0.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id4">0.9.5</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id5">0.9.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id6">0.8.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id7">0.2.5</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id8">0.2.3</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id9">0.2.2</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id10">0.2.1</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id11">0.2.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id12">0.1.0</a></li>
</ul>
</li>
</ul>
@@ -204,7 +205,7 @@ the solver API and usage.</p>
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="#">NVIDIA Flex 1.1.0 documentation</a></li>
+ <li><a href="#">NVIDIA Flex 1.2.0 documentation</a></li>
</ul>
</div>
</div>
diff --git a/doc/manual.html b/doc/manual.html
index be6fc69..6652a87 100644
--- a/doc/manual.html
+++ b/doc/manual.html
@@ -7,7 +7,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=Edge"/>
- <title>Manual &mdash; NVIDIA Flex 1.1.0 documentation</title>
+ <title>Manual &mdash; NVIDIA Flex 1.2.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -18,7 +18,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
- VERSION: '1.1.0',
+ VERSION: '1.2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -31,7 +31,7 @@
<script type="text/javascript" src="_static/bootstrap.js"></script>
<script type="text/javascript" src="_static/jquery.cookie.js"></script>
<script type="text/javascript" src="_static/jquery.storageapi.js"></script>
- <link rel="top" title="NVIDIA Flex 1.1.0 documentation" href="index.html" />
+ <link rel="top" title="NVIDIA Flex 1.2.0 documentation" href="index.html" />
<link rel="next" title="Release Notes" href="releasenotes.html" />
<link rel="prev" title="NVIDIA Flex" href="index.html" />
</head>
@@ -57,7 +57,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="index.html">NVIDIA Flex 1.1.0 documentation</a></li>
+ <li><a href="index.html">NVIDIA Flex 1.2.0 documentation</a></li>
</ul>
</div>
</div>
@@ -115,17 +115,18 @@
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="releasenotes.html">Release Notes</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id1">1.1.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id2">1.0.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id3">0.9.5</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id4">0.9.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id5">0.8.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id6">0.2.5</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id7">0.2.3</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id8">0.2.2</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id9">0.2.1</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id10">0.2.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id11">0.1.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id1">1.2.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id2">1.1.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id3">1.0.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id4">0.9.5</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id5">0.9.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id6">0.8.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id7">0.2.5</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id8">0.2.3</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id9">0.2.2</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id10">0.2.1</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id11">0.2.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id12">0.1.0</a></li>
</ul>
</li>
</ul>
@@ -179,21 +180,26 @@
<div class="section" id="quick-start">
<span id="quick"></span><h3>Quick Start<a class="headerlink" href="#quick-start" title="Permalink to this headline">¶</a></h3>
<p>The example code below shows how to initialize the library, create a new solver (similar to a scene in PhysX), and how to tick the solver:</p>
-<div class="highlight-cpp"><div class="highlight"><pre><span class="cp">#include &lt;NvFlex.h&gt;</span>
+<div class="highlight-cpp"><div class="highlight"><pre><span class="n">NvFlexLibrary</span><span class="o">*</span> <span class="n">library</span> <span class="o">=</span> <span class="n">NvFlexInit</span><span class="p">();</span>
-<span class="n">NvFlexLibrary</span><span class="o">*</span> <span class="n">library</span> <span class="o">=</span> <span class="n">NvFlexInit</span><span class="p">();</span>
-<span class="n">NvFlexSolver</span><span class="o">*</span> <span class="n">solver</span> <span class="o">=</span> <span class="n">NvFlexCreateSolver</span><span class="p">(</span><span class="n">library</span><span class="p">);</span>
+<span class="c1">// create new solver</span>
+<span class="n">NvFlexSolverDesc</span> <span class="n">solverDesc</span><span class="p">;</span>
+<span class="n">NvFlexSetSolverDescDefaults</span><span class="p">(</span><span class="o">&amp;</span><span class="n">solverDesc</span><span class="p">);</span>
+<span class="n">solverDesc</span><span class="p">.</span><span class="n">maxParticles</span> <span class="o">=</span> <span class="n">n</span><span class="p">;</span>
+<span class="n">solverDesc</span><span class="p">.</span><span class="n">maxDiffuseParticles</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
-<span class="n">NvFlexBuffer</span><span class="o">*</span> <span class="n">particleBuffer</span> <span class="o">=</span> <span class="n">NvlexAllocBuffer</span><span class="p">(</span><span class="n">library</span><span class="p">,</span> <span class="n">n</span><span class="p">,</span> <span class="k">sizeof</span><span class="p">(</span><span class="n">Vec4</span><span class="p">),</span> <span class="n">eNvFlexBufferHost</span><span class="p">);</span>
-<span class="n">NvFlexBuffer</span><span class="o">*</span> <span class="n">velocityBuffer</span> <span class="o">=</span> <span class="n">NvlexAllocBuffer</span><span class="p">(</span><span class="n">library</span><span class="p">,</span> <span class="n">n</span><span class="p">,</span> <span class="k">sizeof</span><span class="p">(</span><span class="n">Vec4</span><span class="p">),</span> <span class="n">eNvFlexBufferHost</span><span class="p">);</span>
-<span class="n">NvFlexBuffer</span><span class="o">*</span> <span class="n">phaseBuffer</span> <span class="o">=</span> <span class="n">NvlexAllocBuffer</span><span class="p">(</span><span class="n">library</span><span class="p">,</span> <span class="n">n</span><span class="p">,</span> <span class="k">sizeof</span><span class="p">(</span><span class="kt">int</span><span class="p">),</span> <span class="n">eNvFlexBufferHost</span><span class="p">);</span>
+<span class="n">NvFlexSolver</span><span class="o">*</span> <span class="n">solver</span> <span class="o">=</span> <span class="n">NvFlexCreateSolver</span><span class="p">(</span><span class="n">library</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">solverDesc</span><span class="p">);</span>
+
+<span class="n">NvFlexBuffer</span><span class="o">*</span> <span class="n">particleBuffer</span> <span class="o">=</span> <span class="n">NvFlexAllocBuffer</span><span class="p">(</span><span class="n">library</span><span class="p">,</span> <span class="n">n</span><span class="p">,</span> <span class="k">sizeof</span><span class="p">(</span><span class="n">float4</span><span class="p">),</span> <span class="n">eNvFlexBufferHost</span><span class="p">);</span>
+<span class="n">NvFlexBuffer</span><span class="o">*</span> <span class="n">velocityBuffer</span> <span class="o">=</span> <span class="n">NvFlexAllocBuffer</span><span class="p">(</span><span class="n">library</span><span class="p">,</span> <span class="n">n</span><span class="p">,</span> <span class="k">sizeof</span><span class="p">(</span><span class="n">float4</span><span class="p">),</span> <span class="n">eNvFlexBufferHost</span><span class="p">);</span>
+<span class="n">NvFlexBuffer</span><span class="o">*</span> <span class="n">phaseBuffer</span> <span class="o">=</span> <span class="n">NvFlexAllocBuffer</span><span class="p">(</span><span class="n">library</span><span class="p">,</span> <span class="n">n</span><span class="p">,</span> <span class="k">sizeof</span><span class="p">(</span><span class="kt">int</span><span class="p">),</span> <span class="n">eNvFlexBufferHost</span><span class="p">);</span>
<span class="k">while</span><span class="p">(</span><span class="o">!</span><span class="n">done</span><span class="p">)</span>
<span class="p">{</span>
<span class="c1">// map buffers for reading / writing</span>
- <span class="n">float4</span><span class="o">*</span> <span class="n">particles</span> <span class="o">=</span> <span class="p">(</span><span class="n">float4</span><span class="o">*</span><span class="p">)</span><span class="n">NvlexMap</span><span class="p">(</span><span class="n">particles</span><span class="p">,</span> <span class="n">eNvFlexMapWait</span><span class="p">);</span>
- <span class="n">float3</span><span class="o">*</span> <span class="n">velocities</span> <span class="o">=</span> <span class="p">(</span><span class="n">float3</span><span class="o">*</span><span class="p">)</span><span class="n">NvFlexMap</span><span class="p">(</span><span class="n">velocities</span><span class="p">,</span> <span class="n">eNvFlexMapWait</span><span class="p">);</span>
- <span class="kt">int</span><span class="o">*</span> <span class="n">phases</span> <span class="o">=</span> <span class="p">(</span><span class="kt">int</span><span class="o">*</span><span class="p">)</span><span class="n">NvFlexMap</span><span class="p">(</span><span class="n">phases</span><span class="p">,</span> <span class="n">eNvFlexMapWait</span><span class="p">);</span>
+ <span class="n">float4</span><span class="o">*</span> <span class="n">particles</span> <span class="o">=</span> <span class="p">(</span><span class="n">float4</span><span class="o">*</span><span class="p">)</span><span class="n">NvFlexMap</span><span class="p">(</span><span class="n">particleBuffer</span><span class="p">,</span> <span class="n">eNvFlexMapWait</span><span class="p">);</span>
+ <span class="n">float3</span><span class="o">*</span> <span class="n">velocities</span> <span class="o">=</span> <span class="p">(</span><span class="n">float3</span><span class="o">*</span><span class="p">)</span><span class="n">NvFlexMap</span><span class="p">(</span><span class="n">velocityBuffer</span><span class="p">,</span> <span class="n">eNvFlexMapWait</span><span class="p">);</span>
+ <span class="kt">int</span><span class="o">*</span> <span class="n">phases</span> <span class="o">=</span> <span class="p">(</span><span class="kt">int</span><span class="o">*</span><span class="p">)</span><span class="n">NvFlexMap</span><span class="p">(</span><span class="n">phaseBuffer</span><span class="p">,</span> <span class="n">eNvFlexMapWait</span><span class="p">);</span>
<span class="c1">// spawn (user method)</span>
<span class="n">SpawnParticles</span><span class="p">(</span><span class="n">particles</span><span class="p">,</span> <span class="n">velocities</span><span class="p">,</span> <span class="n">phases</span><span class="p">);</span>
@@ -207,17 +213,17 @@
<span class="n">NvFlexUnmap</span><span class="p">(</span><span class="n">phaseBuffer</span><span class="p">);</span>
<span class="c1">// write to device (async)</span>
- <span class="n">NvFlexSetParticles</span><span class="p">(</span><span class="n">particleBuffer</span><span class="p">,</span> <span class="n">n</span><span class="p">);</span>
- <span class="n">NvFlexSetVelocities</span><span class="p">(</span><span class="n">velocityBuffer</span><span class="p">,</span> <span class="n">n</span><span class="p">);</span>
- <span class="n">NvFlexSetPhases</span><span class="p">(</span><span class="n">phaseBuffer</span><span class="p">,</span> <span class="n">n</span><span class="p">);</span>
+ <span class="n">NvFlexSetParticles</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">particleBuffer</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+ <span class="n">NvFlexSetVelocities</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">velocityBuffer</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+ <span class="n">NvFlexSetPhases</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">phaseBuffer</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
<span class="c1">// tick</span>
<span class="n">NvFlexUpdateSolver</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">dt</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="nb">false</span><span class="p">);</span>
<span class="c1">// read back (async)</span>
- <span class="n">NvFlexGetParticles</span><span class="p">(</span><span class="n">particleBuffer</span><span class="p">,</span> <span class="n">n</span><span class="p">);</span>
- <span class="n">NvFlexGetVelocities</span><span class="p">(</span><span class="n">velocityBuffer</span><span class="p">,</span> <span class="n">n</span><span class="p">);</span>
- <span class="n">NvFlexGetPhases</span><span class="p">(</span><span class="n">phaseBuffer</span><span class="p">,</span> <span class="n">n</span><span class="p">);</span>
+ <span class="n">NvFlexGetParticles</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">particleBuffer</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+ <span class="n">NvFlexGetVelocities</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">velocityBuffer</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+ <span class="n">NvFlexGetPhases</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">phaseBuffer</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
<span class="p">}</span>
<span class="n">NvFlexFreeBuffer</span><span class="p">(</span><span class="n">particleBuffer</span><span class="p">);</span>
@@ -250,9 +256,9 @@
<span class="n">NvFlexBuffer</span><span class="o">*</span> <span class="n">phaseBuffer</span> <span class="o">=</span> <span class="n">NvFlexAllocBuffer</span><span class="p">(</span><span class="n">library</span><span class="p">,</span> <span class="n">n</span><span class="p">,</span> <span class="k">sizeof</span><span class="p">(</span><span class="kt">int</span><span class="p">),</span> <span class="n">eNvFlexBufferHost</span><span class="p">);</span>
<span class="c1">// map buffers for reading / writing</span>
-<span class="n">float4</span><span class="o">*</span> <span class="n">particles</span> <span class="o">=</span> <span class="p">(</span><span class="n">float4</span><span class="o">*</span><span class="p">)</span><span class="n">NvFlexMap</span><span class="p">(</span><span class="n">particles</span><span class="p">,</span> <span class="n">eNvFlexMapWait</span><span class="p">);</span>
-<span class="n">float3</span><span class="o">*</span> <span class="n">velocities</span> <span class="o">=</span> <span class="p">(</span><span class="n">float3</span><span class="o">*</span><span class="p">)</span><span class="n">NvFlexMap</span><span class="p">(</span><span class="n">velocities</span><span class="p">,</span> <span class="n">eNvFlexMapWait</span><span class="p">);</span>
-<span class="kt">int</span><span class="o">*</span> <span class="n">phases</span> <span class="o">=</span> <span class="p">(</span><span class="kt">int</span><span class="o">*</span><span class="p">)</span><span class="n">NvFlexMap</span><span class="p">(</span><span class="n">phases</span><span class="p">,</span> <span class="n">eFlexMapWait</span><span class="p">);</span>
+<span class="n">float4</span><span class="o">*</span> <span class="n">particles</span> <span class="o">=</span> <span class="p">(</span><span class="n">float4</span><span class="o">*</span><span class="p">)</span><span class="n">NvFlexMap</span><span class="p">(</span><span class="n">particlesBuffer</span><span class="p">,</span> <span class="n">eNvFlexMapWait</span><span class="p">);</span>
+<span class="n">float3</span><span class="o">*</span> <span class="n">velocities</span> <span class="o">=</span> <span class="p">(</span><span class="n">float3</span><span class="o">*</span><span class="p">)</span><span class="n">NvFlexMap</span><span class="p">(</span><span class="n">velocityBuffer</span><span class="p">,</span> <span class="n">eNvFlexMapWait</span><span class="p">);</span>
+<span class="kt">int</span><span class="o">*</span> <span class="n">phases</span> <span class="o">=</span> <span class="p">(</span><span class="kt">int</span><span class="o">*</span><span class="p">)</span><span class="n">NvFlexMap</span><span class="p">(</span><span class="n">phaseBuffer</span><span class="p">,</span> <span class="n">eFlexMapWait</span><span class="p">);</span>
<span class="c1">// spawn particles</span>
<span class="k">for</span> <span class="p">(</span><span class="kt">int</span> <span class="n">i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span> <span class="n">i</span> <span class="o">&lt;</span> <span class="n">n</span><span class="p">;</span> <span class="o">++</span><span class="n">i</span><span class="p">)</span>
@@ -268,9 +274,9 @@
<span class="n">NvFlexUnmap</span><span class="p">(</span><span class="n">phaseBuffer</span><span class="p">);</span>
<span class="c1">// write to device (async)</span>
-<span class="n">NvFlexSetParticles</span><span class="p">(</span><span class="n">particleBuffer</span><span class="p">,</span> <span class="n">n</span><span class="p">);</span>
-<span class="n">NvFlexSetVelocities</span><span class="p">(</span><span class="n">velocityBuffer</span><span class="p">,</span> <span class="n">n</span><span class="p">);</span>
-<span class="n">NvFlexSetPhases</span><span class="p">(</span><span class="n">phaseBuffer</span><span class="p">,</span> <span class="n">n</span><span class="p">);</span>
+<span class="n">NvFlexSetParticles</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">particleBuffer</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<span class="n">NvFlexSetVelocities</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">velocityBuffer</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<span class="n">NvFlexSetPhases</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">phaseBuffer</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
</pre></div>
</div>
<div class="section" id="radius">
@@ -309,7 +315,9 @@
<span class="n">activeIndices</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">i</span><span class="p">;</span>
<span class="n">NvFlexUnmap</span><span class="p">(</span><span class="n">activeBuffer</span><span class="p">);</span>
-<span class="n">NvFlexSetActive</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">activeBuffer</span><span class="p">,</span> <span class="mi">10</span><span class="p">)</span>
+
+<span class="n">NvFlexSetActive</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">activeBuffer</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">)</span>
+<span class="n">NvFlexSetActiveCount</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="mi">10</span><span class="p">);</span>
</pre></div>
</div>
<p><strong>Note:</strong> constraints referencing inactive particles may behave unexpectedly.</p>
@@ -634,34 +642,34 @@ simulation. Diffuse particles can be created through the <strong>NvFlexSetDiffus
<p>Synchronization occurs when you call <strong>NvFlexMap()</strong> on a simulation buffer. To avoid making the CPU wait a long time for the GPU to finish its work it is good practice to call <strong>NvFlexMap()</strong> as far away from the <strong>NvFlexUpdateSolver()</strong> and <strong>NvFlexGet*()</strong> as possible. This gives the GPU enough time to finish its work so that the new data is ready for when you call <strong>NvFlexMap()</strong>. The following snippet shows an example of this by performing the main game tick after the the read-back methods have been issued.:</p>
<div class="highlight-cpp"><div class="highlight"><pre><span class="k">while</span> <span class="p">(</span><span class="o">!</span><span class="n">done</span><span class="p">)</span>
<span class="p">{</span>
- <span class="c1">// map buffers for reading / writing (synchronizes with GPU)</span>
- <span class="n">float4</span><span class="o">*</span> <span class="n">particles</span> <span class="o">=</span> <span class="p">(</span><span class="n">float4</span><span class="o">*</span><span class="p">)</span><span class="n">NvFlexMap</span><span class="p">(</span><span class="n">particleBuffer</span><span class="p">,</span> <span class="n">eNvFlexMapWait</span><span class="p">);</span>
- <span class="n">float3</span><span class="o">*</span> <span class="n">velocities</span> <span class="o">=</span> <span class="p">(</span><span class="n">float3</span><span class="o">*</span><span class="p">)</span><span class="n">NvFlexMap</span><span class="p">(</span><span class="n">velocityBuffer</span><span class="p">,</span> <span class="n">eNvFlexMapWait</span><span class="p">);</span>
- <span class="kt">int</span><span class="o">*</span> <span class="n">phases</span> <span class="o">=</span> <span class="p">(</span><span class="kt">int</span><span class="o">*</span><span class="p">)</span><span class="n">NvFlexMap</span><span class="p">(</span><span class="n">phaseBuffer</span><span class="p">,</span> <span class="n">eNvFlexMapWait</span><span class="p">);</span>
+<span class="c1">// map buffers for reading / writing (synchronizes with GPU)</span>
+<span class="n">float4</span><span class="o">*</span> <span class="n">particles</span> <span class="o">=</span> <span class="p">(</span><span class="n">float4</span><span class="o">*</span><span class="p">)</span><span class="n">NvFlexMap</span><span class="p">(</span><span class="n">particleBuffer</span><span class="p">,</span> <span class="n">eNvFlexMapWait</span><span class="p">);</span>
+<span class="n">float3</span><span class="o">*</span> <span class="n">velocities</span> <span class="o">=</span> <span class="p">(</span><span class="n">float3</span><span class="o">*</span><span class="p">)</span><span class="n">NvFlexMap</span><span class="p">(</span><span class="n">velocityBuffer</span><span class="p">,</span> <span class="n">eNvFlexMapWait</span><span class="p">);</span>
+<span class="kt">int</span><span class="o">*</span> <span class="n">phases</span> <span class="o">=</span> <span class="p">(</span><span class="kt">int</span><span class="o">*</span><span class="p">)</span><span class="n">NvFlexMap</span><span class="p">(</span><span class="n">phaseBuffer</span><span class="p">,</span> <span class="n">eNvFlexMapWait</span><span class="p">);</span>
- <span class="c1">// application CPU-side particle update</span>
- <span class="n">UpdateBuffers</span><span class="p">(</span><span class="n">particles</span><span class="p">,</span> <span class="n">velocities</span><span class="p">,</span> <span class="n">phases</span><span class="p">);</span>
+<span class="c1">// application CPU-side particle update</span>
+<span class="n">UpdateBuffers</span><span class="p">(</span><span class="n">particles</span><span class="p">,</span> <span class="n">velocities</span><span class="p">,</span> <span class="n">phases</span><span class="p">);</span>
- <span class="c1">// unmap buffers</span>
- <span class="n">NvFlexUnmap</span><span class="p">(</span><span class="n">particleBuffer</span><span class="p">);</span>
- <span class="n">NvFlexUnmap</span><span class="p">(</span><span class="n">velocityBuffer</span><span class="p">);</span>
- <span class="n">NvFlexUnmap</span><span class="p">(</span><span class="n">phaseBuffer</span><span class="p">);</span>
+<span class="c1">// unmap buffers</span>
+<span class="n">NvFlexUnmap</span><span class="p">(</span><span class="n">particleBuffer</span><span class="p">);</span>
+<span class="n">NvFlexUnmap</span><span class="p">(</span><span class="n">velocityBuffer</span><span class="p">);</span>
+<span class="n">NvFlexUnmap</span><span class="p">(</span><span class="n">phaseBuffer</span><span class="p">);</span>
- <span class="c1">// write to device (async)</span>
- <span class="n">NvFlexSetParticles</span><span class="p">(</span><span class="n">particleBuffer</span><span class="p">,</span> <span class="n">n</span><span class="p">);</span>
- <span class="n">NvFlexSetVelocities</span><span class="p">(</span><span class="n">velocityBuffer</span><span class="p">,</span> <span class="n">n</span><span class="p">);</span>
- <span class="n">NvFlexSetPhases</span><span class="p">(</span><span class="n">phaseBuffer</span><span class="p">,</span> <span class="n">n</span><span class="p">);</span>
+<span class="c1">// write to device (async)</span>
+<span class="n">NvFlexSetParticles</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">particleBuffer</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<span class="n">NvFlexSetVelocities</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">velocityBuffer</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<span class="n">NvFlexSetPhases</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">phaseBuffer</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
- <span class="c1">// tick (async)</span>
- <span class="n">NvFlexUpdateSolver</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">dt</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<span class="c1">// tick (async)</span>
+<span class="n">NvFlexUpdateSolver</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">dt</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
- <span class="c1">// read back (async)</span>
- <span class="n">NvFlexGetParticles</span><span class="p">(</span><span class="n">particleBuffer</span><span class="p">,</span> <span class="n">n</span><span class="p">);</span>
- <span class="n">NvFlexGetVelocities</span><span class="p">(</span><span class="n">velocityBuffer</span><span class="p">,</span> <span class="n">n</span><span class="p">);</span>
- <span class="n">NvFlexGetPhases</span><span class="p">(</span><span class="n">phaseBuffer</span><span class="p">,</span> <span class="n">n</span><span class="p">);</span>
+<span class="c1">// read back (async)</span>
+<span class="n">NvFlexGetParticles</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">particleBuffer</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<span class="n">NvFlexGetVelocities</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">velocityBuffer</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
+<span class="n">NvFlexGetPhases</span><span class="p">(</span><span class="n">solver</span><span class="p">,</span> <span class="n">phaseBuffer</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
- <span class="c1">// Perform CPU work here while update and transfer are in flight</span>
- <span class="n">TickGame</span><span class="p">()</span>
+<span class="c1">// Perform CPU work here while update and transfer are in flight</span>
+<span class="n">TickGame</span><span class="p">()</span>
<span class="p">}</span>
</pre></div>
</div>
@@ -708,7 +716,7 @@ simulation. Diffuse particles can be created through the <strong>NvFlexSetDiffus
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="index.html">NVIDIA Flex 1.1.0 documentation</a></li>
+ <li><a href="index.html">NVIDIA Flex 1.2.0 documentation</a></li>
</ul>
</div>
</div>
diff --git a/doc/objects.inv b/doc/objects.inv
index 02b7623..f212dab 100644
--- a/doc/objects.inv
+++ b/doc/objects.inv
Binary files differ
diff --git a/doc/releasenotes.html b/doc/releasenotes.html
index c505411..bef3053 100644
--- a/doc/releasenotes.html
+++ b/doc/releasenotes.html
@@ -7,7 +7,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=Edge"/>
- <title>Release Notes &mdash; NVIDIA Flex 1.1.0 documentation</title>
+ <title>Release Notes &mdash; NVIDIA Flex 1.2.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -18,7 +18,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
- VERSION: '1.1.0',
+ VERSION: '1.2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -31,7 +31,7 @@
<script type="text/javascript" src="_static/bootstrap.js"></script>
<script type="text/javascript" src="_static/jquery.cookie.js"></script>
<script type="text/javascript" src="_static/jquery.storageapi.js"></script>
- <link rel="top" title="NVIDIA Flex 1.1.0 documentation" href="index.html" />
+ <link rel="top" title="NVIDIA Flex 1.2.0 documentation" href="index.html" />
<link rel="prev" title="Manual" href="manual.html" />
</head>
<body>
@@ -56,7 +56,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="index.html">NVIDIA Flex 1.1.0 documentation</a></li>
+ <li><a href="index.html">NVIDIA Flex 1.2.0 documentation</a></li>
</ul>
</div>
</div>
@@ -114,17 +114,18 @@
</ul>
</li>
<li class="toctree-l1 current"><a class="current reference internal" href="">Release Notes</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="#id1">1.1.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#id2">1.0.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#id3">0.9.5</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#id4">0.9.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#id5">0.8.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#id6">0.2.5</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#id7">0.2.3</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#id8">0.2.2</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#id9">0.2.1</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#id10">0.2.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#id11">0.1.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#id1">1.2.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#id2">1.1.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#id3">1.0.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#id4">0.9.5</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#id5">0.9.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#id6">0.8.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#id7">0.2.5</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#id8">0.2.3</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#id9">0.2.2</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#id10">0.2.1</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#id11">0.2.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#id12">0.1.0</a></li>
</ul>
</li>
</ul>
@@ -156,11 +157,29 @@
<div class="section" id="release-notes">
<span id="releasenotes"></span><h1>Release Notes<a class="headerlink" href="#release-notes" title="Permalink to this headline">¶</a></h1>
<div class="section" id="id1">
-<h2>1.1.0<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
+<h2>1.2.0<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
-<li>New API style, for consistency with other products the API has now an NvFlex prefix, and follows a naming convention similar to PhysX</li>
+<li>New API to retrieve particle neighbor information, see NvFlexGetNeighbors()</li>
+<li>New API to support shape collision filtering, collision channels can be assigned to particles and shapes to specify which pairs collide, see NvFlexPhase</li>
+<li>New API to support per-shape plastic deformation, it is now possible to specify plastic creep and threshold coefficient on a per-shape basis (previous global settings), see NvFlexSetRigids()</li>
+<li>New API to selectively disable solver features, this can lead to improved performance, see NvFlexFeatureMode, replaces global FlexParams::fluid option</li>
+<li>New API to allow sub-range particle buffer updates, see NvFlexCopyDesc</li>
+<li>New API for asynchronous compute, see NvFlexInitDesc</li>
+<li>Fix for unnecessary synchronization when calling NvFlexMap() on a device buffer</li>
+<li>Fix numerical precision for shape-matching constraints with large coordinates</li>
+<li>Fix for uninitialized contact indices returned from NvFlexGetContacts() if NvFlexUpdateSolver() has not been called</li>
+<li>Fix for SDF collision in D3D12</li>
+<li>Fix for D3D warning when using NvFlexSetRigids()</li>
+<li>Add D3D12 rendering support to the demo</li>
+<li>Add support for device NvFlexBuffers on D3D</li>
+</ul>
+</div>
+<div class="section" id="id2">
+<h2>1.1.0<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
+<ul class="simple">
+<li>New API style, for consistency with other products the API has now an NvFlex prefix and follows a naming convention similar to PhysX</li>
<li>Add support for DirectX, in addition to CUDA there is now a cross platform DirectX 11 and 12 version of the Flex libraries that Windows applications can link against</li>
-<li>Add support for max acceleration clamping, see NvFlexParams::mMaxAcceleration, can be useful to reduce popping with fast moving kinematic shapes and large interpenetration</li>
+<li>Add support for max acceleration clamping, see NvFlexParams::maxAcceleration, can be useful to reduce popping with fast moving kinematic shapes and large interpenetration</li>
<li>Add support to querying compute device, see NvFlexGetDeviceName()</li>
<li>Add support for flushing compute queue, see NvFlexFlush()</li>
<li>Add support for multiple library instances, NvFlexInit() now returns a library which is bound to a single compute device</li>
@@ -178,13 +197,13 @@
<li>Fix for bug in BVH builder that could cause missed collisions</li>
<li>New optional NvFlexDevice library for handling GPU selection and initialization in CUDA</li>
<li>New buffer based API, all data must now be passed to Flex through FlexBuffers created through NvFlexAllocBuffer()</li>
-<li>New stable shape matching code for more robust and efficient soft bodies, removes need for NvFlexParams::mInertiaBias</li>
+<li>New stable shape matching code for more robust and efficient soft bodies, removes need for NvFlexParams::inertiaBias</li>
<li>New collision shape API supports instancing of convex meshes and a much simplified API, see NvFlexSetShapes()</li>
<li>Improvements to collision detection for moving shapes, Flex will now perform a CCD check also taking into account the shape trajectory using the prev/current transforms of each shape</li>
</ul>
</div>
-<div class="section" id="id2">
-<h2>1.0.0<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="id3">
+<h2>1.0.0<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Added support for reporting collision shape ids, and trigger volume shapes, see flexGetContacts()</li>
<li>Optimizations to host code performance</li>
@@ -195,8 +214,8 @@
<li>Move flexExt.h header to the /include folder</li>
</ul>
</div>
-<div class="section" id="id3">
-<h2>0.9.5<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="id4">
+<h2>0.9.5<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Fix for NaNs being generated during shape matching with plastic deformation enabled</li>
<li>Fix for bug that could lead to translational drifting of shape matched rigid bodies</li>
@@ -210,8 +229,8 @@
<li>Exposed parameter to control the lifetime of diffuse particles, see FlexParams::mDiffuseLifetime</li>
</ul>
</div>
-<div class="section" id="id4">
-<h2>0.9.0<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="id5">
+<h2>0.9.0<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Added support for soft bodies, particles can now belong to multiple shape-matching clusters used to drive linear blend skinning</li>
<li>Added support for particle rest positions that can be used to filter collisions between particles that touch in their rest pose, see flexSetRestPositions()</li>
@@ -235,8 +254,8 @@
<li>Rename FlexParams::mMaxVelocity -&gt; FlexParams::mMaxSpeed</li>
</ul>
</div>
-<div class="section" id="id5">
-<h2>0.8.0<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="id6">
+<h2>0.8.0<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Upgrade to CUDA 7.0</li>
<li>Linux binaries are now compiled with -fPIC</li>
@@ -246,8 +265,8 @@
<li>Added option to control the max number of neighbors stored per-particle, this can reduce memory usage, see flexCreateSolver()</li>
</ul>
</div>
-<div class="section" id="id6">
-<h2>0.2.5<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="id7">
+<h2>0.2.5<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Fix for vertex normal calculation when using sparse active particle set</li>
<li>Fix for division by zero in rest density calculation when fluid rest distance was 0.0</li>
@@ -262,8 +281,8 @@
<li>Extended particle phase parameters to allow fine grained control over self-collision and fluid properties, see flexMakePhase()</li>
</ul>
</div>
-<div class="section" id="id7">
-<h2>0.2.3<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="id8">
+<h2>0.2.3<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Switched to bindless textures, 50% reduction in CPU usage, because of this change Flex now requires an SM3.0 or above GPU</li>
<li>Optimized convex grid rasterization by assigning 4 warps/shape, reduces time from 1ms-&gt;0.25ms for large shapes</li>
@@ -283,8 +302,8 @@
<li>Added debug capture functionality</li>
</ul>
</div>
-<div class="section" id="id8">
-<h2>0.2.2<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="id9">
+<h2>0.2.2<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Fix for infinite mass particles gaining velocity during collisions</li>
<li>Fix bug with planar triangle mesh rasterization</li>
@@ -304,8 +323,8 @@
<li>Clamp particle velocity to maximum user velocity before prediction step, improves behaviour when interacting with force fields</li>
</ul>
</div>
-<div class="section" id="id9">
-<h2>0.2.1<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="id10">
+<h2>0.2.1<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Add support for lower dimensional particle rigid bodies (rods, planes)</li>
<li>Allow specifying rigid rotations through the solver API</li>
@@ -313,8 +332,8 @@
<li>Add GUI to demo</li>
</ul>
</div>
-<div class="section" id="id10">
-<h2>0.2.0<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="id11">
+<h2>0.2.0<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Fix for rest density calculation when number of neighbors &gt; than max</li>
<li>Add support for async memory copies back to pinned host memory</li>
@@ -332,8 +351,8 @@
<li>Switch to /MT for FlexExtensions library</li>
</ul>
</div>
-<div class="section" id="id11">
-<h2>0.1.0<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="id12">
+<h2>0.1.0<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h2>
<p>Initial release</p>
</div>
</div>
@@ -347,7 +366,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="index.html">NVIDIA Flex 1.1.0 documentation</a></li>
+ <li><a href="index.html">NVIDIA Flex 1.2.0 documentation</a></li>
</ul>
</div>
</div>
diff --git a/doc/search.html b/doc/search.html
index 9198272..d567591 100644
--- a/doc/search.html
+++ b/doc/search.html
@@ -7,7 +7,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=Edge"/>
- <title>Search &mdash; NVIDIA Flex 1.1.0 documentation</title>
+ <title>Search &mdash; NVIDIA Flex 1.2.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -18,7 +18,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
- VERSION: '1.1.0',
+ VERSION: '1.2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -32,7 +32,7 @@
<script type="text/javascript" src="_static/bootstrap.js"></script>
<script type="text/javascript" src="_static/jquery.cookie.js"></script>
<script type="text/javascript" src="_static/jquery.storageapi.js"></script>
- <link rel="top" title="NVIDIA Flex 1.1.0 documentation" href="index.html" />
+ <link rel="top" title="NVIDIA Flex 1.2.0 documentation" href="index.html" />
<script type="text/javascript">
jQuery(function() { Search.loadIndex("searchindex.js"); });
</script>
@@ -52,7 +52,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="index.html">NVIDIA Flex 1.1.0 documentation</a></li>
+ <li><a href="index.html">NVIDIA Flex 1.2.0 documentation</a></li>
</ul>
</div>
</div>
@@ -110,17 +110,18 @@
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="releasenotes.html">Release Notes</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id1">1.1.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id2">1.0.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id3">0.9.5</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id4">0.9.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id5">0.8.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id6">0.2.5</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id7">0.2.3</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id8">0.2.2</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id9">0.2.1</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id10">0.2.0</a></li>
-<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id11">0.1.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id1">1.2.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id2">1.1.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id3">1.0.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id4">0.9.5</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id5">0.9.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id6">0.8.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id7">0.2.5</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id8">0.2.3</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id9">0.2.2</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id10">0.2.1</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id11">0.2.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#id12">0.1.0</a></li>
</ul>
</li>
</ul>
@@ -163,7 +164,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="index.html">NVIDIA Flex 1.1.0 documentation</a></li>
+ <li><a href="index.html">NVIDIA Flex 1.2.0 documentation</a></li>
</ul>
</div>
</div>
diff --git a/doc/searchindex.js b/doc/searchindex.js
index c0f8d53..43b7314 100644
--- a/doc/searchindex.js
+++ b/doc/searchindex.js
@@ -1 +1 @@
-Search.setIndex({envversion:42,terms:{applic:[0,1,2],represent:[1,2],all:[1,2],code:[1,2],edg:2,chain:2,queri:[1,2],lack:2,hennix:2,prefix:1,mile:2,upgrad:1,computation:2,skin:1,follow:[0,1,2],nvflexconvexmeshid:2,bvh:1,nvlab:2,accur:2,depend:2,nvflexcreatetrianglemesh:2,doe:2,graph:2,show:2,specif:2,send:2,articl:2,granular:2,flexgetnorm:1,program:2,nvflexsolv:2,sens:2,nvflexsdfgeometri:2,sent:2,inject:2,passiv:2,"case":2,sourc:2,envflexrelaxationloc:2,inact:2,tickgam:2,fals:2,rod:1,nvflexflush:1,mous:1,diffusethreshold:2,mechan:2,broadli:2,govern:2,veri:2,affect:2,flexgetanisotropi:1,bottleneck:2,strand:2,flexregistersolvercallback:1,imgui:2,stiff:2,tear:[1,2],gui:1,iter:2,anisotropyscal:2,halfheight:2,pbf:2,hydrodynam:2,small:2,nvflexupdatesolv:2,anisotropi:[1,2],stiffer:2,align:2,pleas:0,upper:2,smaller:[1,2],slower:2,natur:2,dimens:2,direct:2,jump:2,fold:2,second:[1,2],cost:2,design:0,priorti:2,pass:[1,2],download:0,improv:[1,2],mesasg:1,even:2,index:2,what:2,appear:2,compar:2,cast:2,neg:2,section:2,abl:2,"while":2,melt:2,uniform:2,current:[1,2],version:[0,1,2],consecut:2,"new":[1,2],ever:2,method:[1,2],contrast:2,thin:[1,2],manag:2,simplifi:1,full:[1,2],deriv:2,gener:[0,1,2],coeffici:2,here:[0,2],nvflexmap:2,water:2,middl:2,studio:0,ubuntu:0,"const":2,along:2,becom:2,realloc:1,implicit:2,valu:[1,2],wait:2,box:2,broken:2,larger:2,host:1,flexgetparam:1,precis:[1,2],converg:[1,2],amount:2,behav:2,pick:1,typic:2,magnitud:2,flexsetspr:1,nvflexmakeshapeflag:2,flexgetdens:1,via:[1,2],although:2,lengthsbuff:2,appli:1,approxim:2,citat:2,releas:0,api:[0,1,2],visibl:2,instabl:1,nvflexsetdiffuseparticl:2,unit:2,environment:2,from:[0,1,2],perf:1,would:2,memori:[1,2],nvflexbuff:2,skelet:2,flextrianglemeshid:2,two:[1,2],particl:0,next:2,predict:1,compactobject:1,overhead:2,asset:2,recommend:2,taken:2,nvflexerror:1,prev:1,type:[1,2],until:2,nvflexfreebuff:2,more:[0,1,2],sort:[1,2],flat:2,desir:[1,2],said:2,nvflexcreateconvexmesh:2,relat:2,ital:2,about:2,nvflexsetdynamictriangl:2,enhanc:2,warn:1,glass:2,visual:[0,1,2],envflexphaseselfcollid:2,stick:2,hold:2,must:[1,2],high:[1,2],account:1,graphic:[0,2],retriev:[1,2],restor:2,tunnel:[1,2],debri:2,work:[1,2],uniqu:2,can:[1,2],www:2,under:2,d3d11:0,veloc:[1,2],problemat:2,control:[1,2],weaker:2,kinet:2,slip:2,give:2,process:2,synchron:[1,2],share:2,shard:2,indic:2,sph:2,tae:2,bend:2,want:2,geometrybuff:2,sharp:2,serial:2,keep:2,occur:2,envflexphasefluid:2,ratio:2,delai:1,alwai:2,surfac:2,end:2,divid:2,nvflexgetnorm:2,anoth:2,write:[1,2],how:2,mikko:2,nvflexextcreaterigidfrommesh:2,confin:[1,2],tile:2,place:2,rotationsbuff:2,simpl:2,numiter:2,buoyanc:1,updat:[0,2],map:2,product:[0,1],referenc:[1,2],convexmesh:2,max:1,after:2,nvflexinit:[1,2],paticl:2,less:2,befor:[1,2],flexgetvort:1,nvflexsetspr:2,date:2,multipl:[1,2],"5cm":2,secondari:2,arch:2,flutter:2,physic:2,spawnparticl:2,stabil:2,alloc:[1,2],drop:2,essenti:2,practic:2,interpol:2,shapecollisionmargin:2,correspond:2,element:2,caus:[1,2],callback:[1,2],"switch":1,fluidrestdist:2,combin:2,allow:[1,2],volum:[1,2],radeon:0,order:2,flexbuff:[1,2],includ:[0,1,2],origin:2,deform:[1,2],softwar:0,over:[1,2],move:[1,2],becaus:[1,2],trade:2,increas:2,vec4:2,paper:2,through:[1,2],same:2,flexibl:2,pointer:2,directx:[0,1,2],paramet:[1,2],divis:1,style:[1,2],rock:2,group:2,thumb:2,bunni:2,fix:[1,2],better:[1,2],window:[0,1],flexextasset:1,creat:[1,2],main:2,might:2,soa:2,them:[1,2],good:2,"return":[1,2],thei:[1,2],envflexphasegroupmask:2,handl:[1,2],safe:2,initi:[1,2],scene:[1,2],half:2,front:2,nvflexconvexmeshgeometri:2,discuss:2,oper:2,envflexbufferhost:2,name:1,realist:2,solver:0,stb_truetyp:2,instruct:2,separ:[1,2],achiev:2,mode:2,each:[1,2],debug:1,nvflexallocbuff:[1,2],higher:[0,2],side:2,bone:2,mean:2,clamp:1,voxel:2,harm:2,"9cm":2,weight:2,tension:2,interop:2,scheme:2,chunk:2,nvflexext:2,idea:2,consum:2,ensur:2,finish:2,"static":[1,2],connect:2,velocitybuff:2,happen:2,differ:2,accord:2,orient:[1,2],out:[1,2],variabl:2,slide:2,architectur:2,physx:[1,2],springindic:2,space:[1,2],goe:2,flexextcreateinst:1,nvflexcreatesdf:2,identifi:2,angular:2,content:2,"m\u00fcller":2,vector:2,suitabl:2,rel:2,flexsynchron:1,nvflexset:2,common:2,model:[1,2],linear:[1,2],found:2,driver:0,"10cm":2,gameplai:2,flexexttearclothmesh:1,standalon:2,reason:2,base:[0,1,2],nvflexcollisiongeometri:2,latest:0,ask:2,org:2,hand:2,nvflexcreatesolv:2,card:0,care:2,raster:1,nvflexshutdown:2,launch:[1,2],recast:2,could:[1,2],area:2,sm3:1,timer:2,nvflexgettim:2,menableccd:1,caption:2,length:[1,2],turk:2,due:2,outsid:1,memononen:2,geometri:[1,2],nvflexsetshap:[1,2],app:1,lifetim:1,onto:2,top:2,first:2,polyhedron:2,brickwork:2,prioritis:1,yong:2,render:[1,2],prevent:[1,2],carri:2,onc:2,arrai:[1,2],nvlexmap:2,qualiti:2,number:[1,2],system:2,mai:2,unlik:2,cfm:2,done:2,wrapper:2,stabl:1,ring:2,nvflexextmovingframeinit:1,miss:[1,2],primari:2,stage:2,size:2,given:2,springlength:2,envflexshapespher:2,advect:2,data:[1,2],interact:[1,2],contact:[1,2],sometim:2,least:[0,2],parallel:[1,2],master:2,flexalloc:1,accept:2,nvflextim:2,gpu:[0,1,2],libsdl:2,john:2,filter:[1,2],store:[1,2],too:2,adhes:[1,2],adher:2,assign:1,interti:1,option:[1,2],relationship:2,especi:2,quat:2,aabb:2,copi:[1,2],circumst:2,specifi:[1,2],part:2,somewhat:2,incred:2,attempt:2,exactli:2,than:[1,2],center:2,nvflextrianglemeshgeometri:2,conveni:2,unmap:2,stb:2,shrapnel:2,provid:[0,2],remov:1,zero:[1,2],structur:2,banana:2,project:1,greg:2,nvflexmakephas:2,substep:2,posit:[1,2],nvflexdestroysolv:2,toward:2,ccw:2,result:2,fashion:2,comput:[1,2],behavior:[1,2],nvflexgetsmoothparticl:2,splat:2,ani:2,rai:2,raw:2,seed:2,complet:[1,2],increment:2,cohes:[1,2],need:[1,2],seen:2,numtriangl:2,"null":2,overconstrain:1,nvflexextcreatesoftfrommesh:2,strength:2,engin:2,squar:2,equival:2,inform:[0,2],destroi:1,self:[1,2],accuraci:2,note:[0,2],also:[1,2],maintain:2,take:[1,2],which:[1,2],interior:2,springcoeffici:2,properti:[1,2],graviti:2,singl:1,nvflex:[1,2],closer:2,pipelin:2,flexinit:1,unless:2,nvflexsetphas:2,normal:[1,2],track:2,flexwaitf:1,object:[1,2],compress:2,recastnavig:2,mmaxspe:1,most:2,plai:1,regular:2,pop:[1,2],pair:2,nvflexsetact:2,cpu:[1,2],segment:2,why:2,sub:2,tradit:2,mdiffuselifetim:1,ballist:2,eject:2,cloth:0,dens:2,flow:2,drive:1,destruct:[1,2],quantiti:2,piplin:1,width:2,wind:2,occasion:2,axi:2,blend:1,microsoft:0,translat:[1,2],viscou:1,shot:2,mostli:2,rayleigh:1,carefulli:2,text:2,random:2,cheap:2,nvflexgetdevicenam:1,friction:[1,2],bring:2,directli:2,particularli:2,flexextsetforcefield:1,flexgetrigidtransform:1,threshold:2,corner:2,font:2,fine:[1,2],eas:2,rotat:[1,2],impact:2,absolut:1,onli:2,explicitli:[1,2],locat:2,just:[1,2],ellipsoid:2,transact:2,configur:2,written:2,fluid:0,should:[1,2],solidrestdist:2,nvflexparam:[1,2],clothphas:2,factor:2,nvflexsetparticl:2,folder:1,local:[1,2],gooei:2,meant:1,custom:1,get:2,kinemat:1,likewis:2,memcpi:[1,2],cheaper:2,flexsetrigid:1,obviou:2,report:1,reconstruct:2,updatebuff:2,parachut:2,layout:2,nvflexmemori:1,think:2,enabl:[1,2],organ:2,"public":1,network:2,integr:2,contain:2,anisotrop:2,where:2,view:1,unexpectedli:2,kernel:[1,2],numvertic:2,nvflexerrorcallback:1,"float":2,frame:[1,2],still:2,sprai:2,consraint:2,maximum:[1,2],resist:2,nvflexgetphas:2,flagsbuff:2,sean:2,randomspawnposit:2,fail:1,close:2,charact:2,best:2,float3:2,infinit:[1,2],nvflexgetparticl:2,nvflexunmap:2,detect:[1,2],collisiondist:2,correctli:1,tend:2,enough:2,stall:1,outstand:2,bruno:2,simplest:2,progress:2,awai:2,experi:2,approach:2,eflexmapwait:2,coefficientsbuff:2,spars:1,extend:1,numer:2,fluidphas:2,screen:2,fundament:2,weak:2,conjunct:2,popul:2,extens:[0,1,2],matthia:2,solv:[1,2],come:2,flexsetrestposit:1,barrett:2,both:2,doxygen:0,irregular:2,similar:[1,2],howev:2,randomspawnveloc:2,against:[1,2],vortic:[1,2],flexgetbound:1,instanc:[1,2],grain:1,trimesh:2,pdf:1,unstructur:2,com:2,acceler:[1,2],simpli:2,pose:1,point:2,wall:2,format:[1,2],unrealist:2,height:2,header:1,featur:2,path:1,averag:[1,2],guid:2,summar:2,panel:1,torsion:2,quit:2,vertic:2,slowli:2,eflexphaseselfcollid:2,coupl:2,stretch:2,damp:[1,2],devic:[0,1,2],invers:[1,2],laplacian:[1,2],sinc:2,trigger:[1,2],treat:2,interest:2,basic:2,minertiabia:1,nvflextrianglemeshid:2,addit:[1,2],"abstract":2,strategi:2,rather:2,flight:2,"25m":1,resolut:2,unnecessarili:2,coordin:2,lift:[1,2],nvflexsetveloc:2,togeth:2,minim:2,rang:2,present:2,nvflexsetinflat:[1,2],determinist:2,multi:1,packag:0,solid:[0,1,2],mdamp:1,erron:2,heidelberg:2,rope:0,defin:2,calcul:[1,2],unifi:[0,1,2],abov:[0,1],error:[1,2],activebuff:2,spawn:2,real:[0,2],planar:1,flexsettriangl:1,have:[1,2],helper:2,wiggl:2,almost:2,demo:[0,1,2],tabl:2,nvflexgetanisotropi:2,non:2,equal:2,cluster:[1,2],itself:2,renderparticl:2,flexcreatesolv:1,cook:1,crash:1,overpressur:2,queue:1,develop:0,author:2,perform:[1,2],suggest:2,make:2,belong:[1,2],cross:1,tetrahedr:2,binari:1,complex:2,split:2,flexsetshap:1,collid:2,android:1,difficult:2,overal:2,http:2,mmaxacceler:1,see:[0,1,2],cubic:2,optim:1,foam:2,hang:2,effect:2,amd:0,capabl:[0,2],nvflexcapsulegeometri:2,user:[1,2],kim:2,mani:2,extern:2,robust:[1,2],stack:2,tune:2,manisotropymax:1,lower:[1,2],appropri:2,off:2,lib:2,builder:1,min:1,well:2,versatil:2,anim:2,exampl:2,expens:2,thi:[0,1,2],diverg:2,ccd:[1,2],everyth:2,dimension:1,usual:2,construct:2,manifold:2,execut:2,eflexhost:1,when:[1,2],bilater:1,rest:[1,2],detail:[1,2],shape:[1,2],aspect:2,world:2,touch:1,jitter:[1,2],envflexmapwait:2,speed:2,renam:1,blow:2,versu:1,now:1,struct:2,expos:[1,2],mshapecollisionmargin:1,help:[1,2],relaxationfactor:2,add:[1,2],discret:2,pile:2,cub:[1,2],densiti:[1,2],lookup:2,subsequ:2,mmaxveloc:1,match:[1,2],build:[0,2],earli:1,nvflexdevic:1,dissip:2,around:2,nvlexallocbuff:2,read:2,piec:2,bia:1,test:[0,1,2],game:[0,2],grid:1,know:2,consid:2,marcu:2,bit:[0,2],tick:2,associ:2,flexparam:1,apart:2,redund:2,measur:2,trash:2,like:[1,2],semi:2,whitespac:1,arbitrari:2,manual:0,integ:2,noth:2,collect:2,benefit:2,necessari:1,either:2,lose:2,output:2,flexextpushtodevic:1,per:[1,2],page:0,underli:2,exceed:2,tran:2,often:[1,2],erelaxationmod:1,captur:1,linux:[0,1],some:[1,2],begin:2,interlock:2,interpenetr:1,global:[1,2],nvflexdistancefieldid:2,previou:2,flush:1,home:0,sizeof:2,librari:0,distribut:2,textur:[1,2],flexext:1,scale:2,siggraph:2,lead:1,phasebuff:2,broad:2,fpic:1,though:2,definit:2,februari:2,overlap:2,multipli:1,mononen:2,larg:[1,2],select:1,toolkit:0,condit:2,refer:0,msvc:1,core:[0,2],sensibl:1,run:[1,2],flexsetconvex:1,vertex:[1,2],nvflexspheregeometri:2,"enum":1,usag:[0,1],nvflexextcreateclothfrommesh:2,quaternion:1,convent:[1,2],stride:2,async:[1,2],flexextcreatesoftfrommesh:1,between:[1,2],describ:2,continu:2,plastic:1,stone:2,compet:2,nvflexbuffertyp:1,face:2,freedom:2,materi:2,commun:2,acm:2,simul:[0,1,2],union:2,degre:2,cuda:[0,1,2],neighbor:[1,2],act:2,convinc:2,geforc:0,behaviour:1,other:[1,2],block:2,reduct:1,compil:1,effici:[1,2],activeindic:2,within:2,bound:1,automat:2,chm:1,down:2,right:2,been:[1,2],positionsbuff:2,float4:2,chang:[1,2],mark:2,bullet:2,merg:2,surround:2,accordingli:2,deal:2,suffici:2,opengl:2,eflexmemoryhost:1,transfer:2,squishi:2,transform:[1,2],fast:[1,2],fight:2,avail:0,topolog:2,much:[1,2],interfac:0,low:2,forward:2,call:[1,2],flexmakephas:1,individu:2,etc:[1,2],"function":[1,2],reduc:1,creation:[1,2],form:2,forc:[1,2],nuttapong:2,indicesbuff:2,back:[1,2],github:[1,2],nvflexgetveloc:2,sdf:[1,2],link:[1,2],gain:1,trajectori:1,sdl:2,don:2,line:2,level:[1,2],"true":2,bug:1,sdk:[0,2],count:[1,2],pull:2,made:[1,2],algorithm:1,consist:[1,2],possibl:2,"default":[1,2],rate:2,access:2,smooth:[1,2],intern:[1,2],asynchron:2,below:2,sum:2,flexextens:1,otherwis:2,problem:[1,2],quickli:2,rigidphas:2,motion:2,nvflexget:2,expect:2,instead:1,taylor:1,alongsid:2,pin:1,classic:2,"int":2,energi:2,dure:[1,2],buckl:2,repres:2,incomplet:1,implement:[1,2],chentanez:2,restitut:[1,2],ship:2,proport:2,check:1,fill:2,incorrect:1,manisotropymin:1,readi:[0,2],incorrectli:1,bindless:1,floor:2,nan:1,ext:1,dynam:[1,2],event:2,longer:2,wai:2,diffuseballist:2,futur:2,nvflexsetrigid:2,diffusesortaxi:2,you:2,flexsetf:1,envflexrelaxationglob:2,nice:1,potenti:[1,2],ratcliff:2,nvflexlibrari:2,nvflexupdatetrianglemesh:2,leak:1,time:0,drift:1,push:2,drag:[1,2],particlecollisionmargin:2,warp:1,tessel:2,pool:2,nvflexboxgeometri:2,ghost:1,droplet:2,receiv:2,faster:2,macklin:2,cooker:2,flexgetcontact:1,snippet:2,flag:[1,2],rule:2,jihun:2,delta:2,mass:[1,2],"long":2,particlebuff:2,far:2,envflexshapetrianglemesh:2,avoid:[1,2]},objtypes:{},objnames:{},filenames:["index","releasenotes","manual"],titles:["NVIDIA Flex","Release Notes","Manual"],objects:{},titleterms:{distanc:2,plane:2,acknowledg:2,radiu:2,sign:2,sphere:2,set:2,design:2,capsul:2,convex:2,librari:2,prioriti:2,note:1,triangl:2,start:2,support:0,activ:2,profil:2,platform:0,collis:2,particl:2,spring:2,document:0,refer:2,flex:0,relax:2,buffer:2,nvidia:0,fluid:2,inflat:2,bodi:2,cloth:2,step:2,diffus:2,rigid:2,phase:2,requir:0,introduct:2,known:2,thread:2,constraint:2,soft:2,solver:2,manual:2,issu:2,releas:1,mesh:2,limit:2,time:2,quick:2,field:2,margin:2}}) \ No newline at end of file
+Search.setIndex({envversion:42,terms:{applic:[0,1,2],represent:[1,2],all:[1,2],code:[1,2],edg:2,chain:2,queri:[1,2],lack:2,hennix:2,prefix:1,mile:2,upgrad:1,computation:2,skin:1,follow:[0,1,2],nvflexconvexmeshid:2,bvh:1,nvlab:2,nvflexinitdesc:1,accur:2,depend:2,nvflexcreatetrianglemesh:2,doe:2,graph:2,show:2,specif:2,send:2,particlesbuff:2,granular:2,flexgetnorm:1,program:2,nvflexsolv:2,sens:2,sent:2,inject:2,passiv:2,"case":2,sourc:2,envflexrelaxationloc:2,inact:2,tickgam:2,fals:2,rod:1,nvflexflush:1,mous:1,diffusethreshold:2,mechan:2,broadli:2,govern:2,veri:2,affect:2,flexgetanisotropi:1,bottleneck:2,strand:2,flexregistersolvercallback:1,imgui:2,maxdiffuseparticl:2,stiff:2,tear:[1,2],gui:1,iter:2,anisotropyscal:2,halfheight:2,pbf:2,hydrodynam:2,small:2,nvflexupdatesolv:[1,2],anisotropi:[1,2],refer:0,stiffer:2,align:2,pleas:0,upper:2,smaller:[1,2],slower:2,natur:2,dimens:2,eas:2,direct:2,jump:2,fold:2,second:[1,2],cost:2,design:0,priorti:2,pass:[1,2],download:0,improv:[1,2],mesasg:1,even:2,index:2,what:2,appear:2,compar:2,cast:2,neg:2,section:2,abl:2,"while":2,melt:2,uniform:2,current:[1,2],version:[0,1,2],consecut:2,"new":[1,2],nvflexsetactivecount:2,ever:2,method:[1,2],contrast:2,thin:[1,2],manag:2,simplifi:1,full:[1,2],deriv:2,gener:[0,1,2],coeffici:[1,2],here:[0,2],nvflexmap:[1,2],water:2,middl:2,studio:0,ubuntu:0,"const":2,along:2,becom:2,realloc:1,implicit:2,valu:[1,2],wait:2,box:2,broken:2,larger:2,host:1,flexgetparam:1,precis:[1,2],converg:[1,2],amount:2,behav:2,pick:1,typic:2,magnitud:2,flexsetspr:1,nvflexmakeshapeflag:2,flexgetdens:1,solverdesc:2,via:[1,2],although:2,lengthsbuff:2,appli:1,approxim:2,citat:2,releas:0,api:[0,1,2],visibl:2,instabl:1,nvflexsetdiffuseparticl:2,unit:2,environment:2,from:[0,1,2],perf:1,would:2,memori:[1,2],nvflexbuff:[1,2],skelet:2,flextrianglemeshid:2,two:[1,2],particl:0,next:2,predict:1,compactobject:1,overhead:2,asset:2,recommend:2,taken:2,nvflexerror:1,prev:1,type:[1,2],until:2,nvflexfreebuff:2,more:[0,1,2],sort:[1,2],flat:2,desir:[1,2],said:2,numtriangl:2,nvflexcreateconvexmesh:2,relat:2,ital:2,about:2,nvflexsetdynamictriangl:2,enhanc:2,warn:1,glass:2,visual:[0,1,2],envflexphaseselfcollid:2,stick:2,hold:2,must:[1,2],high:[1,2],account:1,graphic:[0,2],retriev:[1,2],restor:2,tunnel:[1,2],debri:2,work:[1,2],uniqu:2,other:[1,2],can:[1,2],www:2,d3d12:1,d3d11:0,veloc:[1,2],problemat:2,control:[1,2],weaker:2,kinet:2,slip:2,give:2,process:2,synchron:[1,2],share:2,shard:2,indic:[1,2],sph:2,tae:2,bend:2,want:2,geometrybuff:2,sharp:2,serial:2,keep:2,occur:2,envflexphasefluid:2,ratio:2,delai:1,alwai:2,surfac:2,end:2,divid:2,nvflexgetnorm:2,anoth:2,write:[1,2],how:2,mikko:2,nvflexextcreaterigidfrommesh:2,confin:[1,2],tile:2,place:2,bit:[0,2],rotationsbuff:2,simpl:2,numiter:2,buoyanc:1,updat:[0,1,2],map:2,product:[0,1],referenc:[1,2],convexmesh:2,max:1,after:2,nvflexinit:[1,2],paticl:2,less:2,befor:[1,2],flexgetvort:1,nvflexsetspr:2,date:2,multipl:[1,2],"5cm":2,secondari:2,arch:2,flutter:2,physic:2,spawnparticl:2,stabil:2,alloc:[1,2],drop:2,essenti:2,practic:2,interpol:2,shapecollisionmargin:2,correspond:2,element:2,caus:[1,2],callback:[1,2],"switch":1,fluidrestdist:2,combin:2,allow:[1,2],volum:[1,2],radeon:0,order:2,flexbuff:[1,2],includ:[0,1,2],polyhedron:2,deform:[1,2],softwar:0,over:[1,2],move:[1,2],becaus:[1,2],trade:2,increas:2,vec4:2,paper:2,through:[1,2],same:2,flexibl:2,pointer:2,directx:[0,1,2],paramet:[1,2],divis:1,style:[1,2],rock:2,group:2,thumb:2,bunni:2,fix:[1,2],better:[1,2],window:[0,1],flexextasset:1,creat:[1,2],onc:2,main:2,might:2,soa:2,them:[1,2],good:2,"return":[1,2],thei:[1,2],envflexphasegroupmask:2,handl:[1,2],safe:2,initi:[1,2],scene:[1,2],half:2,front:2,nvflexconvexmeshgeometri:2,discuss:2,oper:2,envflexbufferhost:2,name:1,realist:2,solver:0,stb_truetyp:2,instruct:2,separ:[1,2],achiev:2,mode:2,each:[1,2],debug:1,done:2,d3d:1,higher:[0,2],side:2,bone:2,mean:2,clamp:1,voxel:2,harm:2,"9cm":2,weight:2,tension:2,interop:2,replac:1,chunk:2,nvflexext:2,idea:2,consum:2,ensur:2,finish:2,"static":[1,2],connect:2,velocitybuff:2,happen:2,differ:2,accord:2,orient:[1,2],out:[1,2],variabl:2,slide:2,architectur:2,physx:[1,2],springindic:2,space:[1,2],goe:2,flexextcreateinst:1,inertiabia:1,nvflexcreatesdf:2,identifi:2,angular:2,content:2,"m\u00fcller":2,vector:2,suitabl:2,rel:2,flexsynchron:1,nvflexset:2,common:2,model:[1,2],linear:[1,2],found:2,driver:0,"10cm":2,gameplai:2,flexexttearclothmesh:1,standalon:2,reason:2,base:[0,1,2],nvflexcollisiongeometri:2,latest:0,ask:2,org:2,hand:2,nvflexcreatesolv:2,card:0,basi:1,raster:1,nvflexshutdown:2,launch:[1,2],recast:2,could:[1,2],area:2,sm3:1,timer:2,nvflexgettim:2,menableccd:1,caption:2,length:[1,2],turk:2,due:2,outsid:1,memononen:2,geometri:[1,2],nvflexsetshap:[1,2],scheme:2,lifetim:1,onto:2,top:2,first:2,origin:2,brickwork:2,prioritis:1,yong:2,render:[1,2],prevent:[1,2],carri:2,articl:2,arrai:[1,2],qualiti:2,number:[1,2],system:2,mai:2,unlik:2,cfm:2,nvflexallocbuff:[1,2],wrapper:2,stabl:1,ring:2,nvflexextmovingframeinit:1,miss:[1,2],primari:2,stage:2,size:2,given:2,springlength:2,envflexshapespher:2,advect:2,data:[1,2],interact:[1,2],contact:[1,2],sometim:2,least:[0,2],parallel:[1,2],master:2,flexalloc:1,accept:2,nvflextim:2,gpu:[0,1,2],libsdl:2,john:2,filter:[1,2],store:[1,2],too:2,adhes:[1,2],adher:2,assign:1,interti:1,option:[1,2],relationship:2,especi:2,quat:2,aabb:2,copi:[1,2],circumst:2,specifi:[1,2],part:2,somewhat:2,incred:2,attempt:2,exactli:2,than:[1,2],center:2,nvflextrianglemeshgeometri:2,conveni:2,unmap:2,stb:2,shrapnel:2,provid:[0,2],remov:1,zero:[1,2],structur:2,banana:2,project:1,greg:2,nvflexmakephas:2,substep:2,posit:[1,2],nvflexdestroysolv:2,toward:2,ccw:2,result:2,fashion:2,comput:[1,2],behavior:[1,2],nvflexgetcontact:1,nvflexgetsmoothparticl:2,splat:2,ani:2,rai:2,raw:2,seed:2,complet:[1,2],increment:2,cohes:[1,2],need:[1,2],seen:2,nvflexsolverdesc:2,"null":2,featur:[1,2],overconstrain:1,nvflexextcreatesoftfrommesh:2,strength:2,engin:2,squar:2,equival:2,inform:[0,1,2],destroi:1,self:[1,2],simul:[0,1,2],accuraci:2,note:[0,2],also:[1,2],maintain:2,take:[1,2],which:[1,2],interior:2,springcoeffici:2,properti:[1,2],graviti:2,channel:1,nvflex:[1,2],closer:2,pipelin:2,flexinit:1,unless:2,nvflexsetphas:2,normal:[1,2],track:2,flexwaitf:1,object:[1,2],compress:2,recastnavig:2,mmaxspe:1,most:2,plai:1,regular:2,pop:[1,2],pair:[1,2],nvflexsetact:2,cpu:[1,2],segment:2,why:2,sub:[1,2],tradit:2,mdiffuselifetim:1,ballist:2,eject:2,cloth:0,dens:2,flow:2,drive:1,destruct:[1,2],quantiti:2,piplin:1,width:2,wind:2,occasion:2,axi:2,blend:1,microsoft:0,translat:[1,2],viscou:1,shot:2,mostli:2,rayleigh:1,carefulli:2,text:2,random:2,cheap:2,nvflexgetdevicenam:1,friction:[1,2],bring:2,directli:2,particularli:2,flexextsetforcefield:1,flexgetrigidtransform:1,threshold:[1,2],corner:2,font:2,fine:[1,2],maxacceler:1,rotat:[1,2],impact:2,absolut:1,onli:2,explicitli:[1,2],locat:2,just:[1,2],ellipsoid:2,transact:2,configur:2,written:2,fluid:0,should:[1,2],solidrestdist:2,nvflexparam:[1,2],clothphas:2,factor:2,nvflexsetparticl:2,folder:1,local:[1,2],gooei:2,meant:1,custom:1,get:2,kinemat:1,likewis:2,memcpi:[1,2],cheaper:2,flexsetrigid:1,obviou:2,report:1,reconstruct:2,updatebuff:2,parachut:2,layout:2,nvflexmemori:1,think:2,enabl:[1,2],organ:2,possibl:[1,2],"public":1,network:2,"float":2,integr:2,contain:2,anisotrop:2,where:2,view:1,unexpectedli:2,kernel:[1,2],numvertic:2,nvflexerrorcallback:1,nvflexgetneighbor:1,frame:[1,2],still:2,sprai:2,consraint:2,maximum:[1,2],resist:2,nvflexgetphas:2,flagsbuff:2,sean:2,randomspawnposit:2,fail:1,close:2,charact:2,best:2,float3:2,infinit:[1,2],nvflexgetparticl:2,nvflexunmap:2,detect:[1,2],collisiondist:2,correctli:1,tend:2,enough:2,stall:1,outstand:2,bruno:2,simplest:2,progress:2,awai:2,experi:2,approach:2,eflexmapwait:2,coefficientsbuff:2,spars:1,extend:1,numer:[1,2],fluidphas:2,screen:2,fundament:2,weak:2,conjunct:2,popul:2,extens:[0,1,2],matthia:2,solv:[1,2],come:2,flexsetrestposit:1,barrett:2,both:2,doxygen:0,irregular:2,similar:[1,2],howev:2,randomspawnveloc:2,against:[1,2],vortic:[1,2],flexgetbound:1,instanc:[1,2],grain:1,nvflexget:2,trimesh:2,pdf:1,unstructur:2,com:2,acceler:[1,2],simpli:2,pose:1,point:2,wall:2,format:[1,2],unrealist:2,height:2,header:1,uniniti:1,path:1,averag:[1,2],guid:2,summar:2,panel:1,torsion:2,quit:2,vertic:2,slowli:2,eflexphaseselfcollid:2,coupl:2,stretch:2,damp:[1,2],devic:[0,1,2],invers:[1,2],laplacian:[1,2],sinc:2,trigger:[1,2],treat:2,interest:2,basic:2,minertiabia:1,nvflextrianglemeshid:2,addit:[1,2],"abstract":2,strategi:2,rather:2,flight:2,"25m":1,resolut:2,unnecessarili:2,coordin:[1,2],lift:[1,2],nvflexsetveloc:2,togeth:2,minim:2,rang:[1,2],present:2,nvflexsetinflat:[1,2],determinist:2,multi:1,subsequ:2,packag:0,solid:[0,1,2],mdamp:1,erron:2,heidelberg:2,rope:0,defin:2,calcul:[1,2],unifi:[0,1,2],abov:[0,1],error:[1,2],activebuff:2,spawn:2,real:[0,2],planar:1,flexsettriangl:1,have:[1,2],helper:2,wiggl:2,almost:2,demo:[0,1,2],tabl:2,nvflexgetanisotropi:2,non:2,equal:2,cluster:[1,2],itself:2,renderparticl:2,flexcreatesolv:1,cook:1,crash:1,overpressur:2,queue:1,develop:0,author:2,perform:[1,2],suggest:2,make:2,belong:[1,2],cross:1,tetrahedr:2,binari:1,complex:2,split:2,flexsetshap:1,collid:[1,2],android:1,difficult:2,overal:2,http:2,see:[0,1,2],cubic:2,optim:1,foam:2,hang:2,effect:2,amd:0,capabl:[0,2],app:1,nvflexcapsulegeometri:2,user:[1,2],kim:2,mani:2,extern:2,robust:[1,2],stack:2,tune:2,manisotropymax:1,lower:[1,2],appropri:2,off:2,lib:2,builder:1,min:1,well:2,versatil:2,anim:2,exampl:2,expens:2,thi:[0,1,2],diverg:2,ccd:[1,2],everyth:2,dimension:1,usual:2,construct:2,manifold:2,execut:2,eflexhost:1,when:[1,2],bilater:1,rest:[1,2],detail:[1,2],shape:[1,2],aspect:2,world:2,touch:1,jitter:[1,2],envflexmapwait:2,speed:2,renam:1,nvflexsetsolverdescdefault:2,blow:2,versu:1,now:1,struct:2,expos:[1,2],mshapecollisionmargin:1,help:[1,2],maxparticl:2,add:[1,2],discret:2,pile:2,cub:[1,2],densiti:[1,2],lookup:2,nvflexsdfgeometri:2,mmaxveloc:1,match:[1,2],build:[0,2],earli:1,nvflexdevic:1,dissip:2,around:2,nvlexallocbuff:2,read:2,piec:2,bia:1,test:[0,1,2],game:[0,2],grid:1,know:2,consid:2,marcu:2,apart:2,tick:2,associ:2,flexparam:1,nvflexcopydesc:1,redund:2,measur:2,trash:2,like:[1,2],semi:2,whitespac:1,arbitrari:2,manual:0,integ:2,noth:2,collect:2,benefit:2,necessari:1,singl:1,lose:2,output:2,flexextpushtodevic:1,per:[1,2],unnecessari:1,underli:2,exceed:2,tran:2,often:[1,2],erelaxationmod:1,captur:1,linux:[0,1],some:[1,2],begin:2,interlock:2,interpenetr:1,global:[1,2],nvflexdistancefieldid:2,previou:[1,2],flush:1,home:0,sizeof:2,librari:0,distribut:2,textur:[1,2],flexext:1,scale:2,siggraph:2,lead:1,phasebuff:2,broad:2,fpic:1,though:2,definit:2,februari:2,overlap:2,multipli:1,mononen:2,larg:[1,2],select:1,toolkit:0,condit:2,either:2,msvc:1,core:[0,2],sensibl:1,run:[1,2],flexsetconvex:1,vertex:[1,2],nvflexspheregeometri:2,"enum":1,usag:[0,1],nvflexextcreateclothfrommesh:2,quaternion:1,convent:[1,2],stride:2,async:[1,2],flexextcreatesoftfrommesh:1,between:[1,2],describ:2,continu:2,plastic:1,stone:2,compet:2,nvflexbuffertyp:1,face:2,freedom:2,materi:2,commun:2,acm:2,page:0,union:2,degre:2,cuda:[0,1,2],neighbor:[1,2],act:2,convinc:2,geforc:0,behaviour:1,disabl:1,block:2,reduct:1,compil:1,effici:[1,2],activeindic:2,within:2,bound:1,automat:2,chm:1,down:2,right:2,been:[1,2],positionsbuff:2,float4:2,chang:[1,2],mark:2,bullet:2,merg:2,surround:2,accordingli:2,deal:2,suffici:2,opengl:2,eflexmemoryhost:1,transfer:2,squishi:2,transform:[1,2],fast:[1,2],fight:2,avail:0,topolog:2,much:[1,2],interfac:0,low:2,under:2,forward:2,call:[1,2],flexmakephas:1,individu:2,etc:[1,2],"function":[1,2],ghost:1,creation:[1,2],form:2,droplet:2,forc:[1,2],nuttapong:2,indicesbuff:2,back:[1,2],github:[1,2],nvflexgetveloc:2,sdf:[1,2],link:[1,2],gain:1,trajectori:1,sdl:2,don:2,line:2,level:[1,2],"true":2,bug:1,sdk:[0,2],count:[1,2],pull:2,made:[1,2],algorithm:1,consist:[1,2],relaxationfactor:2,"default":[1,2],rate:2,access:2,smooth:[1,2],intern:[1,2],asynchron:[1,2],below:2,sum:2,flexextens:1,otherwis:2,problem:[1,2],quickli:2,rigidphas:2,motion:2,care:2,expect:2,instead:1,taylor:1,alongsid:2,pin:1,classic:2,"int":2,energi:2,dure:[1,2],buckl:2,futur:2,repres:2,incomplet:1,implement:[1,2],chentanez:2,restitut:[1,2],ship:2,proport:2,check:1,fill:2,incorrect:1,manisotropymin:1,readi:[0,2],incorrectli:1,nvflexphas:1,bindless:1,floor:2,nan:1,ext:1,dynam:[1,2],event:2,longer:2,wai:2,diffuseballist:2,creep:1,nvflexsetrigid:[1,2],diffusesortaxi:2,you:2,flexsetf:1,envflexrelaxationglob:2,nice:1,potenti:[1,2],ratcliff:2,nvflexlibrari:2,nvflexupdatetrianglemesh:2,leak:1,time:0,drift:1,push:2,drag:[1,2],particlecollisionmargin:2,warp:1,tessel:2,pool:2,nvflexboxgeometri:2,reduc:1,nvflexfeaturemod:1,receiv:2,faster:2,macklin:2,cooker:2,flexgetcontact:1,snippet:2,flag:[1,2],rule:2,jihun:2,delta:2,mass:[1,2],"long":2,particlebuff:2,far:2,envflexshapetrianglemesh:2,avoid:[1,2]},objtypes:{},objnames:{},filenames:["index","releasenotes","manual"],titles:["NVIDIA Flex","Release Notes","Manual"],objects:{},titleterms:{distanc:2,plane:2,acknowledg:2,radiu:2,sign:2,sphere:2,set:2,design:2,capsul:2,convex:2,librari:2,prioriti:2,note:1,triangl:2,start:2,support:0,activ:2,profil:2,platform:0,collis:2,particl:2,spring:2,document:0,refer:2,flex:0,relax:2,buffer:2,nvidia:0,fluid:2,inflat:2,bodi:2,cloth:2,step:2,diffus:2,rigid:2,phase:2,requir:0,introduct:2,known:2,thread:2,constraint:2,soft:2,solver:2,manual:2,issu:2,releas:1,mesh:2,limit:2,time:2,quick:2,field:2,margin:2}}) \ No newline at end of file
diff --git a/extensions/compiler/makeandroid/Makefile b/extensions/compiler/makeandroid/Makefile
index e03f411..865fd94 100644
--- a/extensions/compiler/makeandroid/Makefile
+++ b/extensions/compiler/makeandroid/Makefile
@@ -2,11 +2,11 @@
# Makefile generated by XPJ for android
DEPSDIR = .deps
-NDKROOT = "$(NDK_ROOT)"/"$(NDK_VERSION)"
-NDK_BIN_DIR = "$(NDK_ROOT)"/"$(NDK_VERSION)"/toolchains/"$(NDK_TOOLCHAIN)"/prebuilt/"linux-x86_64"/bin
+NDKROOT = ./../../../../../../external/android-ndk/android-ndk-r10e-linux
+NDK_BIN_DIR = ./../../../../../../external/android-ndk/android-ndk-r10e-linux/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin
NDK_PREFIX = arm-linux-androideabi-
-JAVA_HOME = ./../xpj/"$(JAVA_HOME)"
-ANT_TOOL = ./../xpj/"$(ANT_HOME}"/bin/ant
+JAVA_HOME = ./../../../../../../external/java/jdk1.8.0_20
+ANT_TOOL = ./../../../../../../external/ant/apache-ant-1.8.2/bin/ant
#default defines
OBJS_DIR = build
RMDIR = rm -fr
@@ -23,22 +23,23 @@ OBJCOPY = $(NDK_BIN_DIR)/$(NDK_PREFIX)objcopy
all: debug release
-debug: build_flexExtCUDA_debug
+debug: build_flexCUDA_debug build_flexExtCUDA_debug
-release: build_flexExtCUDA_release
+release: build_flexCUDA_release build_flexExtCUDA_release
-clean: clean_flexExtCUDA_release clean_flexExtCUDA_debug
+clean: clean_flexCUDA_release clean_flexCUDA_debug clean_flexExtCUDA_release clean_flexExtCUDA_debug
rm -rf $(DEPSDIR)
-clean_release: clean_flexExtCUDA_release
+clean_release: clean_flexCUDA_release clean_flexExtCUDA_release
rm -rf $(DEPSDIR)
-clean_debug: clean_flexExtCUDA_debug
+clean_debug: clean_flexCUDA_debug clean_flexExtCUDA_debug
rm -rf $(DEPSDIR)
+include Makefile.flexCUDA.mk
include Makefile.flexExtCUDA.mk
diff --git a/extensions/compiler/makeandroid/Makefile.flexExtCUDA.mk b/extensions/compiler/makeandroid/Makefile.flexExtCUDA.mk
index f8bf780..cffe816 100644
--- a/extensions/compiler/makeandroid/Makefile.flexExtCUDA.mk
+++ b/extensions/compiler/makeandroid/Makefile.flexExtCUDA.mk
@@ -24,28 +24,32 @@ flexExtCUDA_debug_dep = $(flexExtCUDA_cpp_debug_dep) $(flexExtCUDA_cc_debug
-include $(flexExtCUDA_debug_dep)
flexExtCUDA_release_hpaths :=
flexExtCUDA_release_hpaths += ./../../..
-flexExtCUDA_release_hpaths += $(NDK_ROOT)/$(NDK_VERSION)/platforms/android-15/arch-arm/usr/include
-flexExtCUDA_release_hpaths += $(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/stlport/stlport
-flexExtCUDA_release_hpaths += $(CUDA_PATH)/targets/armv7-linux-androideabi/include
+flexExtCUDA_release_hpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-15/arch-arm/usr/include
+flexExtCUDA_release_hpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/stlport/stlport
+flexExtCUDA_release_hpaths += ./../../../../../../external/CUDA/cuda-6.0-linux/targets/armv7-linux-androideabi/include
flexExtCUDA_release_lpaths :=
-flexExtCUDA_release_lpaths += $(CUDA_PATH)/targets/armv7-linux-androideabi/lib
+flexExtCUDA_release_lpaths += ./../../../../../../external/CUDA/cuda-6.0-linux/targets/armv7-linux-androideabi/lib
+flexExtCUDA_release_lpaths += ./../../../lib/android
+flexExtCUDA_release_lpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/stlport/libs/armeabi-v7a
flexExtCUDA_release_lpaths += ./../../../lib/android
-flexExtCUDA_release_lpaths += $(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/stlport/libs/armeabi-v7a
flexExtCUDA_release_defines := $(flexExtCUDA_custom_defines)
flexExtCUDA_release_defines += android
flexExtCUDA_release_defines += ANDROID=1
flexExtCUDA_release_defines += ANDROID_PLAT=1
flexExtCUDA_release_defines += DISABLE_IMPORTGL
flexExtCUDA_release_libraries :=
+flexExtCUDA_release_libraries += NvFlexReleaseCUDA_armv7l
flexExtCUDA_release_libraries += ./../../../lib/android/libNvFlexRelease_armv7l.a
flexExtCUDA_release_common_cflags := $(flexExtCUDA_custom_cflags)
flexExtCUDA_release_common_cflags += -MMD
flexExtCUDA_release_common_cflags += $(addprefix -D, $(flexExtCUDA_release_defines))
flexExtCUDA_release_common_cflags += $(addprefix -I, $(flexExtCUDA_release_hpaths))
-flexExtCUDA_release_common_cflags += -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
-flexExtCUDA_release_common_cflags += -O3 -ffast-math
flexExtCUDA_release_cflags := $(flexExtCUDA_release_common_cflags)
+flexExtCUDA_release_cflags += -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
+flexExtCUDA_release_cflags += -O3 -ffast-math
flexExtCUDA_release_cppflags := $(flexExtCUDA_release_common_cflags)
+flexExtCUDA_release_cppflags += -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
+flexExtCUDA_release_cppflags += -O3 -ffast-math
flexExtCUDA_release_lflags := $(flexExtCUDA_custom_lflags)
flexExtCUDA_release_lflags += $(addprefix -L, $(flexExtCUDA_release_lpaths))
flexExtCUDA_release_lflags += -Wl,--start-group $(addprefix -l, $(flexExtCUDA_release_libraries)) -Wl,--end-group
@@ -68,15 +72,15 @@ postbuild_flexExtCUDA_release: mainbuild_flexExtCUDA_release
mainbuild_flexExtCUDA_release: prebuild_flexExtCUDA_release $(flexExtCUDA_release_bin)
prebuild_flexExtCUDA_release:
-$(flexExtCUDA_release_bin): $(flexExtCUDA_release_obj)
+$(flexExtCUDA_release_bin): $(flexExtCUDA_release_obj) build_flexCUDA_release
mkdir -p `dirname ./../../../lib/android/libflexExt_cuda_release_armv7l.a`
@$(AR) rcs $(flexExtCUDA_release_bin) $(flexExtCUDA_release_obj)
$(ECHO) building $@ complete!
$(flexExtCUDA_release_cuda_cuda_flexExt_cu_o): $(flexExtCUDA_cuda_cuda_flexExt_cu)
@mkdir -p `dirname $(OBJS_DIR)/flexExtCUDA_release/cuda/cudaflexExt.o`
- $(ECHO) "$(CUDA_PATH)/bin/nvcc" -ccbin $(NDK_ROOT)/$(NDK_VERSION)/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -target-cpu-arch=ARM -m32 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"$(CUDA_PATH)/targets/armv7-linux-androideabi/include" -I"../../.." -I"$(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/stlport/stlport" -I"$(NDK_ROOT)/$(NDK_VERSION)/platforms/android-15/arch-arm/usr/include" --compile "./../../cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_release/cuda/cudaflexExt.o"
- "$(CUDA_PATH)/bin/nvcc" -ccbin $(NDK_ROOT)/$(NDK_VERSION)/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -target-cpu-arch=ARM -m32 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"$(CUDA_PATH)/targets/armv7-linux-androideabi/include" -I"../../.." -I"$(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/stlport/stlport" -I"$(NDK_ROOT)/$(NDK_VERSION)/platforms/android-15/arch-arm/usr/include" --compile "./../../cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_release/cuda/cudaflexExt.o"
+ $(ECHO) "../../../../../../external/CUDA/cuda-6.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -target-cpu-arch=ARM -m32 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-6.0-linux/targets/armv7-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/stlport/stlport" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-15/arch-arm/usr/include" --compile "../../cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_release/cuda/cudaflexExt.o"
+ "../../../../../../external/CUDA/cuda-6.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -target-cpu-arch=ARM -m32 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-6.0-linux/targets/armv7-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/stlport/stlport" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-15/arch-arm/usr/include" --compile "../../cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_release/cuda/cudaflexExt.o"
flexExtCUDA_release_DEPDIR = $(dir $(@))/$(*F)
$(flexExtCUDA_release_cpp_o): $(flexExtCUDA_release_objsdir)/%.o:
@@ -111,28 +115,32 @@ $(flexExtCUDA_release_c_o): $(flexExtCUDA_release_objsdir)/%.o:
flexExtCUDA_debug_hpaths :=
flexExtCUDA_debug_hpaths += ./../../..
-flexExtCUDA_debug_hpaths += $(NDK_ROOT)/$(NDK_VERSION)/platforms/android-15/arch-arm/usr/include
-flexExtCUDA_debug_hpaths += $(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/stlport/stlport
-flexExtCUDA_debug_hpaths += $(CUDA_PATH)/targets/armv7-linux-androideabi/include
+flexExtCUDA_debug_hpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-15/arch-arm/usr/include
+flexExtCUDA_debug_hpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/stlport/stlport
+flexExtCUDA_debug_hpaths += ./../../../../../../external/CUDA/cuda-6.0-linux/targets/armv7-linux-androideabi/include
flexExtCUDA_debug_lpaths :=
-flexExtCUDA_debug_lpaths += $(CUDA_PATH)/targets/armv7-linux-androideabi/lib
+flexExtCUDA_debug_lpaths += ./../../../../../../external/CUDA/cuda-6.0-linux/targets/armv7-linux-androideabi/lib
+flexExtCUDA_debug_lpaths += ./../../../lib/android
+flexExtCUDA_debug_lpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/stlport/libs/armeabi-v7a
flexExtCUDA_debug_lpaths += ./../../../lib/android
-flexExtCUDA_debug_lpaths += $(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/stlport/libs/armeabi-v7a
flexExtCUDA_debug_defines := $(flexExtCUDA_custom_defines)
flexExtCUDA_debug_defines += android
flexExtCUDA_debug_defines += ANDROID=1
flexExtCUDA_debug_defines += ANDROID_PLAT=1
flexExtCUDA_debug_defines += DISABLE_IMPORTGL
flexExtCUDA_debug_libraries :=
+flexExtCUDA_debug_libraries += NvFlexDebugCUDA_armv7l
flexExtCUDA_debug_libraries += ./../../../lib/android/libNvFlexDebug_armv7l.a
flexExtCUDA_debug_common_cflags := $(flexExtCUDA_custom_cflags)
flexExtCUDA_debug_common_cflags += -MMD
flexExtCUDA_debug_common_cflags += $(addprefix -D, $(flexExtCUDA_debug_defines))
flexExtCUDA_debug_common_cflags += $(addprefix -I, $(flexExtCUDA_debug_hpaths))
-flexExtCUDA_debug_common_cflags += -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
-flexExtCUDA_debug_common_cflags += -g -O0
flexExtCUDA_debug_cflags := $(flexExtCUDA_debug_common_cflags)
+flexExtCUDA_debug_cflags += -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
+flexExtCUDA_debug_cflags += -g -O0
flexExtCUDA_debug_cppflags := $(flexExtCUDA_debug_common_cflags)
+flexExtCUDA_debug_cppflags += -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
+flexExtCUDA_debug_cppflags += -g -O0
flexExtCUDA_debug_lflags := $(flexExtCUDA_custom_lflags)
flexExtCUDA_debug_lflags += $(addprefix -L, $(flexExtCUDA_debug_lpaths))
flexExtCUDA_debug_lflags += -Wl,--start-group $(addprefix -l, $(flexExtCUDA_debug_libraries)) -Wl,--end-group
@@ -155,15 +163,15 @@ postbuild_flexExtCUDA_debug: mainbuild_flexExtCUDA_debug
mainbuild_flexExtCUDA_debug: prebuild_flexExtCUDA_debug $(flexExtCUDA_debug_bin)
prebuild_flexExtCUDA_debug:
-$(flexExtCUDA_debug_bin): $(flexExtCUDA_debug_obj)
+$(flexExtCUDA_debug_bin): $(flexExtCUDA_debug_obj) build_flexCUDA_debug
mkdir -p `dirname ./../../../lib/android/libflexExt_cuda_debug_armv7l.a`
@$(AR) rcs $(flexExtCUDA_debug_bin) $(flexExtCUDA_debug_obj)
$(ECHO) building $@ complete!
$(flexExtCUDA_debug_cuda_cuda_flexExt_cu_o): $(flexExtCUDA_cuda_cuda_flexExt_cu)
@mkdir -p `dirname $(OBJS_DIR)/flexExtCUDA_debug/cuda/cudaflexExt.o`
- $(ECHO) "$(CUDA_PATH)/bin/nvcc" -ccbin $(NDK_ROOT)/$(NDK_VERSION)/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -target-cpu-arch=ARM -m32 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"$(CUDA_PATH)/targets/armv7-linux-androideabi/include" -I"../../.." -I"$(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/stlport/stlport" -I"$(NDK_ROOT)/$(NDK_VERSION)/platforms/android-15/arch-arm/usr/include" --compile "./../../cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_debug/cuda/cudaflexExt.o"
- "$(CUDA_PATH)/bin/nvcc" -ccbin $(NDK_ROOT)/$(NDK_VERSION)/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -target-cpu-arch=ARM -m32 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"$(CUDA_PATH)/targets/armv7-linux-androideabi/include" -I"../../.." -I"$(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/stlport/stlport" -I"$(NDK_ROOT)/$(NDK_VERSION)/platforms/android-15/arch-arm/usr/include" --compile "./../../cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_debug/cuda/cudaflexExt.o"
+ $(ECHO) "../../../../../../external/CUDA/cuda-6.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -target-cpu-arch=ARM -m32 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-6.0-linux/targets/armv7-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/stlport/stlport" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-15/arch-arm/usr/include" --compile "../../cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_debug/cuda/cudaflexExt.o"
+ "../../../../../../external/CUDA/cuda-6.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -target-cpu-arch=ARM -m32 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-6.0-linux/targets/armv7-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/stlport/stlport" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-15/arch-arm/usr/include" --compile "../../cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_debug/cuda/cudaflexExt.o"
flexExtCUDA_debug_DEPDIR = $(dir $(@))/$(*F)
$(flexExtCUDA_debug_cpp_o): $(flexExtCUDA_debug_objsdir)/%.o:
diff --git a/extensions/compiler/makeandroid_aarch64/Makefile b/extensions/compiler/makeandroid_aarch64/Makefile
new file mode 100644
index 0000000..c8cd55c
--- /dev/null
+++ b/extensions/compiler/makeandroid_aarch64/Makefile
@@ -0,0 +1,202 @@
+#!/usr/bin/make
+# Makefile generated by XPJ for android_aarch64
+
+DEPSDIR = .deps
+NDKROOT = "$(NDK_ROOT)"/"$(NDK_VERSION)"
+NDK_BIN_DIR = "$(NDK_ROOT)"/"$(NDK_VERSION)"/toolchains/"$(NDK_TOOLCHAIN)"/prebuilt/"linux-x86_64"/bin
+NDK_PREFIX = aarch64-linux-android-
+JAVA_HOME = ./../xpj/"$(JAVA_HOME)"
+ANT_TOOL = ./../xpj/"$(ANT_HOME}"/bin/ant
+#default defines
+OBJS_DIR = build
+RMDIR = rm -fr
+ECHO = echo
+CCLD = $(NDK_BIN_DIR)/$(NDK_PREFIX)g++
+CXX = $(NDK_BIN_DIR)/$(NDK_PREFIX)g++
+CC = $(NDK_BIN_DIR)/$(NDK_PREFIX)gcc
+RANLIB = $(NDK_BIN_DIR)/$(NDK_PREFIX)ranlib
+AR = $(NDK_BIN_DIR)/$(NDK_PREFIX)ar
+STRIP = $(NDK_BIN_DIR)/$(NDK_PREFIX)strip
+OBJDUMP = $(NDK_BIN_DIR)/$(NDK_PREFIX)objdump
+OBJCOPY = $(NDK_BIN_DIR)/$(NDK_PREFIX)objcopy
+-include Makedefs.ANDROID.mk
+
+all: debug release
+
+debug: build_flexExtCUDA_debug
+
+release: build_flexExtCUDA_release
+
+clean: clean_flexExtCUDA_release clean_flexExtCUDA_debug
+ rm -rf $(DEPSDIR)
+
+
+clean_release: clean_flexExtCUDA_release
+ rm -rf $(DEPSDIR)
+
+
+clean_debug: clean_flexExtCUDA_debug
+ rm -rf $(DEPSDIR)
+
+
+include Makefile.flexExtCUDA.mk
+
+
+# Disable implicit rules to speedup build
+.SUFFIXES:
+SUFFIXES :=
+%.out:
+%.a:
+%.ln:
+%.o:
+%: %.o
+%.c:
+%: %.c
+%.ln: %.c
+%.o: %.c
+%.cc:
+%: %.cc
+%.o: %.cc
+%.C:
+%: %.C
+%.o: %.C
+%.cpp:
+%: %.cpp
+%.o: %.cpp
+%.p:
+%: %.p
+%.o: %.p
+%.f:
+%:
+ %.f%.o: %.f
+%.F:
+%: %.F
+%.o: %.F
+%.f: %.F
+%.r:
+%: %.r
+%.o: %.r
+%.f: %.r
+%.y:
+%.ln: %.y
+%.c: %.y
+%.l:
+%.ln: %.l
+%.c: %.l
+%.r: %.l
+%.s:
+%: %.s
+%.o: %.s
+%.S:
+%: %.S
+%.o: %.S
+%.s: %.S
+%.mod:
+%: %.mod
+%.o: %.mod
+%.sym:
+%.def:
+%.sym: %.def
+%.h:
+%.info:
+%.dvi:
+%.tex:
+%.dvi: %.tex
+%.texinfo:
+%.info: %.texinfo
+%.dvi: %.texinfo
+%.texi:
+%.info: %.texi
+%.dvi: %.texi
+%.txinfo:
+%.info: %.txinfo
+%.dvi: %.txinfo
+%.w:
+%.c: %.w
+%.tex: %.w
+%.ch:
+%.web:
+%.p: %.web
+%.tex: %.web
+%.sh:
+%: %.sh
+%.elc:
+%.el:
+(%): %
+%.out: %
+%.c: %.w %.ch
+%.tex: %.w %.ch
+%: %,v
+%: RCS/%,v
+%: RCS/%
+%: s.%
+%: SCCS/s.%
+.web.p:
+.l.r:
+.dvi:
+.F.o:
+.l:
+.y.ln:
+.o:
+.y:
+.def.sym:
+.p.o:
+.p:
+.txinfo.dvi:
+.a:
+.l.ln:
+.w.c:
+.texi.dvi:
+.sh:
+.cc:
+.cc.o:
+.def:
+.c.o:
+.r.o:
+.r:
+.info:
+.elc:
+.l.c:
+.out:
+.C:
+.r.f:
+.S:
+.texinfo.info:
+.c:
+.w.tex:
+.c.ln:
+.s.o:
+.s:
+.texinfo.dvi:
+.el:
+.texinfo:
+.y.c:
+.web.tex:
+.texi.info:
+.DEFAULT:
+.h:
+.tex.dvi:
+.cpp.o:
+.cpp:
+.C.o:
+.ln:
+.texi:
+.txinfo:
+.tex:
+.txinfo.info:
+.ch:
+.S.s:
+.mod:
+.mod.o:
+.F.f:
+.w:
+.S.o:
+.F:
+.web:
+.sym:
+.f:
+.f.o:
+export VERBOSE
+ifndef VERBOSE
+.SILENT:
+endif
diff --git a/extensions/compiler/makeandroid_aarch64/Makefile.flexCUDA.mk b/extensions/compiler/makeandroid_aarch64/Makefile.flexCUDA.mk
new file mode 100644
index 0000000..bdfb113
--- /dev/null
+++ b/extensions/compiler/makeandroid_aarch64/Makefile.flexCUDA.mk
@@ -0,0 +1,227 @@
+# Makefile generated by XPJ for android_aarch64
+-include Makefile.custom
+ProjectName = flexCUDA
+flexCUDA_cppfiles += ./../../../src/cuda/util.cpp
+flexCUDA_cuda_src_cuda_bvh_cu += ./../../../src/cuda/bvh.cu
+flexCUDA_cuda_src_cuda_flex_cu += ./../../../src/cuda/flex.cu
+flexCUDA_cuda_src_cuda_sort_cu += ./../../../src/cuda/sort.cu
+
+flexCUDA_cpp_release_dep = $(addprefix $(DEPSDIR)/flexCUDA/release/, $(subst ./, , $(subst ../, , $(patsubst %.cpp, %.cpp.P, $(flexCUDA_cppfiles)))))
+flexCUDA_cc_release_dep = $(addprefix $(DEPSDIR)/, $(subst ./, , $(subst ../, , $(patsubst %.cc, %.cc.release.P, $(flexCUDA_ccfiles)))))
+flexCUDA_c_release_dep = $(addprefix $(DEPSDIR)/flexCUDA/release/, $(subst ./, , $(subst ../, , $(patsubst %.c, %.c.P, $(flexCUDA_cfiles)))))
+flexCUDA_release_dep = $(flexCUDA_cpp_release_dep) $(flexCUDA_cc_release_dep) $(flexCUDA_c_release_dep)
+-include $(flexCUDA_release_dep)
+flexCUDA_cpp_debug_dep = $(addprefix $(DEPSDIR)/flexCUDA/debug/, $(subst ./, , $(subst ../, , $(patsubst %.cpp, %.cpp.P, $(flexCUDA_cppfiles)))))
+flexCUDA_cc_debug_dep = $(addprefix $(DEPSDIR)/, $(subst ./, , $(subst ../, , $(patsubst %.cc, %.cc.debug.P, $(flexCUDA_ccfiles)))))
+flexCUDA_c_debug_dep = $(addprefix $(DEPSDIR)/flexCUDA/debug/, $(subst ./, , $(subst ../, , $(patsubst %.c, %.c.P, $(flexCUDA_cfiles)))))
+flexCUDA_debug_dep = $(flexCUDA_cpp_debug_dep) $(flexCUDA_cc_debug_dep) $(flexCUDA_c_debug_dep)
+-include $(flexCUDA_debug_dep)
+flexCUDA_release_hpaths :=
+flexCUDA_release_hpaths += ./../../..
+flexCUDA_release_hpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-21/arch-arm64/usr/include
+flexCUDA_release_hpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/include
+flexCUDA_release_hpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include
+flexCUDA_release_hpaths += ./../../../../../../external/CUDA/cuda-7.0-linux/targets/aarch64-linux-androideabi/include
+flexCUDA_release_lpaths :=
+flexCUDA_release_lpaths += ./../../../../../../external/CUDA/cuda-7.0-linux/targets/aarch64-linux-androideabi/lib
+flexCUDA_release_lpaths += ./../../../lib/android
+flexCUDA_release_lpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a
+flexCUDA_release_defines := $(flexCUDA_custom_defines)
+flexCUDA_release_defines += android
+flexCUDA_release_defines += ANDROID=1
+flexCUDA_release_defines += ANDROID_PLAT=1
+flexCUDA_release_defines += DISABLE_IMPORTGL
+flexCUDA_release_libraries :=
+flexCUDA_release_common_cflags := $(flexCUDA_custom_cflags)
+flexCUDA_release_common_cflags += -MMD
+flexCUDA_release_common_cflags += $(addprefix -D, $(flexCUDA_release_defines))
+flexCUDA_release_common_cflags += $(addprefix -I, $(flexCUDA_release_hpaths))
+flexCUDA_release_cflags := $(flexCUDA_release_common_cflags)
+flexCUDA_release_cflags += -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
+flexCUDA_release_cflags += -O3 -ffast-math
+flexCUDA_release_cppflags := $(flexCUDA_release_common_cflags)
+flexCUDA_release_cppflags += -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
+flexCUDA_release_cppflags += -O3 -ffast-math
+flexCUDA_release_lflags := $(flexCUDA_custom_lflags)
+flexCUDA_release_lflags += $(addprefix -L, $(flexCUDA_release_lpaths))
+flexCUDA_release_lflags += -Wl,--start-group $(addprefix -l, $(flexCUDA_release_libraries)) -Wl,--end-group
+flexCUDA_release_objsdir = $(OBJS_DIR)/flexCUDA_release
+flexCUDA_release_cpp_o = $(addprefix $(flexCUDA_release_objsdir)/, $(subst ./, , $(subst ../, , $(patsubst %.cpp, %.cpp.o, $(flexCUDA_cppfiles)))))
+flexCUDA_release_cc_o = $(addprefix $(flexCUDA_release_objsdir)/, $(subst ./, , $(subst ../, , $(patsubst %.cc, %.cc.o, $(flexCUDA_ccfiles)))))
+flexCUDA_release_c_o = $(addprefix $(flexCUDA_release_objsdir)/, $(subst ./, , $(subst ../, , $(patsubst %.c, %.c.o, $(flexCUDA_cfiles)))))
+flexCUDA_release_cuda_src_cuda_bvh_cu_o += $(OBJS_DIR)/flexCUDA_release/cuda/src/cudabvh.o
+flexCUDA_release_cuda_src_cuda_flex_cu_o += $(OBJS_DIR)/flexCUDA_release/cuda/src/cudaflex.o
+flexCUDA_release_cuda_src_cuda_sort_cu_o += $(OBJS_DIR)/flexCUDA_release/cuda/src/cudasort.o
+flexCUDA_release_obj = $(flexCUDA_release_cpp_o) $(flexCUDA_release_cc_o) $(flexCUDA_release_c_o) $(flexCUDA_release_cuda_src_cuda_bvh_cu_o) $(flexCUDA_release_cuda_src_cuda_flex_cu_o) $(flexCUDA_release_cuda_src_cuda_sort_cu_o)
+flexCUDA_release_bin := ./../../../lib/android_aarch64/libNvFlexReleaseCUDA_aarch64.a
+
+clean_flexCUDA_release:
+ @$(ECHO) clean flexCUDA release
+ @$(RMDIR) $(flexCUDA_release_objsdir)
+ @$(RMDIR) $(flexCUDA_release_bin)
+ @$(RMDIR) $(DEPSDIR)/flexCUDA/release
+
+build_flexCUDA_release: postbuild_flexCUDA_release
+postbuild_flexCUDA_release: mainbuild_flexCUDA_release
+mainbuild_flexCUDA_release: prebuild_flexCUDA_release $(flexCUDA_release_bin)
+prebuild_flexCUDA_release:
+
+$(flexCUDA_release_bin): $(flexCUDA_release_obj)
+ mkdir -p `dirname ./../../../lib/android_aarch64/libNvFlexReleaseCUDA_aarch64.a`
+ @$(AR) rcs $(flexCUDA_release_bin) $(flexCUDA_release_obj)
+ $(ECHO) building $@ complete!
+
+$(flexCUDA_release_cuda_src_cuda_bvh_cu_o): $(flexCUDA_cuda_src_cuda_bvh_cu)
+ @mkdir -p `dirname $(OBJS_DIR)/flexCUDA_release/cuda/src/cudabvh.o`
+ $(ECHO) "../../../../../../external/CUDA/cuda-7.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -target-cpu-arch=ARM -m64 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-7.0-linux/targets/aarch64-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-21/arch-arm64/usr/include" --compile "../../../src/cuda/bvh.cu" -o "$(OBJS_DIR)/flexCUDA_release/cuda/src/cudabvh.o"
+ "../../../../../../external/CUDA/cuda-7.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -target-cpu-arch=ARM -m64 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-7.0-linux/targets/aarch64-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-21/arch-arm64/usr/include" --compile "../../../src/cuda/bvh.cu" -o "$(OBJS_DIR)/flexCUDA_release/cuda/src/cudabvh.o"
+
+$(flexCUDA_release_cuda_src_cuda_flex_cu_o): $(flexCUDA_cuda_src_cuda_flex_cu)
+ @mkdir -p `dirname $(OBJS_DIR)/flexCUDA_release/cuda/src/cudaflex.o`
+ $(ECHO) "../../../../../../external/CUDA/cuda-7.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -target-cpu-arch=ARM -m64 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-7.0-linux/targets/aarch64-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-21/arch-arm64/usr/include" --compile "../../../src/cuda/flex.cu" -o "$(OBJS_DIR)/flexCUDA_release/cuda/src/cudaflex.o"
+ "../../../../../../external/CUDA/cuda-7.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -target-cpu-arch=ARM -m64 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-7.0-linux/targets/aarch64-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-21/arch-arm64/usr/include" --compile "../../../src/cuda/flex.cu" -o "$(OBJS_DIR)/flexCUDA_release/cuda/src/cudaflex.o"
+
+$(flexCUDA_release_cuda_src_cuda_sort_cu_o): $(flexCUDA_cuda_src_cuda_sort_cu)
+ @mkdir -p `dirname $(OBJS_DIR)/flexCUDA_release/cuda/src/cudasort.o`
+ $(ECHO) "../../../../../../external/CUDA/cuda-7.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -target-cpu-arch=ARM -m64 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-7.0-linux/targets/aarch64-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-21/arch-arm64/usr/include" --compile "../../../src/cuda/sort.cu" -o "$(OBJS_DIR)/flexCUDA_release/cuda/src/cudasort.o"
+ "../../../../../../external/CUDA/cuda-7.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -target-cpu-arch=ARM -m64 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-7.0-linux/targets/aarch64-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-21/arch-arm64/usr/include" --compile "../../../src/cuda/sort.cu" -o "$(OBJS_DIR)/flexCUDA_release/cuda/src/cudasort.o"
+
+flexCUDA_release_DEPDIR = $(dir $(@))/$(*F)
+$(flexCUDA_release_cpp_o): $(flexCUDA_release_objsdir)/%.o:
+ $(ECHO) flexCUDA: compiling release $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexCUDA_release_objsdir),, $@))), $(flexCUDA_cppfiles))...
+ mkdir -p $(dir $(@))
+ $(CXX) $(flexCUDA_release_cppflags) -c $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexCUDA_release_objsdir),, $@))), $(flexCUDA_cppfiles)) -o $@
+ @mkdir -p $(dir $(addprefix $(DEPSDIR)/flexCUDA/release/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexCUDA_release_objsdir),, $@))), $(flexCUDA_cppfiles))))))
+ cp $(flexCUDA_release_DEPDIR).d $(addprefix $(DEPSDIR)/flexCUDA/release/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexCUDA_release_objsdir),, $@))), $(flexCUDA_cppfiles))))).P; \
+ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(flexCUDA_release_DEPDIR).d >> $(addprefix $(DEPSDIR)/flexCUDA/release/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexCUDA_release_objsdir),, $@))), $(flexCUDA_cppfiles))))).P; \
+ rm -f $(flexCUDA_release_DEPDIR).d
+
+$(flexCUDA_release_cc_o): $(flexCUDA_release_objsdir)/%.o:
+ $(ECHO) flexCUDA: compiling release $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexCUDA_release_objsdir),, $@))), $(flexCUDA_ccfiles))...
+ mkdir -p $(dir $(@))
+ $(CXX) $(flexCUDA_release_cppflags) -c $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexCUDA_release_objsdir),, $@))), $(flexCUDA_ccfiles)) -o $@
+ mkdir -p $(dir $(addprefix $(DEPSDIR)/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexCUDA_release_objsdir),, $@))), $(flexCUDA_ccfiles))))))
+ cp $(flexCUDA_release_DEPDIR).d $(addprefix $(DEPSDIR)/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexCUDA_release_objsdir),, $@))), $(flexCUDA_ccfiles))))).release.P; \
+ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(flexCUDA_release_DEPDIR).d >> $(addprefix $(DEPSDIR)/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexCUDA_release_objsdir),, $@))), $(flexCUDA_ccfiles))))).release.P; \
+ rm -f $(flexCUDA_release_DEPDIR).d
+
+$(flexCUDA_release_c_o): $(flexCUDA_release_objsdir)/%.o:
+ $(ECHO) flexCUDA: compiling release $(filter %$(strip $(subst .c.o,.c, $(subst $(flexCUDA_release_objsdir),, $@))), $(flexCUDA_cfiles))...
+ mkdir -p $(dir $(@))
+ $(CC) $(flexCUDA_release_cflags) -c $(filter %$(strip $(subst .c.o,.c, $(subst $(flexCUDA_release_objsdir),, $@))), $(flexCUDA_cfiles)) -o $@
+ @mkdir -p $(dir $(addprefix $(DEPSDIR)/flexCUDA/release/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .c.o,.c, $(subst $(flexCUDA_release_objsdir),, $@))), $(flexCUDA_cfiles))))))
+ cp $(flexCUDA_release_DEPDIR).d $(addprefix $(DEPSDIR)/flexCUDA/release/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .c.o,.c, $(subst $(flexCUDA_release_objsdir),, $@))), $(flexCUDA_cfiles))))).P; \
+ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(flexCUDA_release_DEPDIR).d >> $(addprefix $(DEPSDIR)/flexCUDA/release/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .c.o,.c, $(subst $(flexCUDA_release_objsdir),, $@))), $(flexCUDA_cfiles))))).P; \
+ rm -f $(flexCUDA_release_DEPDIR).d
+
+flexCUDA_debug_hpaths :=
+flexCUDA_debug_hpaths += ./../../..
+flexCUDA_debug_hpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-21/arch-arm64/usr/include
+flexCUDA_debug_hpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/include
+flexCUDA_debug_hpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include
+flexCUDA_debug_hpaths += ./../../../../../../external/CUDA/cuda-7.0-linux/targets/aarch64-linux-androideabi/include
+flexCUDA_debug_lpaths :=
+flexCUDA_debug_lpaths += ./../../../../../../external/CUDA/cuda-7.0-linux/targets/aarch64-linux-androideabi/lib
+flexCUDA_debug_lpaths += ./../../../lib/android
+flexCUDA_debug_lpaths += ./../../../../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a
+flexCUDA_debug_defines := $(flexCUDA_custom_defines)
+flexCUDA_debug_defines += android
+flexCUDA_debug_defines += ANDROID=1
+flexCUDA_debug_defines += ANDROID_PLAT=1
+flexCUDA_debug_defines += DISABLE_IMPORTGL
+flexCUDA_debug_libraries :=
+flexCUDA_debug_common_cflags := $(flexCUDA_custom_cflags)
+flexCUDA_debug_common_cflags += -MMD
+flexCUDA_debug_common_cflags += $(addprefix -D, $(flexCUDA_debug_defines))
+flexCUDA_debug_common_cflags += $(addprefix -I, $(flexCUDA_debug_hpaths))
+flexCUDA_debug_cflags := $(flexCUDA_debug_common_cflags)
+flexCUDA_debug_cflags += -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
+flexCUDA_debug_cflags += -g -O0
+flexCUDA_debug_cppflags := $(flexCUDA_debug_common_cflags)
+flexCUDA_debug_cppflags += -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
+flexCUDA_debug_cppflags += -g -O0
+flexCUDA_debug_lflags := $(flexCUDA_custom_lflags)
+flexCUDA_debug_lflags += $(addprefix -L, $(flexCUDA_debug_lpaths))
+flexCUDA_debug_lflags += -Wl,--start-group $(addprefix -l, $(flexCUDA_debug_libraries)) -Wl,--end-group
+flexCUDA_debug_objsdir = $(OBJS_DIR)/flexCUDA_debug
+flexCUDA_debug_cpp_o = $(addprefix $(flexCUDA_debug_objsdir)/, $(subst ./, , $(subst ../, , $(patsubst %.cpp, %.cpp.o, $(flexCUDA_cppfiles)))))
+flexCUDA_debug_cc_o = $(addprefix $(flexCUDA_debug_objsdir)/, $(subst ./, , $(subst ../, , $(patsubst %.cc, %.cc.o, $(flexCUDA_ccfiles)))))
+flexCUDA_debug_c_o = $(addprefix $(flexCUDA_debug_objsdir)/, $(subst ./, , $(subst ../, , $(patsubst %.c, %.c.o, $(flexCUDA_cfiles)))))
+flexCUDA_debug_cuda_src_cuda_bvh_cu_o += $(OBJS_DIR)/flexCUDA_debug/cuda/src/cudabvh.o
+flexCUDA_debug_cuda_src_cuda_flex_cu_o += $(OBJS_DIR)/flexCUDA_debug/cuda/src/cudaflex.o
+flexCUDA_debug_cuda_src_cuda_sort_cu_o += $(OBJS_DIR)/flexCUDA_debug/cuda/src/cudasort.o
+flexCUDA_debug_obj = $(flexCUDA_debug_cpp_o) $(flexCUDA_debug_cc_o) $(flexCUDA_debug_c_o) $(flexCUDA_debug_cuda_src_cuda_bvh_cu_o) $(flexCUDA_debug_cuda_src_cuda_flex_cu_o) $(flexCUDA_debug_cuda_src_cuda_sort_cu_o)
+flexCUDA_debug_bin := ./../../../lib/android_aarch64/libNvFlexDebugCUDA_aarch64.a
+
+clean_flexCUDA_debug:
+ @$(ECHO) clean flexCUDA debug
+ @$(RMDIR) $(flexCUDA_debug_objsdir)
+ @$(RMDIR) $(flexCUDA_debug_bin)
+ @$(RMDIR) $(DEPSDIR)/flexCUDA/debug
+
+build_flexCUDA_debug: postbuild_flexCUDA_debug
+postbuild_flexCUDA_debug: mainbuild_flexCUDA_debug
+mainbuild_flexCUDA_debug: prebuild_flexCUDA_debug $(flexCUDA_debug_bin)
+prebuild_flexCUDA_debug:
+
+$(flexCUDA_debug_bin): $(flexCUDA_debug_obj)
+ mkdir -p `dirname ./../../../lib/android_aarch64/libNvFlexDebugCUDA_aarch64.a`
+ @$(AR) rcs $(flexCUDA_debug_bin) $(flexCUDA_debug_obj)
+ $(ECHO) building $@ complete!
+
+$(flexCUDA_debug_cuda_src_cuda_bvh_cu_o): $(flexCUDA_cuda_src_cuda_bvh_cu)
+ @mkdir -p `dirname $(OBJS_DIR)/flexCUDA_debug/cuda/src/cudabvh.o`
+ $(ECHO) "../../../../../../external/CUDA/cuda-7.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -target-cpu-arch=ARM -m64 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-7.0-linux/targets/aarch64-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-21/arch-arm64/usr/include" --compile "../../../src/cuda/bvh.cu" -o "$(OBJS_DIR)/flexCUDA_debug/cuda/src/cudabvh.o"
+ "../../../../../../external/CUDA/cuda-7.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -target-cpu-arch=ARM -m64 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-7.0-linux/targets/aarch64-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-21/arch-arm64/usr/include" --compile "../../../src/cuda/bvh.cu" -o "$(OBJS_DIR)/flexCUDA_debug/cuda/src/cudabvh.o"
+
+$(flexCUDA_debug_cuda_src_cuda_flex_cu_o): $(flexCUDA_cuda_src_cuda_flex_cu)
+ @mkdir -p `dirname $(OBJS_DIR)/flexCUDA_debug/cuda/src/cudaflex.o`
+ $(ECHO) "../../../../../../external/CUDA/cuda-7.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -target-cpu-arch=ARM -m64 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-7.0-linux/targets/aarch64-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-21/arch-arm64/usr/include" --compile "../../../src/cuda/flex.cu" -o "$(OBJS_DIR)/flexCUDA_debug/cuda/src/cudaflex.o"
+ "../../../../../../external/CUDA/cuda-7.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -target-cpu-arch=ARM -m64 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-7.0-linux/targets/aarch64-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-21/arch-arm64/usr/include" --compile "../../../src/cuda/flex.cu" -o "$(OBJS_DIR)/flexCUDA_debug/cuda/src/cudaflex.o"
+
+$(flexCUDA_debug_cuda_src_cuda_sort_cu_o): $(flexCUDA_cuda_src_cuda_sort_cu)
+ @mkdir -p `dirname $(OBJS_DIR)/flexCUDA_debug/cuda/src/cudasort.o`
+ $(ECHO) "../../../../../../external/CUDA/cuda-7.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -target-cpu-arch=ARM -m64 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-7.0-linux/targets/aarch64-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-21/arch-arm64/usr/include" --compile "../../../src/cuda/sort.cu" -o "$(OBJS_DIR)/flexCUDA_debug/cuda/src/cudasort.o"
+ "../../../../../../external/CUDA/cuda-7.0-linux/bin/nvcc" -ccbin /home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -target-cpu-arch=ARM -m64 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"../../../../../../external/CUDA/cuda-7.0-linux/targets/aarch64-linux-androideabi/include" -I"../../.." -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include" -I"/home/mmacklin/swhost/devrel/libdev/flex/dev/main/../../../external/android-ndk/android-ndk-r10e-linux/platforms/android-21/arch-arm64/usr/include" --compile "../../../src/cuda/sort.cu" -o "$(OBJS_DIR)/flexCUDA_debug/cuda/src/cudasort.o"
+
+flexCUDA_debug_DEPDIR = $(dir $(@))/$(*F)
+$(flexCUDA_debug_cpp_o): $(flexCUDA_debug_objsdir)/%.o:
+ $(ECHO) flexCUDA: compiling debug $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexCUDA_debug_objsdir),, $@))), $(flexCUDA_cppfiles))...
+ mkdir -p $(dir $(@))
+ $(CXX) $(flexCUDA_debug_cppflags) -c $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexCUDA_debug_objsdir),, $@))), $(flexCUDA_cppfiles)) -o $@
+ @mkdir -p $(dir $(addprefix $(DEPSDIR)/flexCUDA/debug/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexCUDA_debug_objsdir),, $@))), $(flexCUDA_cppfiles))))))
+ cp $(flexCUDA_debug_DEPDIR).d $(addprefix $(DEPSDIR)/flexCUDA/debug/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexCUDA_debug_objsdir),, $@))), $(flexCUDA_cppfiles))))).P; \
+ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(flexCUDA_debug_DEPDIR).d >> $(addprefix $(DEPSDIR)/flexCUDA/debug/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexCUDA_debug_objsdir),, $@))), $(flexCUDA_cppfiles))))).P; \
+ rm -f $(flexCUDA_debug_DEPDIR).d
+
+$(flexCUDA_debug_cc_o): $(flexCUDA_debug_objsdir)/%.o:
+ $(ECHO) flexCUDA: compiling debug $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexCUDA_debug_objsdir),, $@))), $(flexCUDA_ccfiles))...
+ mkdir -p $(dir $(@))
+ $(CXX) $(flexCUDA_debug_cppflags) -c $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexCUDA_debug_objsdir),, $@))), $(flexCUDA_ccfiles)) -o $@
+ mkdir -p $(dir $(addprefix $(DEPSDIR)/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexCUDA_debug_objsdir),, $@))), $(flexCUDA_ccfiles))))))
+ cp $(flexCUDA_debug_DEPDIR).d $(addprefix $(DEPSDIR)/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexCUDA_debug_objsdir),, $@))), $(flexCUDA_ccfiles))))).debug.P; \
+ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(flexCUDA_debug_DEPDIR).d >> $(addprefix $(DEPSDIR)/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexCUDA_debug_objsdir),, $@))), $(flexCUDA_ccfiles))))).debug.P; \
+ rm -f $(flexCUDA_debug_DEPDIR).d
+
+$(flexCUDA_debug_c_o): $(flexCUDA_debug_objsdir)/%.o:
+ $(ECHO) flexCUDA: compiling debug $(filter %$(strip $(subst .c.o,.c, $(subst $(flexCUDA_debug_objsdir),, $@))), $(flexCUDA_cfiles))...
+ mkdir -p $(dir $(@))
+ $(CC) $(flexCUDA_debug_cflags) -c $(filter %$(strip $(subst .c.o,.c, $(subst $(flexCUDA_debug_objsdir),, $@))), $(flexCUDA_cfiles)) -o $@
+ @mkdir -p $(dir $(addprefix $(DEPSDIR)/flexCUDA/debug/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .c.o,.c, $(subst $(flexCUDA_debug_objsdir),, $@))), $(flexCUDA_cfiles))))))
+ cp $(flexCUDA_debug_DEPDIR).d $(addprefix $(DEPSDIR)/flexCUDA/debug/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .c.o,.c, $(subst $(flexCUDA_debug_objsdir),, $@))), $(flexCUDA_cfiles))))).P; \
+ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(flexCUDA_debug_DEPDIR).d >> $(addprefix $(DEPSDIR)/flexCUDA/debug/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .c.o,.c, $(subst $(flexCUDA_debug_objsdir),, $@))), $(flexCUDA_cfiles))))).P; \
+ rm -f $(flexCUDA_debug_DEPDIR).d
+
+clean_flexCUDA: clean_flexCUDA_release clean_flexCUDA_debug
+ rm -rf $(DEPSDIR)
+
+export VERBOSE
+ifndef VERBOSE
+.SILENT:
+endif
diff --git a/extensions/compiler/makeandroid_aarch64/Makefile.flexExtCUDA.mk b/extensions/compiler/makeandroid_aarch64/Makefile.flexExtCUDA.mk
new file mode 100644
index 0000000..6f5c84a
--- /dev/null
+++ b/extensions/compiler/makeandroid_aarch64/Makefile.flexExtCUDA.mk
@@ -0,0 +1,207 @@
+# Makefile generated by XPJ for android_aarch64
+-include Makefile.custom
+ProjectName = flexExtCUDA
+flexExtCUDA_cppfiles += ./../../flexExtCloth.cpp
+flexExtCUDA_cppfiles += ./../../flexExtContainer.cpp
+flexExtCUDA_cppfiles += ./../../flexExtMovingFrame.cpp
+flexExtCUDA_cppfiles += ./../../flexExtRigid.cpp
+flexExtCUDA_cppfiles += ./../../flexExtSoft.cpp
+flexExtCUDA_cuda_cuda_flexExt_cu += ./../../cuda/flexExt.cu
+flexExtCUDA_cppfiles += ./../../../core/sdf.cpp
+flexExtCUDA_cppfiles += ./../../../core/voxelize.cpp
+flexExtCUDA_cppfiles += ./../../../core/maths.cpp
+flexExtCUDA_cppfiles += ./../../../core/aabbtree.cpp
+
+flexExtCUDA_cpp_release_dep = $(addprefix $(DEPSDIR)/flexExtCUDA/release/, $(subst ./, , $(subst ../, , $(patsubst %.cpp, %.cpp.P, $(flexExtCUDA_cppfiles)))))
+flexExtCUDA_cc_release_dep = $(addprefix $(DEPSDIR)/, $(subst ./, , $(subst ../, , $(patsubst %.cc, %.cc.release.P, $(flexExtCUDA_ccfiles)))))
+flexExtCUDA_c_release_dep = $(addprefix $(DEPSDIR)/flexExtCUDA/release/, $(subst ./, , $(subst ../, , $(patsubst %.c, %.c.P, $(flexExtCUDA_cfiles)))))
+flexExtCUDA_release_dep = $(flexExtCUDA_cpp_release_dep) $(flexExtCUDA_cc_release_dep) $(flexExtCUDA_c_release_dep)
+-include $(flexExtCUDA_release_dep)
+flexExtCUDA_cpp_debug_dep = $(addprefix $(DEPSDIR)/flexExtCUDA/debug/, $(subst ./, , $(subst ../, , $(patsubst %.cpp, %.cpp.P, $(flexExtCUDA_cppfiles)))))
+flexExtCUDA_cc_debug_dep = $(addprefix $(DEPSDIR)/, $(subst ./, , $(subst ../, , $(patsubst %.cc, %.cc.debug.P, $(flexExtCUDA_ccfiles)))))
+flexExtCUDA_c_debug_dep = $(addprefix $(DEPSDIR)/flexExtCUDA/debug/, $(subst ./, , $(subst ../, , $(patsubst %.c, %.c.P, $(flexExtCUDA_cfiles)))))
+flexExtCUDA_debug_dep = $(flexExtCUDA_cpp_debug_dep) $(flexExtCUDA_cc_debug_dep) $(flexExtCUDA_c_debug_dep)
+-include $(flexExtCUDA_debug_dep)
+flexExtCUDA_release_hpaths :=
+flexExtCUDA_release_hpaths += ./../../..
+flexExtCUDA_release_hpaths += $(NDK_ROOT)/$(NDK_VERSION)/platforms/android-21/arch-arm64/usr/include
+flexExtCUDA_release_hpaths += $(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/gnu-libstdc++/4.9/include
+flexExtCUDA_release_hpaths += $(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include
+flexExtCUDA_release_hpaths += $(CUDA_PATH)/targets/aarch64-linux-androideabi/include
+flexExtCUDA_release_lpaths :=
+flexExtCUDA_release_lpaths += $(CUDA_PATH)/targets/aarch64-linux-androideabi/lib
+flexExtCUDA_release_lpaths += ./../../../lib/android
+flexExtCUDA_release_lpaths += $(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a
+flexExtCUDA_release_defines := $(flexExtCUDA_custom_defines)
+flexExtCUDA_release_defines += android
+flexExtCUDA_release_defines += ANDROID=1
+flexExtCUDA_release_defines += ANDROID_PLAT=1
+flexExtCUDA_release_defines += DISABLE_IMPORTGL
+flexExtCUDA_release_libraries :=
+flexExtCUDA_release_libraries += ./../../../lib/android_aarch64/libNvFlexRelease_aarch64.a
+flexExtCUDA_release_common_cflags := $(flexExtCUDA_custom_cflags)
+flexExtCUDA_release_common_cflags += -MMD
+flexExtCUDA_release_common_cflags += $(addprefix -D, $(flexExtCUDA_release_defines))
+flexExtCUDA_release_common_cflags += $(addprefix -I, $(flexExtCUDA_release_hpaths))
+flexExtCUDA_release_common_cflags += -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
+flexExtCUDA_release_common_cflags += -O3 -ffast-math
+flexExtCUDA_release_cflags := $(flexExtCUDA_release_common_cflags)
+flexExtCUDA_release_cppflags := $(flexExtCUDA_release_common_cflags)
+flexExtCUDA_release_lflags := $(flexExtCUDA_custom_lflags)
+flexExtCUDA_release_lflags += $(addprefix -L, $(flexExtCUDA_release_lpaths))
+flexExtCUDA_release_lflags += -Wl,--start-group $(addprefix -l, $(flexExtCUDA_release_libraries)) -Wl,--end-group
+flexExtCUDA_release_objsdir = $(OBJS_DIR)/flexExtCUDA_release
+flexExtCUDA_release_cpp_o = $(addprefix $(flexExtCUDA_release_objsdir)/, $(subst ./, , $(subst ../, , $(patsubst %.cpp, %.cpp.o, $(flexExtCUDA_cppfiles)))))
+flexExtCUDA_release_cc_o = $(addprefix $(flexExtCUDA_release_objsdir)/, $(subst ./, , $(subst ../, , $(patsubst %.cc, %.cc.o, $(flexExtCUDA_ccfiles)))))
+flexExtCUDA_release_c_o = $(addprefix $(flexExtCUDA_release_objsdir)/, $(subst ./, , $(subst ../, , $(patsubst %.c, %.c.o, $(flexExtCUDA_cfiles)))))
+flexExtCUDA_release_cuda_cuda_flexExt_cu_o += $(OBJS_DIR)/flexExtCUDA_release/cuda/cudaflexExt.o
+flexExtCUDA_release_obj = $(flexExtCUDA_release_cpp_o) $(flexExtCUDA_release_cc_o) $(flexExtCUDA_release_c_o) $(flexExtCUDA_release_cuda_cuda_flexExt_cu_o)
+flexExtCUDA_release_bin := ./../../../lib/android_aarch64/libNvFlexExtReleaseCUDA_aarch64.a
+
+clean_flexExtCUDA_release:
+ @$(ECHO) clean flexExtCUDA release
+ @$(RMDIR) $(flexExtCUDA_release_objsdir)
+ @$(RMDIR) $(flexExtCUDA_release_bin)
+ @$(RMDIR) $(DEPSDIR)/flexExtCUDA/release
+
+build_flexExtCUDA_release: postbuild_flexExtCUDA_release
+postbuild_flexExtCUDA_release: mainbuild_flexExtCUDA_release
+mainbuild_flexExtCUDA_release: prebuild_flexExtCUDA_release $(flexExtCUDA_release_bin)
+prebuild_flexExtCUDA_release:
+
+$(flexExtCUDA_release_bin): $(flexExtCUDA_release_obj)
+ mkdir -p `dirname ./../../../lib/android_aarch64/libNvFlexExtReleaseCUDA_aarch64.a`
+ @$(AR) rcs $(flexExtCUDA_release_bin) $(flexExtCUDA_release_obj)
+ $(ECHO) building $@ complete!
+
+$(flexExtCUDA_release_cuda_cuda_flexExt_cu_o): $(flexExtCUDA_cuda_cuda_flexExt_cu)
+ @mkdir -p `dirname $(OBJS_DIR)/flexExtCUDA_release/cuda/cudaflexExt.o`
+ $(ECHO) "$(CUDA_PATH)/bin/nvcc" -ccbin $(NDK_ROOT)/$(NDK_VERSION)/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -target-cpu-arch=ARM -m64 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"$(CUDA_PATH)/targets/aarch64-linux-androideabi/include" -I"../../.." -I"$(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"$(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include" -I"$(NDK_ROOT)/$(NDK_VERSION)/platforms/android-21/arch-arm64/usr/include" --compile "./../../cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_release/cuda/cudaflexExt.o"
+ "$(CUDA_PATH)/bin/nvcc" -ccbin $(NDK_ROOT)/$(NDK_VERSION)/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -target-cpu-arch=ARM -m64 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"$(CUDA_PATH)/targets/aarch64-linux-androideabi/include" -I"../../.." -I"$(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"$(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include" -I"$(NDK_ROOT)/$(NDK_VERSION)/platforms/android-21/arch-arm64/usr/include" --compile "./../../cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_release/cuda/cudaflexExt.o"
+
+flexExtCUDA_release_DEPDIR = $(dir $(@))/$(*F)
+$(flexExtCUDA_release_cpp_o): $(flexExtCUDA_release_objsdir)/%.o:
+ $(ECHO) flexExtCUDA: compiling release $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexExtCUDA_release_objsdir),, $@))), $(flexExtCUDA_cppfiles))...
+ mkdir -p $(dir $(@))
+ $(CXX) $(flexExtCUDA_release_cppflags) -c $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexExtCUDA_release_objsdir),, $@))), $(flexExtCUDA_cppfiles)) -o $@
+ @mkdir -p $(dir $(addprefix $(DEPSDIR)/flexExtCUDA/release/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexExtCUDA_release_objsdir),, $@))), $(flexExtCUDA_cppfiles))))))
+ cp $(flexExtCUDA_release_DEPDIR).d $(addprefix $(DEPSDIR)/flexExtCUDA/release/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexExtCUDA_release_objsdir),, $@))), $(flexExtCUDA_cppfiles))))).P; \
+ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(flexExtCUDA_release_DEPDIR).d >> $(addprefix $(DEPSDIR)/flexExtCUDA/release/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexExtCUDA_release_objsdir),, $@))), $(flexExtCUDA_cppfiles))))).P; \
+ rm -f $(flexExtCUDA_release_DEPDIR).d
+
+$(flexExtCUDA_release_cc_o): $(flexExtCUDA_release_objsdir)/%.o:
+ $(ECHO) flexExtCUDA: compiling release $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexExtCUDA_release_objsdir),, $@))), $(flexExtCUDA_ccfiles))...
+ mkdir -p $(dir $(@))
+ $(CXX) $(flexExtCUDA_release_cppflags) -c $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexExtCUDA_release_objsdir),, $@))), $(flexExtCUDA_ccfiles)) -o $@
+ mkdir -p $(dir $(addprefix $(DEPSDIR)/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexExtCUDA_release_objsdir),, $@))), $(flexExtCUDA_ccfiles))))))
+ cp $(flexExtCUDA_release_DEPDIR).d $(addprefix $(DEPSDIR)/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexExtCUDA_release_objsdir),, $@))), $(flexExtCUDA_ccfiles))))).release.P; \
+ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(flexExtCUDA_release_DEPDIR).d >> $(addprefix $(DEPSDIR)/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexExtCUDA_release_objsdir),, $@))), $(flexExtCUDA_ccfiles))))).release.P; \
+ rm -f $(flexExtCUDA_release_DEPDIR).d
+
+$(flexExtCUDA_release_c_o): $(flexExtCUDA_release_objsdir)/%.o:
+ $(ECHO) flexExtCUDA: compiling release $(filter %$(strip $(subst .c.o,.c, $(subst $(flexExtCUDA_release_objsdir),, $@))), $(flexExtCUDA_cfiles))...
+ mkdir -p $(dir $(@))
+ $(CC) $(flexExtCUDA_release_cflags) -c $(filter %$(strip $(subst .c.o,.c, $(subst $(flexExtCUDA_release_objsdir),, $@))), $(flexExtCUDA_cfiles)) -o $@
+ @mkdir -p $(dir $(addprefix $(DEPSDIR)/flexExtCUDA/release/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .c.o,.c, $(subst $(flexExtCUDA_release_objsdir),, $@))), $(flexExtCUDA_cfiles))))))
+ cp $(flexExtCUDA_release_DEPDIR).d $(addprefix $(DEPSDIR)/flexExtCUDA/release/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .c.o,.c, $(subst $(flexExtCUDA_release_objsdir),, $@))), $(flexExtCUDA_cfiles))))).P; \
+ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(flexExtCUDA_release_DEPDIR).d >> $(addprefix $(DEPSDIR)/flexExtCUDA/release/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .c.o,.c, $(subst $(flexExtCUDA_release_objsdir),, $@))), $(flexExtCUDA_cfiles))))).P; \
+ rm -f $(flexExtCUDA_release_DEPDIR).d
+
+flexExtCUDA_debug_hpaths :=
+flexExtCUDA_debug_hpaths += ./../../..
+flexExtCUDA_debug_hpaths += $(NDK_ROOT)/$(NDK_VERSION)/platforms/android-21/arch-arm64/usr/include
+flexExtCUDA_debug_hpaths += $(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/gnu-libstdc++/4.9/include
+flexExtCUDA_debug_hpaths += $(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include
+flexExtCUDA_debug_hpaths += $(CUDA_PATH)/targets/aarch64-linux-androideabi/include
+flexExtCUDA_debug_lpaths :=
+flexExtCUDA_debug_lpaths += $(CUDA_PATH)/targets/aarch64-linux-androideabi/lib
+flexExtCUDA_debug_lpaths += ./../../../lib/android
+flexExtCUDA_debug_lpaths += $(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a
+flexExtCUDA_debug_defines := $(flexExtCUDA_custom_defines)
+flexExtCUDA_debug_defines += android
+flexExtCUDA_debug_defines += ANDROID=1
+flexExtCUDA_debug_defines += ANDROID_PLAT=1
+flexExtCUDA_debug_defines += DISABLE_IMPORTGL
+flexExtCUDA_debug_libraries :=
+flexExtCUDA_debug_libraries += ./../../../lib/android_aarch64/libNvFlexDebug_aarch64.a
+flexExtCUDA_debug_common_cflags := $(flexExtCUDA_custom_cflags)
+flexExtCUDA_debug_common_cflags += -MMD
+flexExtCUDA_debug_common_cflags += $(addprefix -D, $(flexExtCUDA_debug_defines))
+flexExtCUDA_debug_common_cflags += $(addprefix -I, $(flexExtCUDA_debug_hpaths))
+flexExtCUDA_debug_common_cflags += -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
+flexExtCUDA_debug_common_cflags += -g -O0
+flexExtCUDA_debug_cflags := $(flexExtCUDA_debug_common_cflags)
+flexExtCUDA_debug_cppflags := $(flexExtCUDA_debug_common_cflags)
+flexExtCUDA_debug_lflags := $(flexExtCUDA_custom_lflags)
+flexExtCUDA_debug_lflags += $(addprefix -L, $(flexExtCUDA_debug_lpaths))
+flexExtCUDA_debug_lflags += -Wl,--start-group $(addprefix -l, $(flexExtCUDA_debug_libraries)) -Wl,--end-group
+flexExtCUDA_debug_objsdir = $(OBJS_DIR)/flexExtCUDA_debug
+flexExtCUDA_debug_cpp_o = $(addprefix $(flexExtCUDA_debug_objsdir)/, $(subst ./, , $(subst ../, , $(patsubst %.cpp, %.cpp.o, $(flexExtCUDA_cppfiles)))))
+flexExtCUDA_debug_cc_o = $(addprefix $(flexExtCUDA_debug_objsdir)/, $(subst ./, , $(subst ../, , $(patsubst %.cc, %.cc.o, $(flexExtCUDA_ccfiles)))))
+flexExtCUDA_debug_c_o = $(addprefix $(flexExtCUDA_debug_objsdir)/, $(subst ./, , $(subst ../, , $(patsubst %.c, %.c.o, $(flexExtCUDA_cfiles)))))
+flexExtCUDA_debug_cuda_cuda_flexExt_cu_o += $(OBJS_DIR)/flexExtCUDA_debug/cuda/cudaflexExt.o
+flexExtCUDA_debug_obj = $(flexExtCUDA_debug_cpp_o) $(flexExtCUDA_debug_cc_o) $(flexExtCUDA_debug_c_o) $(flexExtCUDA_debug_cuda_cuda_flexExt_cu_o)
+flexExtCUDA_debug_bin := ./../../../lib/android_aarch64/libNvFlexExtDebugCUDA_aarch64.a
+
+clean_flexExtCUDA_debug:
+ @$(ECHO) clean flexExtCUDA debug
+ @$(RMDIR) $(flexExtCUDA_debug_objsdir)
+ @$(RMDIR) $(flexExtCUDA_debug_bin)
+ @$(RMDIR) $(DEPSDIR)/flexExtCUDA/debug
+
+build_flexExtCUDA_debug: postbuild_flexExtCUDA_debug
+postbuild_flexExtCUDA_debug: mainbuild_flexExtCUDA_debug
+mainbuild_flexExtCUDA_debug: prebuild_flexExtCUDA_debug $(flexExtCUDA_debug_bin)
+prebuild_flexExtCUDA_debug:
+
+$(flexExtCUDA_debug_bin): $(flexExtCUDA_debug_obj)
+ mkdir -p `dirname ./../../../lib/android_aarch64/libNvFlexExtDebugCUDA_aarch64.a`
+ @$(AR) rcs $(flexExtCUDA_debug_bin) $(flexExtCUDA_debug_obj)
+ $(ECHO) building $@ complete!
+
+$(flexExtCUDA_debug_cuda_cuda_flexExt_cu_o): $(flexExtCUDA_cuda_cuda_flexExt_cu)
+ @mkdir -p `dirname $(OBJS_DIR)/flexExtCUDA_debug/cuda/cudaflexExt.o`
+ $(ECHO) "$(CUDA_PATH)/bin/nvcc" -ccbin $(NDK_ROOT)/$(NDK_VERSION)/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -target-cpu-arch=ARM -m64 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"$(CUDA_PATH)/targets/aarch64-linux-androideabi/include" -I"../../.." -I"$(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"$(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include" -I"$(NDK_ROOT)/$(NDK_VERSION)/platforms/android-21/arch-arm64/usr/include" --compile "./../../cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_debug/cuda/cudaflexExt.o"
+ "$(CUDA_PATH)/bin/nvcc" -ccbin $(NDK_ROOT)/$(NDK_VERSION)/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -target-cpu-arch=ARM -m64 -arch=sm_32 -O3 -Xptxas -dlcm=ca -target-os-variant=Android -I"$(CUDA_PATH)/targets/aarch64-linux-androideabi/include" -I"../../.." -I"$(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"$(NDK_ROOT)/$(NDK_VERSION)/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include" -I"$(NDK_ROOT)/$(NDK_VERSION)/platforms/android-21/arch-arm64/usr/include" --compile "./../../cuda/flexExt.cu" -o "$(OBJS_DIR)/flexExtCUDA_debug/cuda/cudaflexExt.o"
+
+flexExtCUDA_debug_DEPDIR = $(dir $(@))/$(*F)
+$(flexExtCUDA_debug_cpp_o): $(flexExtCUDA_debug_objsdir)/%.o:
+ $(ECHO) flexExtCUDA: compiling debug $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexExtCUDA_debug_objsdir),, $@))), $(flexExtCUDA_cppfiles))...
+ mkdir -p $(dir $(@))
+ $(CXX) $(flexExtCUDA_debug_cppflags) -c $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexExtCUDA_debug_objsdir),, $@))), $(flexExtCUDA_cppfiles)) -o $@
+ @mkdir -p $(dir $(addprefix $(DEPSDIR)/flexExtCUDA/debug/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexExtCUDA_debug_objsdir),, $@))), $(flexExtCUDA_cppfiles))))))
+ cp $(flexExtCUDA_debug_DEPDIR).d $(addprefix $(DEPSDIR)/flexExtCUDA/debug/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexExtCUDA_debug_objsdir),, $@))), $(flexExtCUDA_cppfiles))))).P; \
+ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(flexExtCUDA_debug_DEPDIR).d >> $(addprefix $(DEPSDIR)/flexExtCUDA/debug/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cpp.o,.cpp, $(subst $(flexExtCUDA_debug_objsdir),, $@))), $(flexExtCUDA_cppfiles))))).P; \
+ rm -f $(flexExtCUDA_debug_DEPDIR).d
+
+$(flexExtCUDA_debug_cc_o): $(flexExtCUDA_debug_objsdir)/%.o:
+ $(ECHO) flexExtCUDA: compiling debug $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexExtCUDA_debug_objsdir),, $@))), $(flexExtCUDA_ccfiles))...
+ mkdir -p $(dir $(@))
+ $(CXX) $(flexExtCUDA_debug_cppflags) -c $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexExtCUDA_debug_objsdir),, $@))), $(flexExtCUDA_ccfiles)) -o $@
+ mkdir -p $(dir $(addprefix $(DEPSDIR)/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexExtCUDA_debug_objsdir),, $@))), $(flexExtCUDA_ccfiles))))))
+ cp $(flexExtCUDA_debug_DEPDIR).d $(addprefix $(DEPSDIR)/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexExtCUDA_debug_objsdir),, $@))), $(flexExtCUDA_ccfiles))))).debug.P; \
+ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(flexExtCUDA_debug_DEPDIR).d >> $(addprefix $(DEPSDIR)/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .cc.o,.cc, $(subst $(flexExtCUDA_debug_objsdir),, $@))), $(flexExtCUDA_ccfiles))))).debug.P; \
+ rm -f $(flexExtCUDA_debug_DEPDIR).d
+
+$(flexExtCUDA_debug_c_o): $(flexExtCUDA_debug_objsdir)/%.o:
+ $(ECHO) flexExtCUDA: compiling debug $(filter %$(strip $(subst .c.o,.c, $(subst $(flexExtCUDA_debug_objsdir),, $@))), $(flexExtCUDA_cfiles))...
+ mkdir -p $(dir $(@))
+ $(CC) $(flexExtCUDA_debug_cflags) -c $(filter %$(strip $(subst .c.o,.c, $(subst $(flexExtCUDA_debug_objsdir),, $@))), $(flexExtCUDA_cfiles)) -o $@
+ @mkdir -p $(dir $(addprefix $(DEPSDIR)/flexExtCUDA/debug/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .c.o,.c, $(subst $(flexExtCUDA_debug_objsdir),, $@))), $(flexExtCUDA_cfiles))))))
+ cp $(flexExtCUDA_debug_DEPDIR).d $(addprefix $(DEPSDIR)/flexExtCUDA/debug/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .c.o,.c, $(subst $(flexExtCUDA_debug_objsdir),, $@))), $(flexExtCUDA_cfiles))))).P; \
+ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(flexExtCUDA_debug_DEPDIR).d >> $(addprefix $(DEPSDIR)/flexExtCUDA/debug/, $(subst ./, , $(subst ../, , $(filter %$(strip $(subst .c.o,.c, $(subst $(flexExtCUDA_debug_objsdir),, $@))), $(flexExtCUDA_cfiles))))).P; \
+ rm -f $(flexExtCUDA_debug_DEPDIR).d
+
+clean_flexExtCUDA: clean_flexExtCUDA_release clean_flexExtCUDA_debug
+ rm -rf $(DEPSDIR)
+
+export VERBOSE
+ifndef VERBOSE
+.SILENT:
+endif
diff --git a/extensions/compiler/vc12win32/vc120.pdb b/extensions/compiler/vc12win32/vc120.pdb
index 893ff50..4bb28ac 100644
--- a/extensions/compiler/vc12win32/vc120.pdb
+++ b/extensions/compiler/vc12win32/vc120.pdb
Binary files differ
diff --git a/extensions/compiler/vc12win64/vc120.pdb b/extensions/compiler/vc12win64/vc120.pdb
index 4b0714b..48ac2a4 100644
--- a/extensions/compiler/vc12win64/vc120.pdb
+++ b/extensions/compiler/vc12win64/vc120.pdb
Binary files differ
diff --git a/extensions/compiler/vc14win32/vc140.pdb b/extensions/compiler/vc14win32/vc140.pdb
new file mode 100644
index 0000000..77acd50
--- /dev/null
+++ b/extensions/compiler/vc14win32/vc140.pdb
Binary files differ
diff --git a/extensions/compiler/xpj/flexExtCUDA.xpj b/extensions/compiler/xpj/flexExtCUDA.xpj
index 434b2fe..6e80a6f 100644
--- a/extensions/compiler/xpj/flexExtCUDA.xpj
+++ b/extensions/compiler/xpj/flexExtCUDA.xpj
@@ -12,7 +12,7 @@
</Conditional>
<Export platforms="Win32 Win64">../${xpj:TOOL}${xpj:PLATFORM}</Export>
- <Export platform="android{x}" tool="make">../makeandroid</Export>
+ <Export platform="android_aarch64" tool="make">../makeandroid_aarch64</Export>
<Export platform="Linux64" tool="make">../makelinux64</Export>
<Target name="flexExtCUDA">
@@ -118,47 +118,43 @@
</Config>
- <!-- Android -->
+ <!-- Android aarch64-->
- <Config name="default" type="lib" platforms="android{x}">
+ <Config name="default" type="lib" platforms="android_aarch64">
- <apply-template name="android-common"/>
+ <apply-template name="android-aarch64-common"/>
<FileTemplate name="cuda" command='${user:NVCC} ${user:NVCCInclude} --compile "%s" -o "%o"' buildtype="CustomBuild" />
- <OutDir platforms="android{x}" tool="make">${user:ProjectRoot}/lib/android</OutDir>
+ <OutDir platforms="android_aarch64" tool="make">${user:ProjectRoot}/lib/android_aarch64</OutDir>
- <Preprocessor type="define" platform="android{x}">
- android
+ <Preprocessor type="define" platform="android_aarch64">
+ android
ANDROID=1
ANDROID_PLAT=1
DISABLE_IMPORTGL
</Preprocessor>
- <CFlags tool="make">
- -Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions
- </CFlags>
-
+ <CFlags tool="make">-Wall -std=c++11 -fpermissive -fno-strict-aliasing -fno-rtti -fno-exceptions</CFlags>
+
</Config>
- <Config name="release" type="lib" platforms="android{x}">
+ <Config name="release" type="lib" platforms="android_aarch64">
<cflags> -O3 -ffast-math </cflags>
- <OutFile>libflexExt_cuda_release_armv7l.a</OutFile>
-
+ <OutFile>libNvFlexExtReleaseCUDA_aarch64.a</OutFile>
+
<Libraries>
- ${user:ProjectRoot}/lib/android/libNvFlexRelease_armv7l.a
- </Libraries>
-
+ ${user:ProjectRoot}/lib/android_aarch64/libNvFlexRelease_aarch64.a
+ </Libraries>
</Config>
- <Config name="debug" type="lib" platforms="android{x}">
+ <Config name="debug" type="lib" platforms="android_aarch64">
<cflags> -g -O0 </cflags>
- <OutFile>libflexExt_cuda_debug_armv7l.a</OutFile>
-
+ <OutFile>libNvFlexExtDebugCUDA_aarch64.a</OutFile>
+
<Libraries>
- ${user:ProjectRoot}/lib/android/libNvFlexDebug_armv7l.a
- </Libraries>
-
+ ${user:ProjectRoot}/lib/android_aarch64/libNvFlexDebug_aarch64.a
+ </Libraries>
</Config>
@@ -236,4 +232,4 @@
</Target>
</Project>
-</XPJ> \ No newline at end of file
+</XPJ>
diff --git a/extensions/compiler/xpj/flexExtD3D12.xpj b/extensions/compiler/xpj/flexExtD3D12.xpj
new file mode 100644
index 0000000..7ba5bd8
--- /dev/null
+++ b/extensions/compiler/xpj/flexExtD3D12.xpj
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<XPJ version="4">
+
+ <Project name="flexExtD3D12">
+
+ <!-- depends on flex solver project -->
+ <Conditional value="${config}" match="internal">
+ <Import file="../../../src/compiler/xpj/flexD3D12.xpj" />
+ </Conditional>
+
+ <Export platforms="Win32 Win64">../${xpj:TOOL}${xpj:PLATFORM}</Export>
+
+ <Target name="flexExtD3D12">
+
+ <Var name="ProjectRoot" value="../../.." />
+
+ <!-- Windows -->
+
+ <Config name="default" type="dll" platforms="Win32 Win64">
+
+ <OutDir platform="Win32">../../../bin/win32/</OutDir>
+ <OutDir platform="Win64">../../../bin/win64/</OutDir>
+
+ <Preprocessor type="define">
+ _CONSOLE
+ WIN32
+ </Preprocessor>
+
+ <WarningLevel>3</WarningLevel>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <CharacterSet>MultiByte</CharacterSet>
+
+ <SearchPaths type="header">
+ ..\..\..\..\..
+ </SearchPaths>
+
+ <Libraries>
+ kernel32.lib
+ user32.lib
+ gdi32.lib
+ winspool.lib
+ comdlg32.lib
+ advapi32.lib
+ shell32.lib
+ ole32.lib
+ oleaut32.lib
+ uuid.lib
+ odbc32.lib
+ odbccp32.lib
+ </Libraries>
+
+ </Config>
+
+ <Config name="debug" type="dll" platforms="Win32 Win64">
+
+ <OutFile platform="Win32">flexExt_d3d12_debug_x86.dll</OutFile>
+ <OutFile platform="Win64">flexExt_d3d12_debug_x64.dll</OutFile>
+
+ <IntDir>./build/${xpj:PLATFORM}/DX/debug/</IntDir>
+
+ <Preprocessor type="define">
+ _DEBUG
+ </Preprocessor>
+ <Preprocessor type="define">
+ _ITERATOR_DEBUG_LEVEL=0
+ </Preprocessor>
+ <RuntimeLibrary>MTd</RuntimeLibrary>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <FloatingPointModel>Precise</FloatingPointModel>
+ <ExportLibrary platform="Win32">..\..\..\lib\win32\flexExt_d3d12_debug_x86.lib</ExportLibrary>
+ <ExportLibrary platform="Win64">..\..\..\lib\win64\flexExt_d3d12_debug_x64.lib</ExportLibrary>
+
+ <Libraries platforms="Win32">
+ ${user:ProjectRoot}/lib/win32/flex_d3d12_debug_x86.lib
+ </Libraries>
+
+ <Libraries platforms="Win64">
+ ${user:ProjectRoot}/lib/win64/flex_d3d12_debug_x64.lib
+ </Libraries>
+
+ </Config>
+
+ <Config name="release" type="dll" platforms="Win32 Win64">
+
+ <OutFile platform="Win32">flexExt_d3d12_release_x86.dll</OutFile>
+ <OutFile platform="Win64">flexExt_d3d12_release_x64.dll</OutFile>
+
+ <IntDir>./build/${xpj:PLATFORM}/DX/release/</IntDir>
+
+ <Preprocessor type="define">
+ NDEBUG
+ </Preprocessor>
+ <RuntimeLibrary>MT</RuntimeLibrary>
+ <WholeProgramOptimization>1</WholeProgramOptimization>
+ <Optimization>3</Optimization>
+ <EnableIntrinsicFunctions>true</EnableIntrinsicFunctions>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <EnableFunctionLevelLinking>true</EnableFunctionLevelLinking>
+ <FloatingPointModel>Fast</FloatingPointModel>
+
+ <ExportLibrary platform="Win32">..\..\..\lib\win32\flexExt_d3d12_release_x86.lib</ExportLibrary>
+ <ExportLibrary platform="Win64">..\..\..\lib\win64\flexExt_d3d12_release_x64.lib</ExportLibrary>
+
+ <Libraries platforms="Win32">
+ ${user:ProjectRoot}/lib/win32/flex_d3d12_release_x86.lib
+ </Libraries>
+
+ <Libraries platforms="Win64">
+ ${user:ProjectRoot}/lib/win64/flex_d3d12_release_x64.lib
+ </Libraries>
+
+ </Config>
+
+
+ <SearchPaths type="header">
+ ..\..\..\
+ ..\..\..\external\D3D12\include
+ </SearchPaths>
+
+ <SearchPaths type="lib" platform="Win32">
+ ..\..\..\external\D3D12\libs\x86
+ ..\..\..\lib\x86
+ </SearchPaths>
+
+ <SearchPaths type="lib" platform="Win64">
+ ..\..\..\external\D3D12\libs\x64
+ ..\..\..\lib\win64
+ </SearchPaths>
+
+ <!-- Source -->
+
+ <Files name="Core" type="source" root="${user:ProjectRoot}/core">
+ sdf.cpp
+ voxelize.cpp
+ maths.cpp
+ aabbtree.cpp
+ </Files>
+
+ <Files name="src" type="source" root="${user:ProjectRoot}/extensions/dx">
+ flexExt.cpp
+ flexExt.hlsl
+ flexExt_dx_common.h
+ </Files>
+
+ <Files name="src" type="source" root="${user:ProjectRoot}/include">
+ flexExt.h
+ </Files>
+
+ <Files name="src" type="source" root="${user:ProjectRoot}/extensions">
+ flexExtCloth.cpp
+ flexExtRigid.cpp
+ flexExtSoft.cpp
+ flexExtMovingFrame.cpp
+ flexExtContainer.cpp
+ </Files>
+
+ <HLSL Configurations="release" DisableOptim="No" Debug="No" ShaderModel="5.0" Platforms="Win32 Win64" ObjectFileOutput=" " WarningAsErrors="false" OutputHeaderFileName="${user:ProjectRoot}/extensions/dx/shaders/%(Filename).h">
+ <File ShaderType="Compute" EntryPoint="UpdateForceFields::execute" OutputHeaderVarName="g_flexExt_UpdateForceFields"> "${user:ProjectRoot}/extensions/dx/shaders/flexExt.UpdateForceFields.hlsl" </File>
+ </HLSL>
+
+ <Conditional value="${config}" match="internal">
+ <Dependencies>
+ flexD3D12
+ </Dependencies>
+ </Conditional>
+
+ </Target>
+ </Project>
+</XPJ> \ No newline at end of file
diff --git a/extensions/dx/flexExt.cpp b/extensions/dx/flexExt.cpp
index 4dcc0e4..2b340cc 100644
--- a/extensions/dx/flexExt.cpp
+++ b/extensions/dx/flexExt.cpp
@@ -175,7 +175,7 @@ void NvFlexExtSetForceFields(NvFlexExtForceFieldCallback* c, const NvFlexExtForc
if (numForceFields > 0)
{
// update staging buffer
- void* dstPtr = c->mContext->mapUpload(c->mForceFieldsGpu);
+ void* dstPtr = c->mContext->map(c->mForceFieldsGpu, NvFlex::eMapWrite);
memcpy(dstPtr, forceFields, numForceFields*sizeof(NvFlexExtForceField));
c->mContext->unmap(c->mForceFieldsGpu);
diff --git a/extensions/flexExtContainer.cpp b/extensions/flexExtContainer.cpp
index 92cb958..60d0230 100644
--- a/extensions/flexExtContainer.cpp
+++ b/extensions/flexExtContainer.cpp
@@ -107,6 +107,8 @@ struct NvFlexExtContainer
NvFlexVector<int> mShapeOffsets;
NvFlexVector<int> mShapeIndices;
NvFlexVector<float> mShapeCoefficients;
+ NvFlexVector<float> mShapePlasticThresholds;
+ NvFlexVector<float> mShapePlasticCreeps;
NvFlexVector<Quat> mShapeRotations;
NvFlexVector<Vec3> mShapeTranslations;
NvFlexVector<Vec3> mShapeRestPositions;
@@ -139,7 +141,8 @@ struct NvFlexExtContainer
mMaxParticles(0), mSolver(NULL), mFlexLib(l),
mActiveList(l),mParticles(l),mParticlesRest(l),mVelocities(l),
mPhases(l),mNormals(l),mShapeOffsets(l),mShapeIndices(l),
- mShapeCoefficients(l),mShapeRotations(l),mShapeTranslations(l),
+ mShapeCoefficients(l),mShapePlasticThresholds(l),
+ mShapePlasticCreeps(l),mShapeRotations(l),mShapeTranslations(l),
mShapeRestPositions(l),mSpringIndices(l),mSpringLengths(l),
mSpringCoefficients(l),mTriangleIndices(l),mTriangleNormals(l),
mInflatableStarts(l),mInflatableCounts(l),mInflatableRestVolumes(l),
@@ -161,6 +164,8 @@ void CompactObjects(NvFlexExtContainer* c)
int totalNumShapes = 0;
int totalNumShapeIndices = 0;
+ bool plasticDeformation = false;
+
// pre-calculate array sizes
for (size_t i = 0; i < c->mInstances.size(); ++i)
{
@@ -176,6 +181,11 @@ void CompactObjects(NvFlexExtContainer* c)
totalNumShapeIndices += asset->numShapeIndices;
totalNumShapes += asset->numShapes;
+
+ if (asset->shapePlasticThresholds && asset->shapePlasticCreeps)
+ {
+ plasticDeformation = true;
+ }
}
//----------------------
@@ -203,6 +213,9 @@ void CompactObjects(NvFlexExtContainer* c)
c->mShapeOffsets.map();
c->mShapeCoefficients.map();
+ c->mShapePlasticThresholds.map();
+ c->mShapePlasticCreeps.map();
+
c->mShapeTranslations.map();
c->mShapeRotations.map();
@@ -231,6 +244,17 @@ void CompactObjects(NvFlexExtContainer* c)
c->mShapeOffsets.resize(1 + totalNumShapes);
c->mShapeCoefficients.resize(totalNumShapes);
+ if (plasticDeformation)
+ {
+ c->mShapePlasticThresholds.resize(totalNumShapes);
+ c->mShapePlasticCreeps.resize(totalNumShapes);
+ }
+ else
+ {
+ c->mShapePlasticThresholds.resize(0);
+ c->mShapePlasticCreeps.resize(0);
+ }
+
c->mShapeTranslations.resize(totalNumShapes);
c->mShapeRotations.resize(totalNumShapes);
@@ -244,6 +268,13 @@ void CompactObjects(NvFlexExtContainer* c)
Vec3* __restrict dstShapeRestPositions = (totalNumShapeIndices) ? &c->mShapeRestPositions[0] : NULL;
int* __restrict dstShapeOffsets = (totalNumShapes) ? &c->mShapeOffsets[0] : NULL;
float* __restrict dstShapeCoefficients = (totalNumShapes) ? &c->mShapeCoefficients[0] : NULL;
+ float* __restrict dstShapePlasticThresholds = NULL;
+ float* __restrict dstShapePlasticCreeps = NULL;
+ if (plasticDeformation)
+ {
+ dstShapePlasticThresholds = (totalNumShapes) ? &c->mShapePlasticThresholds[0] : NULL;
+ dstShapePlasticCreeps = (totalNumShapes) ? &c->mShapePlasticCreeps[0] : NULL;
+ }
Vec3* __restrict dstShapeTranslations = (totalNumShapes) ? &c->mShapeTranslations[0] : NULL;
Quat* __restrict dstShapeRotations = (totalNumShapes) ? &c->mShapeRotations[0] : NULL;
@@ -300,6 +331,18 @@ void CompactObjects(NvFlexExtContainer* c)
{
dstShapeOffsets[shapeIndex] = asset->shapeOffsets[s] + indexOffset;
dstShapeCoefficients[shapeIndex] = asset->shapeCoefficients[s];
+ if (plasticDeformation)
+ {
+ if (asset->shapePlasticThresholds)
+ dstShapePlasticThresholds[shapeIndex] = asset->shapePlasticThresholds[s];
+ else
+ dstShapePlasticThresholds[shapeIndex] = 0.0f;
+
+ if (asset->shapePlasticCreeps)
+ dstShapePlasticCreeps[shapeIndex] = asset->shapePlasticCreeps[s];
+ else
+ dstShapePlasticCreeps[shapeIndex] = 0.0f;
+ }
dstShapeTranslations[shapeIndex] = Vec3(&inst->shapeTranslations[s*3]);
dstShapeRotations[shapeIndex] = Quat(&inst->shapeRotations[s*4]);
@@ -309,15 +352,10 @@ void CompactObjects(NvFlexExtContainer* c)
for (int i=shapeStart; i < shapeEnd; ++i)
{
- const int firstParticle = asset->shapeIndices[0];
const int currentParticle = asset->shapeIndices[i];
// remap indices and create local space positions for each shape
- // To make this calculation more robust, subtract the position of the first particle from both, the positions of the current
- // particle and the shapeCenter. Without this one would subtract two very similar floating point values, which can lead to ghost forces.
- dstShapeRestPositions[shapeIndexOffset] = (Vec3(&asset->particles[currentParticle*4]) - Vec3(&asset->particles[firstParticle]))
- - (Vec3(&asset->shapeCenters[s*3]) - Vec3(&asset->particles[firstParticle]));
-
+ dstShapeRestPositions[shapeIndexOffset] = Vec3(&asset->particles[currentParticle*4]) - Vec3(&asset->shapeCenters[s*3]);
dstShapeIndices[shapeIndexOffset] = remap[asset->shapeIndices[i]];
++shapeIndexOffset;
@@ -378,6 +416,9 @@ void CompactObjects(NvFlexExtContainer* c)
c->mShapeOffsets.unmap();
c->mShapeCoefficients.unmap();
+ c->mShapePlasticThresholds.unmap();
+ c->mShapePlasticCreeps.unmap();
+
c->mShapeTranslations.unmap();
c->mShapeRotations.unmap();
@@ -393,14 +434,14 @@ void CompactObjects(NvFlexExtContainer* c)
// shapes
if (c->mShapeCoefficients.size())
{
- NvFlexSetRigids(c->mSolver, c->mShapeOffsets.buffer, c->mShapeIndices.buffer, c->mShapeRestPositions.buffer, NULL, c->mShapeCoefficients.buffer, c->mShapeRotations.buffer, c->mShapeTranslations.buffer, int(c->mShapeCoefficients.size()), c->mShapeIndices.size());
+ NvFlexSetRigids(c->mSolver, c->mShapeOffsets.buffer, c->mShapeIndices.buffer, c->mShapeRestPositions.buffer, NULL, c->mShapeCoefficients.buffer, c->mShapePlasticThresholds.buffer, c->mShapePlasticCreeps.buffer, c->mShapeRotations.buffer, c->mShapeTranslations.buffer, int(c->mShapeCoefficients.size()), c->mShapeIndices.size());
}
else
{
c->mShapeRotations.resize(0);
c->mShapeTranslations.resize(0);
- NvFlexSetRigids(c->mSolver, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0);
+ NvFlexSetRigids(c->mSolver, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0);
}
// triangles
@@ -729,18 +770,19 @@ void NvFlexExtPushToDevice(NvFlexExtContainer* c)
int n = NvFlexExtGetActiveList(c, &c->mActiveList[0]);
c->mActiveList.unmap();
- NvFlexSetActive(c->mSolver, c->mActiveList.buffer, n);
+ NvFlexSetActive(c->mSolver, c->mActiveList.buffer, NULL);
+ NvFlexSetActiveCount(c->mSolver, n);
c->mNeedsActiveListRebuild = false;
}
// push any changes to solver
- NvFlexSetParticles(c->mSolver, c->mParticles.buffer, int(c->mParticles.size()));
- NvFlexSetRestParticles(c->mSolver, c->mParticlesRest.buffer, int(c->mParticlesRest.size()));
+ NvFlexSetParticles(c->mSolver, c->mParticles.buffer, NULL);
+ NvFlexSetRestParticles(c->mSolver, c->mParticlesRest.buffer, NULL);
- NvFlexSetVelocities(c->mSolver, c->mVelocities.buffer, int(c->mVelocities.size()));
- NvFlexSetPhases(c->mSolver, c->mPhases.buffer, int(c->mPhases.size()));
- NvFlexSetNormals(c->mSolver, c->mNormals.buffer, int(c->mNormals.size()));
+ NvFlexSetVelocities(c->mSolver, c->mVelocities.buffer, NULL);
+ NvFlexSetPhases(c->mSolver, c->mPhases.buffer, NULL);
+ NvFlexSetNormals(c->mSolver, c->mNormals.buffer, NULL);
if (c->mNeedsCompact)
CompactObjects(c);
@@ -748,18 +790,16 @@ void NvFlexExtPushToDevice(NvFlexExtContainer* c)
void NvFlexExtPullFromDevice(NvFlexExtContainer* c)
{
-
// read back particle data
- NvFlexGetParticles(c->mSolver, c->mParticles.buffer, int(c->mParticles.size()));
- NvFlexGetVelocities(c->mSolver, c->mVelocities.buffer, int(c->mVelocities.size()));
- NvFlexGetPhases(c->mSolver, c->mPhases.buffer, int(c->mPhases.size()));
- NvFlexGetNormals(c->mSolver, c->mNormals.buffer, int(c->mNormals.size()));
+ NvFlexGetParticles(c->mSolver, c->mParticles.buffer, NULL);
+ NvFlexGetVelocities(c->mSolver, c->mVelocities.buffer, NULL);
+ NvFlexGetPhases(c->mSolver, c->mPhases.buffer, NULL);
+ NvFlexGetNormals(c->mSolver, c->mNormals.buffer, NULL);
NvFlexGetBounds(c->mSolver, c->mBoundsLower.buffer, c->mBoundsUpper.buffer);
// read back shape transforms
if (c->mShapeCoefficients.size())
- NvFlexGetRigidTransforms(c->mSolver, c->mShapeRotations.buffer, c->mShapeTranslations.buffer);
-
+ NvFlexGetRigids(c->mSolver, NULL, NULL, NULL, NULL, NULL, NULL, NULL, c->mShapeRotations.buffer, c->mShapeTranslations.buffer);
}
void NvFlexExtUpdateInstances(NvFlexExtContainer* c)
@@ -800,6 +840,8 @@ void NvFlexExtDestroyAsset(NvFlexExtAsset* asset)
delete[] asset->shapeOffsets;
delete[] asset->shapeCenters;
delete[] asset->shapeCoefficients;
+ delete[] asset->shapePlasticThresholds;
+ delete[] asset->shapePlasticCreeps;
delete asset;
}
diff --git a/extensions/flexExtRigid.cpp b/extensions/flexExtRigid.cpp
index 9c37c28..897d009 100644
--- a/extensions/flexExtRigid.cpp
+++ b/extensions/flexExtRigid.cpp
@@ -68,11 +68,26 @@ Vec3 SampleSDFGrad(const float* sdf, int dim, int x, int y, int z)
NvFlexExtAsset* NvFlexExtCreateRigidFromMesh(const float* vertices, int numVertices, const int* indices, int numTriangleIndices, float spacing, float expand)
{
+ // Switch to relative coordinates by computing the mean position of the vertices and subtracting the result from every vertex position
+ // The increased precision will prevent ghost forces caused by inaccurate center of mass computations
+ Vec3 meshOffset(0.0f);
+ for (int i = 0; i < numVertices; i++)
+ {
+ meshOffset += ((Vec3*)vertices)[i];
+ }
+ meshOffset /= float(numVertices);
+
+ Vec3* relativeVertices = new Vec3[numVertices];
+ for (int i = 0; i < numVertices; i++)
+ {
+ relativeVertices[i] += ((Vec3*)vertices)[i] - meshOffset;
+ }
+
std::vector<Vec4> particles;
std::vector<Vec4> normals;
std::vector<int> phases;
- const Vec3* positions = (Vec3*)vertices;
+ const Vec3* positions = relativeVertices;
Vec3 meshLower(FLT_MAX), meshUpper(-FLT_MAX);
for (int i=0; i < numVertices; ++i)
@@ -105,11 +120,11 @@ NvFlexExtAsset* NvFlexExtCreateRigidFromMesh(const float* vertices, int numVerti
// lie symmetrically to the center of the object. this reduces the
// chance of missing features, and also better aligns the particles
// with the mesh
- Vec3 meshOffset;
- meshOffset.x = 0.5f * (spacing - (edges.x - (dx-1)*spacing));
- meshOffset.y = 0.5f * (spacing - (edges.y - (dy-1)*spacing));
- meshOffset.z = 0.5f * (spacing - (edges.z - (dz-1)*spacing));
- meshLower -= meshOffset;
+ Vec3 meshShift;
+ meshShift.x = 0.5f * (spacing - (edges.x - (dx-1)*spacing));
+ meshShift.y = 0.5f * (spacing - (edges.y - (dy-1)*spacing));
+ meshShift.z = 0.5f * (spacing - (edges.z - (dz-1)*spacing));
+ meshLower -= meshShift;
// don't allow samplings with > 64 per-side
if (maxDim > 64)
@@ -117,7 +132,9 @@ NvFlexExtAsset* NvFlexExtCreateRigidFromMesh(const float* vertices, int numVerti
std::vector<uint32_t> voxels(maxDim*maxDim*maxDim);
- Voxelize(vertices, numVertices, indices, numTriangleIndices, maxDim, maxDim, maxDim, &voxels[0], meshLower, meshLower + Vec3(maxDim*spacing));
+ Voxelize(relativeVertices, numVertices, indices, numTriangleIndices, maxDim, maxDim, maxDim, &voxels[0], meshLower, meshLower + Vec3(maxDim*spacing));
+
+ delete[] relativeVertices;
std::vector<float> sdf(maxDim*maxDim*maxDim);
MakeSDF(&voxels[0], maxDim, maxDim, maxDim, &sdf[0]);
@@ -153,23 +170,27 @@ NvFlexExtAsset* NvFlexExtCreateRigidFromMesh(const float* vertices, int numVerti
}
}
}
+ const int numParticles = int(particles.size());
+
+ // Switch back to absolute coordinates by adding meshOffset to the center of mass and to each particle positions
+ center /= float(numParticles);
+ center += meshOffset;
+
+ for (int i = 0; i < numParticles; i++) {
+ particles[i] += Vec4(meshOffset, 0.0f);
+ }
NvFlexExtAsset* asset = new NvFlexExtAsset();
memset(asset, 0, sizeof(*asset));
- if (particles.size())
+ if (numParticles)
{
- const int numParticles = int(particles.size());
-
asset->numParticles = numParticles;
asset->maxParticles = numParticles;
asset->particles = new float[numParticles*4];
memcpy(asset->particles, &particles[0], sizeof(Vec4)*numParticles);
- // store center of mass
- center /= float(numParticles);
-
asset->numShapes = 1;
asset->numShapeIndices = numParticles;
@@ -179,11 +200,15 @@ NvFlexExtAsset* NvFlexExtCreateRigidFromMesh(const float* vertices, int numVerti
for (int i = 0; i < numParticles; ++i)
asset->shapeIndices[i] = i;
+ // store center of mass
asset->shapeCenters = new float[4];
asset->shapeCenters[0] = center.x;
asset->shapeCenters[1] = center.y;
asset->shapeCenters[2] = center.z;
+ asset->shapePlasticThresholds = NULL;
+ asset->shapePlasticCreeps = NULL;
+
asset->shapeCoefficients = new float[1];
asset->shapeCoefficients[0] = 1.0f;
diff --git a/extensions/flexExtSoft.cpp b/extensions/flexExtSoft.cpp
index 53537c4..aafdc56 100644
--- a/extensions/flexExtSoft.cpp
+++ b/extensions/flexExtSoft.cpp
@@ -441,7 +441,7 @@ void SampleMesh(const Vec3* vertices, int numVertices, const int* indices, int n
meshOffset.z = 0.5f * (spacing - (edges.z - (dz - 1)*spacing));
meshLower -= meshOffset;
- Voxelize((const float*)vertices, numVertices, indices, numIndices, maxDim, maxDim, maxDim, &voxels[0], meshLower, meshLower + Vec3(maxDim*spacing));
+ Voxelize(vertices, numVertices, indices, numIndices, maxDim, maxDim, maxDim, &voxels[0], meshLower, meshLower + Vec3(maxDim*spacing));
// sample interior
for (int x = 0; x < maxDim; ++x)
@@ -507,14 +507,31 @@ void SampleMesh(const Vec3* vertices, int numVertices, const int* indices, int n
// API methods
-NvFlexExtAsset* NvFlexExtCreateSoftFromMesh(const float* vertices, int numVertices, const int* indices, int numIndices, float particleSpacing, float volumeSampling, float surfaceSampling, float clusterSpacing, float clusterRadius, float clusterStiffness, float linkRadius, float linkStiffness, float globalStiffness)
+NvFlexExtAsset* NvFlexExtCreateSoftFromMesh(const float* vertices, int numVertices, const int* indices, int numIndices, float particleSpacing, float volumeSampling, float surfaceSampling, float clusterSpacing, float clusterRadius, float clusterStiffness, float linkRadius, float linkStiffness, float globalStiffness, float clusterPlasticThreshold, float clusterPlasticCreep)
{
+ // Switch to relative coordinates by computing the mean position of the vertices and subtracting the result from every vertex position
+ // The increased precision will prevent ghost forces caused by inaccurate center of mass computations
+ Vec3 meshOffset(0.0f);
+ for (int i = 0; i < numVertices; i++)
+ {
+ meshOffset += ((Vec3*)vertices)[i];
+ }
+ meshOffset /= float(numVertices);
+
+ Vec3* relativeVertices = new Vec3[numVertices];
+ for (int i = 0; i < numVertices; i++)
+ {
+ relativeVertices[i] += ((Vec3*)vertices)[i] - meshOffset;
+ }
+
// construct asset definition
NvFlexExtAsset* asset = new NvFlexExtAsset();
// create particle sampling
std::vector<Vec3> samples;
- SampleMesh((Vec3*)vertices, numVertices, indices, numIndices, particleSpacing, volumeSampling, surfaceSampling, samples);
+ SampleMesh(relativeVertices, numVertices, indices, numIndices, particleSpacing, volumeSampling, surfaceSampling, samples);
+
+ delete[] relativeVertices;
const int numParticles = int(samples.size());
@@ -522,6 +539,8 @@ NvFlexExtAsset* NvFlexExtCreateSoftFromMesh(const float* vertices, int numVertic
std::vector<int> clusterOffsets;
std::vector<Vec3> clusterPositions;
std::vector<float> clusterCoefficients;
+ std::vector<float> clusterPlasticThresholds;
+ std::vector<float> clusterPlasticCreeps;
// priority (not currently used)
std::vector<float> priority(numParticles);
@@ -534,6 +553,15 @@ NvFlexExtAsset* NvFlexExtCreateSoftFromMesh(const float* vertices, int numVertic
// assign all clusters the same stiffness
clusterCoefficients.resize(numClusters, clusterStiffness);
+ if (clusterPlasticCreep)
+ {
+ // assign all clusters the same plastic threshold
+ clusterPlasticThresholds.resize(numClusters, clusterPlasticThreshold);
+
+ // assign all clusters the same plastic creep
+ clusterPlasticCreeps.resize(numClusters, clusterPlasticCreep);
+ }
+
// create links between clusters
if (linkRadius > 0.0f)
{
@@ -565,26 +593,38 @@ NvFlexExtAsset* NvFlexExtCreateSoftFromMesh(const float* vertices, int numVertic
{
numClusters += 1;
clusterCoefficients.push_back(globalStiffness);
+ if (clusterPlasticCreep)
+ {
+ clusterPlasticThresholds.push_back(clusterPlasticThreshold);
+ clusterPlasticCreeps.push_back(clusterPlasticCreep);
+ }
for (int i = 0; i < numParticles; ++i)
{
clusterIndices.push_back(i);
}
-
clusterOffsets.push_back((int)clusterIndices.size());
// the mean of the global cluster is the mean of all particles
Vec3 globalMeanPosition(0.0f);
-
for (int i = 0; i < numParticles; ++i)
{
globalMeanPosition += samples[i];
}
globalMeanPosition /= float(numParticles);
-
clusterPositions.push_back(globalMeanPosition);
}
+ // Switch back to absolute coordinates by adding meshOffset to the centers of mass and to each particle positions
+ for (int i = 0; i < numParticles; ++i)
+ {
+ samples[i] += meshOffset;
+ }
+ for (int i = 0; i < numClusters; ++i)
+ {
+ clusterPositions[i] += meshOffset;
+ }
+
// assign particles
asset->particles = new float[numParticles * 4];
asset->numParticles = numParticles;
@@ -611,6 +651,20 @@ NvFlexExtAsset* NvFlexExtCreateSoftFromMesh(const float* vertices, int numVertic
asset->shapeCoefficients = new float[numClusters];
memcpy(asset->shapeCoefficients, &clusterCoefficients[0], sizeof(float)*numClusters);
+ if (clusterPlasticCreep)
+ {
+ asset->shapePlasticThresholds = new float[numClusters];
+ memcpy(asset->shapePlasticThresholds, &clusterPlasticThresholds[0], sizeof(float)*numClusters);
+
+ asset->shapePlasticCreeps = new float[numClusters];
+ memcpy(asset->shapePlasticCreeps, &clusterPlasticCreeps[0], sizeof(float)*numClusters);
+ }
+ else
+ {
+ asset->shapePlasticThresholds = NULL;
+ asset->shapePlasticCreeps = NULL;
+ }
+
asset->numShapeIndices = int(clusterIndices.size());
asset->numShapes = numClusters;
diff --git a/external/D3D12/include/PIXEventsCommon.h b/external/D3D12/include/PIXEventsCommon.h
new file mode 100644
index 0000000..3021db2
--- /dev/null
+++ b/external/D3D12/include/PIXEventsCommon.h
@@ -0,0 +1,491 @@
+//
+// This file was copied from //depot/rs_xbox_dev_flight/xbox/drivers/Graphics/Pix3/PixEvt/inc/PIXEventsCommon.h#6
+//
+// To refresh: run 'UpdateFromXbox -latest'
+//
+
+/*==========================================================================;
+*
+* Copyright (C) Microsoft Corporation. All Rights Reserved.
+*
+* File: PIXEventsCommon.h
+* Content: PIX include file
+* Don't include this file directly - use pix3.h
+*
+****************************************************************************/
+#pragma once
+
+#ifndef _PIXEventsCommon_H_
+#define _PIXEventsCommon_H_
+
+#if defined(_AMD64_) || defined(_X86_)
+#include <emmintrin.h>
+#endif // _AMD64_ || _X86_
+
+extern "C" UINT64 WINAPI PIXEventsReplaceBlock(bool getEarliestTime);
+
+enum PIXEventType
+{
+ PIXEvent_EndEvent = 0x000,
+ PIXEvent_BeginEvent_VarArgs = 0x001,
+ PIXEvent_BeginEvent_NoArgs = 0x002,
+ PIXEvent_SetMarker_VarArgs = 0x007,
+ PIXEvent_SetMarker_NoArgs = 0x008,
+
+ PIXEvent_EndEvent_OnContext = 0x010,
+ PIXEvent_BeginEvent_OnContext_VarArgs = 0x011,
+ PIXEvent_BeginEvent_OnContext_NoArgs = 0x012,
+ PIXEvent_SetMarker_OnContext_VarArgs = 0x017,
+ PIXEvent_SetMarker_OnContext_NoArgs = 0x018,
+};
+
+static const UINT64 PIXEventsReservedRecordSpaceQwords = 64;
+//this is used to make sure SSE string copy always will end 16-byte write in the current block
+//this way only a check if destination < limit can be performed, instead of destination < limit - 1
+//since both these are UINT64* and SSE writes in 16 byte chunks, 8 bytes are kept in reserve
+//so even if SSE overwrites 8 extra bytes, those will still belong to the correct block
+//on next iteration check destination will be greater than limit
+//this is used as well for fixed size UMD events and PIXEndEvent since these require less space
+//than other variable length user events and do not need big reserved space
+static const UINT64 PIXEventsReservedTailSpaceQwords = 2;
+static const UINT64 PIXEventsSafeFastCopySpaceQwords = PIXEventsReservedRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+static const UINT64 PIXEventsGraphicsRecordSpaceQwords = 64;
+
+//Bits 7-19 (13 bits)
+static const UINT64 PIXEventsBlockEndMarker = 0x00000000000FFF80;
+
+//Bits 10-19 (10 bits)
+static const UINT64 PIXEventsTypeReadMask = 0x00000000000FFC00;
+static const UINT64 PIXEventsTypeWriteMask = 0x00000000000003FF;
+static const UINT64 PIXEventsTypeBitShift = 10;
+
+//Bits 20-63 (44 bits)
+static const UINT64 PIXEventsTimestampReadMask = 0xFFFFFFFFFFF00000;
+static const UINT64 PIXEventsTimestampWriteMask = 0x00000FFFFFFFFFFF;
+static const UINT64 PIXEventsTimestampBitShift = 20;
+
+inline UINT64 PIXEncodeEventInfo(UINT64 timestamp, PIXEventType eventType)
+{
+ return ((timestamp & PIXEventsTimestampWriteMask) << PIXEventsTimestampBitShift) |
+ (((UINT64)eventType & PIXEventsTypeWriteMask) << PIXEventsTypeBitShift);
+}
+
+//Bits 60-63 (4)
+static const UINT64 PIXEventsStringAlignmentWriteMask = 0x000000000000000F;
+static const UINT64 PIXEventsStringAlignmentReadMask = 0xF000000000000000;
+static const UINT64 PIXEventsStringAlignmentBitShift = 60;
+
+//Bits 55-59 (5)
+static const UINT64 PIXEventsStringCopyChunkSizeWriteMask = 0x000000000000001F;
+static const UINT64 PIXEventsStringCopyChunkSizeReadMask = 0x0F80000000000000;
+static const UINT64 PIXEventsStringCopyChunkSizeBitShift = 55;
+
+//Bit 54
+static const UINT64 PIXEventsStringIsANSIWriteMask = 0x0000000000000001;
+static const UINT64 PIXEventsStringIsANSIReadMask = 0x0040000000000000;
+static const UINT64 PIXEventsStringIsANSIBitShift = 54;
+
+//Bit 53
+static const UINT64 PIXEventsStringIsShortcutWriteMask = 0x0000000000000001;
+static const UINT64 PIXEventsStringIsShortcutReadMask = 0x0020000000000000;
+static const UINT64 PIXEventsStringIsShortcutBitShift = 53;
+
+inline UINT64 PIXEncodeStringInfo(UINT64 alignment, UINT64 copyChunkSize, BOOL isANSI, BOOL isShortcut)
+{
+ return ((alignment & PIXEventsStringAlignmentWriteMask) << PIXEventsStringAlignmentBitShift) |
+ ((copyChunkSize & PIXEventsStringCopyChunkSizeWriteMask) << PIXEventsStringCopyChunkSizeBitShift) |
+ (((UINT64)isANSI & PIXEventsStringIsANSIWriteMask) << PIXEventsStringIsANSIBitShift) |
+ (((UINT64)isShortcut & PIXEventsStringIsShortcutWriteMask) << PIXEventsStringIsShortcutBitShift);
+}
+
+template<UINT alignment, class T>
+inline bool PIXIsPointerAligned(T* pointer)
+{
+ return !(((UINT64)pointer) & (alignment - 1));
+}
+
+template<class T>
+inline void PIXCopyEventArgument(_Out_writes_to_ptr_(limit) UINT64*& destination, _In_ const UINT64* limit, T argument)
+{
+ if (destination < limit)
+ {
+ *((T*)destination) = argument;
+ ++destination;
+ }
+}
+
+//floats must be cast to double during writing the data to be properly printed later when reading the data
+//this is needed because when float is passed to varargs function it's cast to double
+template<>
+inline void PIXCopyEventArgument<float>(_Out_writes_to_ptr_(limit) UINT64*& destination, _In_ const UINT64* limit, float argument)
+{
+ if (destination < limit)
+ {
+ *((double*)destination) = (double)(argument);
+ ++destination;
+ }
+}
+
+//char has to be cast to a longer signed integer type
+//this is due to printf not ignoring correctly the upper bits of unsigned long long for a char format specifier
+template<>
+inline void PIXCopyEventArgument<char>(_Out_writes_to_ptr_(limit) UINT64*& destination, _In_ const UINT64* limit, char argument)
+{
+ if (destination < limit)
+ {
+ *((INT64*)destination) = (INT64)(argument);
+ ++destination;
+ }
+}
+
+//unsigned char has to be cast to a longer unsigned integer type
+//this is due to printf not ignoring correctly the upper bits of unsigned long long for a char format specifier
+template<>
+inline void PIXCopyEventArgument<unsigned char>(_Out_writes_to_ptr_(limit) UINT64*& destination, _In_ const UINT64* limit, unsigned char argument)
+{
+ if (destination < limit)
+ {
+ *destination = (UINT64)(argument);
+ ++destination;
+ }
+}
+
+//bool has to be cast to an integer since it's not explicitly supported by string format routines
+//there's no format specifier for bool type, but it should work with integer format specifiers
+template<>
+inline void PIXCopyEventArgument<bool>(_Out_writes_to_ptr_(limit) UINT64*& destination, _In_ const UINT64* limit, bool argument)
+{
+ if (destination < limit)
+ {
+ *destination = (UINT64)(argument);
+ ++destination;
+ }
+}
+
+inline void PIXCopyEventArgumentSlowest(_Out_writes_to_ptr_(limit) UINT64*& destination, _In_ const UINT64* limit, _In_ PCSTR argument)
+{
+ *destination++ = PIXEncodeStringInfo(0, 8, TRUE, FALSE);
+ while (destination < limit)
+ {
+ UINT64 c = argument[0];
+ if (!c)
+ {
+ *destination++ = 0;
+ return;
+ }
+ UINT64 x = c;
+ c = argument[1];
+ if (!c)
+ {
+ *destination++ = x;
+ return;
+ }
+ x |= c << 8;
+ c = argument[2];
+ if (!c)
+ {
+ *destination++ = x;
+ return;
+ }
+ x |= c << 16;
+ c = argument[3];
+ if (!c)
+ {
+ *destination++ = x;
+ return;
+ }
+ x |= c << 24;
+ c = argument[4];
+ if (!c)
+ {
+ *destination++ = x;
+ return;
+ }
+ x |= c << 32;
+ c = argument[5];
+ if (!c)
+ {
+ *destination++ = x;
+ return;
+ }
+ x |= c << 40;
+ c = argument[6];
+ if (!c)
+ {
+ *destination++ = x;
+ return;
+ }
+ x |= c << 48;
+ c = argument[7];
+ if (!c)
+ {
+ *destination++ = x;
+ return;
+ }
+ x |= c << 56;
+ *destination++ = x;
+ argument += 8;
+ }
+}
+
+inline void PIXCopyEventArgumentSlow(_Out_writes_to_ptr_(limit) UINT64*& destination, _In_ const UINT64* limit, _In_ PCSTR argument)
+{
+ if (PIXIsPointerAligned<8>(argument))
+ {
+ *destination++ = PIXEncodeStringInfo(0, 8, TRUE, FALSE);
+ UINT64* source = (UINT64*)argument;
+ while (destination < limit)
+ {
+ UINT64 qword = *source++;
+ *destination++ = qword;
+ //check if any of the characters is a terminating zero
+ if (!((qword & 0xFF00000000000000) &&
+ (qword & 0xFF000000000000) &&
+ (qword & 0xFF0000000000) &&
+ (qword & 0xFF00000000) &&
+ (qword & 0xFF000000) &&
+ (qword & 0xFF0000) &&
+ (qword & 0xFF00) &&
+ (qword & 0xFF)))
+ {
+ break;
+ }
+ }
+ }
+ else
+ {
+ PIXCopyEventArgumentSlowest(destination, limit, argument);
+ }
+}
+
+template<>
+inline void PIXCopyEventArgument<PCSTR>(_Out_writes_to_ptr_(limit) UINT64*& destination, _In_ const UINT64* limit, _In_ PCSTR argument)
+{
+ if (destination < limit)
+ {
+ if (argument != nullptr)
+ {
+#if defined(_AMD64_) || defined(_X86_)
+ if (PIXIsPointerAligned<16>(argument))
+ {
+ *destination++ = PIXEncodeStringInfo(0, 16, TRUE, FALSE);
+ __m128i zero = _mm_setzero_si128();
+ if (PIXIsPointerAligned<16>(destination))
+ {
+ while (destination < limit)
+ {
+ __m128i mem = _mm_load_si128((__m128i*)argument);
+ _mm_store_si128((__m128i*)destination, mem);
+ //check if any of the characters is a terminating zero
+ __m128i res = _mm_cmpeq_epi8(mem, zero);
+ destination += 2;
+ if (_mm_movemask_epi8(res))
+ break;
+ argument += 16;
+ }
+ }
+ else
+ {
+ while (destination < limit)
+ {
+ __m128i mem = _mm_load_si128((__m128i*)argument);
+ _mm_storeu_si128((__m128i*)destination, mem);
+ //check if any of the characters is a terminating zero
+ __m128i res = _mm_cmpeq_epi8(mem, zero);
+ destination += 2;
+ if (_mm_movemask_epi8(res))
+ break;
+ argument += 16;
+ }
+ }
+ }
+ else
+#endif // _AMD64_ || _X86_
+ {
+ PIXCopyEventArgumentSlow(destination, limit, argument);
+ }
+ }
+ else
+ {
+ *destination++ = 0ull;
+ }
+ }
+}
+
+template<>
+inline void PIXCopyEventArgument<PSTR>(_Out_writes_to_ptr_(limit) UINT64*& destination, _In_ const UINT64* limit, _In_ PSTR argument)
+{
+ PIXCopyEventArgument(destination, limit, (PCSTR)argument);
+}
+
+inline void PIXCopyEventArgumentSlowest(_Out_writes_to_ptr_(limit) UINT64*& destination, _In_ const UINT64* limit, _In_ PCWSTR argument)
+{
+ *destination++ = PIXEncodeStringInfo(0, 8, FALSE, FALSE);
+ while (destination < limit)
+ {
+ UINT64 c = argument[0];
+ if (!c)
+ {
+ *destination++ = 0;
+ return;
+ }
+ UINT64 x = c;
+ c = argument[1];
+ if (!c)
+ {
+ *destination++ = x;
+ return;
+ }
+ x |= c << 16;
+ c = argument[2];
+ if (!c)
+ {
+ *destination++ = x;
+ return;
+ }
+ x |= c << 32;
+ c = argument[3];
+ if (!c)
+ {
+ *destination++ = x;
+ return;
+ }
+ x |= c << 48;
+ *destination++ = x;
+ argument += 4;
+ }
+}
+
+inline void PIXCopyEventArgumentSlow(_Out_writes_to_ptr_(limit) UINT64*& destination, _In_ const UINT64* limit, _In_ PCWSTR argument)
+{
+ if (PIXIsPointerAligned<8>(argument))
+ {
+ *destination++ = PIXEncodeStringInfo(0, 8, FALSE, FALSE);
+ UINT64* source = (UINT64*)argument;
+ while (destination < limit)
+ {
+ UINT64 qword = *source++;
+ *destination++ = qword;
+ //check if any of the characters is a terminating zero
+ //TODO: check if reversed condition is faster
+ if (!((qword & 0xFFFF000000000000) &&
+ (qword & 0xFFFF00000000) &&
+ (qword & 0xFFFF0000) &&
+ (qword & 0xFFFF)))
+ {
+ break;
+ }
+ }
+ }
+ else
+ {
+ PIXCopyEventArgumentSlowest(destination, limit, argument);
+ }
+}
+
+template<>
+inline void PIXCopyEventArgument<PCWSTR>(_Out_writes_to_ptr_(limit) UINT64*& destination, _In_ const UINT64* limit, _In_ PCWSTR argument)
+{
+ if (destination < limit)
+ {
+ if (argument != nullptr)
+ {
+#if defined(_AMD64_) || defined(_X86_)
+ if (PIXIsPointerAligned<16>(argument))
+ {
+ *destination++ = PIXEncodeStringInfo(0, 16, FALSE, FALSE);
+ __m128i zero = _mm_setzero_si128();
+ if (PIXIsPointerAligned<16>(destination))
+ {
+ while (destination < limit)
+ {
+ __m128i mem = _mm_load_si128((__m128i*)argument);
+ _mm_store_si128((__m128i*)destination, mem);
+ //check if any of the characters is a terminating zero
+ __m128i res = _mm_cmpeq_epi16(mem, zero);
+ destination += 2;
+ if (_mm_movemask_epi8(res))
+ break;
+ argument += 8;
+ }
+ }
+ else
+ {
+ while (destination < limit)
+ {
+ __m128i mem = _mm_load_si128((__m128i*)argument);
+ _mm_storeu_si128((__m128i*)destination, mem);
+ //check if any of the characters is a terminating zero
+ __m128i res = _mm_cmpeq_epi16(mem, zero);
+ destination += 2;
+ if (_mm_movemask_epi8(res))
+ break;
+ argument += 8;
+ }
+ }
+ }
+ else
+#endif // _AMD64_ || _X86_
+ {
+ PIXCopyEventArgumentSlow(destination, limit, argument);
+ }
+ }
+ else
+ {
+ *destination++ = 0ull;
+ }
+ }
+}
+
+template<>
+inline void PIXCopyEventArgument<PWSTR>(_Out_writes_to_ptr_(limit) UINT64*& destination, _In_ const UINT64* limit, _In_ PWSTR argument)
+{
+ PIXCopyEventArgument(destination, limit, (PCWSTR)argument);
+};
+
+#if defined(__d3d12_x_h__) || defined(__d3d12_h__)
+
+inline void PIXSetMarkerOnContext(_In_ ID3D12GraphicsCommandList* commandList, _In_reads_bytes_(size) void* data, UINT size)
+{
+ commandList->SetMarker(D3D12_EVENT_METADATA, data, size);
+}
+
+inline void PIXSetMarkerOnContext(_In_ ID3D12CommandQueue* commandQueue, _In_reads_bytes_(size) void* data, UINT size)
+{
+ commandQueue->SetMarker(D3D12_EVENT_METADATA, data, size);
+}
+
+inline void PIXBeginEventOnContext(_In_ ID3D12GraphicsCommandList* commandList, _In_reads_bytes_(size) void* data, UINT size)
+{
+ commandList->BeginEvent(D3D12_EVENT_METADATA, data, size);
+}
+
+inline void PIXBeginEventOnContext(_In_ ID3D12CommandQueue* commandQueue, _In_reads_bytes_(size) void* data, UINT size)
+{
+ commandQueue->BeginEvent(D3D12_EVENT_METADATA, data, size);
+}
+inline void PIXEndEventOnContext(_In_ ID3D12GraphicsCommandList* commandList)
+{
+ commandList->EndEvent();
+}
+
+inline void PIXEndEventOnContext(_In_ ID3D12CommandQueue* commandQueue)
+{
+ commandQueue->EndEvent();
+}
+
+#endif //__d3d12_x_h__
+
+template<class T> struct PIXInferScopedEventType { typedef T Type; };
+template<class T> struct PIXInferScopedEventType<const T> { typedef T Type; };
+template<class T> struct PIXInferScopedEventType<T*> { typedef T Type; };
+template<class T> struct PIXInferScopedEventType<T* const> { typedef T Type; };
+template<> struct PIXInferScopedEventType<UINT64> { typedef void Type; };
+template<> struct PIXInferScopedEventType<const UINT64> { typedef void Type; };
+template<> struct PIXInferScopedEventType<INT64> { typedef void Type; };
+template<> struct PIXInferScopedEventType<const INT64> { typedef void Type; };
+template<> struct PIXInferScopedEventType<UINT> { typedef void Type; };
+template<> struct PIXInferScopedEventType<const UINT> { typedef void Type; };
+template<> struct PIXInferScopedEventType<INT> { typedef void Type; };
+template<> struct PIXInferScopedEventType<const INT> { typedef void Type; };
+#endif //_PIXEventsCommon_H_
diff --git a/external/D3D12/include/PIXEventsGenerated.h b/external/D3D12/include/PIXEventsGenerated.h
new file mode 100644
index 0000000..86f742a
--- /dev/null
+++ b/external/D3D12/include/PIXEventsGenerated.h
@@ -0,0 +1,10754 @@
+//
+// This file was copied from //depot/rs_xbox_dev_flight/xbox/drivers/Graphics/Pix3/PixEvt/inc/PIXEventsGenerated.h#6
+//
+// To refresh: run 'UpdateFromXbox -latest'
+//
+
+//This is a generated file.
+#pragma once
+
+#ifndef _PIXEventsGenerated_H_
+#define _PIXEventsGenerated_H_
+
+#ifndef _PIX3_H_
+#error Don't include this file directly - use pix3.h
+#endif
+
+#include "PIXEventsCommon.h"
+
+//__declspec(noinline) is specified to stop compiler from making bad inlining decisions
+//inline has to be specified for functions fully defined in header due to one definition rule
+//supported context types for TContext are ID3D11DeviceContextX, ID3D11ComputeContextX and ID3D11DmaEngineContextX
+
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+__declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+inline void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString);
+ }
+}
+
+template<class T1>
+inline void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1);
+ }
+}
+
+template<class T1, class T2>
+inline void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2);
+ }
+}
+
+template<class T1, class T2, class T3>
+inline void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3);
+ }
+}
+
+template<class T1, class T2, class T3, class T4>
+inline void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5>
+inline void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6>
+inline void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+inline void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+inline void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+inline void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+inline void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+inline void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+inline void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+inline void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+inline void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+inline void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+inline void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
+ }
+}
+
+inline void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString);
+ }
+}
+
+template<class T1>
+inline void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1);
+ }
+}
+
+template<class T1, class T2>
+inline void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2);
+ }
+}
+
+template<class T1, class T2, class T3>
+inline void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3);
+ }
+}
+
+template<class T1, class T2, class T3, class T4>
+inline void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5>
+inline void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6>
+inline void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+inline void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+inline void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+inline void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+inline void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+inline void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+inline void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+inline void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+inline void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+inline void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+inline void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXBeginEventAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
+ }
+}
+
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+__declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+inline void PIXSetMarker(UINT64 color, _In_ PCSTR formatString)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString);
+ }
+}
+
+template<class T1>
+inline void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1);
+ }
+}
+
+template<class T1, class T2>
+inline void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2);
+ }
+}
+
+template<class T1, class T2, class T3>
+inline void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3);
+ }
+}
+
+template<class T1, class T2, class T3, class T4>
+inline void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5>
+inline void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6>
+inline void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+inline void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+inline void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+inline void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+inline void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+inline void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+inline void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+inline void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+inline void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+inline void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+inline void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
+ }
+}
+
+inline void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString);
+ }
+}
+
+template<class T1>
+inline void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1);
+ }
+}
+
+template<class T1, class T2>
+inline void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2);
+ }
+}
+
+template<class T1, class T2, class T3>
+inline void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3);
+ }
+}
+
+template<class T1, class T2, class T3, class T4>
+inline void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5>
+inline void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6>
+inline void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+inline void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+inline void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+inline void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+inline void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+inline void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+inline void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+inline void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+inline void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+inline void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+inline void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXSetMarkerAllocate(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
+ }
+}
+
+template<class TContext>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatString)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatString)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+inline void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ PIXBeginCPUEventOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_BeginEvent_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+ *destination = 0ull;
+ PIXBeginEventOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatString)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatString)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+template<class TContext, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+inline void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ PIXSetCPUMarkerOnContext(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
+
+ UINT64 buffer[PIXEventsGraphicsRecordSpaceQwords];
+ UINT64* destination = buffer;
+ UINT64* limit = buffer + PIXEventsGraphicsRecordSpaceQwords - PIXEventsReservedTailSpaceQwords;
+
+ *destination++ = PIXEncodeEventInfo(0, PIXEvent_SetMarker_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+ *destination = 0ull;
+ PIXSetMarkerOnContext(context, static_cast<void*>(buffer), static_cast<UINT>(reinterpret_cast<BYTE*>(destination) - reinterpret_cast<BYTE*>(buffer)));
+}
+
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+__declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR formatString)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString);
+ }
+}
+
+template<class T1>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1);
+ }
+}
+
+template<class T1, class T2>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2);
+ }
+}
+
+template<class T1, class T2, class T3>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3);
+ }
+}
+
+template<class T1, class T2, class T3, class T4>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
+ }
+}
+
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString);
+ }
+}
+
+template<class T1>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1);
+ }
+}
+
+template<class T1, class T2>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2);
+ }
+}
+
+template<class T1, class T2, class T3>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3);
+ }
+}
+
+template<class T1, class T2, class T3, class T4>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_SetMarker_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUSetMarkerForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
+ }
+}
+
+
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+__declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ UINT64 time = PIXEventsReplaceBlock(false);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR formatString)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString);
+ }
+}
+
+template<class T1>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1);
+ }
+}
+
+template<class T1, class T2>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2);
+ }
+}
+
+template<class T1, class T2, class T3>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3);
+ }
+}
+
+template<class T1, class T2, class T3, class T4>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
+ }
+}
+
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_NoArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString);
+ }
+}
+
+template<class T1>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1);
+ }
+}
+
+template<class T1, class T2>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2);
+ }
+}
+
+template<class T1, class T2, class T3>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3);
+ }
+}
+
+template<class T1, class T2, class T3, class T4>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
+ }
+}
+
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_BeginEvent_OnContext_VarArgs);
+ *destination++ = color;
+
+ PIXCopyEventArgument(destination, limit, context);
+ PIXCopyEventArgument(destination, limit, formatString);
+ PIXCopyEventArgument(destination, limit, a1);
+ PIXCopyEventArgument(destination, limit, a2);
+ PIXCopyEventArgument(destination, limit, a3);
+ PIXCopyEventArgument(destination, limit, a4);
+ PIXCopyEventArgument(destination, limit, a5);
+ PIXCopyEventArgument(destination, limit, a6);
+ PIXCopyEventArgument(destination, limit, a7);
+ PIXCopyEventArgument(destination, limit, a8);
+ PIXCopyEventArgument(destination, limit, a9);
+ PIXCopyEventArgument(destination, limit, a10);
+ PIXCopyEventArgument(destination, limit, a11);
+ PIXCopyEventArgument(destination, limit, a12);
+ PIXCopyEventArgument(destination, limit, a13);
+ PIXCopyEventArgument(destination, limit, a14);
+ PIXCopyEventArgument(destination, limit, a15);
+ PIXCopyEventArgument(destination, limit, a16);
+
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUBeginEventForContextAllocate(color, context, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
+ }
+}
+
+
+__declspec(noinline) inline void PIXEndEventAllocate()
+{
+ UINT64 time = PIXEventsReplaceBlock(true);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_EndEvent);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+inline void PIXEndEvent()
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_EndEvent);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ PIXEndEventAllocate();
+ }
+}
+
+__declspec(noinline) inline void MakeCPUEndEventForContextAllocate(PVOID context)
+{
+ UINT64 time = PIXEventsReplaceBlock(true);
+ if (time)
+ {
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->limit;
+ if (destination < limit)
+ {
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_EndEvent_OnContext);
+ PIXCopyEventArgument(destination, limit, context);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ }
+}
+
+inline void MakeCPUEndEventForContext(PVOID context)
+{
+ PIXEventsThreadInfo* threadInfo = PIXGetThreadInfo();
+ UINT64* destination = threadInfo->destination;
+ UINT64* limit = threadInfo->biasedLimit;
+ if (destination < limit)
+ {
+ limit += PIXEventsSafeFastCopySpaceQwords;
+ UINT64 time = PIXGetTimestampCounter();
+ *destination++ = PIXEncodeEventInfo(time, PIXEvent_EndEvent_OnContext);
+ PIXCopyEventArgument(destination, limit, context);
+ *destination = PIXEventsBlockEndMarker;
+ threadInfo->destination = destination;
+ }
+ else if (limit != nullptr)
+ {
+ MakeCPUEndEventForContextAllocate(context);
+ }
+}
+
+template<class TContext>
+inline void PIXEndEvent(TContext* context)
+{
+ PIXEndCPUEventOnContext(context);
+ PIXEndEventOnContext(context);
+}
+
+template<class TContext>
+class PIXScopedEventObject
+{
+private:
+ TContext* m_context;
+
+public:
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCSTR formatString)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString);
+ }
+
+ template<class T1>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1);
+ }
+
+ template<class T1, class T2>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2);
+ }
+
+ template<class T1, class T2, class T3>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3);
+ }
+
+ template<class T1, class T2, class T3, class T4>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
+ }
+
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCWSTR formatString)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString);
+ }
+
+ template<class T1>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1);
+ }
+
+ template<class T1, class T2>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2);
+ }
+
+ template<class T1, class T2, class T3>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3);
+ }
+
+ template<class T1, class T2, class T3, class T4>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+ PIXScopedEventObject(TContext* context, UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+ : m_context(context)
+ {
+ PIXBeginEvent(context, color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
+ }
+
+ ~PIXScopedEventObject()
+ {
+ PIXEndEvent(m_context);
+ }
+};
+
+template<>
+class PIXScopedEventObject<void>
+{
+public:
+ PIXScopedEventObject(UINT64 color, _In_ PCSTR formatString)
+ {
+ PIXBeginEvent(color, formatString);
+ }
+
+ template<class T1>
+ PIXScopedEventObject(UINT64 color, _In_ PCSTR formatString, T1 a1)
+ {
+ PIXBeginEvent(color, formatString, a1);
+ }
+
+ template<class T1, class T2>
+ PIXScopedEventObject(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2)
+ {
+ PIXBeginEvent(color, formatString, a1, a2);
+ }
+
+ template<class T1, class T2, class T3>
+ PIXScopedEventObject(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3);
+ }
+
+ template<class T1, class T2, class T3, class T4>
+ PIXScopedEventObject(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5>
+ PIXScopedEventObject(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6>
+ PIXScopedEventObject(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+ PIXScopedEventObject(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+ PIXScopedEventObject(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+ PIXScopedEventObject(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+ PIXScopedEventObject(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+ PIXScopedEventObject(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+ PIXScopedEventObject(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+ PIXScopedEventObject(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+ PIXScopedEventObject(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+ PIXScopedEventObject(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+ PIXScopedEventObject(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
+ }
+
+ PIXScopedEventObject(UINT64 color, _In_ PCWSTR formatString)
+ {
+ PIXBeginEvent(color, formatString);
+ }
+
+ template<class T1>
+ PIXScopedEventObject(UINT64 color, _In_ PCWSTR formatString, T1 a1)
+ {
+ PIXBeginEvent(color, formatString, a1);
+ }
+
+ template<class T1, class T2>
+ PIXScopedEventObject(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2)
+ {
+ PIXBeginEvent(color, formatString, a1, a2);
+ }
+
+ template<class T1, class T2, class T3>
+ PIXScopedEventObject(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3);
+ }
+
+ template<class T1, class T2, class T3, class T4>
+ PIXScopedEventObject(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5>
+ PIXScopedEventObject(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6>
+ PIXScopedEventObject(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+ PIXScopedEventObject(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+ PIXScopedEventObject(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+ PIXScopedEventObject(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
+ PIXScopedEventObject(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
+ PIXScopedEventObject(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
+ PIXScopedEventObject(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
+ PIXScopedEventObject(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
+ PIXScopedEventObject(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
+ PIXScopedEventObject(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
+ }
+
+ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
+ PIXScopedEventObject(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16)
+ {
+ PIXBeginEvent(color, formatString, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
+ }
+
+ ~PIXScopedEventObject()
+ {
+ PIXEndEvent();
+ }
+};
+
+#define PIXConcatenate(a, b) a ## b
+#define PIXGetScopedEventVariableName(a, b) PIXConcatenate(a, b)
+#define PIXScopedEvent(context, ...) PIXScopedEventObject<PIXInferScopedEventType<decltype(context)>::Type> PIXGetScopedEventVariableName(pixEvent, __LINE__)(context, __VA_ARGS__)
+
+#endif
diff --git a/external/D3D12/include/dxgi.h b/external/D3D12/include/dxgi.h
new file mode 100644
index 0000000..e7901d4
--- /dev/null
+++ b/external/D3D12/include/dxgi.h
@@ -0,0 +1,2953 @@
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 8.01.0618 */
+/* @@MIDL_FILE_HEADING( ) */
+
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif /* __RPCNDR_H_VERSION__ */
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __dxgi_h__
+#define __dxgi_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */
+
+#ifndef __IDXGIObject_FWD_DEFINED__
+#define __IDXGIObject_FWD_DEFINED__
+typedef interface IDXGIObject IDXGIObject;
+
+#endif /* __IDXGIObject_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIDeviceSubObject_FWD_DEFINED__
+#define __IDXGIDeviceSubObject_FWD_DEFINED__
+typedef interface IDXGIDeviceSubObject IDXGIDeviceSubObject;
+
+#endif /* __IDXGIDeviceSubObject_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIResource_FWD_DEFINED__
+#define __IDXGIResource_FWD_DEFINED__
+typedef interface IDXGIResource IDXGIResource;
+
+#endif /* __IDXGIResource_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIKeyedMutex_FWD_DEFINED__
+#define __IDXGIKeyedMutex_FWD_DEFINED__
+typedef interface IDXGIKeyedMutex IDXGIKeyedMutex;
+
+#endif /* __IDXGIKeyedMutex_FWD_DEFINED__ */
+
+
+#ifndef __IDXGISurface_FWD_DEFINED__
+#define __IDXGISurface_FWD_DEFINED__
+typedef interface IDXGISurface IDXGISurface;
+
+#endif /* __IDXGISurface_FWD_DEFINED__ */
+
+
+#ifndef __IDXGISurface1_FWD_DEFINED__
+#define __IDXGISurface1_FWD_DEFINED__
+typedef interface IDXGISurface1 IDXGISurface1;
+
+#endif /* __IDXGISurface1_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIAdapter_FWD_DEFINED__
+#define __IDXGIAdapter_FWD_DEFINED__
+typedef interface IDXGIAdapter IDXGIAdapter;
+
+#endif /* __IDXGIAdapter_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIOutput_FWD_DEFINED__
+#define __IDXGIOutput_FWD_DEFINED__
+typedef interface IDXGIOutput IDXGIOutput;
+
+#endif /* __IDXGIOutput_FWD_DEFINED__ */
+
+
+#ifndef __IDXGISwapChain_FWD_DEFINED__
+#define __IDXGISwapChain_FWD_DEFINED__
+typedef interface IDXGISwapChain IDXGISwapChain;
+
+#endif /* __IDXGISwapChain_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIFactory_FWD_DEFINED__
+#define __IDXGIFactory_FWD_DEFINED__
+typedef interface IDXGIFactory IDXGIFactory;
+
+#endif /* __IDXGIFactory_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIDevice_FWD_DEFINED__
+#define __IDXGIDevice_FWD_DEFINED__
+typedef interface IDXGIDevice IDXGIDevice;
+
+#endif /* __IDXGIDevice_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIFactory1_FWD_DEFINED__
+#define __IDXGIFactory1_FWD_DEFINED__
+typedef interface IDXGIFactory1 IDXGIFactory1;
+
+#endif /* __IDXGIFactory1_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIAdapter1_FWD_DEFINED__
+#define __IDXGIAdapter1_FWD_DEFINED__
+typedef interface IDXGIAdapter1 IDXGIAdapter1;
+
+#endif /* __IDXGIAdapter1_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIDevice1_FWD_DEFINED__
+#define __IDXGIDevice1_FWD_DEFINED__
+typedef interface IDXGIDevice1 IDXGIDevice1;
+
+#endif /* __IDXGIDevice1_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "oaidl.h"
+#include "ocidl.h"
+#include "dxgitype.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+
+/* interface __MIDL_itf_dxgi_0000_0000 */
+/* [local] */
+
+#include <winapifamily.h>
+#define DXGI_CPU_ACCESS_NONE ( 0 )
+#define DXGI_CPU_ACCESS_DYNAMIC ( 1 )
+#define DXGI_CPU_ACCESS_READ_WRITE ( 2 )
+#define DXGI_CPU_ACCESS_SCRATCH ( 3 )
+#define DXGI_CPU_ACCESS_FIELD 15
+#define DXGI_USAGE_SHADER_INPUT 0x00000010UL
+#define DXGI_USAGE_RENDER_TARGET_OUTPUT 0x00000020UL
+#define DXGI_USAGE_BACK_BUFFER 0x00000040UL
+#define DXGI_USAGE_SHARED 0x00000080UL
+#define DXGI_USAGE_READ_ONLY 0x00000100UL
+#define DXGI_USAGE_DISCARD_ON_PRESENT 0x00000200UL
+#define DXGI_USAGE_UNORDERED_ACCESS 0x00000400UL
+typedef UINT DXGI_USAGE;
+
+typedef struct DXGI_FRAME_STATISTICS
+ {
+ UINT PresentCount;
+ UINT PresentRefreshCount;
+ UINT SyncRefreshCount;
+ LARGE_INTEGER SyncQPCTime;
+ LARGE_INTEGER SyncGPUTime;
+ } DXGI_FRAME_STATISTICS;
+
+typedef struct DXGI_MAPPED_RECT
+ {
+ INT Pitch;
+ BYTE *pBits;
+ } DXGI_MAPPED_RECT;
+
+#ifdef __midl
+typedef struct _LUID
+ {
+ DWORD LowPart;
+ LONG HighPart;
+ } LUID;
+
+typedef struct _LUID *PLUID;
+
+#endif
+typedef struct DXGI_ADAPTER_DESC
+ {
+ WCHAR Description[ 128 ];
+ UINT VendorId;
+ UINT DeviceId;
+ UINT SubSysId;
+ UINT Revision;
+ SIZE_T DedicatedVideoMemory;
+ SIZE_T DedicatedSystemMemory;
+ SIZE_T SharedSystemMemory;
+ LUID AdapterLuid;
+ } DXGI_ADAPTER_DESC;
+
+#if !defined(HMONITOR_DECLARED) && !defined(HMONITOR) && (WINVER < 0x0500)
+#define HMONITOR_DECLARED
+#if 0
+typedef HANDLE HMONITOR;
+
+#endif
+DECLARE_HANDLE(HMONITOR);
+#endif
+typedef struct DXGI_OUTPUT_DESC
+ {
+ WCHAR DeviceName[ 32 ];
+ RECT DesktopCoordinates;
+ BOOL AttachedToDesktop;
+ DXGI_MODE_ROTATION Rotation;
+ HMONITOR Monitor;
+ } DXGI_OUTPUT_DESC;
+
+typedef struct DXGI_SHARED_RESOURCE
+ {
+ HANDLE Handle;
+ } DXGI_SHARED_RESOURCE;
+
+#define DXGI_RESOURCE_PRIORITY_MINIMUM ( 0x28000000 )
+
+#define DXGI_RESOURCE_PRIORITY_LOW ( 0x50000000 )
+
+#define DXGI_RESOURCE_PRIORITY_NORMAL ( 0x78000000 )
+
+#define DXGI_RESOURCE_PRIORITY_HIGH ( 0xa0000000 )
+
+#define DXGI_RESOURCE_PRIORITY_MAXIMUM ( 0xc8000000 )
+
+typedef
+enum DXGI_RESIDENCY
+ {
+ DXGI_RESIDENCY_FULLY_RESIDENT = 1,
+ DXGI_RESIDENCY_RESIDENT_IN_SHARED_MEMORY = 2,
+ DXGI_RESIDENCY_EVICTED_TO_DISK = 3
+ } DXGI_RESIDENCY;
+
+typedef struct DXGI_SURFACE_DESC
+ {
+ UINT Width;
+ UINT Height;
+ DXGI_FORMAT Format;
+ DXGI_SAMPLE_DESC SampleDesc;
+ } DXGI_SURFACE_DESC;
+
+typedef
+enum DXGI_SWAP_EFFECT
+ {
+ DXGI_SWAP_EFFECT_DISCARD = 0,
+ DXGI_SWAP_EFFECT_SEQUENTIAL = 1,
+ DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL = 3,
+ DXGI_SWAP_EFFECT_FLIP_DISCARD = 4
+ } DXGI_SWAP_EFFECT;
+
+typedef
+enum DXGI_SWAP_CHAIN_FLAG
+ {
+ DXGI_SWAP_CHAIN_FLAG_NONPREROTATED = 1,
+ DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH = 2,
+ DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE = 4,
+ DXGI_SWAP_CHAIN_FLAG_RESTRICTED_CONTENT = 8,
+ DXGI_SWAP_CHAIN_FLAG_RESTRICT_SHARED_RESOURCE_DRIVER = 16,
+ DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY = 32,
+ DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT = 64,
+ DXGI_SWAP_CHAIN_FLAG_FOREGROUND_LAYER = 128,
+ DXGI_SWAP_CHAIN_FLAG_FULLSCREEN_VIDEO = 256,
+ DXGI_SWAP_CHAIN_FLAG_YUV_VIDEO = 512,
+ DXGI_SWAP_CHAIN_FLAG_HW_PROTECTED = 1024,
+ DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING = 2048
+ } DXGI_SWAP_CHAIN_FLAG;
+
+typedef struct DXGI_SWAP_CHAIN_DESC
+ {
+ DXGI_MODE_DESC BufferDesc;
+ DXGI_SAMPLE_DESC SampleDesc;
+ DXGI_USAGE BufferUsage;
+ UINT BufferCount;
+ HWND OutputWindow;
+ BOOL Windowed;
+ DXGI_SWAP_EFFECT SwapEffect;
+ UINT Flags;
+ } DXGI_SWAP_CHAIN_DESC;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IDXGIObject_INTERFACE_DEFINED__
+#define __IDXGIObject_INTERFACE_DEFINED__
+
+/* interface IDXGIObject */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIObject;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("aec22fb8-76f3-4639-9be0-28eb43a67a2e")
+ IDXGIObject : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE SetPrivateData(
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface(
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetPrivateData(
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetParent(
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIObjectVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIObject * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIObject * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIObject * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIObject * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIObject * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIObject * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIObject * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ END_INTERFACE
+ } IDXGIObjectVtbl;
+
+ interface IDXGIObject
+ {
+ CONST_VTBL struct IDXGIObjectVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIObject_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIObject_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIObject_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIObject_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIObject_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIObject_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIObject_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIObject_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDXGIDeviceSubObject_INTERFACE_DEFINED__
+#define __IDXGIDeviceSubObject_INTERFACE_DEFINED__
+
+/* interface IDXGIDeviceSubObject */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIDeviceSubObject;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("3d3e0379-f9de-4d58-bb6c-18d62992f1a6")
+ IDXGIDeviceSubObject : public IDXGIObject
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetDevice(
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppDevice) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIDeviceSubObjectVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIDeviceSubObject * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIDeviceSubObject * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIDeviceSubObject * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIDeviceSubObject * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIDeviceSubObject * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIDeviceSubObject * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIDeviceSubObject * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDevice )(
+ IDXGIDeviceSubObject * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppDevice);
+
+ END_INTERFACE
+ } IDXGIDeviceSubObjectVtbl;
+
+ interface IDXGIDeviceSubObject
+ {
+ CONST_VTBL struct IDXGIDeviceSubObjectVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIDeviceSubObject_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIDeviceSubObject_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIDeviceSubObject_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIDeviceSubObject_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIDeviceSubObject_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIDeviceSubObject_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIDeviceSubObject_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIDeviceSubObject_GetDevice(This,riid,ppDevice) \
+ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIDeviceSubObject_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDXGIResource_INTERFACE_DEFINED__
+#define __IDXGIResource_INTERFACE_DEFINED__
+
+/* interface IDXGIResource */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIResource;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("035f3ab4-482e-4e50-b41f-8a7f8bd8960b")
+ IDXGIResource : public IDXGIDeviceSubObject
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetSharedHandle(
+ /* [annotation][out] */
+ _Out_ HANDLE *pSharedHandle) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetUsage(
+ /* [out] */ DXGI_USAGE *pUsage) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetEvictionPriority(
+ /* [in] */ UINT EvictionPriority) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetEvictionPriority(
+ /* [annotation][retval][out] */
+ _Out_ UINT *pEvictionPriority) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIResourceVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIResource * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIResource * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIResource * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIResource * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIResource * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIResource * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIResource * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDevice )(
+ IDXGIResource * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSharedHandle )(
+ IDXGIResource * This,
+ /* [annotation][out] */
+ _Out_ HANDLE *pSharedHandle);
+
+ HRESULT ( STDMETHODCALLTYPE *GetUsage )(
+ IDXGIResource * This,
+ /* [out] */ DXGI_USAGE *pUsage);
+
+ HRESULT ( STDMETHODCALLTYPE *SetEvictionPriority )(
+ IDXGIResource * This,
+ /* [in] */ UINT EvictionPriority);
+
+ HRESULT ( STDMETHODCALLTYPE *GetEvictionPriority )(
+ IDXGIResource * This,
+ /* [annotation][retval][out] */
+ _Out_ UINT *pEvictionPriority);
+
+ END_INTERFACE
+ } IDXGIResourceVtbl;
+
+ interface IDXGIResource
+ {
+ CONST_VTBL struct IDXGIResourceVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIResource_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIResource_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIResource_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIResource_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIResource_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIResource_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIResource_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIResource_GetDevice(This,riid,ppDevice) \
+ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) )
+
+
+#define IDXGIResource_GetSharedHandle(This,pSharedHandle) \
+ ( (This)->lpVtbl -> GetSharedHandle(This,pSharedHandle) )
+
+#define IDXGIResource_GetUsage(This,pUsage) \
+ ( (This)->lpVtbl -> GetUsage(This,pUsage) )
+
+#define IDXGIResource_SetEvictionPriority(This,EvictionPriority) \
+ ( (This)->lpVtbl -> SetEvictionPriority(This,EvictionPriority) )
+
+#define IDXGIResource_GetEvictionPriority(This,pEvictionPriority) \
+ ( (This)->lpVtbl -> GetEvictionPriority(This,pEvictionPriority) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIResource_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDXGIKeyedMutex_INTERFACE_DEFINED__
+#define __IDXGIKeyedMutex_INTERFACE_DEFINED__
+
+/* interface IDXGIKeyedMutex */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIKeyedMutex;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("9d8e1289-d7b3-465f-8126-250e349af85d")
+ IDXGIKeyedMutex : public IDXGIDeviceSubObject
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE AcquireSync(
+ /* [in] */ UINT64 Key,
+ /* [in] */ DWORD dwMilliseconds) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ReleaseSync(
+ /* [in] */ UINT64 Key) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIKeyedMutexVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIKeyedMutex * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIKeyedMutex * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIKeyedMutex * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIKeyedMutex * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIKeyedMutex * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIKeyedMutex * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIKeyedMutex * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDevice )(
+ IDXGIKeyedMutex * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *AcquireSync )(
+ IDXGIKeyedMutex * This,
+ /* [in] */ UINT64 Key,
+ /* [in] */ DWORD dwMilliseconds);
+
+ HRESULT ( STDMETHODCALLTYPE *ReleaseSync )(
+ IDXGIKeyedMutex * This,
+ /* [in] */ UINT64 Key);
+
+ END_INTERFACE
+ } IDXGIKeyedMutexVtbl;
+
+ interface IDXGIKeyedMutex
+ {
+ CONST_VTBL struct IDXGIKeyedMutexVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIKeyedMutex_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIKeyedMutex_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIKeyedMutex_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIKeyedMutex_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIKeyedMutex_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIKeyedMutex_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIKeyedMutex_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIKeyedMutex_GetDevice(This,riid,ppDevice) \
+ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) )
+
+
+#define IDXGIKeyedMutex_AcquireSync(This,Key,dwMilliseconds) \
+ ( (This)->lpVtbl -> AcquireSync(This,Key,dwMilliseconds) )
+
+#define IDXGIKeyedMutex_ReleaseSync(This,Key) \
+ ( (This)->lpVtbl -> ReleaseSync(This,Key) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIKeyedMutex_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi_0000_0004 */
+/* [local] */
+
+#define DXGI_MAP_READ ( 1UL )
+
+#define DXGI_MAP_WRITE ( 2UL )
+
+#define DXGI_MAP_DISCARD ( 4UL )
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0004_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0004_v0_0_s_ifspec;
+
+#ifndef __IDXGISurface_INTERFACE_DEFINED__
+#define __IDXGISurface_INTERFACE_DEFINED__
+
+/* interface IDXGISurface */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGISurface;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("cafcb56c-6ac3-4889-bf47-9e23bbd260ec")
+ IDXGISurface : public IDXGIDeviceSubObject
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetDesc(
+ /* [annotation][out] */
+ _Out_ DXGI_SURFACE_DESC *pDesc) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Map(
+ /* [annotation][out] */
+ _Out_ DXGI_MAPPED_RECT *pLockedRect,
+ /* [in] */ UINT MapFlags) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Unmap( void) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGISurfaceVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGISurface * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGISurface * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGISurface * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGISurface * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGISurface * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGISurface * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGISurface * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDevice )(
+ IDXGISurface * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc )(
+ IDXGISurface * This,
+ /* [annotation][out] */
+ _Out_ DXGI_SURFACE_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *Map )(
+ IDXGISurface * This,
+ /* [annotation][out] */
+ _Out_ DXGI_MAPPED_RECT *pLockedRect,
+ /* [in] */ UINT MapFlags);
+
+ HRESULT ( STDMETHODCALLTYPE *Unmap )(
+ IDXGISurface * This);
+
+ END_INTERFACE
+ } IDXGISurfaceVtbl;
+
+ interface IDXGISurface
+ {
+ CONST_VTBL struct IDXGISurfaceVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGISurface_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGISurface_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGISurface_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGISurface_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGISurface_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGISurface_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGISurface_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGISurface_GetDevice(This,riid,ppDevice) \
+ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) )
+
+
+#define IDXGISurface_GetDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc(This,pDesc) )
+
+#define IDXGISurface_Map(This,pLockedRect,MapFlags) \
+ ( (This)->lpVtbl -> Map(This,pLockedRect,MapFlags) )
+
+#define IDXGISurface_Unmap(This) \
+ ( (This)->lpVtbl -> Unmap(This) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGISurface_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDXGISurface1_INTERFACE_DEFINED__
+#define __IDXGISurface1_INTERFACE_DEFINED__
+
+/* interface IDXGISurface1 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGISurface1;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("4AE63092-6327-4c1b-80AE-BFE12EA32B86")
+ IDXGISurface1 : public IDXGISurface
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetDC(
+ /* [in] */ BOOL Discard,
+ /* [annotation][out] */
+ _Out_ HDC *phdc) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ReleaseDC(
+ /* [annotation][in] */
+ _In_opt_ RECT *pDirtyRect) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGISurface1Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGISurface1 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGISurface1 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGISurface1 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGISurface1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGISurface1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGISurface1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGISurface1 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDevice )(
+ IDXGISurface1 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc )(
+ IDXGISurface1 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_SURFACE_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *Map )(
+ IDXGISurface1 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_MAPPED_RECT *pLockedRect,
+ /* [in] */ UINT MapFlags);
+
+ HRESULT ( STDMETHODCALLTYPE *Unmap )(
+ IDXGISurface1 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDC )(
+ IDXGISurface1 * This,
+ /* [in] */ BOOL Discard,
+ /* [annotation][out] */
+ _Out_ HDC *phdc);
+
+ HRESULT ( STDMETHODCALLTYPE *ReleaseDC )(
+ IDXGISurface1 * This,
+ /* [annotation][in] */
+ _In_opt_ RECT *pDirtyRect);
+
+ END_INTERFACE
+ } IDXGISurface1Vtbl;
+
+ interface IDXGISurface1
+ {
+ CONST_VTBL struct IDXGISurface1Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGISurface1_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGISurface1_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGISurface1_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGISurface1_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGISurface1_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGISurface1_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGISurface1_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGISurface1_GetDevice(This,riid,ppDevice) \
+ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) )
+
+
+#define IDXGISurface1_GetDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc(This,pDesc) )
+
+#define IDXGISurface1_Map(This,pLockedRect,MapFlags) \
+ ( (This)->lpVtbl -> Map(This,pLockedRect,MapFlags) )
+
+#define IDXGISurface1_Unmap(This) \
+ ( (This)->lpVtbl -> Unmap(This) )
+
+
+#define IDXGISurface1_GetDC(This,Discard,phdc) \
+ ( (This)->lpVtbl -> GetDC(This,Discard,phdc) )
+
+#define IDXGISurface1_ReleaseDC(This,pDirtyRect) \
+ ( (This)->lpVtbl -> ReleaseDC(This,pDirtyRect) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGISurface1_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi_0000_0006 */
+/* [local] */
+
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0006_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0006_v0_0_s_ifspec;
+
+#ifndef __IDXGIAdapter_INTERFACE_DEFINED__
+#define __IDXGIAdapter_INTERFACE_DEFINED__
+
+/* interface IDXGIAdapter */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIAdapter;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("2411e7e1-12ac-4ccf-bd14-9798e8534dc0")
+ IDXGIAdapter : public IDXGIObject
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE EnumOutputs(
+ /* [in] */ UINT Output,
+ /* [annotation][out][in] */
+ _COM_Outptr_ IDXGIOutput **ppOutput) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDesc(
+ /* [annotation][out] */
+ _Out_ DXGI_ADAPTER_DESC *pDesc) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CheckInterfaceSupport(
+ /* [annotation][in] */
+ _In_ REFGUID InterfaceName,
+ /* [annotation][out] */
+ _Out_ LARGE_INTEGER *pUMDVersion) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIAdapterVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIAdapter * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIAdapter * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIAdapter * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIAdapter * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIAdapter * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIAdapter * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIAdapter * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *EnumOutputs )(
+ IDXGIAdapter * This,
+ /* [in] */ UINT Output,
+ /* [annotation][out][in] */
+ _COM_Outptr_ IDXGIOutput **ppOutput);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc )(
+ IDXGIAdapter * This,
+ /* [annotation][out] */
+ _Out_ DXGI_ADAPTER_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *CheckInterfaceSupport )(
+ IDXGIAdapter * This,
+ /* [annotation][in] */
+ _In_ REFGUID InterfaceName,
+ /* [annotation][out] */
+ _Out_ LARGE_INTEGER *pUMDVersion);
+
+ END_INTERFACE
+ } IDXGIAdapterVtbl;
+
+ interface IDXGIAdapter
+ {
+ CONST_VTBL struct IDXGIAdapterVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIAdapter_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIAdapter_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIAdapter_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIAdapter_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIAdapter_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIAdapter_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIAdapter_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIAdapter_EnumOutputs(This,Output,ppOutput) \
+ ( (This)->lpVtbl -> EnumOutputs(This,Output,ppOutput) )
+
+#define IDXGIAdapter_GetDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc(This,pDesc) )
+
+#define IDXGIAdapter_CheckInterfaceSupport(This,InterfaceName,pUMDVersion) \
+ ( (This)->lpVtbl -> CheckInterfaceSupport(This,InterfaceName,pUMDVersion) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIAdapter_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi_0000_0007 */
+/* [local] */
+
+#define DXGI_ENUM_MODES_INTERLACED ( 1UL )
+
+#define DXGI_ENUM_MODES_SCALING ( 2UL )
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0007_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0007_v0_0_s_ifspec;
+
+#ifndef __IDXGIOutput_INTERFACE_DEFINED__
+#define __IDXGIOutput_INTERFACE_DEFINED__
+
+/* interface IDXGIOutput */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIOutput;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("ae02eedb-c735-4690-8d52-5a8dc20213aa")
+ IDXGIOutput : public IDXGIObject
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetDesc(
+ /* [annotation][out] */
+ _Out_ DXGI_OUTPUT_DESC *pDesc) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDisplayModeList(
+ /* [in] */ DXGI_FORMAT EnumFormat,
+ /* [in] */ UINT Flags,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pNumModes,
+ /* [annotation][out] */
+ _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC *pDesc) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE FindClosestMatchingMode(
+ /* [annotation][in] */
+ _In_ const DXGI_MODE_DESC *pModeToMatch,
+ /* [annotation][out] */
+ _Out_ DXGI_MODE_DESC *pClosestMatch,
+ /* [annotation][in] */
+ _In_opt_ IUnknown *pConcernedDevice) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE WaitForVBlank( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE TakeOwnership(
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ BOOL Exclusive) = 0;
+
+ virtual void STDMETHODCALLTYPE ReleaseOwnership( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetGammaControlCapabilities(
+ /* [annotation][out] */
+ _Out_ DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetGammaControl(
+ /* [annotation][in] */
+ _In_ const DXGI_GAMMA_CONTROL *pArray) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetGammaControl(
+ /* [annotation][out] */
+ _Out_ DXGI_GAMMA_CONTROL *pArray) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetDisplaySurface(
+ /* [annotation][in] */
+ _In_ IDXGISurface *pScanoutSurface) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDisplaySurfaceData(
+ /* [annotation][in] */
+ _In_ IDXGISurface *pDestination) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetFrameStatistics(
+ /* [annotation][out] */
+ _Out_ DXGI_FRAME_STATISTICS *pStats) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIOutputVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIOutput * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIOutput * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIOutput * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIOutput * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIOutput * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIOutput * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIOutput * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc )(
+ IDXGIOutput * This,
+ /* [annotation][out] */
+ _Out_ DXGI_OUTPUT_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList )(
+ IDXGIOutput * This,
+ /* [in] */ DXGI_FORMAT EnumFormat,
+ /* [in] */ UINT Flags,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pNumModes,
+ /* [annotation][out] */
+ _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode )(
+ IDXGIOutput * This,
+ /* [annotation][in] */
+ _In_ const DXGI_MODE_DESC *pModeToMatch,
+ /* [annotation][out] */
+ _Out_ DXGI_MODE_DESC *pClosestMatch,
+ /* [annotation][in] */
+ _In_opt_ IUnknown *pConcernedDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *WaitForVBlank )(
+ IDXGIOutput * This);
+
+ HRESULT ( STDMETHODCALLTYPE *TakeOwnership )(
+ IDXGIOutput * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ BOOL Exclusive);
+
+ void ( STDMETHODCALLTYPE *ReleaseOwnership )(
+ IDXGIOutput * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGammaControlCapabilities )(
+ IDXGIOutput * This,
+ /* [annotation][out] */
+ _Out_ DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps);
+
+ HRESULT ( STDMETHODCALLTYPE *SetGammaControl )(
+ IDXGIOutput * This,
+ /* [annotation][in] */
+ _In_ const DXGI_GAMMA_CONTROL *pArray);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGammaControl )(
+ IDXGIOutput * This,
+ /* [annotation][out] */
+ _Out_ DXGI_GAMMA_CONTROL *pArray);
+
+ HRESULT ( STDMETHODCALLTYPE *SetDisplaySurface )(
+ IDXGIOutput * This,
+ /* [annotation][in] */
+ _In_ IDXGISurface *pScanoutSurface);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData )(
+ IDXGIOutput * This,
+ /* [annotation][in] */
+ _In_ IDXGISurface *pDestination);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )(
+ IDXGIOutput * This,
+ /* [annotation][out] */
+ _Out_ DXGI_FRAME_STATISTICS *pStats);
+
+ END_INTERFACE
+ } IDXGIOutputVtbl;
+
+ interface IDXGIOutput
+ {
+ CONST_VTBL struct IDXGIOutputVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIOutput_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIOutput_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIOutput_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIOutput_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIOutput_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIOutput_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIOutput_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIOutput_GetDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc(This,pDesc) )
+
+#define IDXGIOutput_GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) \
+ ( (This)->lpVtbl -> GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) )
+
+#define IDXGIOutput_FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) \
+ ( (This)->lpVtbl -> FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) )
+
+#define IDXGIOutput_WaitForVBlank(This) \
+ ( (This)->lpVtbl -> WaitForVBlank(This) )
+
+#define IDXGIOutput_TakeOwnership(This,pDevice,Exclusive) \
+ ( (This)->lpVtbl -> TakeOwnership(This,pDevice,Exclusive) )
+
+#define IDXGIOutput_ReleaseOwnership(This) \
+ ( (This)->lpVtbl -> ReleaseOwnership(This) )
+
+#define IDXGIOutput_GetGammaControlCapabilities(This,pGammaCaps) \
+ ( (This)->lpVtbl -> GetGammaControlCapabilities(This,pGammaCaps) )
+
+#define IDXGIOutput_SetGammaControl(This,pArray) \
+ ( (This)->lpVtbl -> SetGammaControl(This,pArray) )
+
+#define IDXGIOutput_GetGammaControl(This,pArray) \
+ ( (This)->lpVtbl -> GetGammaControl(This,pArray) )
+
+#define IDXGIOutput_SetDisplaySurface(This,pScanoutSurface) \
+ ( (This)->lpVtbl -> SetDisplaySurface(This,pScanoutSurface) )
+
+#define IDXGIOutput_GetDisplaySurfaceData(This,pDestination) \
+ ( (This)->lpVtbl -> GetDisplaySurfaceData(This,pDestination) )
+
+#define IDXGIOutput_GetFrameStatistics(This,pStats) \
+ ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIOutput_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi_0000_0008 */
+/* [local] */
+
+#define DXGI_MAX_SWAP_CHAIN_BUFFERS ( 16 )
+#define DXGI_PRESENT_TEST 0x00000001UL
+#define DXGI_PRESENT_DO_NOT_SEQUENCE 0x00000002UL
+#define DXGI_PRESENT_RESTART 0x00000004UL
+#define DXGI_PRESENT_DO_NOT_WAIT 0x00000008UL
+#define DXGI_PRESENT_STEREO_PREFER_RIGHT 0x00000010UL
+#define DXGI_PRESENT_STEREO_TEMPORARY_MONO 0x00000020UL
+#define DXGI_PRESENT_RESTRICT_TO_OUTPUT 0x00000040UL
+#define DXGI_PRESENT_USE_DURATION 0x00000100UL
+#define DXGI_PRESENT_ALLOW_TEARING 0x00000200UL
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0008_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0008_v0_0_s_ifspec;
+
+#ifndef __IDXGISwapChain_INTERFACE_DEFINED__
+#define __IDXGISwapChain_INTERFACE_DEFINED__
+
+/* interface IDXGISwapChain */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGISwapChain;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("310d36a0-d2e7-4c0a-aa04-6a9d23b8886a")
+ IDXGISwapChain : public IDXGIDeviceSubObject
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE Present(
+ /* [in] */ UINT SyncInterval,
+ /* [in] */ UINT Flags) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetBuffer(
+ /* [in] */ UINT Buffer,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][out][in] */
+ _COM_Outptr_ void **ppSurface) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetFullscreenState(
+ /* [in] */ BOOL Fullscreen,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pTarget) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetFullscreenState(
+ /* [annotation][out] */
+ _Out_opt_ BOOL *pFullscreen,
+ /* [annotation][out] */
+ _COM_Outptr_opt_result_maybenull_ IDXGIOutput **ppTarget) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDesc(
+ /* [annotation][out] */
+ _Out_ DXGI_SWAP_CHAIN_DESC *pDesc) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ResizeBuffers(
+ /* [in] */ UINT BufferCount,
+ /* [in] */ UINT Width,
+ /* [in] */ UINT Height,
+ /* [in] */ DXGI_FORMAT NewFormat,
+ /* [in] */ UINT SwapChainFlags) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ResizeTarget(
+ /* [annotation][in] */
+ _In_ const DXGI_MODE_DESC *pNewTargetParameters) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetContainingOutput(
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIOutput **ppOutput) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetFrameStatistics(
+ /* [annotation][out] */
+ _Out_ DXGI_FRAME_STATISTICS *pStats) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetLastPresentCount(
+ /* [annotation][out] */
+ _Out_ UINT *pLastPresentCount) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGISwapChainVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGISwapChain * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGISwapChain * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGISwapChain * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGISwapChain * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGISwapChain * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGISwapChain * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGISwapChain * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDevice )(
+ IDXGISwapChain * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *Present )(
+ IDXGISwapChain * This,
+ /* [in] */ UINT SyncInterval,
+ /* [in] */ UINT Flags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetBuffer )(
+ IDXGISwapChain * This,
+ /* [in] */ UINT Buffer,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][out][in] */
+ _COM_Outptr_ void **ppSurface);
+
+ HRESULT ( STDMETHODCALLTYPE *SetFullscreenState )(
+ IDXGISwapChain * This,
+ /* [in] */ BOOL Fullscreen,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pTarget);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFullscreenState )(
+ IDXGISwapChain * This,
+ /* [annotation][out] */
+ _Out_opt_ BOOL *pFullscreen,
+ /* [annotation][out] */
+ _COM_Outptr_opt_result_maybenull_ IDXGIOutput **ppTarget);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc )(
+ IDXGISwapChain * This,
+ /* [annotation][out] */
+ _Out_ DXGI_SWAP_CHAIN_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *ResizeBuffers )(
+ IDXGISwapChain * This,
+ /* [in] */ UINT BufferCount,
+ /* [in] */ UINT Width,
+ /* [in] */ UINT Height,
+ /* [in] */ DXGI_FORMAT NewFormat,
+ /* [in] */ UINT SwapChainFlags);
+
+ HRESULT ( STDMETHODCALLTYPE *ResizeTarget )(
+ IDXGISwapChain * This,
+ /* [annotation][in] */
+ _In_ const DXGI_MODE_DESC *pNewTargetParameters);
+
+ HRESULT ( STDMETHODCALLTYPE *GetContainingOutput )(
+ IDXGISwapChain * This,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIOutput **ppOutput);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )(
+ IDXGISwapChain * This,
+ /* [annotation][out] */
+ _Out_ DXGI_FRAME_STATISTICS *pStats);
+
+ HRESULT ( STDMETHODCALLTYPE *GetLastPresentCount )(
+ IDXGISwapChain * This,
+ /* [annotation][out] */
+ _Out_ UINT *pLastPresentCount);
+
+ END_INTERFACE
+ } IDXGISwapChainVtbl;
+
+ interface IDXGISwapChain
+ {
+ CONST_VTBL struct IDXGISwapChainVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGISwapChain_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGISwapChain_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGISwapChain_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGISwapChain_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGISwapChain_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGISwapChain_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGISwapChain_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGISwapChain_GetDevice(This,riid,ppDevice) \
+ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) )
+
+
+#define IDXGISwapChain_Present(This,SyncInterval,Flags) \
+ ( (This)->lpVtbl -> Present(This,SyncInterval,Flags) )
+
+#define IDXGISwapChain_GetBuffer(This,Buffer,riid,ppSurface) \
+ ( (This)->lpVtbl -> GetBuffer(This,Buffer,riid,ppSurface) )
+
+#define IDXGISwapChain_SetFullscreenState(This,Fullscreen,pTarget) \
+ ( (This)->lpVtbl -> SetFullscreenState(This,Fullscreen,pTarget) )
+
+#define IDXGISwapChain_GetFullscreenState(This,pFullscreen,ppTarget) \
+ ( (This)->lpVtbl -> GetFullscreenState(This,pFullscreen,ppTarget) )
+
+#define IDXGISwapChain_GetDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc(This,pDesc) )
+
+#define IDXGISwapChain_ResizeBuffers(This,BufferCount,Width,Height,NewFormat,SwapChainFlags) \
+ ( (This)->lpVtbl -> ResizeBuffers(This,BufferCount,Width,Height,NewFormat,SwapChainFlags) )
+
+#define IDXGISwapChain_ResizeTarget(This,pNewTargetParameters) \
+ ( (This)->lpVtbl -> ResizeTarget(This,pNewTargetParameters) )
+
+#define IDXGISwapChain_GetContainingOutput(This,ppOutput) \
+ ( (This)->lpVtbl -> GetContainingOutput(This,ppOutput) )
+
+#define IDXGISwapChain_GetFrameStatistics(This,pStats) \
+ ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) )
+
+#define IDXGISwapChain_GetLastPresentCount(This,pLastPresentCount) \
+ ( (This)->lpVtbl -> GetLastPresentCount(This,pLastPresentCount) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGISwapChain_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi_0000_0009 */
+/* [local] */
+
+#define DXGI_MWA_NO_WINDOW_CHANGES ( 1 << 0 )
+#define DXGI_MWA_NO_ALT_ENTER ( 1 << 1 )
+#define DXGI_MWA_NO_PRINT_SCREEN ( 1 << 2 )
+#define DXGI_MWA_VALID ( 0x7 )
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0009_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0009_v0_0_s_ifspec;
+
+#ifndef __IDXGIFactory_INTERFACE_DEFINED__
+#define __IDXGIFactory_INTERFACE_DEFINED__
+
+/* interface IDXGIFactory */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIFactory;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("7b7166ec-21c7-44ae-b21a-c9ae321ae369")
+ IDXGIFactory : public IDXGIObject
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE EnumAdapters(
+ /* [in] */ UINT Adapter,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter **ppAdapter) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE MakeWindowAssociation(
+ HWND WindowHandle,
+ UINT Flags) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetWindowAssociation(
+ /* [annotation][out] */
+ _Out_ HWND *pWindowHandle) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateSwapChain(
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_ DXGI_SWAP_CHAIN_DESC *pDesc,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain **ppSwapChain) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateSoftwareAdapter(
+ /* [in] */ HMODULE Module,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter **ppAdapter) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIFactoryVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIFactory * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIFactory * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIFactory * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIFactory * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIFactory * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIFactory * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIFactory * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *EnumAdapters )(
+ IDXGIFactory * This,
+ /* [in] */ UINT Adapter,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter **ppAdapter);
+
+ HRESULT ( STDMETHODCALLTYPE *MakeWindowAssociation )(
+ IDXGIFactory * This,
+ HWND WindowHandle,
+ UINT Flags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetWindowAssociation )(
+ IDXGIFactory * This,
+ /* [annotation][out] */
+ _Out_ HWND *pWindowHandle);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSwapChain )(
+ IDXGIFactory * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_ DXGI_SWAP_CHAIN_DESC *pDesc,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain **ppSwapChain);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSoftwareAdapter )(
+ IDXGIFactory * This,
+ /* [in] */ HMODULE Module,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter **ppAdapter);
+
+ END_INTERFACE
+ } IDXGIFactoryVtbl;
+
+ interface IDXGIFactory
+ {
+ CONST_VTBL struct IDXGIFactoryVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIFactory_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIFactory_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIFactory_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIFactory_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIFactory_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIFactory_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIFactory_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIFactory_EnumAdapters(This,Adapter,ppAdapter) \
+ ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) )
+
+#define IDXGIFactory_MakeWindowAssociation(This,WindowHandle,Flags) \
+ ( (This)->lpVtbl -> MakeWindowAssociation(This,WindowHandle,Flags) )
+
+#define IDXGIFactory_GetWindowAssociation(This,pWindowHandle) \
+ ( (This)->lpVtbl -> GetWindowAssociation(This,pWindowHandle) )
+
+#define IDXGIFactory_CreateSwapChain(This,pDevice,pDesc,ppSwapChain) \
+ ( (This)->lpVtbl -> CreateSwapChain(This,pDevice,pDesc,ppSwapChain) )
+
+#define IDXGIFactory_CreateSoftwareAdapter(This,Module,ppAdapter) \
+ ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIFactory_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi_0000_0010 */
+/* [local] */
+
+#pragma region Desktop Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+HRESULT WINAPI CreateDXGIFactory(REFIID riid, _COM_Outptr_ void **ppFactory);
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
+#pragma endregion
+HRESULT WINAPI CreateDXGIFactory1(REFIID riid, _COM_Outptr_ void **ppFactory);
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0010_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0010_v0_0_s_ifspec;
+
+#ifndef __IDXGIDevice_INTERFACE_DEFINED__
+#define __IDXGIDevice_INTERFACE_DEFINED__
+
+/* interface IDXGIDevice */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIDevice;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("54ec77fa-1377-44e6-8c32-88fd5f44c84c")
+ IDXGIDevice : public IDXGIObject
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetAdapter(
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter **pAdapter) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateSurface(
+ /* [annotation][in] */
+ _In_ const DXGI_SURFACE_DESC *pDesc,
+ /* [in] */ UINT NumSurfaces,
+ /* [in] */ DXGI_USAGE Usage,
+ /* [annotation][in] */
+ _In_opt_ const DXGI_SHARED_RESOURCE *pSharedResource,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISurface **ppSurface) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE QueryResourceResidency(
+ /* [annotation][size_is][in] */
+ _In_reads_(NumResources) IUnknown *const *ppResources,
+ /* [annotation][size_is][out] */
+ _Out_writes_(NumResources) DXGI_RESIDENCY *pResidencyStatus,
+ /* [in] */ UINT NumResources) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetGPUThreadPriority(
+ /* [in] */ INT Priority) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetGPUThreadPriority(
+ /* [annotation][retval][out] */
+ _Out_ INT *pPriority) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIDeviceVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIDevice * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIDevice * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIDevice * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIDevice * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIDevice * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIDevice * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIDevice * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetAdapter )(
+ IDXGIDevice * This,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter **pAdapter);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSurface )(
+ IDXGIDevice * This,
+ /* [annotation][in] */
+ _In_ const DXGI_SURFACE_DESC *pDesc,
+ /* [in] */ UINT NumSurfaces,
+ /* [in] */ DXGI_USAGE Usage,
+ /* [annotation][in] */
+ _In_opt_ const DXGI_SHARED_RESOURCE *pSharedResource,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISurface **ppSurface);
+
+ HRESULT ( STDMETHODCALLTYPE *QueryResourceResidency )(
+ IDXGIDevice * This,
+ /* [annotation][size_is][in] */
+ _In_reads_(NumResources) IUnknown *const *ppResources,
+ /* [annotation][size_is][out] */
+ _Out_writes_(NumResources) DXGI_RESIDENCY *pResidencyStatus,
+ /* [in] */ UINT NumResources);
+
+ HRESULT ( STDMETHODCALLTYPE *SetGPUThreadPriority )(
+ IDXGIDevice * This,
+ /* [in] */ INT Priority);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGPUThreadPriority )(
+ IDXGIDevice * This,
+ /* [annotation][retval][out] */
+ _Out_ INT *pPriority);
+
+ END_INTERFACE
+ } IDXGIDeviceVtbl;
+
+ interface IDXGIDevice
+ {
+ CONST_VTBL struct IDXGIDeviceVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIDevice_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIDevice_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIDevice_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIDevice_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIDevice_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIDevice_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIDevice_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIDevice_GetAdapter(This,pAdapter) \
+ ( (This)->lpVtbl -> GetAdapter(This,pAdapter) )
+
+#define IDXGIDevice_CreateSurface(This,pDesc,NumSurfaces,Usage,pSharedResource,ppSurface) \
+ ( (This)->lpVtbl -> CreateSurface(This,pDesc,NumSurfaces,Usage,pSharedResource,ppSurface) )
+
+#define IDXGIDevice_QueryResourceResidency(This,ppResources,pResidencyStatus,NumResources) \
+ ( (This)->lpVtbl -> QueryResourceResidency(This,ppResources,pResidencyStatus,NumResources) )
+
+#define IDXGIDevice_SetGPUThreadPriority(This,Priority) \
+ ( (This)->lpVtbl -> SetGPUThreadPriority(This,Priority) )
+
+#define IDXGIDevice_GetGPUThreadPriority(This,pPriority) \
+ ( (This)->lpVtbl -> GetGPUThreadPriority(This,pPriority) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIDevice_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi_0000_0011 */
+/* [local] */
+
+typedef
+enum DXGI_ADAPTER_FLAG
+ {
+ DXGI_ADAPTER_FLAG_NONE = 0,
+ DXGI_ADAPTER_FLAG_REMOTE = 1,
+ DXGI_ADAPTER_FLAG_SOFTWARE = 2,
+ DXGI_ADAPTER_FLAG_FORCE_DWORD = 0xffffffff
+ } DXGI_ADAPTER_FLAG;
+
+typedef struct DXGI_ADAPTER_DESC1
+ {
+ WCHAR Description[ 128 ];
+ UINT VendorId;
+ UINT DeviceId;
+ UINT SubSysId;
+ UINT Revision;
+ SIZE_T DedicatedVideoMemory;
+ SIZE_T DedicatedSystemMemory;
+ SIZE_T SharedSystemMemory;
+ LUID AdapterLuid;
+ UINT Flags;
+ } DXGI_ADAPTER_DESC1;
+
+typedef struct DXGI_DISPLAY_COLOR_SPACE
+ {
+ FLOAT PrimaryCoordinates[ 8 ][ 2 ];
+ FLOAT WhitePoints[ 16 ][ 2 ];
+ } DXGI_DISPLAY_COLOR_SPACE;
+
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0011_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0011_v0_0_s_ifspec;
+
+#ifndef __IDXGIFactory1_INTERFACE_DEFINED__
+#define __IDXGIFactory1_INTERFACE_DEFINED__
+
+/* interface IDXGIFactory1 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIFactory1;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("770aae78-f26f-4dba-a829-253c83d1b387")
+ IDXGIFactory1 : public IDXGIFactory
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE EnumAdapters1(
+ /* [in] */ UINT Adapter,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter1 **ppAdapter) = 0;
+
+ virtual BOOL STDMETHODCALLTYPE IsCurrent( void) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIFactory1Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIFactory1 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIFactory1 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIFactory1 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIFactory1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIFactory1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIFactory1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIFactory1 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *EnumAdapters )(
+ IDXGIFactory1 * This,
+ /* [in] */ UINT Adapter,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter **ppAdapter);
+
+ HRESULT ( STDMETHODCALLTYPE *MakeWindowAssociation )(
+ IDXGIFactory1 * This,
+ HWND WindowHandle,
+ UINT Flags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetWindowAssociation )(
+ IDXGIFactory1 * This,
+ /* [annotation][out] */
+ _Out_ HWND *pWindowHandle);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSwapChain )(
+ IDXGIFactory1 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_ DXGI_SWAP_CHAIN_DESC *pDesc,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain **ppSwapChain);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSoftwareAdapter )(
+ IDXGIFactory1 * This,
+ /* [in] */ HMODULE Module,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter **ppAdapter);
+
+ HRESULT ( STDMETHODCALLTYPE *EnumAdapters1 )(
+ IDXGIFactory1 * This,
+ /* [in] */ UINT Adapter,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter1 **ppAdapter);
+
+ BOOL ( STDMETHODCALLTYPE *IsCurrent )(
+ IDXGIFactory1 * This);
+
+ END_INTERFACE
+ } IDXGIFactory1Vtbl;
+
+ interface IDXGIFactory1
+ {
+ CONST_VTBL struct IDXGIFactory1Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIFactory1_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIFactory1_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIFactory1_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIFactory1_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIFactory1_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIFactory1_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIFactory1_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIFactory1_EnumAdapters(This,Adapter,ppAdapter) \
+ ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) )
+
+#define IDXGIFactory1_MakeWindowAssociation(This,WindowHandle,Flags) \
+ ( (This)->lpVtbl -> MakeWindowAssociation(This,WindowHandle,Flags) )
+
+#define IDXGIFactory1_GetWindowAssociation(This,pWindowHandle) \
+ ( (This)->lpVtbl -> GetWindowAssociation(This,pWindowHandle) )
+
+#define IDXGIFactory1_CreateSwapChain(This,pDevice,pDesc,ppSwapChain) \
+ ( (This)->lpVtbl -> CreateSwapChain(This,pDevice,pDesc,ppSwapChain) )
+
+#define IDXGIFactory1_CreateSoftwareAdapter(This,Module,ppAdapter) \
+ ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) )
+
+
+#define IDXGIFactory1_EnumAdapters1(This,Adapter,ppAdapter) \
+ ( (This)->lpVtbl -> EnumAdapters1(This,Adapter,ppAdapter) )
+
+#define IDXGIFactory1_IsCurrent(This) \
+ ( (This)->lpVtbl -> IsCurrent(This) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIFactory1_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDXGIAdapter1_INTERFACE_DEFINED__
+#define __IDXGIAdapter1_INTERFACE_DEFINED__
+
+/* interface IDXGIAdapter1 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIAdapter1;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("29038f61-3839-4626-91fd-086879011a05")
+ IDXGIAdapter1 : public IDXGIAdapter
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetDesc1(
+ /* [annotation][out] */
+ _Out_ DXGI_ADAPTER_DESC1 *pDesc) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIAdapter1Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIAdapter1 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIAdapter1 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIAdapter1 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIAdapter1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIAdapter1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIAdapter1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIAdapter1 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *EnumOutputs )(
+ IDXGIAdapter1 * This,
+ /* [in] */ UINT Output,
+ /* [annotation][out][in] */
+ _COM_Outptr_ IDXGIOutput **ppOutput);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc )(
+ IDXGIAdapter1 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_ADAPTER_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *CheckInterfaceSupport )(
+ IDXGIAdapter1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID InterfaceName,
+ /* [annotation][out] */
+ _Out_ LARGE_INTEGER *pUMDVersion);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc1 )(
+ IDXGIAdapter1 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_ADAPTER_DESC1 *pDesc);
+
+ END_INTERFACE
+ } IDXGIAdapter1Vtbl;
+
+ interface IDXGIAdapter1
+ {
+ CONST_VTBL struct IDXGIAdapter1Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIAdapter1_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIAdapter1_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIAdapter1_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIAdapter1_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIAdapter1_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIAdapter1_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIAdapter1_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIAdapter1_EnumOutputs(This,Output,ppOutput) \
+ ( (This)->lpVtbl -> EnumOutputs(This,Output,ppOutput) )
+
+#define IDXGIAdapter1_GetDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc(This,pDesc) )
+
+#define IDXGIAdapter1_CheckInterfaceSupport(This,InterfaceName,pUMDVersion) \
+ ( (This)->lpVtbl -> CheckInterfaceSupport(This,InterfaceName,pUMDVersion) )
+
+
+#define IDXGIAdapter1_GetDesc1(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc1(This,pDesc) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIAdapter1_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDXGIDevice1_INTERFACE_DEFINED__
+#define __IDXGIDevice1_INTERFACE_DEFINED__
+
+/* interface IDXGIDevice1 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIDevice1;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("77db970f-6276-48ba-ba28-070143b4392c")
+ IDXGIDevice1 : public IDXGIDevice
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE SetMaximumFrameLatency(
+ /* [in] */ UINT MaxLatency) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetMaximumFrameLatency(
+ /* [annotation][out] */
+ _Out_ UINT *pMaxLatency) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIDevice1Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIDevice1 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIDevice1 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIDevice1 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIDevice1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIDevice1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIDevice1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIDevice1 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetAdapter )(
+ IDXGIDevice1 * This,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter **pAdapter);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSurface )(
+ IDXGIDevice1 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_SURFACE_DESC *pDesc,
+ /* [in] */ UINT NumSurfaces,
+ /* [in] */ DXGI_USAGE Usage,
+ /* [annotation][in] */
+ _In_opt_ const DXGI_SHARED_RESOURCE *pSharedResource,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISurface **ppSurface);
+
+ HRESULT ( STDMETHODCALLTYPE *QueryResourceResidency )(
+ IDXGIDevice1 * This,
+ /* [annotation][size_is][in] */
+ _In_reads_(NumResources) IUnknown *const *ppResources,
+ /* [annotation][size_is][out] */
+ _Out_writes_(NumResources) DXGI_RESIDENCY *pResidencyStatus,
+ /* [in] */ UINT NumResources);
+
+ HRESULT ( STDMETHODCALLTYPE *SetGPUThreadPriority )(
+ IDXGIDevice1 * This,
+ /* [in] */ INT Priority);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGPUThreadPriority )(
+ IDXGIDevice1 * This,
+ /* [annotation][retval][out] */
+ _Out_ INT *pPriority);
+
+ HRESULT ( STDMETHODCALLTYPE *SetMaximumFrameLatency )(
+ IDXGIDevice1 * This,
+ /* [in] */ UINT MaxLatency);
+
+ HRESULT ( STDMETHODCALLTYPE *GetMaximumFrameLatency )(
+ IDXGIDevice1 * This,
+ /* [annotation][out] */
+ _Out_ UINT *pMaxLatency);
+
+ END_INTERFACE
+ } IDXGIDevice1Vtbl;
+
+ interface IDXGIDevice1
+ {
+ CONST_VTBL struct IDXGIDevice1Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIDevice1_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIDevice1_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIDevice1_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIDevice1_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIDevice1_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIDevice1_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIDevice1_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIDevice1_GetAdapter(This,pAdapter) \
+ ( (This)->lpVtbl -> GetAdapter(This,pAdapter) )
+
+#define IDXGIDevice1_CreateSurface(This,pDesc,NumSurfaces,Usage,pSharedResource,ppSurface) \
+ ( (This)->lpVtbl -> CreateSurface(This,pDesc,NumSurfaces,Usage,pSharedResource,ppSurface) )
+
+#define IDXGIDevice1_QueryResourceResidency(This,ppResources,pResidencyStatus,NumResources) \
+ ( (This)->lpVtbl -> QueryResourceResidency(This,ppResources,pResidencyStatus,NumResources) )
+
+#define IDXGIDevice1_SetGPUThreadPriority(This,Priority) \
+ ( (This)->lpVtbl -> SetGPUThreadPriority(This,Priority) )
+
+#define IDXGIDevice1_GetGPUThreadPriority(This,pPriority) \
+ ( (This)->lpVtbl -> GetGPUThreadPriority(This,pPriority) )
+
+
+#define IDXGIDevice1_SetMaximumFrameLatency(This,MaxLatency) \
+ ( (This)->lpVtbl -> SetMaximumFrameLatency(This,MaxLatency) )
+
+#define IDXGIDevice1_GetMaximumFrameLatency(This,pMaxLatency) \
+ ( (This)->lpVtbl -> GetMaximumFrameLatency(This,pMaxLatency) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIDevice1_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi_0000_0014 */
+/* [local] */
+
+#ifdef __cplusplus
+#endif /*__cplusplus*/
+DEFINE_GUID(IID_IDXGIObject,0xaec22fb8,0x76f3,0x4639,0x9b,0xe0,0x28,0xeb,0x43,0xa6,0x7a,0x2e);
+DEFINE_GUID(IID_IDXGIDeviceSubObject,0x3d3e0379,0xf9de,0x4d58,0xbb,0x6c,0x18,0xd6,0x29,0x92,0xf1,0xa6);
+DEFINE_GUID(IID_IDXGIResource,0x035f3ab4,0x482e,0x4e50,0xb4,0x1f,0x8a,0x7f,0x8b,0xd8,0x96,0x0b);
+DEFINE_GUID(IID_IDXGIKeyedMutex,0x9d8e1289,0xd7b3,0x465f,0x81,0x26,0x25,0x0e,0x34,0x9a,0xf8,0x5d);
+DEFINE_GUID(IID_IDXGISurface,0xcafcb56c,0x6ac3,0x4889,0xbf,0x47,0x9e,0x23,0xbb,0xd2,0x60,0xec);
+DEFINE_GUID(IID_IDXGISurface1,0x4AE63092,0x6327,0x4c1b,0x80,0xAE,0xBF,0xE1,0x2E,0xA3,0x2B,0x86);
+DEFINE_GUID(IID_IDXGIAdapter,0x2411e7e1,0x12ac,0x4ccf,0xbd,0x14,0x97,0x98,0xe8,0x53,0x4d,0xc0);
+DEFINE_GUID(IID_IDXGIOutput,0xae02eedb,0xc735,0x4690,0x8d,0x52,0x5a,0x8d,0xc2,0x02,0x13,0xaa);
+DEFINE_GUID(IID_IDXGISwapChain,0x310d36a0,0xd2e7,0x4c0a,0xaa,0x04,0x6a,0x9d,0x23,0xb8,0x88,0x6a);
+DEFINE_GUID(IID_IDXGIFactory,0x7b7166ec,0x21c7,0x44ae,0xb2,0x1a,0xc9,0xae,0x32,0x1a,0xe3,0x69);
+DEFINE_GUID(IID_IDXGIDevice,0x54ec77fa,0x1377,0x44e6,0x8c,0x32,0x88,0xfd,0x5f,0x44,0xc8,0x4c);
+DEFINE_GUID(IID_IDXGIFactory1,0x770aae78,0xf26f,0x4dba,0xa8,0x29,0x25,0x3c,0x83,0xd1,0xb3,0x87);
+DEFINE_GUID(IID_IDXGIAdapter1,0x29038f61,0x3839,0x4626,0x91,0xfd,0x08,0x68,0x79,0x01,0x1a,0x05);
+DEFINE_GUID(IID_IDXGIDevice1,0x77db970f,0x6276,0x48ba,0xba,0x28,0x07,0x01,0x43,0xb4,0x39,0x2c);
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0014_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0014_v0_0_s_ifspec;
+
+/* Additional Prototypes for ALL interfaces */
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
diff --git a/external/D3D12/include/dxgi1_2.h b/external/D3D12/include/dxgi1_2.h
new file mode 100644
index 0000000..5ec8088
--- /dev/null
+++ b/external/D3D12/include/dxgi1_2.h
@@ -0,0 +1,2474 @@
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 8.01.0618 */
+/* @@MIDL_FILE_HEADING( ) */
+
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif /* __RPCNDR_H_VERSION__ */
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __dxgi1_2_h__
+#define __dxgi1_2_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */
+
+#ifndef __IDXGIDisplayControl_FWD_DEFINED__
+#define __IDXGIDisplayControl_FWD_DEFINED__
+typedef interface IDXGIDisplayControl IDXGIDisplayControl;
+
+#endif /* __IDXGIDisplayControl_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIOutputDuplication_FWD_DEFINED__
+#define __IDXGIOutputDuplication_FWD_DEFINED__
+typedef interface IDXGIOutputDuplication IDXGIOutputDuplication;
+
+#endif /* __IDXGIOutputDuplication_FWD_DEFINED__ */
+
+
+#ifndef __IDXGISurface2_FWD_DEFINED__
+#define __IDXGISurface2_FWD_DEFINED__
+typedef interface IDXGISurface2 IDXGISurface2;
+
+#endif /* __IDXGISurface2_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIResource1_FWD_DEFINED__
+#define __IDXGIResource1_FWD_DEFINED__
+typedef interface IDXGIResource1 IDXGIResource1;
+
+#endif /* __IDXGIResource1_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIDevice2_FWD_DEFINED__
+#define __IDXGIDevice2_FWD_DEFINED__
+typedef interface IDXGIDevice2 IDXGIDevice2;
+
+#endif /* __IDXGIDevice2_FWD_DEFINED__ */
+
+
+#ifndef __IDXGISwapChain1_FWD_DEFINED__
+#define __IDXGISwapChain1_FWD_DEFINED__
+typedef interface IDXGISwapChain1 IDXGISwapChain1;
+
+#endif /* __IDXGISwapChain1_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIFactory2_FWD_DEFINED__
+#define __IDXGIFactory2_FWD_DEFINED__
+typedef interface IDXGIFactory2 IDXGIFactory2;
+
+#endif /* __IDXGIFactory2_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIAdapter2_FWD_DEFINED__
+#define __IDXGIAdapter2_FWD_DEFINED__
+typedef interface IDXGIAdapter2 IDXGIAdapter2;
+
+#endif /* __IDXGIAdapter2_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIOutput1_FWD_DEFINED__
+#define __IDXGIOutput1_FWD_DEFINED__
+typedef interface IDXGIOutput1 IDXGIOutput1;
+
+#endif /* __IDXGIOutput1_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "dxgi.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+
+/* interface __MIDL_itf_dxgi1_2_0000_0000 */
+/* [local] */
+
+#include <winapifamily.h>
+#pragma region Desktop Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IDXGIDisplayControl_INTERFACE_DEFINED__
+#define __IDXGIDisplayControl_INTERFACE_DEFINED__
+
+/* interface IDXGIDisplayControl */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIDisplayControl;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("ea9dbf1a-c88e-4486-854a-98aa0138f30c")
+ IDXGIDisplayControl : public IUnknown
+ {
+ public:
+ virtual BOOL STDMETHODCALLTYPE IsStereoEnabled( void) = 0;
+
+ virtual void STDMETHODCALLTYPE SetStereoEnabled(
+ BOOL enabled) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIDisplayControlVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIDisplayControl * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIDisplayControl * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIDisplayControl * This);
+
+ BOOL ( STDMETHODCALLTYPE *IsStereoEnabled )(
+ IDXGIDisplayControl * This);
+
+ void ( STDMETHODCALLTYPE *SetStereoEnabled )(
+ IDXGIDisplayControl * This,
+ BOOL enabled);
+
+ END_INTERFACE
+ } IDXGIDisplayControlVtbl;
+
+ interface IDXGIDisplayControl
+ {
+ CONST_VTBL struct IDXGIDisplayControlVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIDisplayControl_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIDisplayControl_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIDisplayControl_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIDisplayControl_IsStereoEnabled(This) \
+ ( (This)->lpVtbl -> IsStereoEnabled(This) )
+
+#define IDXGIDisplayControl_SetStereoEnabled(This,enabled) \
+ ( (This)->lpVtbl -> SetStereoEnabled(This,enabled) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIDisplayControl_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi1_2_0000_0001 */
+/* [local] */
+
+typedef struct DXGI_OUTDUPL_MOVE_RECT
+ {
+ POINT SourcePoint;
+ RECT DestinationRect;
+ } DXGI_OUTDUPL_MOVE_RECT;
+
+typedef struct DXGI_OUTDUPL_DESC
+ {
+ DXGI_MODE_DESC ModeDesc;
+ DXGI_MODE_ROTATION Rotation;
+ BOOL DesktopImageInSystemMemory;
+ } DXGI_OUTDUPL_DESC;
+
+typedef struct DXGI_OUTDUPL_POINTER_POSITION
+ {
+ POINT Position;
+ BOOL Visible;
+ } DXGI_OUTDUPL_POINTER_POSITION;
+
+typedef
+enum DXGI_OUTDUPL_POINTER_SHAPE_TYPE
+ {
+ DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MONOCHROME = 0x1,
+ DXGI_OUTDUPL_POINTER_SHAPE_TYPE_COLOR = 0x2,
+ DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MASKED_COLOR = 0x4
+ } DXGI_OUTDUPL_POINTER_SHAPE_TYPE;
+
+typedef struct DXGI_OUTDUPL_POINTER_SHAPE_INFO
+ {
+ UINT Type;
+ UINT Width;
+ UINT Height;
+ UINT Pitch;
+ POINT HotSpot;
+ } DXGI_OUTDUPL_POINTER_SHAPE_INFO;
+
+typedef struct DXGI_OUTDUPL_FRAME_INFO
+ {
+ LARGE_INTEGER LastPresentTime;
+ LARGE_INTEGER LastMouseUpdateTime;
+ UINT AccumulatedFrames;
+ BOOL RectsCoalesced;
+ BOOL ProtectedContentMaskedOut;
+ DXGI_OUTDUPL_POINTER_POSITION PointerPosition;
+ UINT TotalMetadataBufferSize;
+ UINT PointerShapeBufferSize;
+ } DXGI_OUTDUPL_FRAME_INFO;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0001_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0001_v0_0_s_ifspec;
+
+#ifndef __IDXGIOutputDuplication_INTERFACE_DEFINED__
+#define __IDXGIOutputDuplication_INTERFACE_DEFINED__
+
+/* interface IDXGIOutputDuplication */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIOutputDuplication;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("191cfac3-a341-470d-b26e-a864f428319c")
+ IDXGIOutputDuplication : public IDXGIObject
+ {
+ public:
+ virtual void STDMETHODCALLTYPE GetDesc(
+ /* [annotation][out] */
+ _Out_ DXGI_OUTDUPL_DESC *pDesc) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE AcquireNextFrame(
+ /* [annotation][in] */
+ _In_ UINT TimeoutInMilliseconds,
+ /* [annotation][out] */
+ _Out_ DXGI_OUTDUPL_FRAME_INFO *pFrameInfo,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIResource **ppDesktopResource) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetFrameDirtyRects(
+ /* [annotation][in] */
+ _In_ UINT DirtyRectsBufferSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_to_(DirtyRectsBufferSize, *pDirtyRectsBufferSizeRequired) RECT *pDirtyRectsBuffer,
+ /* [annotation][out] */
+ _Out_ UINT *pDirtyRectsBufferSizeRequired) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetFrameMoveRects(
+ /* [annotation][in] */
+ _In_ UINT MoveRectsBufferSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_to_(MoveRectsBufferSize, *pMoveRectsBufferSizeRequired) DXGI_OUTDUPL_MOVE_RECT *pMoveRectBuffer,
+ /* [annotation][out] */
+ _Out_ UINT *pMoveRectsBufferSizeRequired) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetFramePointerShape(
+ /* [annotation][in] */
+ _In_ UINT PointerShapeBufferSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_to_(PointerShapeBufferSize, *pPointerShapeBufferSizeRequired) void *pPointerShapeBuffer,
+ /* [annotation][out] */
+ _Out_ UINT *pPointerShapeBufferSizeRequired,
+ /* [annotation][out] */
+ _Out_ DXGI_OUTDUPL_POINTER_SHAPE_INFO *pPointerShapeInfo) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE MapDesktopSurface(
+ /* [annotation][out] */
+ _Out_ DXGI_MAPPED_RECT *pLockedRect) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE UnMapDesktopSurface( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ReleaseFrame( void) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIOutputDuplicationVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIOutputDuplication * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIOutputDuplication * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIOutputDuplication * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIOutputDuplication * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIOutputDuplication * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIOutputDuplication * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIOutputDuplication * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ void ( STDMETHODCALLTYPE *GetDesc )(
+ IDXGIOutputDuplication * This,
+ /* [annotation][out] */
+ _Out_ DXGI_OUTDUPL_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *AcquireNextFrame )(
+ IDXGIOutputDuplication * This,
+ /* [annotation][in] */
+ _In_ UINT TimeoutInMilliseconds,
+ /* [annotation][out] */
+ _Out_ DXGI_OUTDUPL_FRAME_INFO *pFrameInfo,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIResource **ppDesktopResource);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFrameDirtyRects )(
+ IDXGIOutputDuplication * This,
+ /* [annotation][in] */
+ _In_ UINT DirtyRectsBufferSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_to_(DirtyRectsBufferSize, *pDirtyRectsBufferSizeRequired) RECT *pDirtyRectsBuffer,
+ /* [annotation][out] */
+ _Out_ UINT *pDirtyRectsBufferSizeRequired);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFrameMoveRects )(
+ IDXGIOutputDuplication * This,
+ /* [annotation][in] */
+ _In_ UINT MoveRectsBufferSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_to_(MoveRectsBufferSize, *pMoveRectsBufferSizeRequired) DXGI_OUTDUPL_MOVE_RECT *pMoveRectBuffer,
+ /* [annotation][out] */
+ _Out_ UINT *pMoveRectsBufferSizeRequired);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFramePointerShape )(
+ IDXGIOutputDuplication * This,
+ /* [annotation][in] */
+ _In_ UINT PointerShapeBufferSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_to_(PointerShapeBufferSize, *pPointerShapeBufferSizeRequired) void *pPointerShapeBuffer,
+ /* [annotation][out] */
+ _Out_ UINT *pPointerShapeBufferSizeRequired,
+ /* [annotation][out] */
+ _Out_ DXGI_OUTDUPL_POINTER_SHAPE_INFO *pPointerShapeInfo);
+
+ HRESULT ( STDMETHODCALLTYPE *MapDesktopSurface )(
+ IDXGIOutputDuplication * This,
+ /* [annotation][out] */
+ _Out_ DXGI_MAPPED_RECT *pLockedRect);
+
+ HRESULT ( STDMETHODCALLTYPE *UnMapDesktopSurface )(
+ IDXGIOutputDuplication * This);
+
+ HRESULT ( STDMETHODCALLTYPE *ReleaseFrame )(
+ IDXGIOutputDuplication * This);
+
+ END_INTERFACE
+ } IDXGIOutputDuplicationVtbl;
+
+ interface IDXGIOutputDuplication
+ {
+ CONST_VTBL struct IDXGIOutputDuplicationVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIOutputDuplication_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIOutputDuplication_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIOutputDuplication_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIOutputDuplication_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIOutputDuplication_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIOutputDuplication_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIOutputDuplication_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIOutputDuplication_GetDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc(This,pDesc) )
+
+#define IDXGIOutputDuplication_AcquireNextFrame(This,TimeoutInMilliseconds,pFrameInfo,ppDesktopResource) \
+ ( (This)->lpVtbl -> AcquireNextFrame(This,TimeoutInMilliseconds,pFrameInfo,ppDesktopResource) )
+
+#define IDXGIOutputDuplication_GetFrameDirtyRects(This,DirtyRectsBufferSize,pDirtyRectsBuffer,pDirtyRectsBufferSizeRequired) \
+ ( (This)->lpVtbl -> GetFrameDirtyRects(This,DirtyRectsBufferSize,pDirtyRectsBuffer,pDirtyRectsBufferSizeRequired) )
+
+#define IDXGIOutputDuplication_GetFrameMoveRects(This,MoveRectsBufferSize,pMoveRectBuffer,pMoveRectsBufferSizeRequired) \
+ ( (This)->lpVtbl -> GetFrameMoveRects(This,MoveRectsBufferSize,pMoveRectBuffer,pMoveRectsBufferSizeRequired) )
+
+#define IDXGIOutputDuplication_GetFramePointerShape(This,PointerShapeBufferSize,pPointerShapeBuffer,pPointerShapeBufferSizeRequired,pPointerShapeInfo) \
+ ( (This)->lpVtbl -> GetFramePointerShape(This,PointerShapeBufferSize,pPointerShapeBuffer,pPointerShapeBufferSizeRequired,pPointerShapeInfo) )
+
+#define IDXGIOutputDuplication_MapDesktopSurface(This,pLockedRect) \
+ ( (This)->lpVtbl -> MapDesktopSurface(This,pLockedRect) )
+
+#define IDXGIOutputDuplication_UnMapDesktopSurface(This) \
+ ( (This)->lpVtbl -> UnMapDesktopSurface(This) )
+
+#define IDXGIOutputDuplication_ReleaseFrame(This) \
+ ( (This)->lpVtbl -> ReleaseFrame(This) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIOutputDuplication_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi1_2_0000_0002 */
+/* [local] */
+
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
+#pragma endregion
+#pragma region App Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
+typedef
+enum DXGI_ALPHA_MODE
+ {
+ DXGI_ALPHA_MODE_UNSPECIFIED = 0,
+ DXGI_ALPHA_MODE_PREMULTIPLIED = 1,
+ DXGI_ALPHA_MODE_STRAIGHT = 2,
+ DXGI_ALPHA_MODE_IGNORE = 3,
+ DXGI_ALPHA_MODE_FORCE_DWORD = 0xffffffff
+ } DXGI_ALPHA_MODE;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0002_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0002_v0_0_s_ifspec;
+
+#ifndef __IDXGISurface2_INTERFACE_DEFINED__
+#define __IDXGISurface2_INTERFACE_DEFINED__
+
+/* interface IDXGISurface2 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGISurface2;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("aba496dd-b617-4cb8-a866-bc44d7eb1fa2")
+ IDXGISurface2 : public IDXGISurface1
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetResource(
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][out] */
+ _COM_Outptr_ void **ppParentResource,
+ /* [annotation][out] */
+ _Out_ UINT *pSubresourceIndex) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGISurface2Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGISurface2 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGISurface2 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGISurface2 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGISurface2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGISurface2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGISurface2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGISurface2 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDevice )(
+ IDXGISurface2 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc )(
+ IDXGISurface2 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_SURFACE_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *Map )(
+ IDXGISurface2 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_MAPPED_RECT *pLockedRect,
+ /* [in] */ UINT MapFlags);
+
+ HRESULT ( STDMETHODCALLTYPE *Unmap )(
+ IDXGISurface2 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDC )(
+ IDXGISurface2 * This,
+ /* [in] */ BOOL Discard,
+ /* [annotation][out] */
+ _Out_ HDC *phdc);
+
+ HRESULT ( STDMETHODCALLTYPE *ReleaseDC )(
+ IDXGISurface2 * This,
+ /* [annotation][in] */
+ _In_opt_ RECT *pDirtyRect);
+
+ HRESULT ( STDMETHODCALLTYPE *GetResource )(
+ IDXGISurface2 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][out] */
+ _COM_Outptr_ void **ppParentResource,
+ /* [annotation][out] */
+ _Out_ UINT *pSubresourceIndex);
+
+ END_INTERFACE
+ } IDXGISurface2Vtbl;
+
+ interface IDXGISurface2
+ {
+ CONST_VTBL struct IDXGISurface2Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGISurface2_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGISurface2_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGISurface2_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGISurface2_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGISurface2_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGISurface2_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGISurface2_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGISurface2_GetDevice(This,riid,ppDevice) \
+ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) )
+
+
+#define IDXGISurface2_GetDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc(This,pDesc) )
+
+#define IDXGISurface2_Map(This,pLockedRect,MapFlags) \
+ ( (This)->lpVtbl -> Map(This,pLockedRect,MapFlags) )
+
+#define IDXGISurface2_Unmap(This) \
+ ( (This)->lpVtbl -> Unmap(This) )
+
+
+#define IDXGISurface2_GetDC(This,Discard,phdc) \
+ ( (This)->lpVtbl -> GetDC(This,Discard,phdc) )
+
+#define IDXGISurface2_ReleaseDC(This,pDirtyRect) \
+ ( (This)->lpVtbl -> ReleaseDC(This,pDirtyRect) )
+
+
+#define IDXGISurface2_GetResource(This,riid,ppParentResource,pSubresourceIndex) \
+ ( (This)->lpVtbl -> GetResource(This,riid,ppParentResource,pSubresourceIndex) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGISurface2_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDXGIResource1_INTERFACE_DEFINED__
+#define __IDXGIResource1_INTERFACE_DEFINED__
+
+/* interface IDXGIResource1 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIResource1;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("30961379-4609-4a41-998e-54fe567ee0c1")
+ IDXGIResource1 : public IDXGIResource
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE CreateSubresourceSurface(
+ UINT index,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISurface2 **ppSurface) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateSharedHandle(
+ /* [annotation][in] */
+ _In_opt_ const SECURITY_ATTRIBUTES *pAttributes,
+ /* [annotation][in] */
+ _In_ DWORD dwAccess,
+ /* [annotation][in] */
+ _In_opt_ LPCWSTR lpName,
+ /* [annotation][out] */
+ _Out_ HANDLE *pHandle) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIResource1Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIResource1 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIResource1 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIResource1 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIResource1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIResource1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIResource1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIResource1 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDevice )(
+ IDXGIResource1 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSharedHandle )(
+ IDXGIResource1 * This,
+ /* [annotation][out] */
+ _Out_ HANDLE *pSharedHandle);
+
+ HRESULT ( STDMETHODCALLTYPE *GetUsage )(
+ IDXGIResource1 * This,
+ /* [out] */ DXGI_USAGE *pUsage);
+
+ HRESULT ( STDMETHODCALLTYPE *SetEvictionPriority )(
+ IDXGIResource1 * This,
+ /* [in] */ UINT EvictionPriority);
+
+ HRESULT ( STDMETHODCALLTYPE *GetEvictionPriority )(
+ IDXGIResource1 * This,
+ /* [annotation][retval][out] */
+ _Out_ UINT *pEvictionPriority);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSubresourceSurface )(
+ IDXGIResource1 * This,
+ UINT index,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISurface2 **ppSurface);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSharedHandle )(
+ IDXGIResource1 * This,
+ /* [annotation][in] */
+ _In_opt_ const SECURITY_ATTRIBUTES *pAttributes,
+ /* [annotation][in] */
+ _In_ DWORD dwAccess,
+ /* [annotation][in] */
+ _In_opt_ LPCWSTR lpName,
+ /* [annotation][out] */
+ _Out_ HANDLE *pHandle);
+
+ END_INTERFACE
+ } IDXGIResource1Vtbl;
+
+ interface IDXGIResource1
+ {
+ CONST_VTBL struct IDXGIResource1Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIResource1_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIResource1_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIResource1_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIResource1_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIResource1_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIResource1_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIResource1_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIResource1_GetDevice(This,riid,ppDevice) \
+ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) )
+
+
+#define IDXGIResource1_GetSharedHandle(This,pSharedHandle) \
+ ( (This)->lpVtbl -> GetSharedHandle(This,pSharedHandle) )
+
+#define IDXGIResource1_GetUsage(This,pUsage) \
+ ( (This)->lpVtbl -> GetUsage(This,pUsage) )
+
+#define IDXGIResource1_SetEvictionPriority(This,EvictionPriority) \
+ ( (This)->lpVtbl -> SetEvictionPriority(This,EvictionPriority) )
+
+#define IDXGIResource1_GetEvictionPriority(This,pEvictionPriority) \
+ ( (This)->lpVtbl -> GetEvictionPriority(This,pEvictionPriority) )
+
+
+#define IDXGIResource1_CreateSubresourceSurface(This,index,ppSurface) \
+ ( (This)->lpVtbl -> CreateSubresourceSurface(This,index,ppSurface) )
+
+#define IDXGIResource1_CreateSharedHandle(This,pAttributes,dwAccess,lpName,pHandle) \
+ ( (This)->lpVtbl -> CreateSharedHandle(This,pAttributes,dwAccess,lpName,pHandle) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIResource1_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi1_2_0000_0004 */
+/* [local] */
+
+typedef
+enum _DXGI_OFFER_RESOURCE_PRIORITY
+ {
+ DXGI_OFFER_RESOURCE_PRIORITY_LOW = 1,
+ DXGI_OFFER_RESOURCE_PRIORITY_NORMAL = ( DXGI_OFFER_RESOURCE_PRIORITY_LOW + 1 ) ,
+ DXGI_OFFER_RESOURCE_PRIORITY_HIGH = ( DXGI_OFFER_RESOURCE_PRIORITY_NORMAL + 1 )
+ } DXGI_OFFER_RESOURCE_PRIORITY;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0004_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0004_v0_0_s_ifspec;
+
+#ifndef __IDXGIDevice2_INTERFACE_DEFINED__
+#define __IDXGIDevice2_INTERFACE_DEFINED__
+
+/* interface IDXGIDevice2 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIDevice2;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("05008617-fbfd-4051-a790-144884b4f6a9")
+ IDXGIDevice2 : public IDXGIDevice1
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE OfferResources(
+ /* [annotation][in] */
+ _In_ UINT NumResources,
+ /* [annotation][size_is][in] */
+ _In_reads_(NumResources) IDXGIResource *const *ppResources,
+ /* [annotation][in] */
+ _In_ DXGI_OFFER_RESOURCE_PRIORITY Priority) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ReclaimResources(
+ /* [annotation][in] */
+ _In_ UINT NumResources,
+ /* [annotation][size_is][in] */
+ _In_reads_(NumResources) IDXGIResource *const *ppResources,
+ /* [annotation][size_is][out] */
+ _Out_writes_all_opt_(NumResources) BOOL *pDiscarded) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE EnqueueSetEvent(
+ /* [annotation][in] */
+ _In_ HANDLE hEvent) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIDevice2Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIDevice2 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIDevice2 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIDevice2 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIDevice2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIDevice2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIDevice2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIDevice2 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetAdapter )(
+ IDXGIDevice2 * This,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter **pAdapter);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSurface )(
+ IDXGIDevice2 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_SURFACE_DESC *pDesc,
+ /* [in] */ UINT NumSurfaces,
+ /* [in] */ DXGI_USAGE Usage,
+ /* [annotation][in] */
+ _In_opt_ const DXGI_SHARED_RESOURCE *pSharedResource,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISurface **ppSurface);
+
+ HRESULT ( STDMETHODCALLTYPE *QueryResourceResidency )(
+ IDXGIDevice2 * This,
+ /* [annotation][size_is][in] */
+ _In_reads_(NumResources) IUnknown *const *ppResources,
+ /* [annotation][size_is][out] */
+ _Out_writes_(NumResources) DXGI_RESIDENCY *pResidencyStatus,
+ /* [in] */ UINT NumResources);
+
+ HRESULT ( STDMETHODCALLTYPE *SetGPUThreadPriority )(
+ IDXGIDevice2 * This,
+ /* [in] */ INT Priority);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGPUThreadPriority )(
+ IDXGIDevice2 * This,
+ /* [annotation][retval][out] */
+ _Out_ INT *pPriority);
+
+ HRESULT ( STDMETHODCALLTYPE *SetMaximumFrameLatency )(
+ IDXGIDevice2 * This,
+ /* [in] */ UINT MaxLatency);
+
+ HRESULT ( STDMETHODCALLTYPE *GetMaximumFrameLatency )(
+ IDXGIDevice2 * This,
+ /* [annotation][out] */
+ _Out_ UINT *pMaxLatency);
+
+ HRESULT ( STDMETHODCALLTYPE *OfferResources )(
+ IDXGIDevice2 * This,
+ /* [annotation][in] */
+ _In_ UINT NumResources,
+ /* [annotation][size_is][in] */
+ _In_reads_(NumResources) IDXGIResource *const *ppResources,
+ /* [annotation][in] */
+ _In_ DXGI_OFFER_RESOURCE_PRIORITY Priority);
+
+ HRESULT ( STDMETHODCALLTYPE *ReclaimResources )(
+ IDXGIDevice2 * This,
+ /* [annotation][in] */
+ _In_ UINT NumResources,
+ /* [annotation][size_is][in] */
+ _In_reads_(NumResources) IDXGIResource *const *ppResources,
+ /* [annotation][size_is][out] */
+ _Out_writes_all_opt_(NumResources) BOOL *pDiscarded);
+
+ HRESULT ( STDMETHODCALLTYPE *EnqueueSetEvent )(
+ IDXGIDevice2 * This,
+ /* [annotation][in] */
+ _In_ HANDLE hEvent);
+
+ END_INTERFACE
+ } IDXGIDevice2Vtbl;
+
+ interface IDXGIDevice2
+ {
+ CONST_VTBL struct IDXGIDevice2Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIDevice2_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIDevice2_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIDevice2_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIDevice2_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIDevice2_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIDevice2_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIDevice2_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIDevice2_GetAdapter(This,pAdapter) \
+ ( (This)->lpVtbl -> GetAdapter(This,pAdapter) )
+
+#define IDXGIDevice2_CreateSurface(This,pDesc,NumSurfaces,Usage,pSharedResource,ppSurface) \
+ ( (This)->lpVtbl -> CreateSurface(This,pDesc,NumSurfaces,Usage,pSharedResource,ppSurface) )
+
+#define IDXGIDevice2_QueryResourceResidency(This,ppResources,pResidencyStatus,NumResources) \
+ ( (This)->lpVtbl -> QueryResourceResidency(This,ppResources,pResidencyStatus,NumResources) )
+
+#define IDXGIDevice2_SetGPUThreadPriority(This,Priority) \
+ ( (This)->lpVtbl -> SetGPUThreadPriority(This,Priority) )
+
+#define IDXGIDevice2_GetGPUThreadPriority(This,pPriority) \
+ ( (This)->lpVtbl -> GetGPUThreadPriority(This,pPriority) )
+
+
+#define IDXGIDevice2_SetMaximumFrameLatency(This,MaxLatency) \
+ ( (This)->lpVtbl -> SetMaximumFrameLatency(This,MaxLatency) )
+
+#define IDXGIDevice2_GetMaximumFrameLatency(This,pMaxLatency) \
+ ( (This)->lpVtbl -> GetMaximumFrameLatency(This,pMaxLatency) )
+
+
+#define IDXGIDevice2_OfferResources(This,NumResources,ppResources,Priority) \
+ ( (This)->lpVtbl -> OfferResources(This,NumResources,ppResources,Priority) )
+
+#define IDXGIDevice2_ReclaimResources(This,NumResources,ppResources,pDiscarded) \
+ ( (This)->lpVtbl -> ReclaimResources(This,NumResources,ppResources,pDiscarded) )
+
+#define IDXGIDevice2_EnqueueSetEvent(This,hEvent) \
+ ( (This)->lpVtbl -> EnqueueSetEvent(This,hEvent) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIDevice2_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi1_2_0000_0005 */
+/* [local] */
+
+#define DXGI_ENUM_MODES_STEREO ( 4UL )
+
+#define DXGI_ENUM_MODES_DISABLED_STEREO ( 8UL )
+
+#define DXGI_SHARED_RESOURCE_READ ( 0x80000000L )
+
+#define DXGI_SHARED_RESOURCE_WRITE ( 1 )
+
+typedef struct DXGI_MODE_DESC1
+ {
+ UINT Width;
+ UINT Height;
+ DXGI_RATIONAL RefreshRate;
+ DXGI_FORMAT Format;
+ DXGI_MODE_SCANLINE_ORDER ScanlineOrdering;
+ DXGI_MODE_SCALING Scaling;
+ BOOL Stereo;
+ } DXGI_MODE_DESC1;
+
+typedef
+enum DXGI_SCALING
+ {
+ DXGI_SCALING_STRETCH = 0,
+ DXGI_SCALING_NONE = 1,
+ DXGI_SCALING_ASPECT_RATIO_STRETCH = 2
+ } DXGI_SCALING;
+
+typedef struct DXGI_SWAP_CHAIN_DESC1
+ {
+ UINT Width;
+ UINT Height;
+ DXGI_FORMAT Format;
+ BOOL Stereo;
+ DXGI_SAMPLE_DESC SampleDesc;
+ DXGI_USAGE BufferUsage;
+ UINT BufferCount;
+ DXGI_SCALING Scaling;
+ DXGI_SWAP_EFFECT SwapEffect;
+ DXGI_ALPHA_MODE AlphaMode;
+ UINT Flags;
+ } DXGI_SWAP_CHAIN_DESC1;
+
+typedef struct DXGI_SWAP_CHAIN_FULLSCREEN_DESC
+ {
+ DXGI_RATIONAL RefreshRate;
+ DXGI_MODE_SCANLINE_ORDER ScanlineOrdering;
+ DXGI_MODE_SCALING Scaling;
+ BOOL Windowed;
+ } DXGI_SWAP_CHAIN_FULLSCREEN_DESC;
+
+typedef struct DXGI_PRESENT_PARAMETERS
+ {
+ UINT DirtyRectsCount;
+ RECT *pDirtyRects;
+ RECT *pScrollRect;
+ POINT *pScrollOffset;
+ } DXGI_PRESENT_PARAMETERS;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0005_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0005_v0_0_s_ifspec;
+
+#ifndef __IDXGISwapChain1_INTERFACE_DEFINED__
+#define __IDXGISwapChain1_INTERFACE_DEFINED__
+
+/* interface IDXGISwapChain1 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGISwapChain1;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("790a45f7-0d42-4876-983a-0a55cfe6f4aa")
+ IDXGISwapChain1 : public IDXGISwapChain
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetDesc1(
+ /* [annotation][out] */
+ _Out_ DXGI_SWAP_CHAIN_DESC1 *pDesc) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetFullscreenDesc(
+ /* [annotation][out] */
+ _Out_ DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pDesc) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetHwnd(
+ /* [annotation][out] */
+ _Out_ HWND *pHwnd) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetCoreWindow(
+ /* [annotation][in] */
+ _In_ REFIID refiid,
+ /* [annotation][out] */
+ _COM_Outptr_ void **ppUnk) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Present1(
+ /* [in] */ UINT SyncInterval,
+ /* [in] */ UINT PresentFlags,
+ /* [annotation][in] */
+ _In_ const DXGI_PRESENT_PARAMETERS *pPresentParameters) = 0;
+
+ virtual BOOL STDMETHODCALLTYPE IsTemporaryMonoSupported( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetRestrictToOutput(
+ /* [annotation][out] */
+ _Out_ IDXGIOutput **ppRestrictToOutput) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetBackgroundColor(
+ /* [annotation][in] */
+ _In_ const DXGI_RGBA *pColor) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetBackgroundColor(
+ /* [annotation][out] */
+ _Out_ DXGI_RGBA *pColor) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetRotation(
+ /* [annotation][in] */
+ _In_ DXGI_MODE_ROTATION Rotation) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetRotation(
+ /* [annotation][out] */
+ _Out_ DXGI_MODE_ROTATION *pRotation) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGISwapChain1Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGISwapChain1 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGISwapChain1 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGISwapChain1 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGISwapChain1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGISwapChain1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGISwapChain1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGISwapChain1 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDevice )(
+ IDXGISwapChain1 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *Present )(
+ IDXGISwapChain1 * This,
+ /* [in] */ UINT SyncInterval,
+ /* [in] */ UINT Flags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetBuffer )(
+ IDXGISwapChain1 * This,
+ /* [in] */ UINT Buffer,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][out][in] */
+ _COM_Outptr_ void **ppSurface);
+
+ HRESULT ( STDMETHODCALLTYPE *SetFullscreenState )(
+ IDXGISwapChain1 * This,
+ /* [in] */ BOOL Fullscreen,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pTarget);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFullscreenState )(
+ IDXGISwapChain1 * This,
+ /* [annotation][out] */
+ _Out_opt_ BOOL *pFullscreen,
+ /* [annotation][out] */
+ _COM_Outptr_opt_result_maybenull_ IDXGIOutput **ppTarget);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc )(
+ IDXGISwapChain1 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_SWAP_CHAIN_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *ResizeBuffers )(
+ IDXGISwapChain1 * This,
+ /* [in] */ UINT BufferCount,
+ /* [in] */ UINT Width,
+ /* [in] */ UINT Height,
+ /* [in] */ DXGI_FORMAT NewFormat,
+ /* [in] */ UINT SwapChainFlags);
+
+ HRESULT ( STDMETHODCALLTYPE *ResizeTarget )(
+ IDXGISwapChain1 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_MODE_DESC *pNewTargetParameters);
+
+ HRESULT ( STDMETHODCALLTYPE *GetContainingOutput )(
+ IDXGISwapChain1 * This,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIOutput **ppOutput);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )(
+ IDXGISwapChain1 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_FRAME_STATISTICS *pStats);
+
+ HRESULT ( STDMETHODCALLTYPE *GetLastPresentCount )(
+ IDXGISwapChain1 * This,
+ /* [annotation][out] */
+ _Out_ UINT *pLastPresentCount);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc1 )(
+ IDXGISwapChain1 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_SWAP_CHAIN_DESC1 *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFullscreenDesc )(
+ IDXGISwapChain1 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *GetHwnd )(
+ IDXGISwapChain1 * This,
+ /* [annotation][out] */
+ _Out_ HWND *pHwnd);
+
+ HRESULT ( STDMETHODCALLTYPE *GetCoreWindow )(
+ IDXGISwapChain1 * This,
+ /* [annotation][in] */
+ _In_ REFIID refiid,
+ /* [annotation][out] */
+ _COM_Outptr_ void **ppUnk);
+
+ HRESULT ( STDMETHODCALLTYPE *Present1 )(
+ IDXGISwapChain1 * This,
+ /* [in] */ UINT SyncInterval,
+ /* [in] */ UINT PresentFlags,
+ /* [annotation][in] */
+ _In_ const DXGI_PRESENT_PARAMETERS *pPresentParameters);
+
+ BOOL ( STDMETHODCALLTYPE *IsTemporaryMonoSupported )(
+ IDXGISwapChain1 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetRestrictToOutput )(
+ IDXGISwapChain1 * This,
+ /* [annotation][out] */
+ _Out_ IDXGIOutput **ppRestrictToOutput);
+
+ HRESULT ( STDMETHODCALLTYPE *SetBackgroundColor )(
+ IDXGISwapChain1 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_RGBA *pColor);
+
+ HRESULT ( STDMETHODCALLTYPE *GetBackgroundColor )(
+ IDXGISwapChain1 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_RGBA *pColor);
+
+ HRESULT ( STDMETHODCALLTYPE *SetRotation )(
+ IDXGISwapChain1 * This,
+ /* [annotation][in] */
+ _In_ DXGI_MODE_ROTATION Rotation);
+
+ HRESULT ( STDMETHODCALLTYPE *GetRotation )(
+ IDXGISwapChain1 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_MODE_ROTATION *pRotation);
+
+ END_INTERFACE
+ } IDXGISwapChain1Vtbl;
+
+ interface IDXGISwapChain1
+ {
+ CONST_VTBL struct IDXGISwapChain1Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGISwapChain1_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGISwapChain1_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGISwapChain1_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGISwapChain1_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGISwapChain1_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGISwapChain1_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGISwapChain1_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGISwapChain1_GetDevice(This,riid,ppDevice) \
+ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) )
+
+
+#define IDXGISwapChain1_Present(This,SyncInterval,Flags) \
+ ( (This)->lpVtbl -> Present(This,SyncInterval,Flags) )
+
+#define IDXGISwapChain1_GetBuffer(This,Buffer,riid,ppSurface) \
+ ( (This)->lpVtbl -> GetBuffer(This,Buffer,riid,ppSurface) )
+
+#define IDXGISwapChain1_SetFullscreenState(This,Fullscreen,pTarget) \
+ ( (This)->lpVtbl -> SetFullscreenState(This,Fullscreen,pTarget) )
+
+#define IDXGISwapChain1_GetFullscreenState(This,pFullscreen,ppTarget) \
+ ( (This)->lpVtbl -> GetFullscreenState(This,pFullscreen,ppTarget) )
+
+#define IDXGISwapChain1_GetDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc(This,pDesc) )
+
+#define IDXGISwapChain1_ResizeBuffers(This,BufferCount,Width,Height,NewFormat,SwapChainFlags) \
+ ( (This)->lpVtbl -> ResizeBuffers(This,BufferCount,Width,Height,NewFormat,SwapChainFlags) )
+
+#define IDXGISwapChain1_ResizeTarget(This,pNewTargetParameters) \
+ ( (This)->lpVtbl -> ResizeTarget(This,pNewTargetParameters) )
+
+#define IDXGISwapChain1_GetContainingOutput(This,ppOutput) \
+ ( (This)->lpVtbl -> GetContainingOutput(This,ppOutput) )
+
+#define IDXGISwapChain1_GetFrameStatistics(This,pStats) \
+ ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) )
+
+#define IDXGISwapChain1_GetLastPresentCount(This,pLastPresentCount) \
+ ( (This)->lpVtbl -> GetLastPresentCount(This,pLastPresentCount) )
+
+
+#define IDXGISwapChain1_GetDesc1(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc1(This,pDesc) )
+
+#define IDXGISwapChain1_GetFullscreenDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetFullscreenDesc(This,pDesc) )
+
+#define IDXGISwapChain1_GetHwnd(This,pHwnd) \
+ ( (This)->lpVtbl -> GetHwnd(This,pHwnd) )
+
+#define IDXGISwapChain1_GetCoreWindow(This,refiid,ppUnk) \
+ ( (This)->lpVtbl -> GetCoreWindow(This,refiid,ppUnk) )
+
+#define IDXGISwapChain1_Present1(This,SyncInterval,PresentFlags,pPresentParameters) \
+ ( (This)->lpVtbl -> Present1(This,SyncInterval,PresentFlags,pPresentParameters) )
+
+#define IDXGISwapChain1_IsTemporaryMonoSupported(This) \
+ ( (This)->lpVtbl -> IsTemporaryMonoSupported(This) )
+
+#define IDXGISwapChain1_GetRestrictToOutput(This,ppRestrictToOutput) \
+ ( (This)->lpVtbl -> GetRestrictToOutput(This,ppRestrictToOutput) )
+
+#define IDXGISwapChain1_SetBackgroundColor(This,pColor) \
+ ( (This)->lpVtbl -> SetBackgroundColor(This,pColor) )
+
+#define IDXGISwapChain1_GetBackgroundColor(This,pColor) \
+ ( (This)->lpVtbl -> GetBackgroundColor(This,pColor) )
+
+#define IDXGISwapChain1_SetRotation(This,Rotation) \
+ ( (This)->lpVtbl -> SetRotation(This,Rotation) )
+
+#define IDXGISwapChain1_GetRotation(This,pRotation) \
+ ( (This)->lpVtbl -> GetRotation(This,pRotation) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGISwapChain1_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDXGIFactory2_INTERFACE_DEFINED__
+#define __IDXGIFactory2_INTERFACE_DEFINED__
+
+/* interface IDXGIFactory2 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIFactory2;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("50c83a1c-e072-4c48-87b0-3630fa36a6d0")
+ IDXGIFactory2 : public IDXGIFactory1
+ {
+ public:
+ virtual BOOL STDMETHODCALLTYPE IsWindowedStereoEnabled( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateSwapChainForHwnd(
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_ HWND hWnd,
+ /* [annotation][in] */
+ _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+ /* [annotation][in] */
+ _In_opt_ const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pRestrictToOutput,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain1 **ppSwapChain) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateSwapChainForCoreWindow(
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_ IUnknown *pWindow,
+ /* [annotation][in] */
+ _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pRestrictToOutput,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain1 **ppSwapChain) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetSharedResourceAdapterLuid(
+ /* [annotation] */
+ _In_ HANDLE hResource,
+ /* [annotation] */
+ _Out_ LUID *pLuid) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE RegisterStereoStatusWindow(
+ /* [annotation][in] */
+ _In_ HWND WindowHandle,
+ /* [annotation][in] */
+ _In_ UINT wMsg,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE RegisterStereoStatusEvent(
+ /* [annotation][in] */
+ _In_ HANDLE hEvent,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie) = 0;
+
+ virtual void STDMETHODCALLTYPE UnregisterStereoStatus(
+ /* [annotation][in] */
+ _In_ DWORD dwCookie) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE RegisterOcclusionStatusWindow(
+ /* [annotation][in] */
+ _In_ HWND WindowHandle,
+ /* [annotation][in] */
+ _In_ UINT wMsg,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE RegisterOcclusionStatusEvent(
+ /* [annotation][in] */
+ _In_ HANDLE hEvent,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie) = 0;
+
+ virtual void STDMETHODCALLTYPE UnregisterOcclusionStatus(
+ /* [annotation][in] */
+ _In_ DWORD dwCookie) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateSwapChainForComposition(
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pRestrictToOutput,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain1 **ppSwapChain) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIFactory2Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIFactory2 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIFactory2 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIFactory2 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIFactory2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIFactory2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIFactory2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIFactory2 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *EnumAdapters )(
+ IDXGIFactory2 * This,
+ /* [in] */ UINT Adapter,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter **ppAdapter);
+
+ HRESULT ( STDMETHODCALLTYPE *MakeWindowAssociation )(
+ IDXGIFactory2 * This,
+ HWND WindowHandle,
+ UINT Flags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetWindowAssociation )(
+ IDXGIFactory2 * This,
+ /* [annotation][out] */
+ _Out_ HWND *pWindowHandle);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSwapChain )(
+ IDXGIFactory2 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_ DXGI_SWAP_CHAIN_DESC *pDesc,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain **ppSwapChain);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSoftwareAdapter )(
+ IDXGIFactory2 * This,
+ /* [in] */ HMODULE Module,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter **ppAdapter);
+
+ HRESULT ( STDMETHODCALLTYPE *EnumAdapters1 )(
+ IDXGIFactory2 * This,
+ /* [in] */ UINT Adapter,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter1 **ppAdapter);
+
+ BOOL ( STDMETHODCALLTYPE *IsCurrent )(
+ IDXGIFactory2 * This);
+
+ BOOL ( STDMETHODCALLTYPE *IsWindowedStereoEnabled )(
+ IDXGIFactory2 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForHwnd )(
+ IDXGIFactory2 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_ HWND hWnd,
+ /* [annotation][in] */
+ _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+ /* [annotation][in] */
+ _In_opt_ const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pRestrictToOutput,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain1 **ppSwapChain);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForCoreWindow )(
+ IDXGIFactory2 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_ IUnknown *pWindow,
+ /* [annotation][in] */
+ _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pRestrictToOutput,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain1 **ppSwapChain);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSharedResourceAdapterLuid )(
+ IDXGIFactory2 * This,
+ /* [annotation] */
+ _In_ HANDLE hResource,
+ /* [annotation] */
+ _Out_ LUID *pLuid);
+
+ HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusWindow )(
+ IDXGIFactory2 * This,
+ /* [annotation][in] */
+ _In_ HWND WindowHandle,
+ /* [annotation][in] */
+ _In_ UINT wMsg,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie);
+
+ HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusEvent )(
+ IDXGIFactory2 * This,
+ /* [annotation][in] */
+ _In_ HANDLE hEvent,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie);
+
+ void ( STDMETHODCALLTYPE *UnregisterStereoStatus )(
+ IDXGIFactory2 * This,
+ /* [annotation][in] */
+ _In_ DWORD dwCookie);
+
+ HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusWindow )(
+ IDXGIFactory2 * This,
+ /* [annotation][in] */
+ _In_ HWND WindowHandle,
+ /* [annotation][in] */
+ _In_ UINT wMsg,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie);
+
+ HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusEvent )(
+ IDXGIFactory2 * This,
+ /* [annotation][in] */
+ _In_ HANDLE hEvent,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie);
+
+ void ( STDMETHODCALLTYPE *UnregisterOcclusionStatus )(
+ IDXGIFactory2 * This,
+ /* [annotation][in] */
+ _In_ DWORD dwCookie);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForComposition )(
+ IDXGIFactory2 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pRestrictToOutput,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain1 **ppSwapChain);
+
+ END_INTERFACE
+ } IDXGIFactory2Vtbl;
+
+ interface IDXGIFactory2
+ {
+ CONST_VTBL struct IDXGIFactory2Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIFactory2_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIFactory2_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIFactory2_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIFactory2_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIFactory2_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIFactory2_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIFactory2_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIFactory2_EnumAdapters(This,Adapter,ppAdapter) \
+ ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) )
+
+#define IDXGIFactory2_MakeWindowAssociation(This,WindowHandle,Flags) \
+ ( (This)->lpVtbl -> MakeWindowAssociation(This,WindowHandle,Flags) )
+
+#define IDXGIFactory2_GetWindowAssociation(This,pWindowHandle) \
+ ( (This)->lpVtbl -> GetWindowAssociation(This,pWindowHandle) )
+
+#define IDXGIFactory2_CreateSwapChain(This,pDevice,pDesc,ppSwapChain) \
+ ( (This)->lpVtbl -> CreateSwapChain(This,pDevice,pDesc,ppSwapChain) )
+
+#define IDXGIFactory2_CreateSoftwareAdapter(This,Module,ppAdapter) \
+ ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) )
+
+
+#define IDXGIFactory2_EnumAdapters1(This,Adapter,ppAdapter) \
+ ( (This)->lpVtbl -> EnumAdapters1(This,Adapter,ppAdapter) )
+
+#define IDXGIFactory2_IsCurrent(This) \
+ ( (This)->lpVtbl -> IsCurrent(This) )
+
+
+#define IDXGIFactory2_IsWindowedStereoEnabled(This) \
+ ( (This)->lpVtbl -> IsWindowedStereoEnabled(This) )
+
+#define IDXGIFactory2_CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) \
+ ( (This)->lpVtbl -> CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) )
+
+#define IDXGIFactory2_CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) \
+ ( (This)->lpVtbl -> CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) )
+
+#define IDXGIFactory2_GetSharedResourceAdapterLuid(This,hResource,pLuid) \
+ ( (This)->lpVtbl -> GetSharedResourceAdapterLuid(This,hResource,pLuid) )
+
+#define IDXGIFactory2_RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) \
+ ( (This)->lpVtbl -> RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) )
+
+#define IDXGIFactory2_RegisterStereoStatusEvent(This,hEvent,pdwCookie) \
+ ( (This)->lpVtbl -> RegisterStereoStatusEvent(This,hEvent,pdwCookie) )
+
+#define IDXGIFactory2_UnregisterStereoStatus(This,dwCookie) \
+ ( (This)->lpVtbl -> UnregisterStereoStatus(This,dwCookie) )
+
+#define IDXGIFactory2_RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) \
+ ( (This)->lpVtbl -> RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) )
+
+#define IDXGIFactory2_RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) \
+ ( (This)->lpVtbl -> RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) )
+
+#define IDXGIFactory2_UnregisterOcclusionStatus(This,dwCookie) \
+ ( (This)->lpVtbl -> UnregisterOcclusionStatus(This,dwCookie) )
+
+#define IDXGIFactory2_CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) \
+ ( (This)->lpVtbl -> CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIFactory2_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi1_2_0000_0007 */
+/* [local] */
+
+typedef
+enum DXGI_GRAPHICS_PREEMPTION_GRANULARITY
+ {
+ DXGI_GRAPHICS_PREEMPTION_DMA_BUFFER_BOUNDARY = 0,
+ DXGI_GRAPHICS_PREEMPTION_PRIMITIVE_BOUNDARY = 1,
+ DXGI_GRAPHICS_PREEMPTION_TRIANGLE_BOUNDARY = 2,
+ DXGI_GRAPHICS_PREEMPTION_PIXEL_BOUNDARY = 3,
+ DXGI_GRAPHICS_PREEMPTION_INSTRUCTION_BOUNDARY = 4
+ } DXGI_GRAPHICS_PREEMPTION_GRANULARITY;
+
+typedef
+enum DXGI_COMPUTE_PREEMPTION_GRANULARITY
+ {
+ DXGI_COMPUTE_PREEMPTION_DMA_BUFFER_BOUNDARY = 0,
+ DXGI_COMPUTE_PREEMPTION_DISPATCH_BOUNDARY = 1,
+ DXGI_COMPUTE_PREEMPTION_THREAD_GROUP_BOUNDARY = 2,
+ DXGI_COMPUTE_PREEMPTION_THREAD_BOUNDARY = 3,
+ DXGI_COMPUTE_PREEMPTION_INSTRUCTION_BOUNDARY = 4
+ } DXGI_COMPUTE_PREEMPTION_GRANULARITY;
+
+typedef struct DXGI_ADAPTER_DESC2
+ {
+ WCHAR Description[ 128 ];
+ UINT VendorId;
+ UINT DeviceId;
+ UINT SubSysId;
+ UINT Revision;
+ SIZE_T DedicatedVideoMemory;
+ SIZE_T DedicatedSystemMemory;
+ SIZE_T SharedSystemMemory;
+ LUID AdapterLuid;
+ UINT Flags;
+ DXGI_GRAPHICS_PREEMPTION_GRANULARITY GraphicsPreemptionGranularity;
+ DXGI_COMPUTE_PREEMPTION_GRANULARITY ComputePreemptionGranularity;
+ } DXGI_ADAPTER_DESC2;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0007_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0007_v0_0_s_ifspec;
+
+#ifndef __IDXGIAdapter2_INTERFACE_DEFINED__
+#define __IDXGIAdapter2_INTERFACE_DEFINED__
+
+/* interface IDXGIAdapter2 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIAdapter2;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("0AA1AE0A-FA0E-4B84-8644-E05FF8E5ACB5")
+ IDXGIAdapter2 : public IDXGIAdapter1
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetDesc2(
+ /* [annotation][out] */
+ _Out_ DXGI_ADAPTER_DESC2 *pDesc) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIAdapter2Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIAdapter2 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIAdapter2 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIAdapter2 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIAdapter2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIAdapter2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIAdapter2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIAdapter2 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *EnumOutputs )(
+ IDXGIAdapter2 * This,
+ /* [in] */ UINT Output,
+ /* [annotation][out][in] */
+ _COM_Outptr_ IDXGIOutput **ppOutput);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc )(
+ IDXGIAdapter2 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_ADAPTER_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *CheckInterfaceSupport )(
+ IDXGIAdapter2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID InterfaceName,
+ /* [annotation][out] */
+ _Out_ LARGE_INTEGER *pUMDVersion);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc1 )(
+ IDXGIAdapter2 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_ADAPTER_DESC1 *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc2 )(
+ IDXGIAdapter2 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_ADAPTER_DESC2 *pDesc);
+
+ END_INTERFACE
+ } IDXGIAdapter2Vtbl;
+
+ interface IDXGIAdapter2
+ {
+ CONST_VTBL struct IDXGIAdapter2Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIAdapter2_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIAdapter2_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIAdapter2_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIAdapter2_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIAdapter2_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIAdapter2_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIAdapter2_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIAdapter2_EnumOutputs(This,Output,ppOutput) \
+ ( (This)->lpVtbl -> EnumOutputs(This,Output,ppOutput) )
+
+#define IDXGIAdapter2_GetDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc(This,pDesc) )
+
+#define IDXGIAdapter2_CheckInterfaceSupport(This,InterfaceName,pUMDVersion) \
+ ( (This)->lpVtbl -> CheckInterfaceSupport(This,InterfaceName,pUMDVersion) )
+
+
+#define IDXGIAdapter2_GetDesc1(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc1(This,pDesc) )
+
+
+#define IDXGIAdapter2_GetDesc2(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc2(This,pDesc) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIAdapter2_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDXGIOutput1_INTERFACE_DEFINED__
+#define __IDXGIOutput1_INTERFACE_DEFINED__
+
+/* interface IDXGIOutput1 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIOutput1;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("00cddea8-939b-4b83-a340-a685226666cc")
+ IDXGIOutput1 : public IDXGIOutput
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetDisplayModeList1(
+ /* [in] */ DXGI_FORMAT EnumFormat,
+ /* [in] */ UINT Flags,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pNumModes,
+ /* [annotation][out] */
+ _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC1 *pDesc) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE FindClosestMatchingMode1(
+ /* [annotation][in] */
+ _In_ const DXGI_MODE_DESC1 *pModeToMatch,
+ /* [annotation][out] */
+ _Out_ DXGI_MODE_DESC1 *pClosestMatch,
+ /* [annotation][in] */
+ _In_opt_ IUnknown *pConcernedDevice) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDisplaySurfaceData1(
+ /* [annotation][in] */
+ _In_ IDXGIResource *pDestination) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE DuplicateOutput(
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIOutputDuplication **ppOutputDuplication) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIOutput1Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIOutput1 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIOutput1 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIOutput1 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIOutput1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIOutput1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIOutput1 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIOutput1 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc )(
+ IDXGIOutput1 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_OUTPUT_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList )(
+ IDXGIOutput1 * This,
+ /* [in] */ DXGI_FORMAT EnumFormat,
+ /* [in] */ UINT Flags,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pNumModes,
+ /* [annotation][out] */
+ _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode )(
+ IDXGIOutput1 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_MODE_DESC *pModeToMatch,
+ /* [annotation][out] */
+ _Out_ DXGI_MODE_DESC *pClosestMatch,
+ /* [annotation][in] */
+ _In_opt_ IUnknown *pConcernedDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *WaitForVBlank )(
+ IDXGIOutput1 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *TakeOwnership )(
+ IDXGIOutput1 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ BOOL Exclusive);
+
+ void ( STDMETHODCALLTYPE *ReleaseOwnership )(
+ IDXGIOutput1 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGammaControlCapabilities )(
+ IDXGIOutput1 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps);
+
+ HRESULT ( STDMETHODCALLTYPE *SetGammaControl )(
+ IDXGIOutput1 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_GAMMA_CONTROL *pArray);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGammaControl )(
+ IDXGIOutput1 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_GAMMA_CONTROL *pArray);
+
+ HRESULT ( STDMETHODCALLTYPE *SetDisplaySurface )(
+ IDXGIOutput1 * This,
+ /* [annotation][in] */
+ _In_ IDXGISurface *pScanoutSurface);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData )(
+ IDXGIOutput1 * This,
+ /* [annotation][in] */
+ _In_ IDXGISurface *pDestination);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )(
+ IDXGIOutput1 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_FRAME_STATISTICS *pStats);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList1 )(
+ IDXGIOutput1 * This,
+ /* [in] */ DXGI_FORMAT EnumFormat,
+ /* [in] */ UINT Flags,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pNumModes,
+ /* [annotation][out] */
+ _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC1 *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode1 )(
+ IDXGIOutput1 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_MODE_DESC1 *pModeToMatch,
+ /* [annotation][out] */
+ _Out_ DXGI_MODE_DESC1 *pClosestMatch,
+ /* [annotation][in] */
+ _In_opt_ IUnknown *pConcernedDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData1 )(
+ IDXGIOutput1 * This,
+ /* [annotation][in] */
+ _In_ IDXGIResource *pDestination);
+
+ HRESULT ( STDMETHODCALLTYPE *DuplicateOutput )(
+ IDXGIOutput1 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIOutputDuplication **ppOutputDuplication);
+
+ END_INTERFACE
+ } IDXGIOutput1Vtbl;
+
+ interface IDXGIOutput1
+ {
+ CONST_VTBL struct IDXGIOutput1Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIOutput1_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIOutput1_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIOutput1_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIOutput1_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIOutput1_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIOutput1_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIOutput1_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIOutput1_GetDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc(This,pDesc) )
+
+#define IDXGIOutput1_GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) \
+ ( (This)->lpVtbl -> GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) )
+
+#define IDXGIOutput1_FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) \
+ ( (This)->lpVtbl -> FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) )
+
+#define IDXGIOutput1_WaitForVBlank(This) \
+ ( (This)->lpVtbl -> WaitForVBlank(This) )
+
+#define IDXGIOutput1_TakeOwnership(This,pDevice,Exclusive) \
+ ( (This)->lpVtbl -> TakeOwnership(This,pDevice,Exclusive) )
+
+#define IDXGIOutput1_ReleaseOwnership(This) \
+ ( (This)->lpVtbl -> ReleaseOwnership(This) )
+
+#define IDXGIOutput1_GetGammaControlCapabilities(This,pGammaCaps) \
+ ( (This)->lpVtbl -> GetGammaControlCapabilities(This,pGammaCaps) )
+
+#define IDXGIOutput1_SetGammaControl(This,pArray) \
+ ( (This)->lpVtbl -> SetGammaControl(This,pArray) )
+
+#define IDXGIOutput1_GetGammaControl(This,pArray) \
+ ( (This)->lpVtbl -> GetGammaControl(This,pArray) )
+
+#define IDXGIOutput1_SetDisplaySurface(This,pScanoutSurface) \
+ ( (This)->lpVtbl -> SetDisplaySurface(This,pScanoutSurface) )
+
+#define IDXGIOutput1_GetDisplaySurfaceData(This,pDestination) \
+ ( (This)->lpVtbl -> GetDisplaySurfaceData(This,pDestination) )
+
+#define IDXGIOutput1_GetFrameStatistics(This,pStats) \
+ ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) )
+
+
+#define IDXGIOutput1_GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) \
+ ( (This)->lpVtbl -> GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) )
+
+#define IDXGIOutput1_FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) \
+ ( (This)->lpVtbl -> FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) )
+
+#define IDXGIOutput1_GetDisplaySurfaceData1(This,pDestination) \
+ ( (This)->lpVtbl -> GetDisplaySurfaceData1(This,pDestination) )
+
+#define IDXGIOutput1_DuplicateOutput(This,pDevice,ppOutputDuplication) \
+ ( (This)->lpVtbl -> DuplicateOutput(This,pDevice,ppOutputDuplication) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIOutput1_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi1_2_0000_0009 */
+/* [local] */
+
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
+#pragma endregion
+DEFINE_GUID(IID_IDXGIDisplayControl,0xea9dbf1a,0xc88e,0x4486,0x85,0x4a,0x98,0xaa,0x01,0x38,0xf3,0x0c);
+DEFINE_GUID(IID_IDXGIOutputDuplication,0x191cfac3,0xa341,0x470d,0xb2,0x6e,0xa8,0x64,0xf4,0x28,0x31,0x9c);
+DEFINE_GUID(IID_IDXGISurface2,0xaba496dd,0xb617,0x4cb8,0xa8,0x66,0xbc,0x44,0xd7,0xeb,0x1f,0xa2);
+DEFINE_GUID(IID_IDXGIResource1,0x30961379,0x4609,0x4a41,0x99,0x8e,0x54,0xfe,0x56,0x7e,0xe0,0xc1);
+DEFINE_GUID(IID_IDXGIDevice2,0x05008617,0xfbfd,0x4051,0xa7,0x90,0x14,0x48,0x84,0xb4,0xf6,0xa9);
+DEFINE_GUID(IID_IDXGISwapChain1,0x790a45f7,0x0d42,0x4876,0x98,0x3a,0x0a,0x55,0xcf,0xe6,0xf4,0xaa);
+DEFINE_GUID(IID_IDXGIFactory2,0x50c83a1c,0xe072,0x4c48,0x87,0xb0,0x36,0x30,0xfa,0x36,0xa6,0xd0);
+DEFINE_GUID(IID_IDXGIAdapter2,0x0AA1AE0A,0xFA0E,0x4B84,0x86,0x44,0xE0,0x5F,0xF8,0xE5,0xAC,0xB5);
+DEFINE_GUID(IID_IDXGIOutput1,0x00cddea8,0x939b,0x4b83,0xa3,0x40,0xa6,0x85,0x22,0x66,0x66,0xcc);
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0009_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0009_v0_0_s_ifspec;
+
+/* Additional Prototypes for ALL interfaces */
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
diff --git a/external/D3D12/include/dxgi1_3.h b/external/D3D12/include/dxgi1_3.h
new file mode 100644
index 0000000..3d58b0e
--- /dev/null
+++ b/external/D3D12/include/dxgi1_3.h
@@ -0,0 +1,2121 @@
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 8.01.0618 */
+/* @@MIDL_FILE_HEADING( ) */
+
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif /* __RPCNDR_H_VERSION__ */
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __dxgi1_3_h__
+#define __dxgi1_3_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */
+
+#ifndef __IDXGIDevice3_FWD_DEFINED__
+#define __IDXGIDevice3_FWD_DEFINED__
+typedef interface IDXGIDevice3 IDXGIDevice3;
+
+#endif /* __IDXGIDevice3_FWD_DEFINED__ */
+
+
+#ifndef __IDXGISwapChain2_FWD_DEFINED__
+#define __IDXGISwapChain2_FWD_DEFINED__
+typedef interface IDXGISwapChain2 IDXGISwapChain2;
+
+#endif /* __IDXGISwapChain2_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIOutput2_FWD_DEFINED__
+#define __IDXGIOutput2_FWD_DEFINED__
+typedef interface IDXGIOutput2 IDXGIOutput2;
+
+#endif /* __IDXGIOutput2_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIFactory3_FWD_DEFINED__
+#define __IDXGIFactory3_FWD_DEFINED__
+typedef interface IDXGIFactory3 IDXGIFactory3;
+
+#endif /* __IDXGIFactory3_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIDecodeSwapChain_FWD_DEFINED__
+#define __IDXGIDecodeSwapChain_FWD_DEFINED__
+typedef interface IDXGIDecodeSwapChain IDXGIDecodeSwapChain;
+
+#endif /* __IDXGIDecodeSwapChain_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIFactoryMedia_FWD_DEFINED__
+#define __IDXGIFactoryMedia_FWD_DEFINED__
+typedef interface IDXGIFactoryMedia IDXGIFactoryMedia;
+
+#endif /* __IDXGIFactoryMedia_FWD_DEFINED__ */
+
+
+#ifndef __IDXGISwapChainMedia_FWD_DEFINED__
+#define __IDXGISwapChainMedia_FWD_DEFINED__
+typedef interface IDXGISwapChainMedia IDXGISwapChainMedia;
+
+#endif /* __IDXGISwapChainMedia_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIOutput3_FWD_DEFINED__
+#define __IDXGIOutput3_FWD_DEFINED__
+typedef interface IDXGIOutput3 IDXGIOutput3;
+
+#endif /* __IDXGIOutput3_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "dxgi1_2.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+
+/* interface __MIDL_itf_dxgi1_3_0000_0000 */
+/* [local] */
+
+#include <winapifamily.h>
+#pragma region App Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
+#define DXGI_CREATE_FACTORY_DEBUG 0x1
+HRESULT WINAPI CreateDXGIFactory2(UINT Flags, REFIID riid, _COM_Outptr_ void **ppFactory);
+HRESULT WINAPI DXGIGetDebugInterface1(UINT Flags, REFIID riid, _COM_Outptr_ void **pDebug);
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IDXGIDevice3_INTERFACE_DEFINED__
+#define __IDXGIDevice3_INTERFACE_DEFINED__
+
+/* interface IDXGIDevice3 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIDevice3;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("6007896c-3244-4afd-bf18-a6d3beda5023")
+ IDXGIDevice3 : public IDXGIDevice2
+ {
+ public:
+ virtual void STDMETHODCALLTYPE Trim( void) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIDevice3Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIDevice3 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIDevice3 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIDevice3 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIDevice3 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIDevice3 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIDevice3 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIDevice3 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetAdapter )(
+ IDXGIDevice3 * This,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter **pAdapter);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSurface )(
+ IDXGIDevice3 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_SURFACE_DESC *pDesc,
+ /* [in] */ UINT NumSurfaces,
+ /* [in] */ DXGI_USAGE Usage,
+ /* [annotation][in] */
+ _In_opt_ const DXGI_SHARED_RESOURCE *pSharedResource,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISurface **ppSurface);
+
+ HRESULT ( STDMETHODCALLTYPE *QueryResourceResidency )(
+ IDXGIDevice3 * This,
+ /* [annotation][size_is][in] */
+ _In_reads_(NumResources) IUnknown *const *ppResources,
+ /* [annotation][size_is][out] */
+ _Out_writes_(NumResources) DXGI_RESIDENCY *pResidencyStatus,
+ /* [in] */ UINT NumResources);
+
+ HRESULT ( STDMETHODCALLTYPE *SetGPUThreadPriority )(
+ IDXGIDevice3 * This,
+ /* [in] */ INT Priority);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGPUThreadPriority )(
+ IDXGIDevice3 * This,
+ /* [annotation][retval][out] */
+ _Out_ INT *pPriority);
+
+ HRESULT ( STDMETHODCALLTYPE *SetMaximumFrameLatency )(
+ IDXGIDevice3 * This,
+ /* [in] */ UINT MaxLatency);
+
+ HRESULT ( STDMETHODCALLTYPE *GetMaximumFrameLatency )(
+ IDXGIDevice3 * This,
+ /* [annotation][out] */
+ _Out_ UINT *pMaxLatency);
+
+ HRESULT ( STDMETHODCALLTYPE *OfferResources )(
+ IDXGIDevice3 * This,
+ /* [annotation][in] */
+ _In_ UINT NumResources,
+ /* [annotation][size_is][in] */
+ _In_reads_(NumResources) IDXGIResource *const *ppResources,
+ /* [annotation][in] */
+ _In_ DXGI_OFFER_RESOURCE_PRIORITY Priority);
+
+ HRESULT ( STDMETHODCALLTYPE *ReclaimResources )(
+ IDXGIDevice3 * This,
+ /* [annotation][in] */
+ _In_ UINT NumResources,
+ /* [annotation][size_is][in] */
+ _In_reads_(NumResources) IDXGIResource *const *ppResources,
+ /* [annotation][size_is][out] */
+ _Out_writes_all_opt_(NumResources) BOOL *pDiscarded);
+
+ HRESULT ( STDMETHODCALLTYPE *EnqueueSetEvent )(
+ IDXGIDevice3 * This,
+ /* [annotation][in] */
+ _In_ HANDLE hEvent);
+
+ void ( STDMETHODCALLTYPE *Trim )(
+ IDXGIDevice3 * This);
+
+ END_INTERFACE
+ } IDXGIDevice3Vtbl;
+
+ interface IDXGIDevice3
+ {
+ CONST_VTBL struct IDXGIDevice3Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIDevice3_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIDevice3_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIDevice3_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIDevice3_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIDevice3_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIDevice3_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIDevice3_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIDevice3_GetAdapter(This,pAdapter) \
+ ( (This)->lpVtbl -> GetAdapter(This,pAdapter) )
+
+#define IDXGIDevice3_CreateSurface(This,pDesc,NumSurfaces,Usage,pSharedResource,ppSurface) \
+ ( (This)->lpVtbl -> CreateSurface(This,pDesc,NumSurfaces,Usage,pSharedResource,ppSurface) )
+
+#define IDXGIDevice3_QueryResourceResidency(This,ppResources,pResidencyStatus,NumResources) \
+ ( (This)->lpVtbl -> QueryResourceResidency(This,ppResources,pResidencyStatus,NumResources) )
+
+#define IDXGIDevice3_SetGPUThreadPriority(This,Priority) \
+ ( (This)->lpVtbl -> SetGPUThreadPriority(This,Priority) )
+
+#define IDXGIDevice3_GetGPUThreadPriority(This,pPriority) \
+ ( (This)->lpVtbl -> GetGPUThreadPriority(This,pPriority) )
+
+
+#define IDXGIDevice3_SetMaximumFrameLatency(This,MaxLatency) \
+ ( (This)->lpVtbl -> SetMaximumFrameLatency(This,MaxLatency) )
+
+#define IDXGIDevice3_GetMaximumFrameLatency(This,pMaxLatency) \
+ ( (This)->lpVtbl -> GetMaximumFrameLatency(This,pMaxLatency) )
+
+
+#define IDXGIDevice3_OfferResources(This,NumResources,ppResources,Priority) \
+ ( (This)->lpVtbl -> OfferResources(This,NumResources,ppResources,Priority) )
+
+#define IDXGIDevice3_ReclaimResources(This,NumResources,ppResources,pDiscarded) \
+ ( (This)->lpVtbl -> ReclaimResources(This,NumResources,ppResources,pDiscarded) )
+
+#define IDXGIDevice3_EnqueueSetEvent(This,hEvent) \
+ ( (This)->lpVtbl -> EnqueueSetEvent(This,hEvent) )
+
+
+#define IDXGIDevice3_Trim(This) \
+ ( (This)->lpVtbl -> Trim(This) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIDevice3_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi1_3_0000_0001 */
+/* [local] */
+
+typedef struct DXGI_MATRIX_3X2_F
+ {
+ FLOAT _11;
+ FLOAT _12;
+ FLOAT _21;
+ FLOAT _22;
+ FLOAT _31;
+ FLOAT _32;
+ } DXGI_MATRIX_3X2_F;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0001_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0001_v0_0_s_ifspec;
+
+#ifndef __IDXGISwapChain2_INTERFACE_DEFINED__
+#define __IDXGISwapChain2_INTERFACE_DEFINED__
+
+/* interface IDXGISwapChain2 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGISwapChain2;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("a8be2ac4-199f-4946-b331-79599fb98de7")
+ IDXGISwapChain2 : public IDXGISwapChain1
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE SetSourceSize(
+ UINT Width,
+ UINT Height) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetSourceSize(
+ /* [annotation][out] */
+ _Out_ UINT *pWidth,
+ /* [annotation][out] */
+ _Out_ UINT *pHeight) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetMaximumFrameLatency(
+ UINT MaxLatency) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetMaximumFrameLatency(
+ /* [annotation][out] */
+ _Out_ UINT *pMaxLatency) = 0;
+
+ virtual HANDLE STDMETHODCALLTYPE GetFrameLatencyWaitableObject( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetMatrixTransform(
+ const DXGI_MATRIX_3X2_F *pMatrix) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetMatrixTransform(
+ /* [annotation][out] */
+ _Out_ DXGI_MATRIX_3X2_F *pMatrix) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGISwapChain2Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGISwapChain2 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGISwapChain2 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGISwapChain2 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGISwapChain2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGISwapChain2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGISwapChain2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGISwapChain2 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDevice )(
+ IDXGISwapChain2 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *Present )(
+ IDXGISwapChain2 * This,
+ /* [in] */ UINT SyncInterval,
+ /* [in] */ UINT Flags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetBuffer )(
+ IDXGISwapChain2 * This,
+ /* [in] */ UINT Buffer,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][out][in] */
+ _COM_Outptr_ void **ppSurface);
+
+ HRESULT ( STDMETHODCALLTYPE *SetFullscreenState )(
+ IDXGISwapChain2 * This,
+ /* [in] */ BOOL Fullscreen,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pTarget);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFullscreenState )(
+ IDXGISwapChain2 * This,
+ /* [annotation][out] */
+ _Out_opt_ BOOL *pFullscreen,
+ /* [annotation][out] */
+ _COM_Outptr_opt_result_maybenull_ IDXGIOutput **ppTarget);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc )(
+ IDXGISwapChain2 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_SWAP_CHAIN_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *ResizeBuffers )(
+ IDXGISwapChain2 * This,
+ /* [in] */ UINT BufferCount,
+ /* [in] */ UINT Width,
+ /* [in] */ UINT Height,
+ /* [in] */ DXGI_FORMAT NewFormat,
+ /* [in] */ UINT SwapChainFlags);
+
+ HRESULT ( STDMETHODCALLTYPE *ResizeTarget )(
+ IDXGISwapChain2 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_MODE_DESC *pNewTargetParameters);
+
+ HRESULT ( STDMETHODCALLTYPE *GetContainingOutput )(
+ IDXGISwapChain2 * This,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIOutput **ppOutput);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )(
+ IDXGISwapChain2 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_FRAME_STATISTICS *pStats);
+
+ HRESULT ( STDMETHODCALLTYPE *GetLastPresentCount )(
+ IDXGISwapChain2 * This,
+ /* [annotation][out] */
+ _Out_ UINT *pLastPresentCount);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc1 )(
+ IDXGISwapChain2 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_SWAP_CHAIN_DESC1 *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFullscreenDesc )(
+ IDXGISwapChain2 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *GetHwnd )(
+ IDXGISwapChain2 * This,
+ /* [annotation][out] */
+ _Out_ HWND *pHwnd);
+
+ HRESULT ( STDMETHODCALLTYPE *GetCoreWindow )(
+ IDXGISwapChain2 * This,
+ /* [annotation][in] */
+ _In_ REFIID refiid,
+ /* [annotation][out] */
+ _COM_Outptr_ void **ppUnk);
+
+ HRESULT ( STDMETHODCALLTYPE *Present1 )(
+ IDXGISwapChain2 * This,
+ /* [in] */ UINT SyncInterval,
+ /* [in] */ UINT PresentFlags,
+ /* [annotation][in] */
+ _In_ const DXGI_PRESENT_PARAMETERS *pPresentParameters);
+
+ BOOL ( STDMETHODCALLTYPE *IsTemporaryMonoSupported )(
+ IDXGISwapChain2 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetRestrictToOutput )(
+ IDXGISwapChain2 * This,
+ /* [annotation][out] */
+ _Out_ IDXGIOutput **ppRestrictToOutput);
+
+ HRESULT ( STDMETHODCALLTYPE *SetBackgroundColor )(
+ IDXGISwapChain2 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_RGBA *pColor);
+
+ HRESULT ( STDMETHODCALLTYPE *GetBackgroundColor )(
+ IDXGISwapChain2 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_RGBA *pColor);
+
+ HRESULT ( STDMETHODCALLTYPE *SetRotation )(
+ IDXGISwapChain2 * This,
+ /* [annotation][in] */
+ _In_ DXGI_MODE_ROTATION Rotation);
+
+ HRESULT ( STDMETHODCALLTYPE *GetRotation )(
+ IDXGISwapChain2 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_MODE_ROTATION *pRotation);
+
+ HRESULT ( STDMETHODCALLTYPE *SetSourceSize )(
+ IDXGISwapChain2 * This,
+ UINT Width,
+ UINT Height);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSourceSize )(
+ IDXGISwapChain2 * This,
+ /* [annotation][out] */
+ _Out_ UINT *pWidth,
+ /* [annotation][out] */
+ _Out_ UINT *pHeight);
+
+ HRESULT ( STDMETHODCALLTYPE *SetMaximumFrameLatency )(
+ IDXGISwapChain2 * This,
+ UINT MaxLatency);
+
+ HRESULT ( STDMETHODCALLTYPE *GetMaximumFrameLatency )(
+ IDXGISwapChain2 * This,
+ /* [annotation][out] */
+ _Out_ UINT *pMaxLatency);
+
+ HANDLE ( STDMETHODCALLTYPE *GetFrameLatencyWaitableObject )(
+ IDXGISwapChain2 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetMatrixTransform )(
+ IDXGISwapChain2 * This,
+ const DXGI_MATRIX_3X2_F *pMatrix);
+
+ HRESULT ( STDMETHODCALLTYPE *GetMatrixTransform )(
+ IDXGISwapChain2 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_MATRIX_3X2_F *pMatrix);
+
+ END_INTERFACE
+ } IDXGISwapChain2Vtbl;
+
+ interface IDXGISwapChain2
+ {
+ CONST_VTBL struct IDXGISwapChain2Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGISwapChain2_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGISwapChain2_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGISwapChain2_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGISwapChain2_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGISwapChain2_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGISwapChain2_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGISwapChain2_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGISwapChain2_GetDevice(This,riid,ppDevice) \
+ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) )
+
+
+#define IDXGISwapChain2_Present(This,SyncInterval,Flags) \
+ ( (This)->lpVtbl -> Present(This,SyncInterval,Flags) )
+
+#define IDXGISwapChain2_GetBuffer(This,Buffer,riid,ppSurface) \
+ ( (This)->lpVtbl -> GetBuffer(This,Buffer,riid,ppSurface) )
+
+#define IDXGISwapChain2_SetFullscreenState(This,Fullscreen,pTarget) \
+ ( (This)->lpVtbl -> SetFullscreenState(This,Fullscreen,pTarget) )
+
+#define IDXGISwapChain2_GetFullscreenState(This,pFullscreen,ppTarget) \
+ ( (This)->lpVtbl -> GetFullscreenState(This,pFullscreen,ppTarget) )
+
+#define IDXGISwapChain2_GetDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc(This,pDesc) )
+
+#define IDXGISwapChain2_ResizeBuffers(This,BufferCount,Width,Height,NewFormat,SwapChainFlags) \
+ ( (This)->lpVtbl -> ResizeBuffers(This,BufferCount,Width,Height,NewFormat,SwapChainFlags) )
+
+#define IDXGISwapChain2_ResizeTarget(This,pNewTargetParameters) \
+ ( (This)->lpVtbl -> ResizeTarget(This,pNewTargetParameters) )
+
+#define IDXGISwapChain2_GetContainingOutput(This,ppOutput) \
+ ( (This)->lpVtbl -> GetContainingOutput(This,ppOutput) )
+
+#define IDXGISwapChain2_GetFrameStatistics(This,pStats) \
+ ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) )
+
+#define IDXGISwapChain2_GetLastPresentCount(This,pLastPresentCount) \
+ ( (This)->lpVtbl -> GetLastPresentCount(This,pLastPresentCount) )
+
+
+#define IDXGISwapChain2_GetDesc1(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc1(This,pDesc) )
+
+#define IDXGISwapChain2_GetFullscreenDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetFullscreenDesc(This,pDesc) )
+
+#define IDXGISwapChain2_GetHwnd(This,pHwnd) \
+ ( (This)->lpVtbl -> GetHwnd(This,pHwnd) )
+
+#define IDXGISwapChain2_GetCoreWindow(This,refiid,ppUnk) \
+ ( (This)->lpVtbl -> GetCoreWindow(This,refiid,ppUnk) )
+
+#define IDXGISwapChain2_Present1(This,SyncInterval,PresentFlags,pPresentParameters) \
+ ( (This)->lpVtbl -> Present1(This,SyncInterval,PresentFlags,pPresentParameters) )
+
+#define IDXGISwapChain2_IsTemporaryMonoSupported(This) \
+ ( (This)->lpVtbl -> IsTemporaryMonoSupported(This) )
+
+#define IDXGISwapChain2_GetRestrictToOutput(This,ppRestrictToOutput) \
+ ( (This)->lpVtbl -> GetRestrictToOutput(This,ppRestrictToOutput) )
+
+#define IDXGISwapChain2_SetBackgroundColor(This,pColor) \
+ ( (This)->lpVtbl -> SetBackgroundColor(This,pColor) )
+
+#define IDXGISwapChain2_GetBackgroundColor(This,pColor) \
+ ( (This)->lpVtbl -> GetBackgroundColor(This,pColor) )
+
+#define IDXGISwapChain2_SetRotation(This,Rotation) \
+ ( (This)->lpVtbl -> SetRotation(This,Rotation) )
+
+#define IDXGISwapChain2_GetRotation(This,pRotation) \
+ ( (This)->lpVtbl -> GetRotation(This,pRotation) )
+
+
+#define IDXGISwapChain2_SetSourceSize(This,Width,Height) \
+ ( (This)->lpVtbl -> SetSourceSize(This,Width,Height) )
+
+#define IDXGISwapChain2_GetSourceSize(This,pWidth,pHeight) \
+ ( (This)->lpVtbl -> GetSourceSize(This,pWidth,pHeight) )
+
+#define IDXGISwapChain2_SetMaximumFrameLatency(This,MaxLatency) \
+ ( (This)->lpVtbl -> SetMaximumFrameLatency(This,MaxLatency) )
+
+#define IDXGISwapChain2_GetMaximumFrameLatency(This,pMaxLatency) \
+ ( (This)->lpVtbl -> GetMaximumFrameLatency(This,pMaxLatency) )
+
+#define IDXGISwapChain2_GetFrameLatencyWaitableObject(This) \
+ ( (This)->lpVtbl -> GetFrameLatencyWaitableObject(This) )
+
+#define IDXGISwapChain2_SetMatrixTransform(This,pMatrix) \
+ ( (This)->lpVtbl -> SetMatrixTransform(This,pMatrix) )
+
+#define IDXGISwapChain2_GetMatrixTransform(This,pMatrix) \
+ ( (This)->lpVtbl -> GetMatrixTransform(This,pMatrix) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGISwapChain2_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDXGIOutput2_INTERFACE_DEFINED__
+#define __IDXGIOutput2_INTERFACE_DEFINED__
+
+/* interface IDXGIOutput2 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIOutput2;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("595e39d1-2724-4663-99b1-da969de28364")
+ IDXGIOutput2 : public IDXGIOutput1
+ {
+ public:
+ virtual BOOL STDMETHODCALLTYPE SupportsOverlays( void) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIOutput2Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIOutput2 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIOutput2 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIOutput2 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIOutput2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIOutput2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIOutput2 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIOutput2 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc )(
+ IDXGIOutput2 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_OUTPUT_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList )(
+ IDXGIOutput2 * This,
+ /* [in] */ DXGI_FORMAT EnumFormat,
+ /* [in] */ UINT Flags,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pNumModes,
+ /* [annotation][out] */
+ _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode )(
+ IDXGIOutput2 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_MODE_DESC *pModeToMatch,
+ /* [annotation][out] */
+ _Out_ DXGI_MODE_DESC *pClosestMatch,
+ /* [annotation][in] */
+ _In_opt_ IUnknown *pConcernedDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *WaitForVBlank )(
+ IDXGIOutput2 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *TakeOwnership )(
+ IDXGIOutput2 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ BOOL Exclusive);
+
+ void ( STDMETHODCALLTYPE *ReleaseOwnership )(
+ IDXGIOutput2 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGammaControlCapabilities )(
+ IDXGIOutput2 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps);
+
+ HRESULT ( STDMETHODCALLTYPE *SetGammaControl )(
+ IDXGIOutput2 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_GAMMA_CONTROL *pArray);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGammaControl )(
+ IDXGIOutput2 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_GAMMA_CONTROL *pArray);
+
+ HRESULT ( STDMETHODCALLTYPE *SetDisplaySurface )(
+ IDXGIOutput2 * This,
+ /* [annotation][in] */
+ _In_ IDXGISurface *pScanoutSurface);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData )(
+ IDXGIOutput2 * This,
+ /* [annotation][in] */
+ _In_ IDXGISurface *pDestination);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )(
+ IDXGIOutput2 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_FRAME_STATISTICS *pStats);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList1 )(
+ IDXGIOutput2 * This,
+ /* [in] */ DXGI_FORMAT EnumFormat,
+ /* [in] */ UINT Flags,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pNumModes,
+ /* [annotation][out] */
+ _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC1 *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode1 )(
+ IDXGIOutput2 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_MODE_DESC1 *pModeToMatch,
+ /* [annotation][out] */
+ _Out_ DXGI_MODE_DESC1 *pClosestMatch,
+ /* [annotation][in] */
+ _In_opt_ IUnknown *pConcernedDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData1 )(
+ IDXGIOutput2 * This,
+ /* [annotation][in] */
+ _In_ IDXGIResource *pDestination);
+
+ HRESULT ( STDMETHODCALLTYPE *DuplicateOutput )(
+ IDXGIOutput2 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIOutputDuplication **ppOutputDuplication);
+
+ BOOL ( STDMETHODCALLTYPE *SupportsOverlays )(
+ IDXGIOutput2 * This);
+
+ END_INTERFACE
+ } IDXGIOutput2Vtbl;
+
+ interface IDXGIOutput2
+ {
+ CONST_VTBL struct IDXGIOutput2Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIOutput2_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIOutput2_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIOutput2_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIOutput2_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIOutput2_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIOutput2_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIOutput2_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIOutput2_GetDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc(This,pDesc) )
+
+#define IDXGIOutput2_GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) \
+ ( (This)->lpVtbl -> GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) )
+
+#define IDXGIOutput2_FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) \
+ ( (This)->lpVtbl -> FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) )
+
+#define IDXGIOutput2_WaitForVBlank(This) \
+ ( (This)->lpVtbl -> WaitForVBlank(This) )
+
+#define IDXGIOutput2_TakeOwnership(This,pDevice,Exclusive) \
+ ( (This)->lpVtbl -> TakeOwnership(This,pDevice,Exclusive) )
+
+#define IDXGIOutput2_ReleaseOwnership(This) \
+ ( (This)->lpVtbl -> ReleaseOwnership(This) )
+
+#define IDXGIOutput2_GetGammaControlCapabilities(This,pGammaCaps) \
+ ( (This)->lpVtbl -> GetGammaControlCapabilities(This,pGammaCaps) )
+
+#define IDXGIOutput2_SetGammaControl(This,pArray) \
+ ( (This)->lpVtbl -> SetGammaControl(This,pArray) )
+
+#define IDXGIOutput2_GetGammaControl(This,pArray) \
+ ( (This)->lpVtbl -> GetGammaControl(This,pArray) )
+
+#define IDXGIOutput2_SetDisplaySurface(This,pScanoutSurface) \
+ ( (This)->lpVtbl -> SetDisplaySurface(This,pScanoutSurface) )
+
+#define IDXGIOutput2_GetDisplaySurfaceData(This,pDestination) \
+ ( (This)->lpVtbl -> GetDisplaySurfaceData(This,pDestination) )
+
+#define IDXGIOutput2_GetFrameStatistics(This,pStats) \
+ ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) )
+
+
+#define IDXGIOutput2_GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) \
+ ( (This)->lpVtbl -> GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) )
+
+#define IDXGIOutput2_FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) \
+ ( (This)->lpVtbl -> FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) )
+
+#define IDXGIOutput2_GetDisplaySurfaceData1(This,pDestination) \
+ ( (This)->lpVtbl -> GetDisplaySurfaceData1(This,pDestination) )
+
+#define IDXGIOutput2_DuplicateOutput(This,pDevice,ppOutputDuplication) \
+ ( (This)->lpVtbl -> DuplicateOutput(This,pDevice,ppOutputDuplication) )
+
+
+#define IDXGIOutput2_SupportsOverlays(This) \
+ ( (This)->lpVtbl -> SupportsOverlays(This) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIOutput2_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDXGIFactory3_INTERFACE_DEFINED__
+#define __IDXGIFactory3_INTERFACE_DEFINED__
+
+/* interface IDXGIFactory3 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIFactory3;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("25483823-cd46-4c7d-86ca-47aa95b837bd")
+ IDXGIFactory3 : public IDXGIFactory2
+ {
+ public:
+ virtual UINT STDMETHODCALLTYPE GetCreationFlags( void) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIFactory3Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIFactory3 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIFactory3 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIFactory3 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIFactory3 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIFactory3 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIFactory3 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIFactory3 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *EnumAdapters )(
+ IDXGIFactory3 * This,
+ /* [in] */ UINT Adapter,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter **ppAdapter);
+
+ HRESULT ( STDMETHODCALLTYPE *MakeWindowAssociation )(
+ IDXGIFactory3 * This,
+ HWND WindowHandle,
+ UINT Flags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetWindowAssociation )(
+ IDXGIFactory3 * This,
+ /* [annotation][out] */
+ _Out_ HWND *pWindowHandle);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSwapChain )(
+ IDXGIFactory3 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_ DXGI_SWAP_CHAIN_DESC *pDesc,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain **ppSwapChain);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSoftwareAdapter )(
+ IDXGIFactory3 * This,
+ /* [in] */ HMODULE Module,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter **ppAdapter);
+
+ HRESULT ( STDMETHODCALLTYPE *EnumAdapters1 )(
+ IDXGIFactory3 * This,
+ /* [in] */ UINT Adapter,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter1 **ppAdapter);
+
+ BOOL ( STDMETHODCALLTYPE *IsCurrent )(
+ IDXGIFactory3 * This);
+
+ BOOL ( STDMETHODCALLTYPE *IsWindowedStereoEnabled )(
+ IDXGIFactory3 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForHwnd )(
+ IDXGIFactory3 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_ HWND hWnd,
+ /* [annotation][in] */
+ _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+ /* [annotation][in] */
+ _In_opt_ const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pRestrictToOutput,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain1 **ppSwapChain);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForCoreWindow )(
+ IDXGIFactory3 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_ IUnknown *pWindow,
+ /* [annotation][in] */
+ _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pRestrictToOutput,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain1 **ppSwapChain);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSharedResourceAdapterLuid )(
+ IDXGIFactory3 * This,
+ /* [annotation] */
+ _In_ HANDLE hResource,
+ /* [annotation] */
+ _Out_ LUID *pLuid);
+
+ HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusWindow )(
+ IDXGIFactory3 * This,
+ /* [annotation][in] */
+ _In_ HWND WindowHandle,
+ /* [annotation][in] */
+ _In_ UINT wMsg,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie);
+
+ HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusEvent )(
+ IDXGIFactory3 * This,
+ /* [annotation][in] */
+ _In_ HANDLE hEvent,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie);
+
+ void ( STDMETHODCALLTYPE *UnregisterStereoStatus )(
+ IDXGIFactory3 * This,
+ /* [annotation][in] */
+ _In_ DWORD dwCookie);
+
+ HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusWindow )(
+ IDXGIFactory3 * This,
+ /* [annotation][in] */
+ _In_ HWND WindowHandle,
+ /* [annotation][in] */
+ _In_ UINT wMsg,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie);
+
+ HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusEvent )(
+ IDXGIFactory3 * This,
+ /* [annotation][in] */
+ _In_ HANDLE hEvent,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie);
+
+ void ( STDMETHODCALLTYPE *UnregisterOcclusionStatus )(
+ IDXGIFactory3 * This,
+ /* [annotation][in] */
+ _In_ DWORD dwCookie);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForComposition )(
+ IDXGIFactory3 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pRestrictToOutput,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain1 **ppSwapChain);
+
+ UINT ( STDMETHODCALLTYPE *GetCreationFlags )(
+ IDXGIFactory3 * This);
+
+ END_INTERFACE
+ } IDXGIFactory3Vtbl;
+
+ interface IDXGIFactory3
+ {
+ CONST_VTBL struct IDXGIFactory3Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIFactory3_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIFactory3_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIFactory3_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIFactory3_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIFactory3_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIFactory3_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIFactory3_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIFactory3_EnumAdapters(This,Adapter,ppAdapter) \
+ ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) )
+
+#define IDXGIFactory3_MakeWindowAssociation(This,WindowHandle,Flags) \
+ ( (This)->lpVtbl -> MakeWindowAssociation(This,WindowHandle,Flags) )
+
+#define IDXGIFactory3_GetWindowAssociation(This,pWindowHandle) \
+ ( (This)->lpVtbl -> GetWindowAssociation(This,pWindowHandle) )
+
+#define IDXGIFactory3_CreateSwapChain(This,pDevice,pDesc,ppSwapChain) \
+ ( (This)->lpVtbl -> CreateSwapChain(This,pDevice,pDesc,ppSwapChain) )
+
+#define IDXGIFactory3_CreateSoftwareAdapter(This,Module,ppAdapter) \
+ ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) )
+
+
+#define IDXGIFactory3_EnumAdapters1(This,Adapter,ppAdapter) \
+ ( (This)->lpVtbl -> EnumAdapters1(This,Adapter,ppAdapter) )
+
+#define IDXGIFactory3_IsCurrent(This) \
+ ( (This)->lpVtbl -> IsCurrent(This) )
+
+
+#define IDXGIFactory3_IsWindowedStereoEnabled(This) \
+ ( (This)->lpVtbl -> IsWindowedStereoEnabled(This) )
+
+#define IDXGIFactory3_CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) \
+ ( (This)->lpVtbl -> CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) )
+
+#define IDXGIFactory3_CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) \
+ ( (This)->lpVtbl -> CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) )
+
+#define IDXGIFactory3_GetSharedResourceAdapterLuid(This,hResource,pLuid) \
+ ( (This)->lpVtbl -> GetSharedResourceAdapterLuid(This,hResource,pLuid) )
+
+#define IDXGIFactory3_RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) \
+ ( (This)->lpVtbl -> RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) )
+
+#define IDXGIFactory3_RegisterStereoStatusEvent(This,hEvent,pdwCookie) \
+ ( (This)->lpVtbl -> RegisterStereoStatusEvent(This,hEvent,pdwCookie) )
+
+#define IDXGIFactory3_UnregisterStereoStatus(This,dwCookie) \
+ ( (This)->lpVtbl -> UnregisterStereoStatus(This,dwCookie) )
+
+#define IDXGIFactory3_RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) \
+ ( (This)->lpVtbl -> RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) )
+
+#define IDXGIFactory3_RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) \
+ ( (This)->lpVtbl -> RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) )
+
+#define IDXGIFactory3_UnregisterOcclusionStatus(This,dwCookie) \
+ ( (This)->lpVtbl -> UnregisterOcclusionStatus(This,dwCookie) )
+
+#define IDXGIFactory3_CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) \
+ ( (This)->lpVtbl -> CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) )
+
+
+#define IDXGIFactory3_GetCreationFlags(This) \
+ ( (This)->lpVtbl -> GetCreationFlags(This) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIFactory3_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi1_3_0000_0004 */
+/* [local] */
+
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
+#pragma endregion
+#pragma region App Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+typedef struct DXGI_DECODE_SWAP_CHAIN_DESC
+ {
+ UINT Flags;
+ } DXGI_DECODE_SWAP_CHAIN_DESC;
+
+typedef
+enum DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS
+ {
+ DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_NOMINAL_RANGE = 0x1,
+ DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_BT709 = 0x2,
+ DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_xvYCC = 0x4
+ } DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0004_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0004_v0_0_s_ifspec;
+
+#ifndef __IDXGIDecodeSwapChain_INTERFACE_DEFINED__
+#define __IDXGIDecodeSwapChain_INTERFACE_DEFINED__
+
+/* interface IDXGIDecodeSwapChain */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIDecodeSwapChain;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("2633066b-4514-4c7a-8fd8-12ea98059d18")
+ IDXGIDecodeSwapChain : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE PresentBuffer(
+ UINT BufferToPresent,
+ UINT SyncInterval,
+ UINT Flags) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetSourceRect(
+ const RECT *pRect) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetTargetRect(
+ const RECT *pRect) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetDestSize(
+ UINT Width,
+ UINT Height) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetSourceRect(
+ /* [annotation][out] */
+ _Out_ RECT *pRect) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetTargetRect(
+ /* [annotation][out] */
+ _Out_ RECT *pRect) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDestSize(
+ /* [annotation][out] */
+ _Out_ UINT *pWidth,
+ /* [annotation][out] */
+ _Out_ UINT *pHeight) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetColorSpace(
+ DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS ColorSpace) = 0;
+
+ virtual DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS STDMETHODCALLTYPE GetColorSpace( void) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIDecodeSwapChainVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIDecodeSwapChain * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIDecodeSwapChain * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIDecodeSwapChain * This);
+
+ HRESULT ( STDMETHODCALLTYPE *PresentBuffer )(
+ IDXGIDecodeSwapChain * This,
+ UINT BufferToPresent,
+ UINT SyncInterval,
+ UINT Flags);
+
+ HRESULT ( STDMETHODCALLTYPE *SetSourceRect )(
+ IDXGIDecodeSwapChain * This,
+ const RECT *pRect);
+
+ HRESULT ( STDMETHODCALLTYPE *SetTargetRect )(
+ IDXGIDecodeSwapChain * This,
+ const RECT *pRect);
+
+ HRESULT ( STDMETHODCALLTYPE *SetDestSize )(
+ IDXGIDecodeSwapChain * This,
+ UINT Width,
+ UINT Height);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSourceRect )(
+ IDXGIDecodeSwapChain * This,
+ /* [annotation][out] */
+ _Out_ RECT *pRect);
+
+ HRESULT ( STDMETHODCALLTYPE *GetTargetRect )(
+ IDXGIDecodeSwapChain * This,
+ /* [annotation][out] */
+ _Out_ RECT *pRect);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDestSize )(
+ IDXGIDecodeSwapChain * This,
+ /* [annotation][out] */
+ _Out_ UINT *pWidth,
+ /* [annotation][out] */
+ _Out_ UINT *pHeight);
+
+ HRESULT ( STDMETHODCALLTYPE *SetColorSpace )(
+ IDXGIDecodeSwapChain * This,
+ DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS ColorSpace);
+
+ DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS ( STDMETHODCALLTYPE *GetColorSpace )(
+ IDXGIDecodeSwapChain * This);
+
+ END_INTERFACE
+ } IDXGIDecodeSwapChainVtbl;
+
+ interface IDXGIDecodeSwapChain
+ {
+ CONST_VTBL struct IDXGIDecodeSwapChainVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIDecodeSwapChain_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIDecodeSwapChain_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIDecodeSwapChain_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIDecodeSwapChain_PresentBuffer(This,BufferToPresent,SyncInterval,Flags) \
+ ( (This)->lpVtbl -> PresentBuffer(This,BufferToPresent,SyncInterval,Flags) )
+
+#define IDXGIDecodeSwapChain_SetSourceRect(This,pRect) \
+ ( (This)->lpVtbl -> SetSourceRect(This,pRect) )
+
+#define IDXGIDecodeSwapChain_SetTargetRect(This,pRect) \
+ ( (This)->lpVtbl -> SetTargetRect(This,pRect) )
+
+#define IDXGIDecodeSwapChain_SetDestSize(This,Width,Height) \
+ ( (This)->lpVtbl -> SetDestSize(This,Width,Height) )
+
+#define IDXGIDecodeSwapChain_GetSourceRect(This,pRect) \
+ ( (This)->lpVtbl -> GetSourceRect(This,pRect) )
+
+#define IDXGIDecodeSwapChain_GetTargetRect(This,pRect) \
+ ( (This)->lpVtbl -> GetTargetRect(This,pRect) )
+
+#define IDXGIDecodeSwapChain_GetDestSize(This,pWidth,pHeight) \
+ ( (This)->lpVtbl -> GetDestSize(This,pWidth,pHeight) )
+
+#define IDXGIDecodeSwapChain_SetColorSpace(This,ColorSpace) \
+ ( (This)->lpVtbl -> SetColorSpace(This,ColorSpace) )
+
+#define IDXGIDecodeSwapChain_GetColorSpace(This) \
+ ( (This)->lpVtbl -> GetColorSpace(This) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIDecodeSwapChain_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDXGIFactoryMedia_INTERFACE_DEFINED__
+#define __IDXGIFactoryMedia_INTERFACE_DEFINED__
+
+/* interface IDXGIFactoryMedia */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIFactoryMedia;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("41e7d1f2-a591-4f7b-a2e5-fa9c843e1c12")
+ IDXGIFactoryMedia : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE CreateSwapChainForCompositionSurfaceHandle(
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_opt_ HANDLE hSurface,
+ /* [annotation][in] */
+ _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pRestrictToOutput,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain1 **ppSwapChain) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateDecodeSwapChainForCompositionSurfaceHandle(
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_opt_ HANDLE hSurface,
+ /* [annotation][in] */
+ _In_ DXGI_DECODE_SWAP_CHAIN_DESC *pDesc,
+ /* [annotation][in] */
+ _In_ IDXGIResource *pYuvDecodeBuffers,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pRestrictToOutput,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIDecodeSwapChain **ppSwapChain) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIFactoryMediaVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIFactoryMedia * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIFactoryMedia * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIFactoryMedia * This);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForCompositionSurfaceHandle )(
+ IDXGIFactoryMedia * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_opt_ HANDLE hSurface,
+ /* [annotation][in] */
+ _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pRestrictToOutput,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain1 **ppSwapChain);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateDecodeSwapChainForCompositionSurfaceHandle )(
+ IDXGIFactoryMedia * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_opt_ HANDLE hSurface,
+ /* [annotation][in] */
+ _In_ DXGI_DECODE_SWAP_CHAIN_DESC *pDesc,
+ /* [annotation][in] */
+ _In_ IDXGIResource *pYuvDecodeBuffers,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pRestrictToOutput,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIDecodeSwapChain **ppSwapChain);
+
+ END_INTERFACE
+ } IDXGIFactoryMediaVtbl;
+
+ interface IDXGIFactoryMedia
+ {
+ CONST_VTBL struct IDXGIFactoryMediaVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIFactoryMedia_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIFactoryMedia_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIFactoryMedia_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIFactoryMedia_CreateSwapChainForCompositionSurfaceHandle(This,pDevice,hSurface,pDesc,pRestrictToOutput,ppSwapChain) \
+ ( (This)->lpVtbl -> CreateSwapChainForCompositionSurfaceHandle(This,pDevice,hSurface,pDesc,pRestrictToOutput,ppSwapChain) )
+
+#define IDXGIFactoryMedia_CreateDecodeSwapChainForCompositionSurfaceHandle(This,pDevice,hSurface,pDesc,pYuvDecodeBuffers,pRestrictToOutput,ppSwapChain) \
+ ( (This)->lpVtbl -> CreateDecodeSwapChainForCompositionSurfaceHandle(This,pDevice,hSurface,pDesc,pYuvDecodeBuffers,pRestrictToOutput,ppSwapChain) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIFactoryMedia_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi1_3_0000_0006 */
+/* [local] */
+
+typedef
+enum DXGI_FRAME_PRESENTATION_MODE
+ {
+ DXGI_FRAME_PRESENTATION_MODE_COMPOSED = 0,
+ DXGI_FRAME_PRESENTATION_MODE_OVERLAY = 1,
+ DXGI_FRAME_PRESENTATION_MODE_NONE = 2,
+ DXGI_FRAME_PRESENTATION_MODE_COMPOSITION_FAILURE = 3
+ } DXGI_FRAME_PRESENTATION_MODE;
+
+typedef struct DXGI_FRAME_STATISTICS_MEDIA
+ {
+ UINT PresentCount;
+ UINT PresentRefreshCount;
+ UINT SyncRefreshCount;
+ LARGE_INTEGER SyncQPCTime;
+ LARGE_INTEGER SyncGPUTime;
+ DXGI_FRAME_PRESENTATION_MODE CompositionMode;
+ UINT ApprovedPresentDuration;
+ } DXGI_FRAME_STATISTICS_MEDIA;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0006_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0006_v0_0_s_ifspec;
+
+#ifndef __IDXGISwapChainMedia_INTERFACE_DEFINED__
+#define __IDXGISwapChainMedia_INTERFACE_DEFINED__
+
+/* interface IDXGISwapChainMedia */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGISwapChainMedia;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("dd95b90b-f05f-4f6a-bd65-25bfb264bd84")
+ IDXGISwapChainMedia : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetFrameStatisticsMedia(
+ /* [annotation][out] */
+ _Out_ DXGI_FRAME_STATISTICS_MEDIA *pStats) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetPresentDuration(
+ UINT Duration) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CheckPresentDurationSupport(
+ UINT DesiredPresentDuration,
+ /* [annotation][out] */
+ _Out_ UINT *pClosestSmallerPresentDuration,
+ /* [annotation][out] */
+ _Out_ UINT *pClosestLargerPresentDuration) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGISwapChainMediaVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGISwapChainMedia * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGISwapChainMedia * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGISwapChainMedia * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFrameStatisticsMedia )(
+ IDXGISwapChainMedia * This,
+ /* [annotation][out] */
+ _Out_ DXGI_FRAME_STATISTICS_MEDIA *pStats);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPresentDuration )(
+ IDXGISwapChainMedia * This,
+ UINT Duration);
+
+ HRESULT ( STDMETHODCALLTYPE *CheckPresentDurationSupport )(
+ IDXGISwapChainMedia * This,
+ UINT DesiredPresentDuration,
+ /* [annotation][out] */
+ _Out_ UINT *pClosestSmallerPresentDuration,
+ /* [annotation][out] */
+ _Out_ UINT *pClosestLargerPresentDuration);
+
+ END_INTERFACE
+ } IDXGISwapChainMediaVtbl;
+
+ interface IDXGISwapChainMedia
+ {
+ CONST_VTBL struct IDXGISwapChainMediaVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGISwapChainMedia_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGISwapChainMedia_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGISwapChainMedia_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGISwapChainMedia_GetFrameStatisticsMedia(This,pStats) \
+ ( (This)->lpVtbl -> GetFrameStatisticsMedia(This,pStats) )
+
+#define IDXGISwapChainMedia_SetPresentDuration(This,Duration) \
+ ( (This)->lpVtbl -> SetPresentDuration(This,Duration) )
+
+#define IDXGISwapChainMedia_CheckPresentDurationSupport(This,DesiredPresentDuration,pClosestSmallerPresentDuration,pClosestLargerPresentDuration) \
+ ( (This)->lpVtbl -> CheckPresentDurationSupport(This,DesiredPresentDuration,pClosestSmallerPresentDuration,pClosestLargerPresentDuration) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGISwapChainMedia_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi1_3_0000_0007 */
+/* [local] */
+
+typedef
+enum DXGI_OVERLAY_SUPPORT_FLAG
+ {
+ DXGI_OVERLAY_SUPPORT_FLAG_DIRECT = 0x1,
+ DXGI_OVERLAY_SUPPORT_FLAG_SCALING = 0x2
+ } DXGI_OVERLAY_SUPPORT_FLAG;
+
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
+#pragma endregion
+#pragma region App Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0007_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0007_v0_0_s_ifspec;
+
+#ifndef __IDXGIOutput3_INTERFACE_DEFINED__
+#define __IDXGIOutput3_INTERFACE_DEFINED__
+
+/* interface IDXGIOutput3 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIOutput3;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("8a6bb301-7e7e-41F4-a8e0-5b32f7f99b18")
+ IDXGIOutput3 : public IDXGIOutput2
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE CheckOverlaySupport(
+ /* [annotation][in] */
+ _In_ DXGI_FORMAT EnumFormat,
+ /* [annotation][out] */
+ _In_ IUnknown *pConcernedDevice,
+ /* [annotation][out] */
+ _Out_ UINT *pFlags) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIOutput3Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIOutput3 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIOutput3 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIOutput3 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIOutput3 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIOutput3 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIOutput3 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIOutput3 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc )(
+ IDXGIOutput3 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_OUTPUT_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList )(
+ IDXGIOutput3 * This,
+ /* [in] */ DXGI_FORMAT EnumFormat,
+ /* [in] */ UINT Flags,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pNumModes,
+ /* [annotation][out] */
+ _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode )(
+ IDXGIOutput3 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_MODE_DESC *pModeToMatch,
+ /* [annotation][out] */
+ _Out_ DXGI_MODE_DESC *pClosestMatch,
+ /* [annotation][in] */
+ _In_opt_ IUnknown *pConcernedDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *WaitForVBlank )(
+ IDXGIOutput3 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *TakeOwnership )(
+ IDXGIOutput3 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ BOOL Exclusive);
+
+ void ( STDMETHODCALLTYPE *ReleaseOwnership )(
+ IDXGIOutput3 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGammaControlCapabilities )(
+ IDXGIOutput3 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps);
+
+ HRESULT ( STDMETHODCALLTYPE *SetGammaControl )(
+ IDXGIOutput3 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_GAMMA_CONTROL *pArray);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGammaControl )(
+ IDXGIOutput3 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_GAMMA_CONTROL *pArray);
+
+ HRESULT ( STDMETHODCALLTYPE *SetDisplaySurface )(
+ IDXGIOutput3 * This,
+ /* [annotation][in] */
+ _In_ IDXGISurface *pScanoutSurface);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData )(
+ IDXGIOutput3 * This,
+ /* [annotation][in] */
+ _In_ IDXGISurface *pDestination);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )(
+ IDXGIOutput3 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_FRAME_STATISTICS *pStats);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList1 )(
+ IDXGIOutput3 * This,
+ /* [in] */ DXGI_FORMAT EnumFormat,
+ /* [in] */ UINT Flags,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pNumModes,
+ /* [annotation][out] */
+ _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC1 *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode1 )(
+ IDXGIOutput3 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_MODE_DESC1 *pModeToMatch,
+ /* [annotation][out] */
+ _Out_ DXGI_MODE_DESC1 *pClosestMatch,
+ /* [annotation][in] */
+ _In_opt_ IUnknown *pConcernedDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData1 )(
+ IDXGIOutput3 * This,
+ /* [annotation][in] */
+ _In_ IDXGIResource *pDestination);
+
+ HRESULT ( STDMETHODCALLTYPE *DuplicateOutput )(
+ IDXGIOutput3 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIOutputDuplication **ppOutputDuplication);
+
+ BOOL ( STDMETHODCALLTYPE *SupportsOverlays )(
+ IDXGIOutput3 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *CheckOverlaySupport )(
+ IDXGIOutput3 * This,
+ /* [annotation][in] */
+ _In_ DXGI_FORMAT EnumFormat,
+ /* [annotation][out] */
+ _In_ IUnknown *pConcernedDevice,
+ /* [annotation][out] */
+ _Out_ UINT *pFlags);
+
+ END_INTERFACE
+ } IDXGIOutput3Vtbl;
+
+ interface IDXGIOutput3
+ {
+ CONST_VTBL struct IDXGIOutput3Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIOutput3_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIOutput3_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIOutput3_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIOutput3_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIOutput3_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIOutput3_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIOutput3_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIOutput3_GetDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc(This,pDesc) )
+
+#define IDXGIOutput3_GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) \
+ ( (This)->lpVtbl -> GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) )
+
+#define IDXGIOutput3_FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) \
+ ( (This)->lpVtbl -> FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) )
+
+#define IDXGIOutput3_WaitForVBlank(This) \
+ ( (This)->lpVtbl -> WaitForVBlank(This) )
+
+#define IDXGIOutput3_TakeOwnership(This,pDevice,Exclusive) \
+ ( (This)->lpVtbl -> TakeOwnership(This,pDevice,Exclusive) )
+
+#define IDXGIOutput3_ReleaseOwnership(This) \
+ ( (This)->lpVtbl -> ReleaseOwnership(This) )
+
+#define IDXGIOutput3_GetGammaControlCapabilities(This,pGammaCaps) \
+ ( (This)->lpVtbl -> GetGammaControlCapabilities(This,pGammaCaps) )
+
+#define IDXGIOutput3_SetGammaControl(This,pArray) \
+ ( (This)->lpVtbl -> SetGammaControl(This,pArray) )
+
+#define IDXGIOutput3_GetGammaControl(This,pArray) \
+ ( (This)->lpVtbl -> GetGammaControl(This,pArray) )
+
+#define IDXGIOutput3_SetDisplaySurface(This,pScanoutSurface) \
+ ( (This)->lpVtbl -> SetDisplaySurface(This,pScanoutSurface) )
+
+#define IDXGIOutput3_GetDisplaySurfaceData(This,pDestination) \
+ ( (This)->lpVtbl -> GetDisplaySurfaceData(This,pDestination) )
+
+#define IDXGIOutput3_GetFrameStatistics(This,pStats) \
+ ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) )
+
+
+#define IDXGIOutput3_GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) \
+ ( (This)->lpVtbl -> GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) )
+
+#define IDXGIOutput3_FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) \
+ ( (This)->lpVtbl -> FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) )
+
+#define IDXGIOutput3_GetDisplaySurfaceData1(This,pDestination) \
+ ( (This)->lpVtbl -> GetDisplaySurfaceData1(This,pDestination) )
+
+#define IDXGIOutput3_DuplicateOutput(This,pDevice,ppOutputDuplication) \
+ ( (This)->lpVtbl -> DuplicateOutput(This,pDevice,ppOutputDuplication) )
+
+
+#define IDXGIOutput3_SupportsOverlays(This) \
+ ( (This)->lpVtbl -> SupportsOverlays(This) )
+
+
+#define IDXGIOutput3_CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) \
+ ( (This)->lpVtbl -> CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIOutput3_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi1_3_0000_0008 */
+/* [local] */
+
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
+#pragma endregion
+DEFINE_GUID(IID_IDXGIDevice3,0x6007896c,0x3244,0x4afd,0xbf,0x18,0xa6,0xd3,0xbe,0xda,0x50,0x23);
+DEFINE_GUID(IID_IDXGISwapChain2,0xa8be2ac4,0x199f,0x4946,0xb3,0x31,0x79,0x59,0x9f,0xb9,0x8d,0xe7);
+DEFINE_GUID(IID_IDXGIOutput2,0x595e39d1,0x2724,0x4663,0x99,0xb1,0xda,0x96,0x9d,0xe2,0x83,0x64);
+DEFINE_GUID(IID_IDXGIFactory3,0x25483823,0xcd46,0x4c7d,0x86,0xca,0x47,0xaa,0x95,0xb8,0x37,0xbd);
+DEFINE_GUID(IID_IDXGIDecodeSwapChain,0x2633066b,0x4514,0x4c7a,0x8f,0xd8,0x12,0xea,0x98,0x05,0x9d,0x18);
+DEFINE_GUID(IID_IDXGIFactoryMedia,0x41e7d1f2,0xa591,0x4f7b,0xa2,0xe5,0xfa,0x9c,0x84,0x3e,0x1c,0x12);
+DEFINE_GUID(IID_IDXGISwapChainMedia,0xdd95b90b,0xf05f,0x4f6a,0xbd,0x65,0x25,0xbf,0xb2,0x64,0xbd,0x84);
+DEFINE_GUID(IID_IDXGIOutput3,0x8a6bb301,0x7e7e,0x41F4,0xa8,0xe0,0x5b,0x32,0xf7,0xf9,0x9b,0x18);
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0008_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0008_v0_0_s_ifspec;
+
+/* Additional Prototypes for ALL interfaces */
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
diff --git a/external/D3D12/include/dxgi1_4.h b/external/D3D12/include/dxgi1_4.h
new file mode 100644
index 0000000..405252b
--- /dev/null
+++ b/external/D3D12/include/dxgi1_4.h
@@ -0,0 +1,1494 @@
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 8.01.0618 */
+/* @@MIDL_FILE_HEADING( ) */
+
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif /* __RPCNDR_H_VERSION__ */
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __dxgi1_4_h__
+#define __dxgi1_4_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */
+
+#ifndef __IDXGISwapChain3_FWD_DEFINED__
+#define __IDXGISwapChain3_FWD_DEFINED__
+typedef interface IDXGISwapChain3 IDXGISwapChain3;
+
+#endif /* __IDXGISwapChain3_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIOutput4_FWD_DEFINED__
+#define __IDXGIOutput4_FWD_DEFINED__
+typedef interface IDXGIOutput4 IDXGIOutput4;
+
+#endif /* __IDXGIOutput4_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIFactory4_FWD_DEFINED__
+#define __IDXGIFactory4_FWD_DEFINED__
+typedef interface IDXGIFactory4 IDXGIFactory4;
+
+#endif /* __IDXGIFactory4_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIAdapter3_FWD_DEFINED__
+#define __IDXGIAdapter3_FWD_DEFINED__
+typedef interface IDXGIAdapter3 IDXGIAdapter3;
+
+#endif /* __IDXGIAdapter3_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "dxgi1_3.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+
+/* interface __MIDL_itf_dxgi1_4_0000_0000 */
+/* [local] */
+
+#include <winapifamily.h>
+#pragma region App Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
+typedef
+enum DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG
+ {
+ DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1,
+ DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_OVERLAY_PRESENT = 0x2
+ } DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IDXGISwapChain3_INTERFACE_DEFINED__
+#define __IDXGISwapChain3_INTERFACE_DEFINED__
+
+/* interface IDXGISwapChain3 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGISwapChain3;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("94d99bdb-f1f8-4ab0-b236-7da0170edab1")
+ IDXGISwapChain3 : public IDXGISwapChain2
+ {
+ public:
+ virtual UINT STDMETHODCALLTYPE GetCurrentBackBufferIndex( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CheckColorSpaceSupport(
+ /* [annotation][in] */
+ _In_ DXGI_COLOR_SPACE_TYPE ColorSpace,
+ /* [annotation][out] */
+ _Out_ UINT *pColorSpaceSupport) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetColorSpace1(
+ /* [annotation][in] */
+ _In_ DXGI_COLOR_SPACE_TYPE ColorSpace) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ResizeBuffers1(
+ /* [annotation][in] */
+ _In_ UINT BufferCount,
+ /* [annotation][in] */
+ _In_ UINT Width,
+ /* [annotation][in] */
+ _In_ UINT Height,
+ /* [annotation][in] */
+ _In_ DXGI_FORMAT Format,
+ /* [annotation][in] */
+ _In_ UINT SwapChainFlags,
+ /* [annotation][in] */
+ _In_reads_(BufferCount) const UINT *pCreationNodeMask,
+ /* [annotation][in] */
+ _In_reads_(BufferCount) IUnknown *const *ppPresentQueue) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGISwapChain3Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGISwapChain3 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGISwapChain3 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGISwapChain3 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGISwapChain3 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGISwapChain3 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGISwapChain3 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGISwapChain3 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDevice )(
+ IDXGISwapChain3 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *Present )(
+ IDXGISwapChain3 * This,
+ /* [in] */ UINT SyncInterval,
+ /* [in] */ UINT Flags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetBuffer )(
+ IDXGISwapChain3 * This,
+ /* [in] */ UINT Buffer,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][out][in] */
+ _COM_Outptr_ void **ppSurface);
+
+ HRESULT ( STDMETHODCALLTYPE *SetFullscreenState )(
+ IDXGISwapChain3 * This,
+ /* [in] */ BOOL Fullscreen,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pTarget);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFullscreenState )(
+ IDXGISwapChain3 * This,
+ /* [annotation][out] */
+ _Out_opt_ BOOL *pFullscreen,
+ /* [annotation][out] */
+ _COM_Outptr_opt_result_maybenull_ IDXGIOutput **ppTarget);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc )(
+ IDXGISwapChain3 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_SWAP_CHAIN_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *ResizeBuffers )(
+ IDXGISwapChain3 * This,
+ /* [in] */ UINT BufferCount,
+ /* [in] */ UINT Width,
+ /* [in] */ UINT Height,
+ /* [in] */ DXGI_FORMAT NewFormat,
+ /* [in] */ UINT SwapChainFlags);
+
+ HRESULT ( STDMETHODCALLTYPE *ResizeTarget )(
+ IDXGISwapChain3 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_MODE_DESC *pNewTargetParameters);
+
+ HRESULT ( STDMETHODCALLTYPE *GetContainingOutput )(
+ IDXGISwapChain3 * This,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIOutput **ppOutput);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )(
+ IDXGISwapChain3 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_FRAME_STATISTICS *pStats);
+
+ HRESULT ( STDMETHODCALLTYPE *GetLastPresentCount )(
+ IDXGISwapChain3 * This,
+ /* [annotation][out] */
+ _Out_ UINT *pLastPresentCount);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc1 )(
+ IDXGISwapChain3 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_SWAP_CHAIN_DESC1 *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFullscreenDesc )(
+ IDXGISwapChain3 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *GetHwnd )(
+ IDXGISwapChain3 * This,
+ /* [annotation][out] */
+ _Out_ HWND *pHwnd);
+
+ HRESULT ( STDMETHODCALLTYPE *GetCoreWindow )(
+ IDXGISwapChain3 * This,
+ /* [annotation][in] */
+ _In_ REFIID refiid,
+ /* [annotation][out] */
+ _COM_Outptr_ void **ppUnk);
+
+ HRESULT ( STDMETHODCALLTYPE *Present1 )(
+ IDXGISwapChain3 * This,
+ /* [in] */ UINT SyncInterval,
+ /* [in] */ UINT PresentFlags,
+ /* [annotation][in] */
+ _In_ const DXGI_PRESENT_PARAMETERS *pPresentParameters);
+
+ BOOL ( STDMETHODCALLTYPE *IsTemporaryMonoSupported )(
+ IDXGISwapChain3 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetRestrictToOutput )(
+ IDXGISwapChain3 * This,
+ /* [annotation][out] */
+ _Out_ IDXGIOutput **ppRestrictToOutput);
+
+ HRESULT ( STDMETHODCALLTYPE *SetBackgroundColor )(
+ IDXGISwapChain3 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_RGBA *pColor);
+
+ HRESULT ( STDMETHODCALLTYPE *GetBackgroundColor )(
+ IDXGISwapChain3 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_RGBA *pColor);
+
+ HRESULT ( STDMETHODCALLTYPE *SetRotation )(
+ IDXGISwapChain3 * This,
+ /* [annotation][in] */
+ _In_ DXGI_MODE_ROTATION Rotation);
+
+ HRESULT ( STDMETHODCALLTYPE *GetRotation )(
+ IDXGISwapChain3 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_MODE_ROTATION *pRotation);
+
+ HRESULT ( STDMETHODCALLTYPE *SetSourceSize )(
+ IDXGISwapChain3 * This,
+ UINT Width,
+ UINT Height);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSourceSize )(
+ IDXGISwapChain3 * This,
+ /* [annotation][out] */
+ _Out_ UINT *pWidth,
+ /* [annotation][out] */
+ _Out_ UINT *pHeight);
+
+ HRESULT ( STDMETHODCALLTYPE *SetMaximumFrameLatency )(
+ IDXGISwapChain3 * This,
+ UINT MaxLatency);
+
+ HRESULT ( STDMETHODCALLTYPE *GetMaximumFrameLatency )(
+ IDXGISwapChain3 * This,
+ /* [annotation][out] */
+ _Out_ UINT *pMaxLatency);
+
+ HANDLE ( STDMETHODCALLTYPE *GetFrameLatencyWaitableObject )(
+ IDXGISwapChain3 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetMatrixTransform )(
+ IDXGISwapChain3 * This,
+ const DXGI_MATRIX_3X2_F *pMatrix);
+
+ HRESULT ( STDMETHODCALLTYPE *GetMatrixTransform )(
+ IDXGISwapChain3 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_MATRIX_3X2_F *pMatrix);
+
+ UINT ( STDMETHODCALLTYPE *GetCurrentBackBufferIndex )(
+ IDXGISwapChain3 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *CheckColorSpaceSupport )(
+ IDXGISwapChain3 * This,
+ /* [annotation][in] */
+ _In_ DXGI_COLOR_SPACE_TYPE ColorSpace,
+ /* [annotation][out] */
+ _Out_ UINT *pColorSpaceSupport);
+
+ HRESULT ( STDMETHODCALLTYPE *SetColorSpace1 )(
+ IDXGISwapChain3 * This,
+ /* [annotation][in] */
+ _In_ DXGI_COLOR_SPACE_TYPE ColorSpace);
+
+ HRESULT ( STDMETHODCALLTYPE *ResizeBuffers1 )(
+ IDXGISwapChain3 * This,
+ /* [annotation][in] */
+ _In_ UINT BufferCount,
+ /* [annotation][in] */
+ _In_ UINT Width,
+ /* [annotation][in] */
+ _In_ UINT Height,
+ /* [annotation][in] */
+ _In_ DXGI_FORMAT Format,
+ /* [annotation][in] */
+ _In_ UINT SwapChainFlags,
+ /* [annotation][in] */
+ _In_reads_(BufferCount) const UINT *pCreationNodeMask,
+ /* [annotation][in] */
+ _In_reads_(BufferCount) IUnknown *const *ppPresentQueue);
+
+ END_INTERFACE
+ } IDXGISwapChain3Vtbl;
+
+ interface IDXGISwapChain3
+ {
+ CONST_VTBL struct IDXGISwapChain3Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGISwapChain3_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGISwapChain3_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGISwapChain3_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGISwapChain3_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGISwapChain3_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGISwapChain3_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGISwapChain3_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGISwapChain3_GetDevice(This,riid,ppDevice) \
+ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) )
+
+
+#define IDXGISwapChain3_Present(This,SyncInterval,Flags) \
+ ( (This)->lpVtbl -> Present(This,SyncInterval,Flags) )
+
+#define IDXGISwapChain3_GetBuffer(This,Buffer,riid,ppSurface) \
+ ( (This)->lpVtbl -> GetBuffer(This,Buffer,riid,ppSurface) )
+
+#define IDXGISwapChain3_SetFullscreenState(This,Fullscreen,pTarget) \
+ ( (This)->lpVtbl -> SetFullscreenState(This,Fullscreen,pTarget) )
+
+#define IDXGISwapChain3_GetFullscreenState(This,pFullscreen,ppTarget) \
+ ( (This)->lpVtbl -> GetFullscreenState(This,pFullscreen,ppTarget) )
+
+#define IDXGISwapChain3_GetDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc(This,pDesc) )
+
+#define IDXGISwapChain3_ResizeBuffers(This,BufferCount,Width,Height,NewFormat,SwapChainFlags) \
+ ( (This)->lpVtbl -> ResizeBuffers(This,BufferCount,Width,Height,NewFormat,SwapChainFlags) )
+
+#define IDXGISwapChain3_ResizeTarget(This,pNewTargetParameters) \
+ ( (This)->lpVtbl -> ResizeTarget(This,pNewTargetParameters) )
+
+#define IDXGISwapChain3_GetContainingOutput(This,ppOutput) \
+ ( (This)->lpVtbl -> GetContainingOutput(This,ppOutput) )
+
+#define IDXGISwapChain3_GetFrameStatistics(This,pStats) \
+ ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) )
+
+#define IDXGISwapChain3_GetLastPresentCount(This,pLastPresentCount) \
+ ( (This)->lpVtbl -> GetLastPresentCount(This,pLastPresentCount) )
+
+
+#define IDXGISwapChain3_GetDesc1(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc1(This,pDesc) )
+
+#define IDXGISwapChain3_GetFullscreenDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetFullscreenDesc(This,pDesc) )
+
+#define IDXGISwapChain3_GetHwnd(This,pHwnd) \
+ ( (This)->lpVtbl -> GetHwnd(This,pHwnd) )
+
+#define IDXGISwapChain3_GetCoreWindow(This,refiid,ppUnk) \
+ ( (This)->lpVtbl -> GetCoreWindow(This,refiid,ppUnk) )
+
+#define IDXGISwapChain3_Present1(This,SyncInterval,PresentFlags,pPresentParameters) \
+ ( (This)->lpVtbl -> Present1(This,SyncInterval,PresentFlags,pPresentParameters) )
+
+#define IDXGISwapChain3_IsTemporaryMonoSupported(This) \
+ ( (This)->lpVtbl -> IsTemporaryMonoSupported(This) )
+
+#define IDXGISwapChain3_GetRestrictToOutput(This,ppRestrictToOutput) \
+ ( (This)->lpVtbl -> GetRestrictToOutput(This,ppRestrictToOutput) )
+
+#define IDXGISwapChain3_SetBackgroundColor(This,pColor) \
+ ( (This)->lpVtbl -> SetBackgroundColor(This,pColor) )
+
+#define IDXGISwapChain3_GetBackgroundColor(This,pColor) \
+ ( (This)->lpVtbl -> GetBackgroundColor(This,pColor) )
+
+#define IDXGISwapChain3_SetRotation(This,Rotation) \
+ ( (This)->lpVtbl -> SetRotation(This,Rotation) )
+
+#define IDXGISwapChain3_GetRotation(This,pRotation) \
+ ( (This)->lpVtbl -> GetRotation(This,pRotation) )
+
+
+#define IDXGISwapChain3_SetSourceSize(This,Width,Height) \
+ ( (This)->lpVtbl -> SetSourceSize(This,Width,Height) )
+
+#define IDXGISwapChain3_GetSourceSize(This,pWidth,pHeight) \
+ ( (This)->lpVtbl -> GetSourceSize(This,pWidth,pHeight) )
+
+#define IDXGISwapChain3_SetMaximumFrameLatency(This,MaxLatency) \
+ ( (This)->lpVtbl -> SetMaximumFrameLatency(This,MaxLatency) )
+
+#define IDXGISwapChain3_GetMaximumFrameLatency(This,pMaxLatency) \
+ ( (This)->lpVtbl -> GetMaximumFrameLatency(This,pMaxLatency) )
+
+#define IDXGISwapChain3_GetFrameLatencyWaitableObject(This) \
+ ( (This)->lpVtbl -> GetFrameLatencyWaitableObject(This) )
+
+#define IDXGISwapChain3_SetMatrixTransform(This,pMatrix) \
+ ( (This)->lpVtbl -> SetMatrixTransform(This,pMatrix) )
+
+#define IDXGISwapChain3_GetMatrixTransform(This,pMatrix) \
+ ( (This)->lpVtbl -> GetMatrixTransform(This,pMatrix) )
+
+
+#define IDXGISwapChain3_GetCurrentBackBufferIndex(This) \
+ ( (This)->lpVtbl -> GetCurrentBackBufferIndex(This) )
+
+#define IDXGISwapChain3_CheckColorSpaceSupport(This,ColorSpace,pColorSpaceSupport) \
+ ( (This)->lpVtbl -> CheckColorSpaceSupport(This,ColorSpace,pColorSpaceSupport) )
+
+#define IDXGISwapChain3_SetColorSpace1(This,ColorSpace) \
+ ( (This)->lpVtbl -> SetColorSpace1(This,ColorSpace) )
+
+#define IDXGISwapChain3_ResizeBuffers1(This,BufferCount,Width,Height,Format,SwapChainFlags,pCreationNodeMask,ppPresentQueue) \
+ ( (This)->lpVtbl -> ResizeBuffers1(This,BufferCount,Width,Height,Format,SwapChainFlags,pCreationNodeMask,ppPresentQueue) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGISwapChain3_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi1_4_0000_0001 */
+/* [local] */
+
+typedef
+enum DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG
+ {
+ DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1
+ } DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0001_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0001_v0_0_s_ifspec;
+
+#ifndef __IDXGIOutput4_INTERFACE_DEFINED__
+#define __IDXGIOutput4_INTERFACE_DEFINED__
+
+/* interface IDXGIOutput4 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIOutput4;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("dc7dca35-2196-414d-9F53-617884032a60")
+ IDXGIOutput4 : public IDXGIOutput3
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE CheckOverlayColorSpaceSupport(
+ /* [annotation][in] */
+ _In_ DXGI_FORMAT Format,
+ /* [annotation][in] */
+ _In_ DXGI_COLOR_SPACE_TYPE ColorSpace,
+ /* [annotation][in] */
+ _In_ IUnknown *pConcernedDevice,
+ /* [annotation][out] */
+ _Out_ UINT *pFlags) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIOutput4Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIOutput4 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIOutput4 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIOutput4 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIOutput4 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIOutput4 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIOutput4 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIOutput4 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc )(
+ IDXGIOutput4 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_OUTPUT_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList )(
+ IDXGIOutput4 * This,
+ /* [in] */ DXGI_FORMAT EnumFormat,
+ /* [in] */ UINT Flags,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pNumModes,
+ /* [annotation][out] */
+ _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode )(
+ IDXGIOutput4 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_MODE_DESC *pModeToMatch,
+ /* [annotation][out] */
+ _Out_ DXGI_MODE_DESC *pClosestMatch,
+ /* [annotation][in] */
+ _In_opt_ IUnknown *pConcernedDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *WaitForVBlank )(
+ IDXGIOutput4 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *TakeOwnership )(
+ IDXGIOutput4 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ BOOL Exclusive);
+
+ void ( STDMETHODCALLTYPE *ReleaseOwnership )(
+ IDXGIOutput4 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGammaControlCapabilities )(
+ IDXGIOutput4 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps);
+
+ HRESULT ( STDMETHODCALLTYPE *SetGammaControl )(
+ IDXGIOutput4 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_GAMMA_CONTROL *pArray);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGammaControl )(
+ IDXGIOutput4 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_GAMMA_CONTROL *pArray);
+
+ HRESULT ( STDMETHODCALLTYPE *SetDisplaySurface )(
+ IDXGIOutput4 * This,
+ /* [annotation][in] */
+ _In_ IDXGISurface *pScanoutSurface);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData )(
+ IDXGIOutput4 * This,
+ /* [annotation][in] */
+ _In_ IDXGISurface *pDestination);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFrameStatistics )(
+ IDXGIOutput4 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_FRAME_STATISTICS *pStats);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplayModeList1 )(
+ IDXGIOutput4 * This,
+ /* [in] */ DXGI_FORMAT EnumFormat,
+ /* [in] */ UINT Flags,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pNumModes,
+ /* [annotation][out] */
+ _Out_writes_to_opt_(*pNumModes,*pNumModes) DXGI_MODE_DESC1 *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *FindClosestMatchingMode1 )(
+ IDXGIOutput4 * This,
+ /* [annotation][in] */
+ _In_ const DXGI_MODE_DESC1 *pModeToMatch,
+ /* [annotation][out] */
+ _Out_ DXGI_MODE_DESC1 *pClosestMatch,
+ /* [annotation][in] */
+ _In_opt_ IUnknown *pConcernedDevice);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplaySurfaceData1 )(
+ IDXGIOutput4 * This,
+ /* [annotation][in] */
+ _In_ IDXGIResource *pDestination);
+
+ HRESULT ( STDMETHODCALLTYPE *DuplicateOutput )(
+ IDXGIOutput4 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIOutputDuplication **ppOutputDuplication);
+
+ BOOL ( STDMETHODCALLTYPE *SupportsOverlays )(
+ IDXGIOutput4 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *CheckOverlaySupport )(
+ IDXGIOutput4 * This,
+ /* [annotation][in] */
+ _In_ DXGI_FORMAT EnumFormat,
+ /* [annotation][out] */
+ _In_ IUnknown *pConcernedDevice,
+ /* [annotation][out] */
+ _Out_ UINT *pFlags);
+
+ HRESULT ( STDMETHODCALLTYPE *CheckOverlayColorSpaceSupport )(
+ IDXGIOutput4 * This,
+ /* [annotation][in] */
+ _In_ DXGI_FORMAT Format,
+ /* [annotation][in] */
+ _In_ DXGI_COLOR_SPACE_TYPE ColorSpace,
+ /* [annotation][in] */
+ _In_ IUnknown *pConcernedDevice,
+ /* [annotation][out] */
+ _Out_ UINT *pFlags);
+
+ END_INTERFACE
+ } IDXGIOutput4Vtbl;
+
+ interface IDXGIOutput4
+ {
+ CONST_VTBL struct IDXGIOutput4Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIOutput4_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIOutput4_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIOutput4_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIOutput4_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIOutput4_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIOutput4_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIOutput4_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIOutput4_GetDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc(This,pDesc) )
+
+#define IDXGIOutput4_GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) \
+ ( (This)->lpVtbl -> GetDisplayModeList(This,EnumFormat,Flags,pNumModes,pDesc) )
+
+#define IDXGIOutput4_FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) \
+ ( (This)->lpVtbl -> FindClosestMatchingMode(This,pModeToMatch,pClosestMatch,pConcernedDevice) )
+
+#define IDXGIOutput4_WaitForVBlank(This) \
+ ( (This)->lpVtbl -> WaitForVBlank(This) )
+
+#define IDXGIOutput4_TakeOwnership(This,pDevice,Exclusive) \
+ ( (This)->lpVtbl -> TakeOwnership(This,pDevice,Exclusive) )
+
+#define IDXGIOutput4_ReleaseOwnership(This) \
+ ( (This)->lpVtbl -> ReleaseOwnership(This) )
+
+#define IDXGIOutput4_GetGammaControlCapabilities(This,pGammaCaps) \
+ ( (This)->lpVtbl -> GetGammaControlCapabilities(This,pGammaCaps) )
+
+#define IDXGIOutput4_SetGammaControl(This,pArray) \
+ ( (This)->lpVtbl -> SetGammaControl(This,pArray) )
+
+#define IDXGIOutput4_GetGammaControl(This,pArray) \
+ ( (This)->lpVtbl -> GetGammaControl(This,pArray) )
+
+#define IDXGIOutput4_SetDisplaySurface(This,pScanoutSurface) \
+ ( (This)->lpVtbl -> SetDisplaySurface(This,pScanoutSurface) )
+
+#define IDXGIOutput4_GetDisplaySurfaceData(This,pDestination) \
+ ( (This)->lpVtbl -> GetDisplaySurfaceData(This,pDestination) )
+
+#define IDXGIOutput4_GetFrameStatistics(This,pStats) \
+ ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) )
+
+
+#define IDXGIOutput4_GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) \
+ ( (This)->lpVtbl -> GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) )
+
+#define IDXGIOutput4_FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) \
+ ( (This)->lpVtbl -> FindClosestMatchingMode1(This,pModeToMatch,pClosestMatch,pConcernedDevice) )
+
+#define IDXGIOutput4_GetDisplaySurfaceData1(This,pDestination) \
+ ( (This)->lpVtbl -> GetDisplaySurfaceData1(This,pDestination) )
+
+#define IDXGIOutput4_DuplicateOutput(This,pDevice,ppOutputDuplication) \
+ ( (This)->lpVtbl -> DuplicateOutput(This,pDevice,ppOutputDuplication) )
+
+
+#define IDXGIOutput4_SupportsOverlays(This) \
+ ( (This)->lpVtbl -> SupportsOverlays(This) )
+
+
+#define IDXGIOutput4_CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) \
+ ( (This)->lpVtbl -> CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) )
+
+
+#define IDXGIOutput4_CheckOverlayColorSpaceSupport(This,Format,ColorSpace,pConcernedDevice,pFlags) \
+ ( (This)->lpVtbl -> CheckOverlayColorSpaceSupport(This,Format,ColorSpace,pConcernedDevice,pFlags) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIOutput4_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDXGIFactory4_INTERFACE_DEFINED__
+#define __IDXGIFactory4_INTERFACE_DEFINED__
+
+/* interface IDXGIFactory4 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIFactory4;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("1bc6ea02-ef36-464f-bf0c-21ca39e5168a")
+ IDXGIFactory4 : public IDXGIFactory3
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE EnumAdapterByLuid(
+ /* [annotation] */
+ _In_ LUID AdapterLuid,
+ /* [annotation] */
+ _In_ REFIID riid,
+ /* [annotation] */
+ _COM_Outptr_ void **ppvAdapter) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE EnumWarpAdapter(
+ /* [annotation] */
+ _In_ REFIID riid,
+ /* [annotation] */
+ _COM_Outptr_ void **ppvAdapter) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIFactory4Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIFactory4 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIFactory4 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIFactory4 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIFactory4 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIFactory4 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIFactory4 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIFactory4 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *EnumAdapters )(
+ IDXGIFactory4 * This,
+ /* [in] */ UINT Adapter,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter **ppAdapter);
+
+ HRESULT ( STDMETHODCALLTYPE *MakeWindowAssociation )(
+ IDXGIFactory4 * This,
+ HWND WindowHandle,
+ UINT Flags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetWindowAssociation )(
+ IDXGIFactory4 * This,
+ /* [annotation][out] */
+ _Out_ HWND *pWindowHandle);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSwapChain )(
+ IDXGIFactory4 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_ DXGI_SWAP_CHAIN_DESC *pDesc,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain **ppSwapChain);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSoftwareAdapter )(
+ IDXGIFactory4 * This,
+ /* [in] */ HMODULE Module,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter **ppAdapter);
+
+ HRESULT ( STDMETHODCALLTYPE *EnumAdapters1 )(
+ IDXGIFactory4 * This,
+ /* [in] */ UINT Adapter,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGIAdapter1 **ppAdapter);
+
+ BOOL ( STDMETHODCALLTYPE *IsCurrent )(
+ IDXGIFactory4 * This);
+
+ BOOL ( STDMETHODCALLTYPE *IsWindowedStereoEnabled )(
+ IDXGIFactory4 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForHwnd )(
+ IDXGIFactory4 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_ HWND hWnd,
+ /* [annotation][in] */
+ _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+ /* [annotation][in] */
+ _In_opt_ const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pRestrictToOutput,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain1 **ppSwapChain);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForCoreWindow )(
+ IDXGIFactory4 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_ IUnknown *pWindow,
+ /* [annotation][in] */
+ _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pRestrictToOutput,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain1 **ppSwapChain);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSharedResourceAdapterLuid )(
+ IDXGIFactory4 * This,
+ /* [annotation] */
+ _In_ HANDLE hResource,
+ /* [annotation] */
+ _Out_ LUID *pLuid);
+
+ HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusWindow )(
+ IDXGIFactory4 * This,
+ /* [annotation][in] */
+ _In_ HWND WindowHandle,
+ /* [annotation][in] */
+ _In_ UINT wMsg,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie);
+
+ HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusEvent )(
+ IDXGIFactory4 * This,
+ /* [annotation][in] */
+ _In_ HANDLE hEvent,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie);
+
+ void ( STDMETHODCALLTYPE *UnregisterStereoStatus )(
+ IDXGIFactory4 * This,
+ /* [annotation][in] */
+ _In_ DWORD dwCookie);
+
+ HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusWindow )(
+ IDXGIFactory4 * This,
+ /* [annotation][in] */
+ _In_ HWND WindowHandle,
+ /* [annotation][in] */
+ _In_ UINT wMsg,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie);
+
+ HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusEvent )(
+ IDXGIFactory4 * This,
+ /* [annotation][in] */
+ _In_ HANDLE hEvent,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie);
+
+ void ( STDMETHODCALLTYPE *UnregisterOcclusionStatus )(
+ IDXGIFactory4 * This,
+ /* [annotation][in] */
+ _In_ DWORD dwCookie);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForComposition )(
+ IDXGIFactory4 * This,
+ /* [annotation][in] */
+ _In_ IUnknown *pDevice,
+ /* [annotation][in] */
+ _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+ /* [annotation][in] */
+ _In_opt_ IDXGIOutput *pRestrictToOutput,
+ /* [annotation][out] */
+ _COM_Outptr_ IDXGISwapChain1 **ppSwapChain);
+
+ UINT ( STDMETHODCALLTYPE *GetCreationFlags )(
+ IDXGIFactory4 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *EnumAdapterByLuid )(
+ IDXGIFactory4 * This,
+ /* [annotation] */
+ _In_ LUID AdapterLuid,
+ /* [annotation] */
+ _In_ REFIID riid,
+ /* [annotation] */
+ _COM_Outptr_ void **ppvAdapter);
+
+ HRESULT ( STDMETHODCALLTYPE *EnumWarpAdapter )(
+ IDXGIFactory4 * This,
+ /* [annotation] */
+ _In_ REFIID riid,
+ /* [annotation] */
+ _COM_Outptr_ void **ppvAdapter);
+
+ END_INTERFACE
+ } IDXGIFactory4Vtbl;
+
+ interface IDXGIFactory4
+ {
+ CONST_VTBL struct IDXGIFactory4Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIFactory4_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIFactory4_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIFactory4_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIFactory4_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIFactory4_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIFactory4_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIFactory4_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIFactory4_EnumAdapters(This,Adapter,ppAdapter) \
+ ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) )
+
+#define IDXGIFactory4_MakeWindowAssociation(This,WindowHandle,Flags) \
+ ( (This)->lpVtbl -> MakeWindowAssociation(This,WindowHandle,Flags) )
+
+#define IDXGIFactory4_GetWindowAssociation(This,pWindowHandle) \
+ ( (This)->lpVtbl -> GetWindowAssociation(This,pWindowHandle) )
+
+#define IDXGIFactory4_CreateSwapChain(This,pDevice,pDesc,ppSwapChain) \
+ ( (This)->lpVtbl -> CreateSwapChain(This,pDevice,pDesc,ppSwapChain) )
+
+#define IDXGIFactory4_CreateSoftwareAdapter(This,Module,ppAdapter) \
+ ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) )
+
+
+#define IDXGIFactory4_EnumAdapters1(This,Adapter,ppAdapter) \
+ ( (This)->lpVtbl -> EnumAdapters1(This,Adapter,ppAdapter) )
+
+#define IDXGIFactory4_IsCurrent(This) \
+ ( (This)->lpVtbl -> IsCurrent(This) )
+
+
+#define IDXGIFactory4_IsWindowedStereoEnabled(This) \
+ ( (This)->lpVtbl -> IsWindowedStereoEnabled(This) )
+
+#define IDXGIFactory4_CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) \
+ ( (This)->lpVtbl -> CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) )
+
+#define IDXGIFactory4_CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) \
+ ( (This)->lpVtbl -> CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) )
+
+#define IDXGIFactory4_GetSharedResourceAdapterLuid(This,hResource,pLuid) \
+ ( (This)->lpVtbl -> GetSharedResourceAdapterLuid(This,hResource,pLuid) )
+
+#define IDXGIFactory4_RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) \
+ ( (This)->lpVtbl -> RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) )
+
+#define IDXGIFactory4_RegisterStereoStatusEvent(This,hEvent,pdwCookie) \
+ ( (This)->lpVtbl -> RegisterStereoStatusEvent(This,hEvent,pdwCookie) )
+
+#define IDXGIFactory4_UnregisterStereoStatus(This,dwCookie) \
+ ( (This)->lpVtbl -> UnregisterStereoStatus(This,dwCookie) )
+
+#define IDXGIFactory4_RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) \
+ ( (This)->lpVtbl -> RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) )
+
+#define IDXGIFactory4_RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) \
+ ( (This)->lpVtbl -> RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) )
+
+#define IDXGIFactory4_UnregisterOcclusionStatus(This,dwCookie) \
+ ( (This)->lpVtbl -> UnregisterOcclusionStatus(This,dwCookie) )
+
+#define IDXGIFactory4_CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) \
+ ( (This)->lpVtbl -> CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) )
+
+
+#define IDXGIFactory4_GetCreationFlags(This) \
+ ( (This)->lpVtbl -> GetCreationFlags(This) )
+
+
+#define IDXGIFactory4_EnumAdapterByLuid(This,AdapterLuid,riid,ppvAdapter) \
+ ( (This)->lpVtbl -> EnumAdapterByLuid(This,AdapterLuid,riid,ppvAdapter) )
+
+#define IDXGIFactory4_EnumWarpAdapter(This,riid,ppvAdapter) \
+ ( (This)->lpVtbl -> EnumWarpAdapter(This,riid,ppvAdapter) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIFactory4_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi1_4_0000_0003 */
+/* [local] */
+
+typedef
+enum DXGI_MEMORY_SEGMENT_GROUP
+ {
+ DXGI_MEMORY_SEGMENT_GROUP_LOCAL = 0,
+ DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL = 1
+ } DXGI_MEMORY_SEGMENT_GROUP;
+
+typedef struct DXGI_QUERY_VIDEO_MEMORY_INFO
+ {
+ UINT64 Budget;
+ UINT64 CurrentUsage;
+ UINT64 AvailableForReservation;
+ UINT64 CurrentReservation;
+ } DXGI_QUERY_VIDEO_MEMORY_INFO;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0003_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0003_v0_0_s_ifspec;
+
+#ifndef __IDXGIAdapter3_INTERFACE_DEFINED__
+#define __IDXGIAdapter3_INTERFACE_DEFINED__
+
+/* interface IDXGIAdapter3 */
+/* [unique][local][uuid][object] */
+
+
+EXTERN_C const IID IID_IDXGIAdapter3;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("645967A4-1392-4310-A798-8053CE3E93FD")
+ IDXGIAdapter3 : public IDXGIAdapter2
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE RegisterHardwareContentProtectionTeardownStatusEvent(
+ /* [annotation][in] */
+ _In_ HANDLE hEvent,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie) = 0;
+
+ virtual void STDMETHODCALLTYPE UnregisterHardwareContentProtectionTeardownStatus(
+ /* [annotation][in] */
+ _In_ DWORD dwCookie) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE QueryVideoMemoryInfo(
+ /* [annotation][in] */
+ _In_ UINT NodeIndex,
+ /* [annotation][in] */
+ _In_ DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup,
+ /* [annotation][out] */
+ _Out_ DXGI_QUERY_VIDEO_MEMORY_INFO *pVideoMemoryInfo) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetVideoMemoryReservation(
+ /* [annotation][in] */
+ _In_ UINT NodeIndex,
+ /* [annotation][in] */
+ _In_ DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup,
+ /* [annotation][in] */
+ _In_ UINT64 Reservation) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE RegisterVideoMemoryBudgetChangeNotificationEvent(
+ /* [annotation][in] */
+ _In_ HANDLE hEvent,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie) = 0;
+
+ virtual void STDMETHODCALLTYPE UnregisterVideoMemoryBudgetChangeNotification(
+ /* [annotation][in] */
+ _In_ DWORD dwCookie) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IDXGIAdapter3Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDXGIAdapter3 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDXGIAdapter3 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDXGIAdapter3 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateData )(
+ IDXGIAdapter3 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [in] */ UINT DataSize,
+ /* [annotation][in] */
+ _In_reads_bytes_(DataSize) const void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )(
+ IDXGIAdapter3 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][in] */
+ _In_ const IUnknown *pUnknown);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPrivateData )(
+ IDXGIAdapter3 * This,
+ /* [annotation][in] */
+ _In_ REFGUID Name,
+ /* [annotation][out][in] */
+ _Inout_ UINT *pDataSize,
+ /* [annotation][out] */
+ _Out_writes_bytes_(*pDataSize) void *pData);
+
+ HRESULT ( STDMETHODCALLTYPE *GetParent )(
+ IDXGIAdapter3 * This,
+ /* [annotation][in] */
+ _In_ REFIID riid,
+ /* [annotation][retval][out] */
+ _COM_Outptr_ void **ppParent);
+
+ HRESULT ( STDMETHODCALLTYPE *EnumOutputs )(
+ IDXGIAdapter3 * This,
+ /* [in] */ UINT Output,
+ /* [annotation][out][in] */
+ _COM_Outptr_ IDXGIOutput **ppOutput);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc )(
+ IDXGIAdapter3 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_ADAPTER_DESC *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *CheckInterfaceSupport )(
+ IDXGIAdapter3 * This,
+ /* [annotation][in] */
+ _In_ REFGUID InterfaceName,
+ /* [annotation][out] */
+ _Out_ LARGE_INTEGER *pUMDVersion);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc1 )(
+ IDXGIAdapter3 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_ADAPTER_DESC1 *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDesc2 )(
+ IDXGIAdapter3 * This,
+ /* [annotation][out] */
+ _Out_ DXGI_ADAPTER_DESC2 *pDesc);
+
+ HRESULT ( STDMETHODCALLTYPE *RegisterHardwareContentProtectionTeardownStatusEvent )(
+ IDXGIAdapter3 * This,
+ /* [annotation][in] */
+ _In_ HANDLE hEvent,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie);
+
+ void ( STDMETHODCALLTYPE *UnregisterHardwareContentProtectionTeardownStatus )(
+ IDXGIAdapter3 * This,
+ /* [annotation][in] */
+ _In_ DWORD dwCookie);
+
+ HRESULT ( STDMETHODCALLTYPE *QueryVideoMemoryInfo )(
+ IDXGIAdapter3 * This,
+ /* [annotation][in] */
+ _In_ UINT NodeIndex,
+ /* [annotation][in] */
+ _In_ DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup,
+ /* [annotation][out] */
+ _Out_ DXGI_QUERY_VIDEO_MEMORY_INFO *pVideoMemoryInfo);
+
+ HRESULT ( STDMETHODCALLTYPE *SetVideoMemoryReservation )(
+ IDXGIAdapter3 * This,
+ /* [annotation][in] */
+ _In_ UINT NodeIndex,
+ /* [annotation][in] */
+ _In_ DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup,
+ /* [annotation][in] */
+ _In_ UINT64 Reservation);
+
+ HRESULT ( STDMETHODCALLTYPE *RegisterVideoMemoryBudgetChangeNotificationEvent )(
+ IDXGIAdapter3 * This,
+ /* [annotation][in] */
+ _In_ HANDLE hEvent,
+ /* [annotation][out] */
+ _Out_ DWORD *pdwCookie);
+
+ void ( STDMETHODCALLTYPE *UnregisterVideoMemoryBudgetChangeNotification )(
+ IDXGIAdapter3 * This,
+ /* [annotation][in] */
+ _In_ DWORD dwCookie);
+
+ END_INTERFACE
+ } IDXGIAdapter3Vtbl;
+
+ interface IDXGIAdapter3
+ {
+ CONST_VTBL struct IDXGIAdapter3Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDXGIAdapter3_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDXGIAdapter3_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDXGIAdapter3_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDXGIAdapter3_SetPrivateData(This,Name,DataSize,pData) \
+ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) )
+
+#define IDXGIAdapter3_SetPrivateDataInterface(This,Name,pUnknown) \
+ ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) )
+
+#define IDXGIAdapter3_GetPrivateData(This,Name,pDataSize,pData) \
+ ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) )
+
+#define IDXGIAdapter3_GetParent(This,riid,ppParent) \
+ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) )
+
+
+#define IDXGIAdapter3_EnumOutputs(This,Output,ppOutput) \
+ ( (This)->lpVtbl -> EnumOutputs(This,Output,ppOutput) )
+
+#define IDXGIAdapter3_GetDesc(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc(This,pDesc) )
+
+#define IDXGIAdapter3_CheckInterfaceSupport(This,InterfaceName,pUMDVersion) \
+ ( (This)->lpVtbl -> CheckInterfaceSupport(This,InterfaceName,pUMDVersion) )
+
+
+#define IDXGIAdapter3_GetDesc1(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc1(This,pDesc) )
+
+
+#define IDXGIAdapter3_GetDesc2(This,pDesc) \
+ ( (This)->lpVtbl -> GetDesc2(This,pDesc) )
+
+
+#define IDXGIAdapter3_RegisterHardwareContentProtectionTeardownStatusEvent(This,hEvent,pdwCookie) \
+ ( (This)->lpVtbl -> RegisterHardwareContentProtectionTeardownStatusEvent(This,hEvent,pdwCookie) )
+
+#define IDXGIAdapter3_UnregisterHardwareContentProtectionTeardownStatus(This,dwCookie) \
+ ( (This)->lpVtbl -> UnregisterHardwareContentProtectionTeardownStatus(This,dwCookie) )
+
+#define IDXGIAdapter3_QueryVideoMemoryInfo(This,NodeIndex,MemorySegmentGroup,pVideoMemoryInfo) \
+ ( (This)->lpVtbl -> QueryVideoMemoryInfo(This,NodeIndex,MemorySegmentGroup,pVideoMemoryInfo) )
+
+#define IDXGIAdapter3_SetVideoMemoryReservation(This,NodeIndex,MemorySegmentGroup,Reservation) \
+ ( (This)->lpVtbl -> SetVideoMemoryReservation(This,NodeIndex,MemorySegmentGroup,Reservation) )
+
+#define IDXGIAdapter3_RegisterVideoMemoryBudgetChangeNotificationEvent(This,hEvent,pdwCookie) \
+ ( (This)->lpVtbl -> RegisterVideoMemoryBudgetChangeNotificationEvent(This,hEvent,pdwCookie) )
+
+#define IDXGIAdapter3_UnregisterVideoMemoryBudgetChangeNotification(This,dwCookie) \
+ ( (This)->lpVtbl -> UnregisterVideoMemoryBudgetChangeNotification(This,dwCookie) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDXGIAdapter3_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi1_4_0000_0004 */
+/* [local] */
+
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
+#pragma endregion
+DEFINE_GUID(IID_IDXGISwapChain3,0x94d99bdb,0xf1f8,0x4ab0,0xb2,0x36,0x7d,0xa0,0x17,0x0e,0xda,0xb1);
+DEFINE_GUID(IID_IDXGIOutput4,0xdc7dca35,0x2196,0x414d,0x9F,0x53,0x61,0x78,0x84,0x03,0x2a,0x60);
+DEFINE_GUID(IID_IDXGIFactory4,0x1bc6ea02,0xef36,0x464f,0xbf,0x0c,0x21,0xca,0x39,0xe5,0x16,0x8a);
+DEFINE_GUID(IID_IDXGIAdapter3,0x645967A4,0x1392,0x4310,0xA7,0x98,0x80,0x53,0xCE,0x3E,0x93,0xFD);
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0004_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0004_v0_0_s_ifspec;
+
+/* Additional Prototypes for ALL interfaces */
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
diff --git a/external/D3D12/include/dxgitype.h b/external/D3D12/include/dxgitype.h
new file mode 100644
index 0000000..525840e
--- /dev/null
+++ b/external/D3D12/include/dxgitype.h
@@ -0,0 +1,149 @@
+//
+// Copyright (C) Microsoft. All rights reserved.
+//
+#ifndef __dxgitype_h__
+#define __dxgitype_h__
+
+#include "dxgiformat.h"
+
+#define _FACDXGI 0x87a
+#define MAKE_DXGI_HRESULT(code) MAKE_HRESULT(1, _FACDXGI, code)
+#define MAKE_DXGI_STATUS(code) MAKE_HRESULT(0, _FACDXGI, code)
+
+// DXGI error messages have moved to winerror.h
+
+#define DXGI_CPU_ACCESS_NONE ( 0 )
+#define DXGI_CPU_ACCESS_DYNAMIC ( 1 )
+#define DXGI_CPU_ACCESS_READ_WRITE ( 2 )
+#define DXGI_CPU_ACCESS_SCRATCH ( 3 )
+#define DXGI_CPU_ACCESS_FIELD 15
+
+
+typedef struct DXGI_RGB
+{
+ float Red;
+ float Green;
+ float Blue;
+} DXGI_RGB;
+
+#ifndef D3DCOLORVALUE_DEFINED
+typedef struct _D3DCOLORVALUE {
+ float r;
+ float g;
+ float b;
+ float a;
+} D3DCOLORVALUE;
+
+#define D3DCOLORVALUE_DEFINED
+#endif
+
+typedef D3DCOLORVALUE DXGI_RGBA;
+
+typedef struct DXGI_GAMMA_CONTROL
+{
+ DXGI_RGB Scale;
+ DXGI_RGB Offset;
+ DXGI_RGB GammaCurve[ 1025 ];
+} DXGI_GAMMA_CONTROL;
+
+typedef struct DXGI_GAMMA_CONTROL_CAPABILITIES
+{
+ BOOL ScaleAndOffsetSupported;
+ float MaxConvertedValue;
+ float MinConvertedValue;
+ UINT NumGammaControlPoints;
+ float ControlPointPositions[1025];
+} DXGI_GAMMA_CONTROL_CAPABILITIES;
+
+typedef struct DXGI_RATIONAL
+{
+ UINT Numerator;
+ UINT Denominator;
+} DXGI_RATIONAL;
+
+typedef enum DXGI_MODE_SCANLINE_ORDER
+{
+ DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED = 0,
+ DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE = 1,
+ DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST = 2,
+ DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST = 3
+} DXGI_MODE_SCANLINE_ORDER;
+
+typedef enum DXGI_MODE_SCALING
+{
+ DXGI_MODE_SCALING_UNSPECIFIED = 0,
+ DXGI_MODE_SCALING_CENTERED = 1,
+ DXGI_MODE_SCALING_STRETCHED = 2
+} DXGI_MODE_SCALING;
+
+typedef enum DXGI_MODE_ROTATION
+{
+ DXGI_MODE_ROTATION_UNSPECIFIED = 0,
+ DXGI_MODE_ROTATION_IDENTITY = 1,
+ DXGI_MODE_ROTATION_ROTATE90 = 2,
+ DXGI_MODE_ROTATION_ROTATE180 = 3,
+ DXGI_MODE_ROTATION_ROTATE270 = 4
+} DXGI_MODE_ROTATION;
+
+typedef struct DXGI_MODE_DESC
+{
+ UINT Width;
+ UINT Height;
+ DXGI_RATIONAL RefreshRate;
+ DXGI_FORMAT Format;
+ DXGI_MODE_SCANLINE_ORDER ScanlineOrdering;
+ DXGI_MODE_SCALING Scaling;
+} DXGI_MODE_DESC;
+
+// The following values are used with DXGI_SAMPLE_DESC::Quality:
+#define DXGI_STANDARD_MULTISAMPLE_QUALITY_PATTERN 0xffffffff
+#define DXGI_CENTER_MULTISAMPLE_QUALITY_PATTERN 0xfffffffe
+
+typedef struct DXGI_SAMPLE_DESC
+{
+ UINT Count;
+ UINT Quality;
+} DXGI_SAMPLE_DESC;
+
+typedef enum DXGI_COLOR_SPACE_TYPE
+{
+ DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 = 0,
+ DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709 = 1,
+ DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P709 = 2,
+ DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P2020 = 3,
+ DXGI_COLOR_SPACE_RESERVED = 4,
+ DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601 = 5,
+ DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601 = 6,
+ DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P601 = 7,
+ DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709 = 8,
+ DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P709 = 9,
+ DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020 = 10,
+ DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020 = 11,
+ DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020 = 12,
+ DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_LEFT_P2020 = 13,
+ DXGI_COLOR_SPACE_RGB_STUDIO_G2084_NONE_P2020 = 14,
+ DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_TOPLEFT_P2020 = 15,
+ DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_TOPLEFT_P2020 = 16,
+ DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P2020 = 17,
+ DXGI_COLOR_SPACE_CUSTOM = 0xFFFFFFFF
+} DXGI_COLOR_SPACE_TYPE;
+
+typedef struct DXGI_JPEG_DC_HUFFMAN_TABLE
+{
+ BYTE CodeCounts[12];
+ BYTE CodeValues[12];
+} DXGI_JPEG_DC_HUFFMAN_TABLE;
+
+typedef struct DXGI_JPEG_AC_HUFFMAN_TABLE
+{
+ BYTE CodeCounts[16];
+ BYTE CodeValues[162];
+} DXGI_JPEG_AC_HUFFMAN_TABLE;
+
+typedef struct DXGI_JPEG_QUANTIZATION_TABLE
+{
+ BYTE Elements[64];
+} DXGI_JPEG_QUANTIZATION_TABLE;
+
+#endif // __dxgitype_h__
+
diff --git a/external/D3D12/include/pix3.h b/external/D3D12/include/pix3.h
new file mode 100644
index 0000000..7668702
--- /dev/null
+++ b/external/D3D12/include/pix3.h
@@ -0,0 +1,126 @@
+//
+// This file was copied from //depot/rs_xbox_dev_flight/xbox/drivers/Graphics/Pix3/PixEvt/inc/pix3.h#4
+//
+// To refresh: run 'UpdateFromXbox -latest'
+//
+
+/*==========================================================================;
+ *
+ * Copyright (C) Microsoft Corporation. All Rights Reserved.
+ *
+ * File: pix3.h
+ * Content: PIX include file
+ *
+ ****************************************************************************/
+#pragma once
+
+#ifndef _PIX3_H_
+#define _PIX3_H_
+
+#include <sal.h>
+
+#ifndef __cplusplus
+#error "Only C++ files can include pix.h. C is not supported."
+#endif
+
+#if defined(XBOX) || defined(_XBOX_ONE) || defined(_DURANGO)
+#include "pix3_xbox.h"
+#else
+#include "pix3_win.h"
+#endif
+
+//
+// The PIX event/marker APIs compile to nothing on retail builds and on x86 builds
+//
+#if (!defined(USE_PIX)) && ((defined(_DEBUG) || DBG || (defined(PROFILE) && !defined(FASTCAP)) || defined(PROFILE_BUILD)) && !defined(i386) && defined(_AMD64_) && !defined(_PREFAST_))
+#define USE_PIX
+#endif
+
+#if defined(USE_PIX) && !defined(_AMD64_)
+#pragma message("Warning: Pix markers are only supported on AMD64")
+#endif
+
+// These flags are used by both PIXBeginCapture and PIXGetCaptureState
+#define PIX_CAPTURE_TIMING (1 << 0)
+#define PIX_CAPTURE_GPU (1 << 1)
+#define PIX_CAPTURE_FUNCTION_SUMMARY (1 << 2)
+#define PIX_CAPTURE_FUNCTION_DETAILS (1 << 3)
+#define PIX_CAPTURE_CALLGRAPH (1 << 4)
+#define PIX_CAPTURE_INSTRUCTION_TRACE (1 << 5)
+#define PIX_CAPTURE_SYSTEM_MONITOR_COUNTERS (1 << 6)
+#define PIX_CAPTURE_VIDEO (1 << 7)
+#define PIX_CAPTURE_AUDIO (1 << 8)
+
+typedef union PIXCaptureParameters
+{
+ struct GpuCaptureParameters
+ {
+ PVOID reserved;
+ } GpuCaptureParameters;
+
+ struct TimingCaptureParameters
+ {
+ BOOL CaptureCallstacks;
+ PWSTR FileName;
+ } TimingCaptureParameters;
+
+} PIXCaptureParameters, *PPIXCaptureParameters;
+
+
+
+#if defined (USE_PIX) && defined(_AMD64_)
+
+#include "PIXEventsCommon.h"
+#include "PIXEventsGenerated.h"
+
+// Starts a programmatically controlled capture.
+// captureFlags uses the PIX_CAPTURE_* family of flags to specify the type of capture to take
+extern "C" HRESULT WINAPI PIXBeginCapture(DWORD captureFlags, _In_opt_ const PPIXCaptureParameters captureParameters);
+
+// Stops a programmatically controlled capture
+// If discard == TRUE, the captured data is discarded
+// If discard == FALSE, the captured data is saved
+extern "C" HRESULT WINAPI PIXEndCapture(BOOL discard);
+
+extern "C" DWORD WINAPI PIXGetCaptureState();
+
+extern "C" void WINAPI PIXReportCounter(_In_ PCWSTR name, float value);
+
+#else
+
+// Eliminate these APIs when not using PIX
+inline HRESULT PIXBeginCapture(DWORD, _In_opt_ const PIXCaptureParameters*) { return S_OK; }
+inline HRESULT PIXEndCapture(BOOL) { return S_OK; }
+inline DWORD PIXGetCaptureState() { return 0; }
+inline void PIXReportCounter(_In_ PCWSTR, float) {}
+
+inline void PIXBeginEvent(UINT64, _In_ PCSTR, ...) {}
+inline void PIXBeginEvent(UINT64, _In_ PCWSTR, ...) {}
+inline void PIXBeginEvent(void*, UINT64, _In_ PCSTR, ...) {}
+inline void PIXBeginEvent(void*, UINT64, _In_ PCWSTR, ...) {}
+inline void PIXEndEvent() {}
+inline void PIXEndEvent(void*) {}
+inline void PIXSetMarker(UINT64, _In_ PCSTR, ...) {}
+inline void PIXSetMarker(UINT64, _In_ PCWSTR, ...) {}
+inline void PIXSetMarker(void*, UINT64, _In_ PCSTR, ...) {}
+inline void PIXSetMarker(void*, UINT64, _In_ PCWSTR, ...) {}
+inline void PIXScopedEvent(UINT64, _In_ PCSTR, ...) {}
+inline void PIXScopedEvent(UINT64, _In_ PCWSTR, ...) {}
+inline void PIXScopedEvent(void*, UINT64, _In_ PCSTR, ...) {}
+inline void PIXScopedEvent(void*, UINT64, _In_ PCWSTR, ...) {}
+
+// don't show warnings about expressions with no effect
+#pragma warning(disable:4548)
+#pragma warning(disable:4555)
+
+#endif // USE_PIX
+
+// Use these functions to specify colors to pass as metadata to a PIX event/marker API.
+// Use PIX_COLOR() to specify a particular color for an event.
+// Or, use PIX_COLOR_INDEX() to specify a set of unique event categories, and let PIX choose
+// the colors to represent each category.
+inline UINT PIX_COLOR(BYTE r, BYTE g, BYTE b) { return 0xff000000 | (r << 16) | (g << 8) | b; }
+inline UINT PIX_COLOR_INDEX(BYTE i) { return i; }
+const UINT PIX_COLOR_DEFAULT = PIX_COLOR_INDEX(0);
+
+#endif // _PIX3_H_
diff --git a/external/D3D12/include/pix3_win.h b/external/D3D12/include/pix3_win.h
new file mode 100644
index 0000000..4e7915b
--- /dev/null
+++ b/external/D3D12/include/pix3_win.h
@@ -0,0 +1,61 @@
+//
+// This file was copied from //depot/rs_xbox_dev_flight/xbox/drivers/Graphics/Pix3/PixEvt/inc/pix3_win.h#4
+//
+// To refresh: run 'UpdateFromXbox -latest'
+//
+
+/*==========================================================================;
+ *
+ * Copyright (C) Microsoft Corporation. All Rights Reserved.
+ *
+ * File: PIX3_win.h
+ * Content: PIX include file
+ * Don't include this file directly - use pix3.h
+ *
+ ****************************************************************************/
+
+#pragma once
+
+#ifndef _PIX3_H_
+#error Don't include this file directly - use pix3.h
+#endif
+
+#ifndef _PIX3_WIN_H_
+#define _PIX3_WIN_H_
+
+struct PIXEventsBlockInfo
+{
+};
+
+struct PIXEventsThreadInfo
+{
+ PIXEventsBlockInfo* block;
+ UINT64* biasedLimit;
+ UINT64* destination;
+ UINT64* limit;
+ UINT64 id;
+};
+
+extern "C" PIXEventsThreadInfo* PIXGetThreadInfo();
+
+// The following defines denote the different metadata values that have been used
+// by tools to denote how to parse pix marker event data. The first two values
+// are legacy values.
+#define WINPIX_EVENT_UNICODE_VERSION 0
+#define WINPIX_EVENT_ANSI_VERSION 1
+#define WINPIX_EVENT_PIX3BLOB_VERSION 2
+
+#define D3D12_EVENT_METADATA WINPIX_EVENT_PIX3BLOB_VERSION
+
+__forceinline UINT64 PIXGetTimestampCounter()
+{
+ LARGE_INTEGER time = {};
+ QueryPerformanceCounter(&time);
+ return time.QuadPart;
+}
+
+#define PIXSetCPUMarkerOnContext(context, metadata, ...) MakeCPUSetMarkerForContext(metadata, context, __VA_ARGS__)
+#define PIXBeginCPUEventOnContext(context, metadata, ...) MakeCPUBeginEventForContext(metadata, context, __VA_ARGS__)
+#define PIXEndCPUEventOnContext(context) MakeCPUEndEventForContext(context)
+
+#endif //_PIX3_WIN_H_
diff --git a/external/cub-1.3.2/cub/warp/specializations/warp_scan_smem.cuh b/external/cub-1.3.2/cub/warp/specializations/warp_scan_smem.cuh
index 3bc21e0..75e06d9 100644
--- a/external/cub-1.3.2/cub/warp/specializations/warp_scan_smem.cuh
+++ b/external/cub-1.3.2/cub/warp/specializations/warp_scan_smem.cuh
@@ -219,7 +219,8 @@ struct WarpScanSmem
T &output, ///< [out] Calling thread's output item. May be aliased with \p input.
ScanOp scan_op) ///< [in] Binary scan operator
{
- InclusiveScan(input, output, scan_op, Int2Type<Traits<T>::PRIMITIVE>()); }
+ InclusiveScan(input, output, scan_op, Int2Type<Traits<T>::PRIMITIVE>());
+ }
/// Inclusive scan with aggregate
diff --git a/include/NvFlex.h b/include/NvFlex.h
index a6b305c..8189489 100644
--- a/include/NvFlex.h
+++ b/include/NvFlex.h
@@ -36,7 +36,7 @@
#endif
// least 2 significant digits define minor version, eg: 10 -> version 0.10
-#define NV_FLEX_VERSION 110
+#define NV_FLEX_VERSION 120
//! \endcond
@@ -68,7 +68,6 @@ enum NvFlexMapFlags
{
eNvFlexMapWait = 0, //!< Calling thread will be blocked until buffer is ready for access, default
eNvFlexMapDoNotWait = 1, //!< Calling thread will check if buffer is ready for access, if not ready then the method will return NULL immediately
- eNvFlexMapDiscard = 2 //!< Buffer contents will be discarded, this allows for efficent buffer reuse
};
/**
@@ -76,8 +75,8 @@ enum NvFlexMapFlags
*/
enum NvFlexBufferType
{
- eNvFlexBufferHost = 0, //!< Host mappable buffer, pinned memory on CUDA, staging buffer on DX
- eNvFlexBufferDevice = 1, //!< Device memory buffer, mapping this on CUDA will return a device memory pointer, and will return a buffer pointer on DX
+ eNvFlexBufferHost = 0, //!< A host mappable buffer, pinned memory on CUDA, staging buffer on DX
+ eNvFlexBufferDevice = 1, //!< A device memory buffer, mapping this on CUDA will return a device memory pointer, and will return a buffer pointer on DX
};
/**
@@ -86,7 +85,7 @@ enum NvFlexBufferType
enum NvFlexRelaxationMode
{
eNvFlexRelaxationGlobal = 0, //!< The relaxation factor is a fixed multiplier on each constraint's position delta
- eNvFlexRelaxationLocal = 1 //!< The relaxation factor is a fixed multiplier on each constraint's delta divided by the particle's constraint count, convergence will be slower but more reliable
+ eNvFlexRelaxationLocal = 1 //!< The relaxation factor is a fixed multiplier on each constraint's delta divided by the particle's constraint count, convergence will be slower but more reliable
};
@@ -123,7 +122,6 @@ struct NvFlexParams
float lift; //!< Lift force applied to particles belonging to dynamic triangles, proportional to velocity^2*area in the direction perpendicular to velocity and (if possible), parallel to the plane normal
// fluid params
- bool fluid; //!< If true then particles with phase 0 are considered fluid particles and interact using the position based fluids method
float cohesion; //!< Control how strongly particles hold each other together, default: 0.025, range [0.0, +inf]
float surfaceTension; //!< Controls how strongly particles attempt to minimize surface area, default: 0.0, range: [0.0, +inf]
float viscosity; //!< Smoothes particle velocities using XSPH viscosity
@@ -141,13 +139,8 @@ struct NvFlexParams
float diffuseBuoyancy; //!< Scales force opposing gravity that diffuse particles receive
float diffuseDrag; //!< Scales force diffuse particles receive in direction of neighbor fluid particles
int diffuseBallistic; //!< The number of neighbors below which a diffuse particle is considered ballistic
- float diffuseSortAxis[3]; //!< Diffuse particles will be sorted by depth along this axis if non-zero
float diffuseLifetime; //!< Time in seconds that a diffuse particle will live for after being spawned, particles will be spawned with a random lifetime in the range [0, diffuseLifetime]
- // rigid params
- float plasticThreshold; //!< Particles belonging to rigid shapes that move with a position delta magnitude > threshold will be permanently deformed in the rest pose
- float plasticCreep; //!< Controls the rate at which particles in the rest pose are deformed for particles passing the deformation threshold
-
// collision params
float collisionDistance; //!< Distance particles maintain against shapes, note that for robust collision against triangle meshes this distance should be greater than zero
float particleCollisionMargin; //!< Increases the radius used during neighbor finding, this is useful if particles are expected to move significantly during a single step to ensure contacts aren't missed on subsequent iterations
@@ -160,22 +153,46 @@ struct NvFlexParams
float relaxationFactor; //!< Control the convergence rate of the parallel solver, default: 1, values greater than 1 may lead to instability
};
+
/**
- * Flags that control the a particle's behavior and grouping, use NvFlexMakePhase() to construct a valid 32bit phase identifier
+ * Flags that control a particle's behavior and grouping, use NvFlexMakePhase() to construct a valid 32bit phase identifier
*/
enum NvFlexPhase
{
- eNvFlexPhaseGroupMask = 0x00ffffff, //!< Low 24 bits represent the particle group for controlling collisions
-
- eNvFlexPhaseSelfCollide = 1 << 24, //!< If set this particle will interact with particles of the same group
- eNvFlexPhaseSelfCollideFilter = 1 << 25, //!< If set this particle will ignore collisions with particles closer than the radius in the rest pose, this flag should not be specified unless valid rest positions have been specified using NvFlexSetRestParticles()
- eNvFlexPhaseFluid = 1 << 26, //!< If set this particle will generate fluid density constraints for its overlapping neighbors
+ eNvFlexPhaseGroupMask = 0x000fffff, //!< Bits [ 0, 19] represent the particle group for controlling collisions
+ eNvFlexPhaseFlagsMask = 0x00f00000, //!< Bits [20, 23] hold flags about how the particle behave
+ eNvFlexPhaseShapeChannelMask = 0xff000000, //!< Bits [24, 31] hold flags representing what shape collision channels particles will collide with, see NvFlexMakeShapeFlags()
+
+ eNvFlexPhaseSelfCollide = 1 << 20, //!< If set this particle will interact with particles of the same group
+ eNvFlexPhaseSelfCollideFilter = 1 << 21, //!< If set this particle will ignore collisions with particles closer than the radius in the rest pose, this flag should not be specified unless valid rest positions have been specified using NvFlexSetRestParticles()
+ eNvFlexPhaseFluid = 1 << 22, //!< If set this particle will generate fluid density constraints for its overlapping neighbors
+ eNvFlexPhaseUnused = 1 << 23, //!< Reserved
+
+ eNvFlexPhaseShapeChannel0 = 1 << 24, //!< Particle will collide with shapes with channel 0 set (see NvFlexMakeShapeFlags())
+ eNvFlexPhaseShapeChannel1 = 1 << 25, //!< Particle will collide with shapes with channel 1 set (see NvFlexMakeShapeFlags())
+ eNvFlexPhaseShapeChannel2 = 1 << 26, //!< Particle will collide with shapes with channel 2 set (see NvFlexMakeShapeFlags())
+ eNvFlexPhaseShapeChannel3 = 1 << 27, //!< Particle will collide with shapes with channel 3 set (see NvFlexMakeShapeFlags())
+ eNvFlexPhaseShapeChannel4 = 1 << 28, //!< Particle will collide with shapes with channel 4 set (see NvFlexMakeShapeFlags())
+ eNvFlexPhaseShapeChannel5 = 1 << 29, //!< Particle will collide with shapes with channel 5 set (see NvFlexMakeShapeFlags())
+ eNvFlexPhaseShapeChannel6 = 1 << 30, //!< Particle will collide with shapes with channel 6 set (see NvFlexMakeShapeFlags())
+ eNvFlexPhaseShapeChannel7 = 1 << 31, //!< Particle will collide with shapes with channel 7 set (see NvFlexMakeShapeFlags())
};
+
/**
- * Generate a bit set for the particle phase, the group should be an integer < 2^24, and the flags should be a combination of FlexPhase enum values
+ * Generate a bit set for the particle phase, this is a helper method to simply combine the
+ * group id and bit flags into a single integer.
+ *
+ * @param[in] group The index of the group for this particle, should be an integer < 2^20
+ * @param[in] particleFlags A combination of the phase flags which should be a combination of eNvFlexPhaseSelfCollide, eNvFlexPhaseSelfCollideFilter, and eNvFlexPhaseFluid
+ * @param[in] shapeChannels A combination of eNvFlexPhaseShapeChannel* flags that control which shapes will be collided against, particles will only collide against shapes that share at least one set channel, see NvFlexMakeShapeFlagsWithChannels()
*/
-NV_FLEX_API inline int NvFlexMakePhase(int group, int flags) { return (group & eNvFlexPhaseGroupMask) | flags; }
+NV_FLEX_API inline int NvFlexMakePhaseWithChannels(int group, int particleFlags, int shapeChannels) { return (group & eNvFlexPhaseGroupMask) | (particleFlags & eNvFlexPhaseFlagsMask) | (shapeChannels & eNvFlexPhaseShapeChannelMask); }
+
+/**
+ * Deprecated helper method to generates a phase with all shape channels set
+ */
+NV_FLEX_API inline int NvFlexMakePhase(int group, int particleFlags) { return NvFlexMakePhaseWithChannels(group, particleFlags, eNvFlexPhaseShapeChannelMask); }
/**
@@ -234,14 +251,6 @@ enum NvFlexSolverCallbackStage
eNvFlexStageCount, //!< Number of stages
};
-/** Defines the different DirectX compute modes that Flex can use
-*/
-enum NvFlexComputeType
-{
- eNvFlexCUDA, //!< Use CUDA compute for Flex, the application must link against the CUDA libraries
- eNvFlexD3D11, //!< Use DirectX 11 compute for Flex, the application must link against the D3D libraries
- eNvFlexD3D12, //!< Use DirectX 12 compute for Flex, the application must link against the D3D libraries
-};
/** Structure containing pointers to the internal solver data that is passed to each registered solver callback
*
@@ -272,18 +281,6 @@ struct NvFlexSolverCallbackParams
const int* sortedToOriginalMap; //!< Device pointer that maps the original particle index to the index in the callback data structure
};
-/** Descriptor used to initialize Flex
-*/
-struct NvFlexInitDesc
-{
- int deviceIndex; //!< The GPU device index that should be used, if there is already a CUDA context on the calling thread then this parameter will be ignored and the active CUDA context used. Otherwise a new context will be created using the suggested device ordinal.
- bool enableExtensions; //!< Enable or disable NVIDIA/AMD extensions in DirectX, can lead to improved performance.
- void* renderDevice; //!< Direct3D device to use for simulation, if none is specified a new device and context will be created.
- void* renderContext; //!< Direct3D context to use for simulation, if none is specified a new context will be created, in DirectX 12 this should be a pointer to the ID3D12CommandQueue where compute operations will take place.
-
- NvFlexComputeType computeType; //!< Set to eNvFlexD3D11 if DirectX 11 should be used, eNvFlexD3D12 for DirectX 12, this must match the libraries used to link the application
-};
-
/** Solver callback definition, see NvFlexRegisterSolverCallback()
*/
struct NvFlexSolverCallback
@@ -300,6 +297,33 @@ struct NvFlexSolverCallback
*/
typedef void (*NvFlexErrorCallback)(NvFlexErrorSeverity type, const char* msg, const char* file, int line);
+
+
+
+/** Defines the different compute backends that Flex can use
+*/
+enum NvFlexComputeType
+{
+ eNvFlexCUDA, //!< Use CUDA compute for Flex, the application must link against the CUDA libraries
+ eNvFlexD3D11, //!< Use DirectX 11 compute for Flex, the application must link against the D3D libraries
+ eNvFlexD3D12, //!< Use DirectX 12 compute for Flex, the application must link against the D3D libraries
+};
+
+
+/** Descriptor used to initialize Flex
+*/
+struct NvFlexInitDesc
+{
+ int deviceIndex; //!< The GPU device index that should be used, if there is already a CUDA context on the calling thread then this parameter will be ignored and the active CUDA context used. Otherwise a new context will be created using the suggested device ordinal.
+ bool enableExtensions; //!< Enable or disable NVIDIA/AMD extensions in DirectX, can lead to improved performance.
+ void* renderDevice; //!< Direct3D device to use for simulation, if none is specified a new device and context will be created.
+ void* renderContext; //!< Direct3D context that the app is using for rendering. In DirectX 12 this should be a ID3D12CommandQueue pointer.
+ void* computeContext; //!< Direct3D context to use for simulation, if none is specified a new context will be created, in DirectX 12 this should be a pointer to the ID3D12CommandQueue where compute operations will take place.
+ bool runOnRenderContext; //!< If true, run Flex on D3D11 render context, or D3D12 direct queue. If false, run on a D3D12 compute queue, or vendor specific D3D11 compute queue, allowing compute and graphics to run in parallel on some GPUs.
+
+ NvFlexComputeType computeType; //!< Set to eNvFlexD3D11 if DirectX 11 should be used, eNvFlexD3D12 for DirectX 12, this must match the libraries used to link the application
+};
+
/**
* Initialize library, should be called before any other API function.
*
@@ -309,7 +333,7 @@ typedef void (*NvFlexErrorCallback)(NvFlexErrorSeverity type, const char* msg, c
* @param[in] desc The NvFlexInitDesc struct defining the device ordinal, D3D device/context and the type of D3D compute being used
* @return A pointer to a library instance that can be used to allocate shared object such as triangle meshes, buffers, etc
*/
-NV_FLEX_API NvFlexLibrary* NvFlexInit(int version = NV_FLEX_VERSION, NvFlexErrorCallback errorFunc = 0, NvFlexInitDesc * desc = 0);
+NV_FLEX_API NvFlexLibrary* NvFlexInit(int version = NV_FLEX_VERSION, NvFlexErrorCallback errorFunc = 0, NvFlexInitDesc* desc = 0);
/**
* Shutdown library, users should manually destroy any previously created
@@ -324,15 +348,41 @@ NV_FLEX_API void NvFlexShutdown(NvFlexLibrary* lib);
*/
NV_FLEX_API int NvFlexGetVersion();
+/**
+ * Controls which features are enabled, choosing a simple option will disable features and can lead to better performance and reduced memory usage
+ */
+enum NvFlexFeatureMode
+{
+ eNvFlexFeatureModeDefault = 0, //!< All features enabled
+ eNvFlexFeatureModeSimpleSolids = 1, //!< Simple per-particle collision (no per-particle SDF normals, no fluids)
+ eNvFlexFeatureModeSimpleFluids = 2, //!< Simple single phase fluid-only particles (no solids)
+};
+
+/**
+ * Describes the creation time parameters for the solver
+ */
+struct NvFlexSolverDesc
+{
+ NvFlexFeatureMode featureMode; //!< Control which features are enabled
+
+ int maxParticles; //!< Maximum number of regular particles in the solver
+ int maxDiffuseParticles; //!< Maximum number of diffuse particles in the solver
+ int maxNeighborsPerParticle; //!< Maximum number of neighbors per-particle, for solids this can be around 32, for fluids up to 128 may be necessary depending on smoothing radius
+};
+
+/**
+ * Initialize the solver desc to its default values
+ * @param[in] desc Pointer to a description structure that will be initialized to default values
+ */
+NV_FLEX_API void NvFlexSetSolverDescDefaults(NvFlexSolverDesc* desc);
+
/**
* Create a new particle solver
*
* @param[in] lib The library instance to use
- * @param[in] maxParticles Maximum number of simulation particles possible for this solver
- * @param[in] maxDiffuseParticles Maximum number of diffuse (non-simulation) particles possible for this solver
- * @param[in] maxNeighborsPerParticle Maximum number of neighbors per particle possible for this solver
+ * @param[in] desc Pointer to a solver description structure used to create the solver
*/
-NV_FLEX_API NvFlexSolver* NvFlexCreateSolver(NvFlexLibrary* lib, int maxParticles, int maxDiffuseParticles, int maxNeighborsPerParticle = 96);
+NV_FLEX_API NvFlexSolver* NvFlexCreateSolver(NvFlexLibrary* lib, const NvFlexSolverDesc* desc);
/**
* Delete a particle solver
*
@@ -348,6 +398,14 @@ NV_FLEX_API void NvFlexDestroySolver(NvFlexSolver* solver);
*/
NV_FLEX_API NvFlexLibrary* NvFlexGetSolverLibrary(NvFlexSolver* solver);
+/**
+ * Return the solver desc that was used to create a solver
+ *
+ * @param[in] solver Pointer to a valid Flex solver
+ * @param[in] desc Pointer to a desc structure
+ */
+NV_FLEX_API void NvFlexGetSolverDesc(NvFlexSolver* solver, NvFlexSolverDesc* desc);
+
/** Registers a callback for a solver stage, the callback will be invoked from the same thread that calls NvFlexUpdateSolver().
*
* @param[in] solver A valid solver
@@ -437,21 +495,40 @@ NV_FLEX_API void NvFlexSetParams(NvFlexSolver* solver, const NvFlexParams* param
NV_FLEX_API void NvFlexGetParams(NvFlexSolver* solver, NvFlexParams* params);
/**
+ * Describes a source and destination buffer region for performing a copy operation.
+ */
+struct NvFlexCopyDesc
+{
+ int srcOffset; //<! Offset in elements from the start of the source buffer to begin reading from
+ int dstOffset; //<! Offset in elements from the start of the destination buffer to being writing to
+ int elementCount; //<! Number of elements to copy
+};
+
+/**
* Set the active particles indices in the solver
*
* @param[in] solver A valid solver
* @param[in] indices Holds the indices of particles that have been made active
- * @param[in] n Number of particles to allocate
+ * @param[in] desc Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length)
*/
-NV_FLEX_API void NvFlexSetActive(NvFlexSolver* solver, NvFlexBuffer* indices, int n);
+NV_FLEX_API void NvFlexSetActive(NvFlexSolver* solver, NvFlexBuffer* indices, const NvFlexCopyDesc* desc);
/**
* Return the active particle indices
*
* @param[in] solver A valid solver
* @param[out] indices a buffer of indices at least activeCount in length
+ * @param[in] desc Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length)
+ */
+NV_FLEX_API void NvFlexGetActive(NvFlexSolver* solver, NvFlexBuffer* indices, const NvFlexCopyDesc* desc);
+
+/**
+ * Set the total number of active particles
+ *
+ * @param[in] solver A valid solver
+ * @param[in] n The number of active particles, the first n indices in the active particles array will be used as the active count
*/
-NV_FLEX_API void NvFlexGetActive(NvFlexSolver* solver, NvFlexBuffer* indices);
+NV_FLEX_API void NvFlexSetActiveCount(NvFlexSolver* solver, int n);
/**
* Return the number of active particles in the solver
@@ -466,19 +543,19 @@ NV_FLEX_API int NvFlexGetActiveCount(NvFlexSolver* solver);
*
* @param[in] solver A valid solver
* @param[in] p Pointer to a buffer of particle data, should be 4*n in length
- * @param[in] n The number of particles to set
+ * @param[in] desc Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length)
*
*/
-NV_FLEX_API void NvFlexSetParticles(NvFlexSolver* solver, NvFlexBuffer* p, int n);
+NV_FLEX_API void NvFlexSetParticles(NvFlexSolver* solver, NvFlexBuffer* p, const NvFlexCopyDesc* desc);
/**
* Get the particles state of the solver, a particle consists of 4 floating point numbers, its x,y,z position followed by its inverse mass (1/m)
*
* @param[in] solver A valid solver
* @param[out] p Pointer to a buffer of 4*n floats that will be filled out with the particle data, can be either a host or device pointer
- * @param[in] n The number of particles to get, must be less than max particles passed to NvFlexCreateSolver
+ * @param[in] desc Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length)
*/
-NV_FLEX_API void NvFlexGetParticles(NvFlexSolver* solver, NvFlexBuffer* p, int n);
+NV_FLEX_API void NvFlexGetParticles(NvFlexSolver* solver, NvFlexBuffer* p, const NvFlexCopyDesc* desc);
/**
* Set the particle positions in their rest state, if eNvFlexPhaseSelfCollideFilter is set on the particle's
@@ -486,20 +563,20 @@ NV_FLEX_API void NvFlexGetParticles(NvFlexSolver* solver, NvFlexBuffer* p, int n
*
* @param[in] solver A valid solver
* @param[in] p Pointer to a buffer of particle data, should be 4*n in length
- * @param[in] n The number of particles to set
+ * @param[in] desc Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length)
*
*/
-NV_FLEX_API void NvFlexSetRestParticles(NvFlexSolver* solver, NvFlexBuffer* p, int n);
+NV_FLEX_API void NvFlexSetRestParticles(NvFlexSolver* solver, NvFlexBuffer* p, const NvFlexCopyDesc* desc);
/**
* Get the particle positions in their rest state
*
* @param[in] solver A valid solver
* @param[in] p Pointer to a buffer of particle data, should be 4*n in length
- * @param[in] n The number of particles to set
+ * @param[in] desc Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length)
*
*/
-NV_FLEX_API void NvFlexGetRestParticles(NvFlexSolver* solver, NvFlexBuffer* p, int n);
+NV_FLEX_API void NvFlexGetRestParticles(NvFlexSolver* solver, NvFlexBuffer* p, const NvFlexCopyDesc* desc);
/**
@@ -507,27 +584,27 @@ NV_FLEX_API void NvFlexGetRestParticles(NvFlexSolver* solver, NvFlexBuffer* p, i
*
* @param[in] solver A valid solver
* @param[out] p Pointer to a buffer of 4*n floats that will be filled out with the data, can be either a host or device pointer
- * @param[in] n The number of smooth particles to return
+ * @param[in] desc Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length)
*/
-NV_FLEX_API void NvFlexGetSmoothParticles(NvFlexSolver* solver, NvFlexBuffer* p, int n);
+NV_FLEX_API void NvFlexGetSmoothParticles(NvFlexSolver* solver, NvFlexBuffer* p, const NvFlexCopyDesc* desc);
/**
* Set the particle velocities, each velocity is a 3-tuple of x,y,z floating point values
*
* @param[in] solver A valid solver
* @param[in] v Pointer to a buffer of 3*n floats
- * @param[in] n The number of velocities to set
+ * @param[in] desc Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length)
*
*/
-NV_FLEX_API void NvFlexSetVelocities(NvFlexSolver* solver, NvFlexBuffer* v, int n);
+NV_FLEX_API void NvFlexSetVelocities(NvFlexSolver* solver, NvFlexBuffer* v, const NvFlexCopyDesc* desc);
/**
* Get the particle velocities, each velocity is a 3-tuple of x,y,z floating point values
*
* @param[in] solver A valid solver
* @param[out] v Pointer to a buffer of 3*n floats that will be filled out with the data, can be either a host or device pointer
- * @param[in] n The number of velocities to get
+ * @param[in] desc Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length)
*/
-NV_FLEX_API void NvFlexGetVelocities(NvFlexSolver* solver, NvFlexBuffer* v, int n);
+NV_FLEX_API void NvFlexGetVelocities(NvFlexSolver* solver, NvFlexBuffer* v, const NvFlexCopyDesc* desc);
/**
* Set the particles phase id array, each particle has an associated phase id which
@@ -542,37 +619,36 @@ NV_FLEX_API void NvFlexGetVelocities(NvFlexSolver* solver, NvFlexBuffer* v, int
*
* @param[in] solver A valid solver
* @param[in] phases Pointer to a buffer of n integers containing the phases
- * @param[in] n The number of phases to set
+ * @param[in] desc Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length)
*
*/
-NV_FLEX_API void NvFlexSetPhases(NvFlexSolver* solver, NvFlexBuffer* phases, int n);
+NV_FLEX_API void NvFlexSetPhases(NvFlexSolver* solver, NvFlexBuffer* phases, const NvFlexCopyDesc* desc);
/**
* Get the particle phase ids
*
* @param[in] solver A valid solver
* @param[out] phases Pointer to a buffer of n integers that will be filled with the phase data, can be either a host or device pointer
- * @param[in] n The number of phases to get
+ * @param[in] desc Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length)
*/
-NV_FLEX_API void NvFlexGetPhases(NvFlexSolver* solver, NvFlexBuffer* phases, int n);
+NV_FLEX_API void NvFlexGetPhases(NvFlexSolver* solver, NvFlexBuffer* phases, const NvFlexCopyDesc* desc);
/**
* Set per-particle normals to the solver, these will be overwritten after each simulation step, but can be used to initialize the normals to valid values
*
* @param[in] solver A valid solver
* @param[in] normals Pointer to a buffer of normals, should be 4*n in length
- * @param[in] n The number of normals to set
- *
+ * @param[in] desc Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length)
*/
-NV_FLEX_API void NvFlexSetNormals(NvFlexSolver* solver, NvFlexBuffer* normals, int n);
+NV_FLEX_API void NvFlexSetNormals(NvFlexSolver* solver, NvFlexBuffer* normals, const NvFlexCopyDesc* desc);
/**
* Get per-particle normals from the solver, these are the world-space normals computed during surface tension, cloth, and rigid body calculations
*
* @param[in] solver A valid solver
* @param[out] normals Pointer to a buffer of normals, should be 4*n in length
- * @param[in] n The number of normals to get
+ * @param[in] desc Describes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length)
*/
-NV_FLEX_API void NvFlexGetNormals(NvFlexSolver* solver, NvFlexBuffer* normals, int n);
+NV_FLEX_API void NvFlexGetNormals(NvFlexSolver* solver, NvFlexBuffer* normals, const NvFlexCopyDesc* desc);
/**
@@ -609,23 +685,32 @@ NV_FLEX_API void NvFlexGetSprings(NvFlexSolver* solver, NvFlexBuffer* indices, N
* @param[in] restPositions Pointer to a buffer of local space positions relative to the rigid's center of mass (average position), this should be at least 3*numIndices in length in the format x,y,z
* @param[in] restNormals Pointer to a buffer of local space normals, this should be at least 4*numIndices in length in the format x,y,z,w where w is the (negative) signed distance of the particle inside its shape
* @param[in] stiffness Pointer to a buffer of rigid stiffness coefficents, should be numRigids in length, valid values in range [0, 1]
+ * @param[in] thresholds Pointer to a buffer of plastic deformation threshold coefficients, should be numRigids in length
+ * @param[in] creeps Pointer to a buffer of plastic deformation creep coefficients, should be numRigids in length, valid values in range [0, 1]
* @param[in] rotations Pointer to a buffer of quaternions (4*numRigids in length)
* @param[in] translations Pointer to a buffer of translations of the center of mass (3*numRigids in length)
* @param[in] numRigids The number of rigid bodies to set
* @param[in] numIndices The number of indices in the indices array
*
*/
-NV_FLEX_API void NvFlexSetRigids(NvFlexSolver* solver, NvFlexBuffer* offsets, NvFlexBuffer* indices, NvFlexBuffer* restPositions, NvFlexBuffer* restNormals, NvFlexBuffer* stiffness, NvFlexBuffer* rotations, NvFlexBuffer* translations, int numRigids, int numIndices);
-
+NV_FLEX_API void NvFlexSetRigids(NvFlexSolver* solver, NvFlexBuffer* offsets, NvFlexBuffer* indices, NvFlexBuffer* restPositions, NvFlexBuffer* restNormals, NvFlexBuffer* stiffness, NvFlexBuffer* thresholds, NvFlexBuffer* creeps, NvFlexBuffer* rotations, NvFlexBuffer* translations, int numRigids, int numIndices);
/**
- * Get the rotation matrices for the rigid bodies in the solver
+ * Retrive the rigid body shape matching constraints and transforms, if any buffer pointers are NULL then they will be ignored
+ * This method supersedes the previous NvFlexGetRigidTransforms method and can be used to retrieve modified rest positions from plastic deformation.
*
* @param[in] solver A valid solver
- * @param[out] rotations Pointer to a buffer of quaternions, should be 4*numRigids floats in length
- * @param[out] translations Pointer to a buffer of vectors to hold the rigid translations, should be 3*numRigids floats in length
+ * @param[in] offsets Pointer to a buffer of start offsets for a rigid in the indices array, should be numRigids+1 in length, the first entry must be 0
+ * @param[in] indices Pointer to a buffer of indices for the rigid bodies, the indices for the jth rigid body start at indices[offsets[j]] and run to indices[offsets[j+1]] exclusive
+ * @param[in] restPositions Pointer to a buffer of local space positions relative to the rigid's center of mass (average position), this should be at least 3*numIndices in length in the format x,y,z
+ * @param[in] restNormals Pointer to a buffer of local space normals, this should be at least 4*numIndices in length in the format x,y,z,w where w is the (negative) signed distance of the particle inside its shape
+ * @param[in] stiffness Pointer to a buffer of rigid stiffness coefficents, should be numRigids in length, valid values in range [0, 1]
+ * @param[in] thresholds Pointer to a buffer of plastic deformation threshold coefficients, should be numRigids in length
+ * @param[in] creeps Pointer to a buffer of plastic deformation creep coefficients, should be numRigids in length, valid values in range [0, 1]
+ * @param[in] rotations Pointer to a buffer of quaternions (4*numRigids in length with the imaginary elements in the x,y,z components)
+ * @param[in] translations Pointer to a buffer of translations of the center of mass (3*numRigids in length)
*/
-NV_FLEX_API void NvFlexGetRigidTransforms(NvFlexSolver* solver, NvFlexBuffer* rotations, NvFlexBuffer* translations);
+NV_FLEX_API void NvFlexGetRigids(NvFlexSolver* solver, NvFlexBuffer* offsets, NvFlexBuffer* indices, NvFlexBuffer* restPositions, NvFlexBuffer* restNormals, NvFlexBuffer* stiffness, NvFlexBuffer* thresholds, NvFlexBuffer* creeps, NvFlexBuffer* rotations, NvFlexBuffer* translations);
/**
* An opaque type representing a static triangle mesh in the solver
@@ -715,7 +800,7 @@ NV_FLEX_API void NvFlexDestroyDistanceField(NvFlexLibrary* lib, NvFlexDistanceFi
NV_FLEX_API void NvFlexUpdateDistanceField(NvFlexLibrary* lib, NvFlexDistanceFieldId sdf, int dimx, int dimy, int dimz, NvFlexBuffer* field);
/**
- * Create a convex mesh collision shapes, see NvFlexConvexMeshId for details.
+ * Create a convex mesh collision shape, see NvFlexConvexMeshId for details.
*
* @param[in] lib The library instance to use
* @return A pointer to a signed distance field object
@@ -736,11 +821,11 @@ NV_FLEX_API void NvFlexDestroyConvexMesh(NvFlexLibrary* lib, NvFlexConvexMeshId
* @param[in] lib The library instance to use
* @param[in] convex A valid convex mesh shape created from NvFlexCreateConvexMesh()
* @param[in] planes An array of planes, each plane consists of 4 floats in the form a*x + b*y + c*z + d = 0
- * @param[in] numPlanes The number of planes in the convex
+ * @param[in] numPlanes The number of planes in the convex, must be less than 64 planes per-convex
* @param[in] lower The local space lower bound of the convex shape
* @param[in] upper The local space upper bound of the convex shape
*/
-NV_FLEX_API void NvFlexUpdateConvexMesh(NvFlexLibrary* lib, NvFlexConvexMeshId convex, NvFlexBuffer* planes, int numPlanes, float* lower, float* upper);
+NV_FLEX_API void NvFlexUpdateConvexMesh(NvFlexLibrary* lib, NvFlexConvexMeshId convex, NvFlexBuffer* planes, int numPlanes, const float* lower, const float* upper);
/**
* Retrieve the local space bounds of the mesh, these are the same values specified to NvFlexUpdateConvexMesh()
@@ -831,17 +916,27 @@ enum NvFlexCollisionShapeType
enum NvFlexCollisionShapeFlags
{
- eNvFlexShapeFlagTypeMask = 0x7, //!< Lower 3 bits holds the type of the collision shape
- eNvFlexShapeFlagDynamic = 8, //!< Indicates the shape is dynamic and should have lower priority over static collision shapes
- eNvFlexShapeFlagTrigger = 16, //!< Indicates that the shape is a trigger volume, this means it will not perform any collision response, but will be reported in the contacts array (see NvFlexGetContacts())
-
+ eNvFlexShapeFlagTypeMask = 0x7, //!< Lower 3 bits holds the type of the collision shape given by the NvFlexCollisionShapeType enum
+ eNvFlexShapeFlagDynamic = 0x8, //!< Indicates the shape is dynamic and should have lower priority over static collision shapes
+ eNvFlexShapeFlagTrigger = 0x10, //!< Indicates that the shape is a trigger volume, this means it will not perform any collision response, but will be reported in the contacts array (see NvFlexGetContacts())
+
eNvFlexShapeFlagReserved = 0xffffff00
};
/**
- * Combines geometry type and static/dynamic flags
+ * Helper function to combine shape type, flags, and phase/shape collision channels into a 32bit value
+ *
+ * @param[in] type The type of the shape, see NvFlexCollisionShapeType
+ * @param[in] dynamic See eNvFlexShapeFlagDynamic
+ * @param[in] shapeChannels A combination of the eNvFlexPhaseShapeChannel* flags, collisions will only be processed between a particle and a shape if a channel is set on both the particle and shape, see NvFlexMakePhaseWithChannels()
+ */
+NV_FLEX_API inline int NvFlexMakeShapeFlagsWithChannels(NvFlexCollisionShapeType type, bool dynamic, int shapeChannels) { return type | (dynamic?eNvFlexShapeFlagDynamic:0) | shapeChannels; }
+
+/**
+ * Deprecrated helper method that creates shape flags that by default have all collision channels enabled
*/
-NV_FLEX_API inline int NvFlexMakeShapeFlags(NvFlexCollisionShapeType type, bool dynamic) { return type | (dynamic?eNvFlexShapeFlagDynamic:0); }
+NV_FLEX_API inline int NvFlexMakeShapeFlags(NvFlexCollisionShapeType type, bool dynamic) { return NvFlexMakeShapeFlagsWithChannels(type, dynamic, eNvFlexPhaseShapeChannelMask); }
+
/**
* Set the collision shapes for the solver
@@ -899,10 +994,10 @@ NV_FLEX_API void NvFlexSetInflatables(NvFlexSolver* solver, NvFlexBuffer* startT
* Get the density values for fluid particles
*
* @param[in] solver A valid solver
- * @param[in] n The number of particle densities to return
* @param[out] densities Pointer to a buffer of floats, should be maxParticles in length, density values are normalized between [0, 1] where 1 represents the rest density
+ * @param[in] desc Pointer to a descriptor specifying the contents to read back
*/
-NV_FLEX_API void NvFlexGetDensities(NvFlexSolver* solver, NvFlexBuffer* densities, int n);
+NV_FLEX_API void NvFlexGetDensities(NvFlexSolver* solver, NvFlexBuffer* densities, const NvFlexCopyDesc* desc);
/**
* Get the anisotropy of fluid particles, the particle distribution for a particle is represented
@@ -916,8 +1011,9 @@ NV_FLEX_API void NvFlexGetDensities(NvFlexSolver* solver, NvFlexBuffer* densitie
* @param[out] q1 Pointer to a buffer of floats that receive the first basis vector and scale, should be 4*maxParticles in length
* @param[out] q2 Pointer to a buffer of floats that receive the second basis vector and scale, should be 4*maxParticles in length
* @param[out] q3 Pointer to a buffer of floats that receive the third basis vector and scale, should be 4*maxParticles in length
+ * @param[in] desc Pointer to a descriptor specifying the contents to read back
*/
-NV_FLEX_API void NvFlexGetAnisotropy(NvFlexSolver* solver, NvFlexBuffer* q1, NvFlexBuffer* q2, NvFlexBuffer* q3);
+NV_FLEX_API void NvFlexGetAnisotropy(NvFlexSolver* solver, NvFlexBuffer* q1, NvFlexBuffer* q2, NvFlexBuffer* q3, const NvFlexCopyDesc* desc);
/**
* Get the state of the diffuse particles. Diffuse particles are passively advected by the fluid
* velocity field.
@@ -925,9 +1021,9 @@ NV_FLEX_API void NvFlexGetAnisotropy(NvFlexSolver* solver, NvFlexBuffer* q1, NvF
* @param[in] solver A valid solver
* @param[out] p Pointer to a buffer of floats, should be 4*maxParticles in length, the w component represents the particles lifetime with 1 representing a new particle, and 0 representing an inactive particle
* @param[out] v Pointer to a buffer of floats, should be 4*maxParticles in length, the w component is not used
- * @param[out] indices Pointer to a buffer of ints that specify particle indices in depth sorted order, should be maxParticles in length, see NvFlexParams::mDiffuseSortDir
+ * @param[out] count Pointer to a buffer of a single int that holds the current particle count (this may be updated by the GPU which is why it is passed back in a buffer)
*/
-NV_FLEX_API int NvFlexGetDiffuseParticles(NvFlexSolver* solver, NvFlexBuffer* p, NvFlexBuffer* v, NvFlexBuffer* indices);
+NV_FLEX_API void NvFlexGetDiffuseParticles(NvFlexSolver* solver, NvFlexBuffer* p, NvFlexBuffer* v, NvFlexBuffer* count);
/**
* Set the state of the diffuse particles. Diffuse particles are passively advected by the fluid
@@ -936,7 +1032,7 @@ NV_FLEX_API int NvFlexGetDiffuseParticles(NvFlexSolver* solver, NvFlexBuffer* p,
* @param[in] solver A valid solver
* @param[in] p Pointer to a buffer of floats, should be 4*n in length, the w component represents the particles lifetime with 1 representing a new particle, and 0 representing an inactive particle
* @param[in] v Pointer to a buffer of floats, should be 4*n in length, the w component is not used
- * @param[in] n Number of diffuse particles to set
+ * @param[in] n The number of active diffuse particles
*
*/
NV_FLEX_API void NvFlexSetDiffuseParticles(NvFlexSolver* solver, NvFlexBuffer* p, NvFlexBuffer* v, int n);
@@ -945,14 +1041,59 @@ NV_FLEX_API void NvFlexSetDiffuseParticles(NvFlexSolver* solver, NvFlexBuffer* p
* Get the particle contact planes. Note this will only include contacts that were active on the last substep of an update, and will include all contact planes generated within NvFlexParams::shapeCollisionMargin.
*
* @param[in] solver A valid solver
- * @param[out] planes Pointer to a destination buffer containing the contact planes for the particle, each particle can have up to 4 contact planes so this buffer should be 16*maxParticles in length
- * @param[out] velocities Pointer to a destination buffer containing the velocity of the contact point on the shape in world space, the index of the shape (corresponding to the shape in NvFlexSetShapes() is stored in the w component), each particle can have up to 4 contact planes so this buffer should be 16*maxParticles in length
- * @param[out] indices Pointer to a buffer of indices into the contacts buffer, the first contact plane for the i'th particle is given by planes[indices[i]*sizeof(float)*4] and subsequent contacts for that particle are stored sequentially, this array should be maxParticles in length
- * @param[out] counts Pointer to a buffer of contact counts for each particle (will be <= 4), this buffer should be maxParticles in length
+ * @param[out] planes Pointer to a destination buffer containing the contact planes for the particle, each particle can have up to 6 contact planes so this buffer should be 4*6*maxParticles floats in length
+ * @param[out] velocities Pointer to a destination buffer containing the velocity of the contact point on the shape in world space, the index of the shape (corresponding to the shape in NvFlexSetShapes() is stored in the w component), each particle can have up to 6 contact planes so this buffer should be 4*6*maxParticles floats in length
+ * @param[out] indices Pointer to a buffer of indices into the contacts buffer, the first contact plane for the i'th particle is given by planes[indices[i]*sizeof(float)*4*6] and subsequent contact planes for that particle are stored sequentially, this array should be maxParticles in length
+ * @param[out] counts Pointer to a buffer of contact counts for each particle (will be <= 6), this buffer should be maxParticles in length
*/
NV_FLEX_API void NvFlexGetContacts(NvFlexSolver* solver, NvFlexBuffer* planes, NvFlexBuffer* velocities, NvFlexBuffer* indices, NvFlexBuffer* counts);
/**
+ * Get the particle neighbor lists, these are stored in a strided format, and can be iterated in the following manner:
+ *
+\code{.c}
+
+ NvFlexGetNeighbors(solver, neighborsBuffer, countsBuffer, indicesBuffer);
+
+ int* neighbors = (int*)NvFlexMap(neighborsBuffer, 0);
+ int* counts = (int*)NvFlexMap(countsBuffer, 0);
+ int* remap = (int*)NvFlexMap(remapBuffer, 0);
+
+ // neighbors are stored in a strided format so that the first neighbor
+ // of each particle is stored sequentially, then the second, and so on
+
+ int stride = maxParticles;
+
+ for (int i=0; i < maxParticles; ++i)
+ {
+ // find offset in the neighbors buffer
+ int offset = remap[i];
+ int count = counts[offset];
+
+ for (int c=0; c < count; ++c)
+ {
+ int neighbor = remap[neighbors[c*stride + offset]];
+
+ printf("Particle %d's neighbor %d is particle %d\n", i, c, neighbor);
+ }
+ }
+
+ NvFlexUnmap(neighborsBuffer);
+ NvFlexUnmap(countsBuffer);
+ NvFlexUnmap(remapBuffer);
+
+\endcode
+ *
+ * @param[in] solver A valid solver
+ * @param[out] neighbors Pointer to a destination buffer containing the the neighbors for all particles, this should be maxParticles*maxParticleNeighbors ints (passed to NvFlexInit() in length)
+ * @param[out] counts Pointer to a buffer of neighbor counts per-particle, should be maxParticles ints in length
+ * @param[out] remap Pointer to a buffer of indices, because Flex internally re-orders particles these are used to map from an API particle index to it internal index
+ *
+ * @note Neighbors are only valid after a call to NvFlexUpdateSolver() has completed, the returned neighbors correspond to the last substep of the last update
+ */
+NV_FLEX_API void NvFlexGetNeighbors(NvFlexSolver* solver, NvFlexBuffer* neighbors, NvFlexBuffer* counts, NvFlexBuffer* remap);
+
+/**
* Get the world space AABB of all particles in the solver, note that the bounds are calculated during the update (see NvFlexUpdateSolver()) so only become valid after an update has been performed.
* The returned bounds represent bounds of the particles in their predicted positions *before* the constraint solve.
*
@@ -965,12 +1106,15 @@ NV_FLEX_API void NvFlexGetBounds(NvFlexSolver* solver, NvFlexBuffer* lower, NvFl
/**
*
* @param[in] solver A valid solver
+ * @param[out] begin Optional pointer to a 64 bit unsigned to receive the value of the GPU clock when Flex update began (in cycles)
+ * @param[out] end Optional pointer to a 64 bit unsigned to receive the value of the GPU clock when Flex update ended (in cycles)
+ * @param[out] frequency Optional pointer to a 64 bit unsigned to receive the frequency of the clock used to measure begin and end
* @return The time in seconds between the first and last GPU operations executed by the last NvFlexUpdateSolver.
*
* @note This method causes the CPU to wait until the GPU has finished any outstanding work.
* To avoid blocking the calling thread it should be called after work has completed, e.g.: directly after a NvFlexMap().
*/
-NV_FLEX_API float NvFlexGetDeviceLatency(NvFlexSolver* solver);
+NV_FLEX_API float NvFlexGetDeviceLatency(NvFlexSolver* solver, unsigned long long* begin, unsigned long long* end, unsigned long long* frequency);
/**
* Fetch high-level GPU timers.
@@ -1028,7 +1172,7 @@ NV_FLEX_API void NvFlexFreeBuffer(NvFlexBuffer* buf);
/**
* Maps a buffer for reading and writing. When the buffer is created with NvFlexBufferType::eHost, then the returned pointer will be a host memory address
* that can be read/written.
- * Mapping a buffer implicitly synchronizes with the GPU to ensure that any reads or writes from the buffer (e.g.: from the NvFlexGet*() or NvFlexSet*()) methods have completed.
+ * Mapping a buffer implicitly synchronizes with the GPU to ensure that any reads or writes from the buffer (e.g.: from the NvFlexGet*() or NvFlexSet*() methods) have completed.
*
* @param[in] buffer A buffer allocated with NvFlexAllocBuffer()
* @param[in] flags Hints to Flex how the buffer is to be accessed, typically this should be eNvFlexMapWait (0)
@@ -1138,6 +1282,8 @@ NV_FLEX_API void NvFlexGetDeviceAndContext(NvFlexLibrary* lib, void** device, vo
*/
NV_FLEX_API void NvFlexFlush(NvFlexLibrary* lib);
+NV_FLEX_API void NvFlexWait(NvFlexLibrary* lib);
+
//! \cond HIDDEN_SYMBOLS
/**
@@ -1147,6 +1293,8 @@ NV_FLEX_API void NvFlexFlush(NvFlexLibrary* lib);
NV_FLEX_API void NvFlexSetDebug(NvFlexSolver* solver, bool enable);
NV_FLEX_API void NvFlexGetShapeBVH(NvFlexSolver* solver, void* bvh);
NV_FLEX_API void NvFlexCopySolver(NvFlexSolver* dst, NvFlexSolver* src);
+NV_FLEX_API void NvFlexCopyDeviceToHost(NvFlexSolver* solver, NvFlexBuffer* pDevice, void* pHost, int size, int stride);
+NV_FLEX_API void NvFlexComputeWaitForGraphics(NvFlexLibrary* lib);
//! \endcond
diff --git a/include/NvFlexExt.h b/include/NvFlexExt.h
index ec78b81..e43163e 100644
--- a/include/NvFlexExt.h
+++ b/include/NvFlexExt.h
@@ -44,7 +44,7 @@
template <typename T>
struct NvFlexVector
{
- NvFlexVector(NvFlexLibrary* l, int size=0) : lib(l), buffer(NULL), mappedPtr(NULL), count(0), capacity(0)
+ NvFlexVector(NvFlexLibrary* l, int size = 0, NvFlexBufferType type = eNvFlexBufferHost) : lib(l), buffer(NULL), mappedPtr(NULL), count(0), capacity(0), type(type)
{
if (size)
{
@@ -55,7 +55,7 @@ struct NvFlexVector
}
}
- NvFlexVector(NvFlexLibrary* l, const T* ptr, int size) : lib(l), buffer(NULL), mappedPtr(NULL), count(0), capacity(0)
+ NvFlexVector(NvFlexLibrary* l, const T* ptr, int size, NvFlexBufferType type = eNvFlexBufferHost) : lib(l), buffer(NULL), mappedPtr(NULL), count(0), capacity(0), type(type)
{
assign(ptr, size);
unmap();
@@ -73,6 +73,7 @@ struct NvFlexVector
T* mappedPtr;
int count;
int capacity;
+ NvFlexBufferType type;
// reinitialize the vector leaving it unmapped
void init(int size)
@@ -177,7 +178,7 @@ struct NvFlexVector
// growth factor of 1.5
const int newCapacity = minCapacity*3/2;
- NvFlexBuffer* newBuf = NvFlexAllocBuffer(lib, newCapacity, sizeof(T), eNvFlexBufferHost);
+ NvFlexBuffer* newBuf = NvFlexAllocBuffer(lib, newCapacity, sizeof(T), type);
// copy contents to new buffer
void* newPtr = NvFlexMap(newBuf, eNvFlexMapWait);
@@ -328,6 +329,10 @@ struct NvFlexExtAsset
float* shapeCenters; //!< The position of the center of mass of each shape, an array of vec3s mNumShapes in length
int numShapes; //!< The number of shape matching constraints
+ // plastic deformation
+ float* shapePlasticThresholds; //!< The plastic threshold coefficient for each shape
+ float* shapePlasticCreeps; //!< The plastic creep coefficient for each shape
+
// faces for cloth
int* triangleIndices; //!< Indexed triangle mesh indices for clothing
int numTriangles; //!< Number of triangles
@@ -489,9 +494,11 @@ NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateRigidFromMesh(const float* vertices,
* @param[in] linkRadius Any particles below this distance will have additional distance constraints created between them
* @param[in] linkStiffness The stiffness of distance links
* @param[in] globalStiffness If this parameter is > 0.0f, adds an additional global cluster that consists of all particles in the shape. The stiffness of this cluster is the globalStiffness.
+* @param[in] clusterPlasticThreshold Particles belonging to rigid shapes that move with a position delta magnitude > threshold will be permanently deformed in the rest pose, if clusterPlasticCreep > 0.0f
+* @param[in] clusterPlasticCreep Controls the rate at which particles in the rest pose are deformed for particles passing the deformation threshold
* @return A pointer to an asset structure holding the particles and constraints
*/
-NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateSoftFromMesh(const float* vertices, int numVertices, const int* indices, int numTriangleIndices, float particleSpacing, float volumeSampling, float surfaceSampling, float clusterSpacing, float clusterRadius, float clusterStiffness, float linkRadius, float linkStiffness, float globalStiffness);
+NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateSoftFromMesh(const float* vertices, int numVertices, const int* indices, int numTriangleIndices, float particleSpacing, float volumeSampling, float surfaceSampling, float clusterSpacing, float clusterRadius, float clusterStiffness, float linkRadius, float linkStiffness, float globalStiffness, float clusterPlasticThreshold, float clusterPlasticCreep);
/**
* Frees all memory associated with an asset created by one of the creation methods
@@ -642,7 +649,7 @@ NV_FLEX_API NvFlexExtInstance* NvFlexExtCreateInstance(NvFlexExtContainer* conta
NV_FLEX_API void NvFlexExtDestroyInstance(NvFlexExtContainer* container, const NvFlexExtInstance* instance);
/** Notifies the container that asset data has changed and needs to be sent to the GPU
- * this should be called if the constrains for an existing asset are modified by the user
+ * this should be called if the constraints for an existing asset are modified by the user
*
* @param[in] container The container the instance referencing the asset belongs to
* @param[in] asset The asset which was modified (can be NULL)
diff --git a/lib/linux64/NvFlexDebugCUDA_x64.a b/lib/linux64/NvFlexDebugCUDA_x64.a
index ad7a463..3a144c2 100644
--- a/lib/linux64/NvFlexDebugCUDA_x64.a
+++ b/lib/linux64/NvFlexDebugCUDA_x64.a
Binary files differ
diff --git a/lib/linux64/NvFlexDeviceDebug_x64.a b/lib/linux64/NvFlexDeviceDebug_x64.a
index d556016..4aabf0c 100644
--- a/lib/linux64/NvFlexDeviceDebug_x64.a
+++ b/lib/linux64/NvFlexDeviceDebug_x64.a
Binary files differ
diff --git a/lib/linux64/NvFlexDeviceRelease_x64.a b/lib/linux64/NvFlexDeviceRelease_x64.a
index 5194152..1118e28 100644
--- a/lib/linux64/NvFlexDeviceRelease_x64.a
+++ b/lib/linux64/NvFlexDeviceRelease_x64.a
Binary files differ
diff --git a/lib/linux64/NvFlexExtDebugCUDA_x64.a b/lib/linux64/NvFlexExtDebugCUDA_x64.a
index 59f91ca..e6d5c83 100644
--- a/lib/linux64/NvFlexExtDebugCUDA_x64.a
+++ b/lib/linux64/NvFlexExtDebugCUDA_x64.a
Binary files differ
diff --git a/lib/linux64/NvFlexExtReleaseCUDA_x64.a b/lib/linux64/NvFlexExtReleaseCUDA_x64.a
index 9d27575..8261036 100644
--- a/lib/linux64/NvFlexExtReleaseCUDA_x64.a
+++ b/lib/linux64/NvFlexExtReleaseCUDA_x64.a
Binary files differ
diff --git a/lib/linux64/NvFlexReleaseCUDA_x64.a b/lib/linux64/NvFlexReleaseCUDA_x64.a
index ab1bc81..9bf9e0b 100644
--- a/lib/linux64/NvFlexReleaseCUDA_x64.a
+++ b/lib/linux64/NvFlexReleaseCUDA_x64.a
Binary files differ
diff --git a/lib/win32/NvFlexDebugCUDA_x86.lib b/lib/win32/NvFlexDebugCUDA_x86.lib
index 5eb8505..ed006ed 100644
--- a/lib/win32/NvFlexDebugCUDA_x86.lib
+++ b/lib/win32/NvFlexDebugCUDA_x86.lib
Binary files differ
diff --git a/lib/win32/NvFlexDebugD3D_x86.lib b/lib/win32/NvFlexDebugD3D_x86.lib
index 7956385..09654ad 100644
--- a/lib/win32/NvFlexDebugD3D_x86.lib
+++ b/lib/win32/NvFlexDebugD3D_x86.lib
Binary files differ
diff --git a/lib/win32/NvFlexDeviceDebug_x86.lib b/lib/win32/NvFlexDeviceDebug_x86.lib
index 78a629e..2fca1a7 100644
--- a/lib/win32/NvFlexDeviceDebug_x86.lib
+++ b/lib/win32/NvFlexDeviceDebug_x86.lib
Binary files differ
diff --git a/lib/win32/NvFlexDeviceRelease_x86.lib b/lib/win32/NvFlexDeviceRelease_x86.lib
index 7a11b66..99abd1c 100644
--- a/lib/win32/NvFlexDeviceRelease_x86.lib
+++ b/lib/win32/NvFlexDeviceRelease_x86.lib
Binary files differ
diff --git a/lib/win32/NvFlexExtDebugCUDA_x86.lib b/lib/win32/NvFlexExtDebugCUDA_x86.lib
index ad777b1..bac00cc 100644
--- a/lib/win32/NvFlexExtDebugCUDA_x86.lib
+++ b/lib/win32/NvFlexExtDebugCUDA_x86.lib
Binary files differ
diff --git a/lib/win32/NvFlexExtDebugD3D_x86.lib b/lib/win32/NvFlexExtDebugD3D_x86.lib
index 6b54d91..5edfffc 100644
--- a/lib/win32/NvFlexExtDebugD3D_x86.lib
+++ b/lib/win32/NvFlexExtDebugD3D_x86.lib
Binary files differ
diff --git a/lib/win32/NvFlexExtReleaseCUDA_x86.lib b/lib/win32/NvFlexExtReleaseCUDA_x86.lib
index 5af8d2d..9ecde23 100644
--- a/lib/win32/NvFlexExtReleaseCUDA_x86.lib
+++ b/lib/win32/NvFlexExtReleaseCUDA_x86.lib
Binary files differ
diff --git a/lib/win32/NvFlexExtReleaseD3D_x86.lib b/lib/win32/NvFlexExtReleaseD3D_x86.lib
index 0980a42..56d7e9f 100644
--- a/lib/win32/NvFlexExtReleaseD3D_x86.lib
+++ b/lib/win32/NvFlexExtReleaseD3D_x86.lib
Binary files differ
diff --git a/lib/win32/NvFlexReleaseCUDA_x86.lib b/lib/win32/NvFlexReleaseCUDA_x86.lib
index d0e4bd8..68bb4b4 100644
--- a/lib/win32/NvFlexReleaseCUDA_x86.lib
+++ b/lib/win32/NvFlexReleaseCUDA_x86.lib
Binary files differ
diff --git a/lib/win32/NvFlexReleaseD3D_x86.lib b/lib/win32/NvFlexReleaseD3D_x86.lib
index 4d16728..16ea844 100644
--- a/lib/win32/NvFlexReleaseD3D_x86.lib
+++ b/lib/win32/NvFlexReleaseD3D_x86.lib
Binary files differ
diff --git a/lib/win64/NvFlexDebugCUDA_x64.lib b/lib/win64/NvFlexDebugCUDA_x64.lib
index 6539cbc..bb21d51 100644
--- a/lib/win64/NvFlexDebugCUDA_x64.lib
+++ b/lib/win64/NvFlexDebugCUDA_x64.lib
Binary files differ
diff --git a/lib/win64/NvFlexDebugD3D_x64.lib b/lib/win64/NvFlexDebugD3D_x64.lib
index 7d407bc..ec07504 100644
--- a/lib/win64/NvFlexDebugD3D_x64.lib
+++ b/lib/win64/NvFlexDebugD3D_x64.lib
Binary files differ
diff --git a/lib/win64/NvFlexDeviceDebug_x64.lib b/lib/win64/NvFlexDeviceDebug_x64.lib
index 40e2597..22b5696 100644
--- a/lib/win64/NvFlexDeviceDebug_x64.lib
+++ b/lib/win64/NvFlexDeviceDebug_x64.lib
Binary files differ
diff --git a/lib/win64/NvFlexDeviceRelease_x64.lib b/lib/win64/NvFlexDeviceRelease_x64.lib
index 52db1d6..2e19c6e 100644
--- a/lib/win64/NvFlexDeviceRelease_x64.lib
+++ b/lib/win64/NvFlexDeviceRelease_x64.lib
Binary files differ
diff --git a/lib/win64/NvFlexExtDebugCUDA_x64.lib b/lib/win64/NvFlexExtDebugCUDA_x64.lib
index 19ec840..919b576 100644
--- a/lib/win64/NvFlexExtDebugCUDA_x64.lib
+++ b/lib/win64/NvFlexExtDebugCUDA_x64.lib
Binary files differ
diff --git a/lib/win64/NvFlexExtDebugD3D_x64.lib b/lib/win64/NvFlexExtDebugD3D_x64.lib
index 371cc01..7b5901d 100644
--- a/lib/win64/NvFlexExtDebugD3D_x64.lib
+++ b/lib/win64/NvFlexExtDebugD3D_x64.lib
Binary files differ
diff --git a/lib/win64/NvFlexExtReleaseCUDA_x64.lib b/lib/win64/NvFlexExtReleaseCUDA_x64.lib
index fd37f5c..ca07406 100644
--- a/lib/win64/NvFlexExtReleaseCUDA_x64.lib
+++ b/lib/win64/NvFlexExtReleaseCUDA_x64.lib
Binary files differ
diff --git a/lib/win64/NvFlexExtReleaseD3D_x64.lib b/lib/win64/NvFlexExtReleaseD3D_x64.lib
index b533511..163b83c 100644
--- a/lib/win64/NvFlexExtReleaseD3D_x64.lib
+++ b/lib/win64/NvFlexExtReleaseD3D_x64.lib
Binary files differ
diff --git a/lib/win64/NvFlexReleaseCUDA_x64.lib b/lib/win64/NvFlexReleaseCUDA_x64.lib
index 07ed6c0..f9858d6 100644
--- a/lib/win64/NvFlexReleaseCUDA_x64.lib
+++ b/lib/win64/NvFlexReleaseCUDA_x64.lib
Binary files differ
diff --git a/lib/win64/NvFlexReleaseD3D_x64.lib b/lib/win64/NvFlexReleaseD3D_x64.lib
index aac1beb..9307019 100644
--- a/lib/win64/NvFlexReleaseD3D_x64.lib
+++ b/lib/win64/NvFlexReleaseD3D_x64.lib
Binary files differ
diff --git a/release_notes.txt b/release_notes.txt
index 78e4e21..d9815af 100644
--- a/release_notes.txt
+++ b/release_notes.txt
@@ -1,3 +1,28 @@
+1.2.0 (beta)
+------------
+
+- New API to retrieve particle neighbor information, see NvFlexGetNeighbors()
+- New API to support shape collision filtering, collision channels can be assigned to particles and shapes to specify which pairs collide, see NvFlexPhase
+- New API to support per-shape plastic deformation, it is now possible to specify plastic creep and threshold coefficient on a per-shape basis (previous global settings), see NvFlexSetRigids()
+- New API to selectively disable solver features, this can lead to improved performance, see NvFlexFeatureMode, replaces global FlexParams::fluid option
+- New API to allow sub-range particle buffer updates, see NvFlexCopyDesc
+- New API for asynchronous compute, see NvFlexInitDesc
+- Fix for unnecessary synchronization when calling NvFlexMap() on a device buffer
+- Fix numerical precision for shape-matching constraints with large coordinates
+- Fix for uninitialized contact indices returned from NvFlexGetContacts() if NvFlexUpdateSolver() has not been called
+- Fix for SDF collision in D3D12
+- Fix for D3D warning when using NvFlexSetRigids()
+- Add D3D12 rendering support to the demo
+- Add support for device NvFlexBuffers on D3D
+- Enable NvToolkit profiling zones so to provide annotations in NSight profiles by default
+
+Known Issues
+------------
+
+- Demo rendering artifacts in D3D12 fullscreen on AMD platforms
+- NvFlexGetTimers() may report incorrect values on D3D12
+- Crash on inflatable test scenes on some Kepler class GPUs
+
1.1.0
-----
diff --git a/src/dx/context/Context.h b/src/dx/context/Context.h
index 31ddb95..2c78777 100644
--- a/src/dx/context/Context.h
+++ b/src/dx/context/Context.h
@@ -94,7 +94,7 @@ namespace NvFlex
virtual NvFlexUint addRef() { return Object::addRefInternal(); } \
virtual NvFlexUint release() { return Object::releaseInternal(); }
- #define NV_FLEX_DISPATCH_MAX_READ_TEXTURES ( 30u )
+ #define NV_FLEX_DISPATCH_MAX_READ_TEXTURES ( 32u )
#define NV_FLEX_DISPATCH_MAX_WRITE_TEXTURES ( 8u )
#define NV_FLEX_DRAW_MAX_READ_TEXTURES ( 8u )
@@ -118,7 +118,8 @@ namespace NvFlex
eRaw = 1 << 3,
eStructured = 1 << 4,
eIndirect = 1 << 5,
- eShared = 1 << 6
+ eShared = 1 << 6,
+ eDynamic = 1 << 7
};
struct BufferDesc
@@ -184,12 +185,20 @@ namespace NvFlex
virtual Resource* getResource() = 0;
};
-
+ enum BufferResourceTypes
+ {
+ eResource = 1 << 0,
+ eDefaultBuffer = 1 << 1,
+ eUploadBuffer = 1 << 2,
+ eDownloadBuffer = 1 << 3,
+ eNativeBuffer = 1 << 4,
+ };
+
/// Context created resources
/// includes Resource, ResourceRW
struct Buffer : public NvFlexObject
{
- virtual Resource* getResource() = 0;
+ virtual Resource* getResource(BufferResourceTypes type = eResource) = 0;
virtual ResourceRW* getResourceRW() = 0;
virtual ~Buffer() {}
BufferDesc m_desc;
@@ -238,6 +247,14 @@ namespace NvFlex
Buffer * IndirectLaunchArgs;
};
+ enum MapType
+ {
+ eMapRead = 0,
+ eMapWrite = 1,
+ eMapReadWrite = 2,
+ eMapWriteDiscard = 3,
+ };
+
struct MappedData
{
void* data;
@@ -265,7 +282,7 @@ namespace NvFlex
virtual void clear() = 0;
- virtual float get(int index) = 0;
+ virtual float get(int index, unsigned long long* begin = 0, unsigned long long* end = 0, unsigned long long* freq = 0) = 0;
// Set the number of timers in the pool
// In D3D12 this results in a reallocation of the timer heap
virtual void reserve(size_t size) = 0;
@@ -327,9 +344,7 @@ namespace NvFlex
virtual Buffer* createBufferView(Buffer* buffer, const BufferViewDesc* desc) = 0;
- virtual void* map(Buffer* buffer) = 0;
-
- virtual void* mapUpload(Buffer* buffer) = 0;
+ virtual void* map(Buffer* buffer, MapType type = eMapReadWrite, bool wait=true) = 0;
virtual void unmap(Buffer* buffer) = 0;
@@ -345,12 +360,14 @@ namespace NvFlex
virtual void copyToNative(void* dst, unsigned dstByteOffset, Buffer* src, NvFlexUint srcByteOffset, NvFlexUint numBytes) = 0;
- virtual void copyToDevice(Buffer* dst, unsigned dstByteOffset, Buffer* src, NvFlexUint srcByteOffset, NvFlexUint numBytes) = 0;
+ virtual void copyToDevice(Buffer* dst, unsigned dstByteOffset, Buffer* src, NvFlexUint srcByteOffset, NvFlexUint numBytes, BufferResourceTypes type = eDownloadBuffer) = 0;
virtual void copyToHost(Buffer* dst, unsigned dstByteOffset, Buffer* src, NvFlexUint srcByteOffset, NvFlexUint numBytes) = 0;
virtual void clearUnorderedAccessViewUint(Buffer* buffer, const NvFlexUint * values) = 0;
+ virtual void clearUnorderedAccessViewFloat(Buffer* buffer, const NvFlexFloat * values) = 0;
+
virtual void copyResourceState(Buffer* bufferFrom, Buffer* bufferTo) = 0;
//virtual void updateSubresource(Buffer* bufferIn, const NvFlexUint * box, const void * data) = 0;
@@ -391,6 +408,8 @@ namespace NvFlex
virtual void clearState() = 0;
+ virtual void computeWaitForGraphics() = 0;
+
// ***************** Profiling ****************
virtual void eventMarker(const wchar_t* label) = 0;
diff --git a/src/dx/context/Device.h b/src/dx/context/Device.h
index c3685a9..69499ad 100644
--- a/src/dx/context/Device.h
+++ b/src/dx/context/Device.h
@@ -2,6 +2,9 @@
#include "Context.h"
+// For NvFlexErrorCallback
+#include "../../include/NvFlex.h"
+
#include <d3d11.h>
#include <d3d11_1.h>
@@ -16,17 +19,20 @@
#include <vector>
#define ENABLE_LIVE_DEVICE_OBJECTS_REPORTING 0 // Provides detailed report of D3D object reference counts
-#define USE_NVAPI_DEVICE 0 // Enable this for D3D11 SCG
+#define USE_NVAPI_DEVICE 1 // Enable this for D3D11 SCG
struct FlexDeviceDesc
{
- FlexDeviceDesc() : mDeviceNumber(-1), mDevice(nullptr), mCommandQueue(nullptr), useComputeQueue(false), enablePresent(false) {}
+ FlexDeviceDesc() : mDeviceNumber(-1), mDevice(nullptr), mComputeCommandQueue(nullptr), mRenderCommandQueue(nullptr), useComputeQueue(false), enablePresent(false) {}
virtual ~FlexDeviceDesc() {}
unsigned int mDeviceNumber; //!< Compute device number
void * mDevice; //!< pointer to existing device
- void * mCommandQueue; //!< pointer to existing command queue for DX12
+ void * mComputeCommandQueue; //!< pointer to existing command queue for DX12
+ void * mRenderCommandQueue; //!< pointer to existing command queue for DX12
bool useComputeQueue; //!< Use the compute queue instead of the graphics queue for DX12
bool enablePresent; //!< Present after each frame to that APIC and PB dump work
+
+ NvFlexErrorCallback mErrorFunc;
};
namespace NvFlex
diff --git a/src/dx/context/NvFlexTypes.h b/src/dx/context/NvFlexTypes.h
index 46e8269..ba538e4 100644
--- a/src/dx/context/NvFlexTypes.h
+++ b/src/dx/context/NvFlexTypes.h
@@ -18,6 +18,7 @@ enum NvFlexResult
};
typedef int NvFlexInt;
+typedef float NvFlexFloat;
typedef unsigned int NvFlexUint;
typedef unsigned long long NvFlexUint64;