From 85129a6868aca02adc80a0a5360fa47579dac526 Mon Sep 17 00:00:00 2001 From: assiduous Date: Thu, 29 Oct 2020 22:45:25 -0700 Subject: Added include tests for BLAS, TLAS and SBT headers, fixed few issues --- .../GraphicsEngine/BottomLevelASH_test.c | 45 ++++++++++++++++++++++ .../GraphicsEngine/BottomLevelASH_test.cpp | 28 ++++++++++++++ .../GraphicsEngine/ShaderBindingTableH_test.c | 44 +++++++++++++++++++++ .../GraphicsEngine/ShaderBindingTableH_test.cpp | 28 ++++++++++++++ .../IncludeTest/GraphicsEngine/TopLevelASH_test.c | 45 ++++++++++++++++++++++ .../GraphicsEngine/TopLevelASH_test.cpp | 28 ++++++++++++++ .../GraphicsEngineD3D12/BottomLevelASD3D12H_test.c | 35 +++++++++++++++++ .../BottomLevelASD3D12H_test.cpp | 29 ++++++++++++++ .../ShaderBindingTableD3D12H_test.c | 34 ++++++++++++++++ .../ShaderBindingTableD3D12H_test.cpp | 29 ++++++++++++++ .../GraphicsEngineD3D12/TopLevelASD3D12H_test.c | 37 ++++++++++++++++++ .../GraphicsEngineD3D12/TopLevelASD3D12H_test.cpp | 29 ++++++++++++++ .../GraphicsEngineVk/BottomLevelASVkH_test.c | 38 ++++++++++++++++++ .../GraphicsEngineVk/BottomLevelASVkH_test.cpp | 29 ++++++++++++++ .../GraphicsEngineVk/ShaderBindingTableVkH.c | 29 ++++++++++++++ .../GraphicsEngineVk/ShaderBindingTableVkH.cpp | 29 ++++++++++++++ .../GraphicsEngineVk/TopLevelASVkH_test.c | 35 +++++++++++++++++ .../GraphicsEngineVk/TopLevelASVkH_test.cpp | 29 ++++++++++++++ 18 files changed, 600 insertions(+) create mode 100644 Tests/IncludeTest/GraphicsEngine/BottomLevelASH_test.c create mode 100644 Tests/IncludeTest/GraphicsEngine/BottomLevelASH_test.cpp create mode 100644 Tests/IncludeTest/GraphicsEngine/ShaderBindingTableH_test.c create mode 100644 Tests/IncludeTest/GraphicsEngine/ShaderBindingTableH_test.cpp create mode 100644 Tests/IncludeTest/GraphicsEngine/TopLevelASH_test.c create mode 100644 Tests/IncludeTest/GraphicsEngine/TopLevelASH_test.cpp create mode 100644 Tests/IncludeTest/GraphicsEngineD3D12/BottomLevelASD3D12H_test.c create mode 100644 Tests/IncludeTest/GraphicsEngineD3D12/BottomLevelASD3D12H_test.cpp create mode 100644 Tests/IncludeTest/GraphicsEngineD3D12/ShaderBindingTableD3D12H_test.c create mode 100644 Tests/IncludeTest/GraphicsEngineD3D12/ShaderBindingTableD3D12H_test.cpp create mode 100644 Tests/IncludeTest/GraphicsEngineD3D12/TopLevelASD3D12H_test.c create mode 100644 Tests/IncludeTest/GraphicsEngineD3D12/TopLevelASD3D12H_test.cpp create mode 100644 Tests/IncludeTest/GraphicsEngineVk/BottomLevelASVkH_test.c create mode 100644 Tests/IncludeTest/GraphicsEngineVk/BottomLevelASVkH_test.cpp create mode 100644 Tests/IncludeTest/GraphicsEngineVk/ShaderBindingTableVkH.c create mode 100644 Tests/IncludeTest/GraphicsEngineVk/ShaderBindingTableVkH.cpp create mode 100644 Tests/IncludeTest/GraphicsEngineVk/TopLevelASVkH_test.c create mode 100644 Tests/IncludeTest/GraphicsEngineVk/TopLevelASVkH_test.cpp (limited to 'Tests/IncludeTest') diff --git a/Tests/IncludeTest/GraphicsEngine/BottomLevelASH_test.c b/Tests/IncludeTest/GraphicsEngine/BottomLevelASH_test.c new file mode 100644 index 00000000..a10a32d1 --- /dev/null +++ b/Tests/IncludeTest/GraphicsEngine/BottomLevelASH_test.c @@ -0,0 +1,45 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include "DiligentCore/Graphics/GraphicsEngine/interface/BottomLevelAS.h" + +void TestBottomLevelAS_CInterface(IBottomLevelAS* pBLAS) +{ + Uint32 GeomIndex = IBottomLevelAS_GetGeometryIndex(pBLAS, "Name"); + (void)GeomIndex; + + ScratchBufferSizes ScratchSizes = IBottomLevelAS_GetScratchBufferSizes(pBLAS); + (void)ScratchSizes; + + void* NativeHandle = IBottomLevelAS_GetNativeHandle(pBLAS); + (void)NativeHandle; + + IBottomLevelAS_SetState(pBLAS, RESOURCE_STATE_UNDEFINED); + + RESOURCE_STATE State = IBottomLevelAS_GetState(pBLAS); + (void)State; +} diff --git a/Tests/IncludeTest/GraphicsEngine/BottomLevelASH_test.cpp b/Tests/IncludeTest/GraphicsEngine/BottomLevelASH_test.cpp new file mode 100644 index 00000000..75ff6659 --- /dev/null +++ b/Tests/IncludeTest/GraphicsEngine/BottomLevelASH_test.cpp @@ -0,0 +1,28 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include "DiligentCore/Graphics/GraphicsEngine/interface/BottomLevelAS.h" diff --git a/Tests/IncludeTest/GraphicsEngine/ShaderBindingTableH_test.c b/Tests/IncludeTest/GraphicsEngine/ShaderBindingTableH_test.c new file mode 100644 index 00000000..955e92a1 --- /dev/null +++ b/Tests/IncludeTest/GraphicsEngine/ShaderBindingTableH_test.c @@ -0,0 +1,44 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include "DiligentCore/Graphics/GraphicsEngine/interface/ShaderBindingTable.h" + +void TestShaderBindingTable_CInterface(IShaderBindingTable* pSBT) +{ + IShaderBindingTable_Verify(pSBT); + + ShaderBindingTableDesc SBTDesc = {0}; + IShaderBindingTable_Reset(pSBT, &SBTDesc); + + IShaderBindingTable_ResetHitGroups(pSBT, 0); + IShaderBindingTable_BindRayGenShader(pSBT, "Group name", (const void*)NULL, 0); + IShaderBindingTable_BindMissShader(pSBT, "Group name", 0, (const void*)NULL, 0); + IShaderBindingTable_BindHitGroup(pSBT, (ITopLevelAS*)NULL, "Instance name", "Geometry name", 0, "Shader group name", (const void*)NULL, 0); + IShaderBindingTable_BindHitGroups(pSBT, (ITopLevelAS*)NULL, "Instance name", 0, "Shader group name", (const void*)NULL, 0); + IShaderBindingTable_BindCallableShader(pSBT, "Shader group name", 0, (const void*)NULL, 0); + IShaderBindingTable_BindAll(pSBT, (BindAllAttribs*)NULL); +} diff --git a/Tests/IncludeTest/GraphicsEngine/ShaderBindingTableH_test.cpp b/Tests/IncludeTest/GraphicsEngine/ShaderBindingTableH_test.cpp new file mode 100644 index 00000000..335b1430 --- /dev/null +++ b/Tests/IncludeTest/GraphicsEngine/ShaderBindingTableH_test.cpp @@ -0,0 +1,28 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include "DiligentCore/Graphics/GraphicsEngine/interface/ShaderBindingTable.h" diff --git a/Tests/IncludeTest/GraphicsEngine/TopLevelASH_test.c b/Tests/IncludeTest/GraphicsEngine/TopLevelASH_test.c new file mode 100644 index 00000000..3c70e3ee --- /dev/null +++ b/Tests/IncludeTest/GraphicsEngine/TopLevelASH_test.c @@ -0,0 +1,45 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include "DiligentCore/Graphics/GraphicsEngine/interface/TopLevelAS.h" + +void TestTopLevelAS_CInterface(ITopLevelAS* pTLAS) +{ + TLASInstanceDesc InstDesc = ITopLevelAS_GetInstanceDesc(pTLAS, "Name"); + (void)InstDesc; + + ScratchBufferSizes ScratchSizes = ITopLevelAS_GetScratchBufferSizes(pTLAS); + (void)ScratchSizes; + + void* Handle = ITopLevelAS_GetNativeHandle(pTLAS); + (void)Handle; + + ITopLevelAS_SetState(pTLAS, RESOURCE_STATE_UNDEFINED); + + RESOURCE_STATE State = ITopLevelAS_GetState(pTLAS); + (void)State; +} diff --git a/Tests/IncludeTest/GraphicsEngine/TopLevelASH_test.cpp b/Tests/IncludeTest/GraphicsEngine/TopLevelASH_test.cpp new file mode 100644 index 00000000..cf6246a7 --- /dev/null +++ b/Tests/IncludeTest/GraphicsEngine/TopLevelASH_test.cpp @@ -0,0 +1,28 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include "DiligentCore/Graphics/GraphicsEngine/interface/TopLevelAS.h" diff --git a/Tests/IncludeTest/GraphicsEngineD3D12/BottomLevelASD3D12H_test.c b/Tests/IncludeTest/GraphicsEngineD3D12/BottomLevelASD3D12H_test.c new file mode 100644 index 00000000..3f14967e --- /dev/null +++ b/Tests/IncludeTest/GraphicsEngineD3D12/BottomLevelASD3D12H_test.c @@ -0,0 +1,35 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include +#include "DiligentCore/Graphics/GraphicsEngineD3D12/interface/BottomLevelASD3D12.h" + +void TestBottomLevelASD3D12_CInterface(IBottomLevelASD3D12* pBLASD3D12) +{ + ID3D12Resource* pD3D12Res = IBottomLevelASD3D12_GetD3D12BLAS(pBLASD3D12); + (void)pD3D12Res; +} diff --git a/Tests/IncludeTest/GraphicsEngineD3D12/BottomLevelASD3D12H_test.cpp b/Tests/IncludeTest/GraphicsEngineD3D12/BottomLevelASD3D12H_test.cpp new file mode 100644 index 00000000..92e96720 --- /dev/null +++ b/Tests/IncludeTest/GraphicsEngineD3D12/BottomLevelASD3D12H_test.cpp @@ -0,0 +1,29 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include +#include "DiligentCore/Graphics/GraphicsEngineD3D12/interface/BottomLevelASD3D12.h" diff --git a/Tests/IncludeTest/GraphicsEngineD3D12/ShaderBindingTableD3D12H_test.c b/Tests/IncludeTest/GraphicsEngineD3D12/ShaderBindingTableD3D12H_test.c new file mode 100644 index 00000000..854c0808 --- /dev/null +++ b/Tests/IncludeTest/GraphicsEngineD3D12/ShaderBindingTableD3D12H_test.c @@ -0,0 +1,34 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include +#include "DiligentCore/Graphics/GraphicsEngineD3D12/interface/ShaderBindingTableD3D12.h" + +void TestShaderBindingTableD3D12_CInterface(IShaderBindingTableD3D12* pSBTD3D12) +{ + /// AZ TODO +} diff --git a/Tests/IncludeTest/GraphicsEngineD3D12/ShaderBindingTableD3D12H_test.cpp b/Tests/IncludeTest/GraphicsEngineD3D12/ShaderBindingTableD3D12H_test.cpp new file mode 100644 index 00000000..ab9b5e80 --- /dev/null +++ b/Tests/IncludeTest/GraphicsEngineD3D12/ShaderBindingTableD3D12H_test.cpp @@ -0,0 +1,29 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include +#include "DiligentCore/Graphics/GraphicsEngineD3D12/interface/ShaderBindingTableD3D12.h" diff --git a/Tests/IncludeTest/GraphicsEngineD3D12/TopLevelASD3D12H_test.c b/Tests/IncludeTest/GraphicsEngineD3D12/TopLevelASD3D12H_test.c new file mode 100644 index 00000000..7e3b62f0 --- /dev/null +++ b/Tests/IncludeTest/GraphicsEngineD3D12/TopLevelASD3D12H_test.c @@ -0,0 +1,37 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include +#include "DiligentCore/Graphics/GraphicsEngineD3D12/interface/TopLevelASD3D12.h" + +void TestTopLevelASD3D12_CInterface(ITopLevelASD3D12* pTLASD3D12) +{ + ID3D12Resource* pD3D12Res = ITopLevelASD3D12_GetD3D12TLAS(pTLASD3D12); + (void)pD3D12Res; + D3D12_CPU_DESCRIPTOR_HANDLE CPUHandle = ITopLevelASD3D12_GetCPUDescriptorHandle(pTLASD3D12); + (void)CPUHandle; +} diff --git a/Tests/IncludeTest/GraphicsEngineD3D12/TopLevelASD3D12H_test.cpp b/Tests/IncludeTest/GraphicsEngineD3D12/TopLevelASD3D12H_test.cpp new file mode 100644 index 00000000..92e96720 --- /dev/null +++ b/Tests/IncludeTest/GraphicsEngineD3D12/TopLevelASD3D12H_test.cpp @@ -0,0 +1,29 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include +#include "DiligentCore/Graphics/GraphicsEngineD3D12/interface/BottomLevelASD3D12.h" diff --git a/Tests/IncludeTest/GraphicsEngineVk/BottomLevelASVkH_test.c b/Tests/IncludeTest/GraphicsEngineVk/BottomLevelASVkH_test.c new file mode 100644 index 00000000..39abba45 --- /dev/null +++ b/Tests/IncludeTest/GraphicsEngineVk/BottomLevelASVkH_test.c @@ -0,0 +1,38 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include "DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan.h" +#include "DiligentCore/Graphics/GraphicsEngineVulkan/interface/BottomLevelASVk.h" + +void TestBottomLevelASVk_CInterface(IBottomLevelASVk* pBLASVk) +{ + VkAccelerationStructureKHR VkBLAS = IBottomLevelASVk_GetVkBLAS(pBLASVk); + (void)VkBLAS; + + VkDeviceAddress vkAddress = IBottomLevelASVk_GetVkDeviceAddress(pBLASVk); + (void)vkAddress; +} diff --git a/Tests/IncludeTest/GraphicsEngineVk/BottomLevelASVkH_test.cpp b/Tests/IncludeTest/GraphicsEngineVk/BottomLevelASVkH_test.cpp new file mode 100644 index 00000000..75bcf9c0 --- /dev/null +++ b/Tests/IncludeTest/GraphicsEngineVk/BottomLevelASVkH_test.cpp @@ -0,0 +1,29 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include "DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan.h" +#include "DiligentCore/Graphics/GraphicsEngineVulkan/interface/BottomLevelASVk.h" diff --git a/Tests/IncludeTest/GraphicsEngineVk/ShaderBindingTableVkH.c b/Tests/IncludeTest/GraphicsEngineVk/ShaderBindingTableVkH.c new file mode 100644 index 00000000..e8c26554 --- /dev/null +++ b/Tests/IncludeTest/GraphicsEngineVk/ShaderBindingTableVkH.c @@ -0,0 +1,29 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include "DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan.h" +#include "DiligentCore/Graphics/GraphicsEngineVulkan/interface/ShaderResourceBindingVk.h" diff --git a/Tests/IncludeTest/GraphicsEngineVk/ShaderBindingTableVkH.cpp b/Tests/IncludeTest/GraphicsEngineVk/ShaderBindingTableVkH.cpp new file mode 100644 index 00000000..e8c26554 --- /dev/null +++ b/Tests/IncludeTest/GraphicsEngineVk/ShaderBindingTableVkH.cpp @@ -0,0 +1,29 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include "DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan.h" +#include "DiligentCore/Graphics/GraphicsEngineVulkan/interface/ShaderResourceBindingVk.h" diff --git a/Tests/IncludeTest/GraphicsEngineVk/TopLevelASVkH_test.c b/Tests/IncludeTest/GraphicsEngineVk/TopLevelASVkH_test.c new file mode 100644 index 00000000..3fad5fb5 --- /dev/null +++ b/Tests/IncludeTest/GraphicsEngineVk/TopLevelASVkH_test.c @@ -0,0 +1,35 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include "DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan.h" +#include "DiligentCore/Graphics/GraphicsEngineVulkan/interface/TopLevelASVk.h" + +void TestTopLevelASVk_CInterface(ITopLevelASVk* pTLASVk) +{ + VkAccelerationStructureKHR vkAS = ITopLevelASVk_GetVkTLAS(pTLASVk); + (void)vkAS; +} diff --git a/Tests/IncludeTest/GraphicsEngineVk/TopLevelASVkH_test.cpp b/Tests/IncludeTest/GraphicsEngineVk/TopLevelASVkH_test.cpp new file mode 100644 index 00000000..af18ad36 --- /dev/null +++ b/Tests/IncludeTest/GraphicsEngineVk/TopLevelASVkH_test.cpp @@ -0,0 +1,29 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include "DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan.h" +#include "DiligentCore/Graphics/GraphicsEngineVulkan/interface/TopLevelASVk.h" -- cgit v1.2.3