Skip to content

Commit 4058bf8

Browse files
Integrated tests
1 parent aa0d5d2 commit 4058bf8

9 files changed

Lines changed: 623 additions & 23 deletions

File tree

Graphics/Archiver/include/SerializationDeviceImpl.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class SerializationDeviceImpl final : public RenderDeviceBase<SerializationEngin
7070
UNSUPPORTED_METHOD(void, CreateTLAS, const TopLevelASDesc& Desc, ITopLevelAS** ppTLAS)
7171
UNSUPPORTED_METHOD(void, CreateSBT, const ShaderBindingTableDesc& Desc, IShaderBindingTable** ppSBT)
7272
UNSUPPORTED_METHOD(void, CreatePipelineResourceSignature, const PipelineResourceSignatureDesc& Desc, IPipelineResourceSignature** ppSignature)
73+
UNSUPPORTED_METHOD(void, CreateSuperResolutionUpscaler, const SuperResolutionUpscalerDesc& Desc, ISuperResolutionUpscaler** ppUpscaler)
7374
UNSUPPORTED_METHOD(void, CreateDeviceMemory, const DeviceMemoryCreateInfo& CreateInfo, IDeviceMemory** ppMemory)
7475
UNSUPPORTED_METHOD(void, CreatePipelineStateCache, const PipelineStateCacheCreateInfo& CreateInfo, IPipelineStateCache** ppPSOCache)
7576
UNSUPPORTED_METHOD(void, CreateDeferredContext, IDeviceContext** ppContext)

Graphics/GraphicsEngine/interface/GraphicsTypes.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3412,24 +3412,24 @@ struct GraphicsAdapterInfo
34123412
if (!(Queues[i] == RHS.Queues[i]))
34133413
return false;
34143414

3415-
return Type == RHS.Type &&
3416-
Vendor == RHS.Vendor &&
3417-
VendorId == RHS.VendorId &&
3418-
DeviceId == RHS.DeviceId &&
3419-
NumOutputs == RHS.NumOutputs &&
3420-
Memory == RHS.Memory &&
3421-
RayTracing == RHS.RayTracing &&
3422-
WaveOp == RHS.WaveOp &&
3423-
Buffer == RHS.Buffer &&
3424-
Texture == RHS.Texture &&
3425-
Sampler == RHS.Sampler &&
3426-
MeshShader == RHS.MeshShader &&
3427-
ShadingRate == RHS.ShadingRate &&
3428-
ComputeShader == RHS.ComputeShader &&
3429-
DrawCommand == RHS.DrawCommand &&
3430-
SparseResources == RHS.SparseResources &&
3431-
SuperResolution == RHS.SuperResolution &&
3432-
Features == RHS.Features &&
3415+
return Type == RHS.Type &&
3416+
Vendor == RHS.Vendor &&
3417+
VendorId == RHS.VendorId &&
3418+
DeviceId == RHS.DeviceId &&
3419+
NumOutputs == RHS.NumOutputs &&
3420+
Memory == RHS.Memory &&
3421+
RayTracing == RHS.RayTracing &&
3422+
WaveOp == RHS.WaveOp &&
3423+
Buffer == RHS.Buffer &&
3424+
Texture == RHS.Texture &&
3425+
Sampler == RHS.Sampler &&
3426+
MeshShader == RHS.MeshShader &&
3427+
ShadingRate == RHS.ShadingRate &&
3428+
ComputeShader == RHS.ComputeShader &&
3429+
DrawCommand == RHS.DrawCommand &&
3430+
SparseResources == RHS.SparseResources &&
3431+
SuperResolution == RHS.SuperResolution &&
3432+
Features == RHS.Features &&
34333433
memcmp(Description, RHS.Description, sizeof(Description)) == 0;
34343434
}
34353435
#endif

Graphics/GraphicsEngine/interface/SuperResolutionUpscaler.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ DILIGENT_TYPED_ENUM(SUPER_RESOLUTION_UPSCALER_TYPE, Uint8)
5353
SUPER_RESOLUTION_UPSCALER_TYPE_LAST = SUPER_RESOLUTION_UPSCALER_TYPE_TEMPORAL
5454
};
5555

56-
/// Super resolution upscaler description
57-
5856
/// This structure describes the super resolution upscaler object and is part of the creation
5957
/// parameters given to IRenderDevice::CreateSuperResolutionUpscaler().
6058
struct SuperResolutionUpscalerDesc DILIGENT_DERIVE(DeviceObjectAttribs)
@@ -174,8 +172,8 @@ DILIGENT_END_INTERFACE
174172
#if DILIGENT_C_INTERFACE
175173

176174
// clang-format off
175+
# define ISuperResolutionUpscaler_GetDesc(This) (const struct SuperResolutionUpscalerDesc*)IDeviceObject_GetDesc(This)
177176

178-
# define ISuperResolutionUpscaler_GetDesc(This) CALL_IFACE_METHOD(SuperResolutionUpscaler, GetDesc, This)
179177
# define ISuperResolutionUpscaler_GetRenderResolution(This, ...) CALL_IFACE_METHOD(SuperResolutionUpscaler, GetRenderResolution, This, __VA_ARGS__)
180178

181179
// clang-format on

Tests/DiligentCoreAPITest/src/CInterfaceTest.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2022 Diligent Graphics LLC
2+
* Copyright 2019-2026 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -39,6 +39,7 @@ extern "C"
3939
int TestRenderDeviceCInterface_CreateResourceMapping(void* pRenderDevice);
4040
int TestRenderDeviceCInterface_CreateFence(void* pRenderDevice);
4141
int TestRenderDeviceCInterface_CreateQuery(void* pRenderDevice);
42+
int TestRenderDeviceCInterface_CreateSuperResolutionUpscaler(void* pRenderDevice);
4243
}
4344

4445
using namespace Diligent;
@@ -53,7 +54,6 @@ TEST(RenderDevice_CInterface, Misc)
5354
EXPECT_EQ(TestRenderDeviceCInterface_Misc(pDevice), 0);
5455
}
5556

56-
5757
TEST(RenderDevice_CInterface, CreateBuffer)
5858
{
5959
auto* pDevice = GPUTestingEnvironment::GetInstance()->GetDevice();
@@ -96,4 +96,10 @@ TEST(RenderDevice_CInterface, CreateQuery)
9696
EXPECT_EQ(TestRenderDeviceCInterface_CreateQuery(pDevice), 0);
9797
}
9898

99+
TEST(RenderDevice_CInterface, CreateSuperResolutionUpscaler)
100+
{
101+
auto* pDevice = GPUTestingEnvironment::GetInstance()->GetDevice();
102+
EXPECT_EQ(TestRenderDeviceCInterface_CreateSuperResolutionUpscaler(pDevice), 0);
103+
}
104+
99105
} // namespace

0 commit comments

Comments
 (0)