Skip to content

Commit af39c68

Browse files
Added IRenderDeviceVk::GetDeviceFeaturesVk() method (API256005)
1 parent 13ab892 commit af39c68

File tree

5 files changed

+17
-2
lines changed

5 files changed

+17
-2
lines changed

Graphics/GraphicsEngine/interface/APIInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
/// \file
3131
/// Diligent API information
3232

33-
#define DILIGENT_API_VERSION 256004
33+
#define DILIGENT_API_VERSION 256005
3434

3535
#include "../../../Primitives/interface/BasicTypes.h"
3636

Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ class RenderDeviceVkImpl final : public RenderDeviceNextGenBase<RenderDeviceBase
222222
RESOURCE_DIMENSION Dimension,
223223
Uint32 SampleCount) const override final;
224224

225+
/// Implementation of IRenderDeviceVk::GetDeviceFeaturesVk().
226+
virtual void DILIGENT_CALL_TYPE GetDeviceFeaturesVk(DeviceFeaturesVk& FeaturesVk) const override final;
227+
225228
DescriptorSetAllocation AllocateDescriptorSet(Uint64 CommandQueueMask, VkDescriptorSetLayout SetLayout, const char* DebugName = "")
226229
{
227230
return m_DescriptorSetAllocator.Allocate(CommandQueueMask, SetLayout, DebugName);

Graphics/GraphicsEngineVulkan/interface/RenderDeviceVk.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2023 Diligent Graphics LLC
2+
* Copyright 2019-2025 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -157,6 +157,10 @@ DILIGENT_BEGIN_INTERFACE(IRenderDeviceVk, IRenderDevice)
157157
VkSemaphore vkTimelineSemaphore,
158158
const FenceDesc REF Desc,
159159
IFence** ppFence) PURE;
160+
161+
/// Returns Vulkan-specific device features, see Diligent::DeviceFeaturesVk.
162+
VIRTUAL void METHOD(GetDeviceFeaturesVk)(THIS_
163+
DeviceFeaturesVk REF FeaturesVk) CONST PURE;
160164
};
161165
DILIGENT_END_INTERFACE
162166

@@ -174,6 +178,7 @@ DILIGENT_END_INTERFACE
174178
# define IRenderDeviceVk_CreateBLASFromVulkanResource(This, ...) CALL_IFACE_METHOD(RenderDeviceVk, CreateBLASFromVulkanResource, This, __VA_ARGS__)
175179
# define IRenderDeviceVk_CreateTLASFromVulkanResource(This, ...) CALL_IFACE_METHOD(RenderDeviceVk, CreateTLASFromVulkanResource, This, __VA_ARGS__)
176180
# define IRenderDeviceVk_CreateFenceFromVulkanResource(This, ...) CALL_IFACE_METHOD(RenderDeviceVk, CreateFenceFromVulkanResource, This, __VA_ARGS__)
181+
# define IRenderDeviceVk_GetDeviceFeaturesVk(This, ...) CALL_IFACE_METHOD(RenderDeviceVk, GetDeviceFeaturesVk, This, __VA_ARGS__)
177182

178183
// clang-format on
179184

Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include "PipelineStateCacheVkImpl.hpp"
4848
#include "CommandQueueVkImpl.hpp"
4949
#include "PipelineResourceSignatureVkImpl.hpp"
50+
#include "GraphicsAccessories.hpp"
5051

5152
#include "VulkanTypeConversions.hpp"
5253
#include "EngineMemory.h"
@@ -821,4 +822,9 @@ SparseTextureFormatInfo RenderDeviceVkImpl::GetSparseTextureFormatInfo(TEXTURE_F
821822
return Info;
822823
}
823824

825+
void RenderDeviceVkImpl::GetDeviceFeaturesVk(DeviceFeaturesVk& FeaturesVk) const
826+
{
827+
FeaturesVk = PhysicalDeviceFeaturesToDeviceFeaturesVk(m_LogicalVkDevice->GetEnabledExtFeatures());
828+
}
829+
824830
} // namespace Diligent

ReleaseHistory.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## Current progress
22

3+
* Added `IRenderDeviceVk::GetDeviceFeaturesVk()` method (API256005)
34
* Added `DeviceFeaturesVk` struct and `EngineVkCreateInfo::FeaturesVk` member (API256004)
45
* Removed `DRAW_FLAG_VERIFY_RENDER_TARGETS` flag (API256003)
56
* The validation uses render target formats hash, which allows detecting format mismatches

0 commit comments

Comments
 (0)