Skip to content

Commit 79a2e12

Browse files
GraphicsEngineVk: a bit more renaming
1 parent ae8f903 commit 79a2e12

File tree

11 files changed

+69
-69
lines changed

11 files changed

+69
-69
lines changed

Graphics/GraphicsEngineVulkan/include/CommandQueueVkImpl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class SyncPointVk final : public std::enable_shared_from_this<SyncPointVk>
5353
SyncPointVk(SoftwareQueueIndex CommandQueueId,
5454
Uint32 NumContexts,
5555
VulkanUtilities::SyncObjectManager& SyncObjectMngr,
56-
VkDevice LogicalDevice,
56+
VkDevice vkDevice,
5757
Uint64 dbgValue);
5858

5959
void GetSemaphores(std::vector<VkSemaphore>& Semaphores);

Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class RenderDeviceVkImpl final : public RenderDeviceNextGenBase<RenderDeviceBase
164164
virtual void DILIGENT_CALL_TYPE CreateDeferredContext(IDeviceContext** ppContext) override final;
165165

166166
/// Implementation of IRenderDeviceVk::GetVkDevice().
167-
virtual VkDevice DILIGENT_CALL_TYPE GetVkDevice() override final { return m_LogicalVkDevice->GetVkDevice(); }
167+
virtual VkDevice DILIGENT_CALL_TYPE GetVkDevice() override final { return m_LogicalDevice->GetVkDevice(); }
168168

169169
/// Implementation of IRenderDeviceVk::GetVkPhysicalDevice().
170170
virtual VkPhysicalDevice DILIGENT_CALL_TYPE GetVkPhysicalDevice() override final { return m_PhysicalDevice->GetVkDeviceHandle(); }
@@ -237,7 +237,7 @@ class RenderDeviceVkImpl final : public RenderDeviceNextGenBase<RenderDeviceBase
237237
std::shared_ptr<const VulkanUtilities::Instance> GetInstance() const { return m_Instance; }
238238

239239
const VulkanUtilities::PhysicalDevice& GetPhysicalDevice() const { return *m_PhysicalDevice; }
240-
const VulkanUtilities::LogicalDevice& GetLogicalDevice() const { return *m_LogicalVkDevice; }
240+
const VulkanUtilities::LogicalDevice& GetLogicalDevice() const { return *m_LogicalDevice; }
241241

242242
FramebufferCache* GetFramebufferCache() { return m_FramebufferCache.get(); }
243243
RenderPassCache* GetImplicitRenderPassCache() { return m_ImplicitRenderPassCache.get(); }
@@ -300,7 +300,7 @@ class RenderDeviceVkImpl final : public RenderDeviceNextGenBase<RenderDeviceBase
300300

301301
std::shared_ptr<VulkanUtilities::Instance> m_Instance;
302302
std::unique_ptr<VulkanUtilities::PhysicalDevice> m_PhysicalDevice;
303-
std::shared_ptr<VulkanUtilities::LogicalDevice> m_LogicalVkDevice;
303+
std::shared_ptr<VulkanUtilities::LogicalDevice> m_LogicalDevice;
304304

305305
std::unique_ptr<FramebufferCache> m_FramebufferCache;
306306
std::unique_ptr<RenderPassCache> m_ImplicitRenderPassCache;

Graphics/GraphicsEngineVulkan/include/VulkanUtilities/Instance.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ class Instance : public std::enable_shared_from_this<Instance>
9292
VkPhysicalDevice SelectPhysicalDevice(uint32_t AdapterId)const noexcept(false);
9393
VkPhysicalDevice SelectPhysicalDeviceForOpenXR(const CreateInfo::OpenXRInfo& XRInfo)const noexcept(false);
9494

95-
VkAllocationCallbacks* GetVkAllocator() const {return m_pVkAllocator;}
96-
VkInstance GetVkInstance() const {return m_VkInstance; }
97-
uint32_t GetVersion() const {return m_VkVersion; } // Warning: instance version may be greater than physical device version
95+
VkAllocationCallbacks* GetVkAllocator() const {return m_pvkAllocator;}
96+
VkInstance GetVkInstance() const {return m_vkInstance; }
97+
uint32_t GetVersion() const {return m_vkVersion; } // Warning: instance version may be greater than physical device version
9898
// clang-format on
9999

100100
const std::vector<VkPhysicalDevice>& GetVkPhysicalDevices() const { return m_PhysicalDevices; }
@@ -110,9 +110,9 @@ class Instance : public std::enable_shared_from_this<Instance>
110110
};
111111
DebugMode m_DebugMode = DebugMode::Disabled;
112112

113-
VkAllocationCallbacks* const m_pVkAllocator;
114-
VkInstance m_VkInstance = VK_NULL_HANDLE;
115-
uint32_t m_VkVersion = VK_API_VERSION_1_0;
113+
VkAllocationCallbacks* const m_pvkAllocator;
114+
VkInstance m_vkInstance = VK_NULL_HANDLE;
115+
uint32_t m_vkVersion = VK_API_VERSION_1_0;
116116

117117
std::vector<VkLayerProperties> m_Layers;
118118
std::vector<VkExtensionProperties> m_Extensions;

Graphics/GraphicsEngineVulkan/include/VulkanUtilities/MemoryManager.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,13 @@ class MemoryManager
157157
public:
158158
// clang-format off
159159
MemoryManager(std::string MgrName,
160-
const LogicalDevice& Device,
161-
const PhysicalDevice& PhysDevice,
162-
Diligent::IMemoryAllocator& Allocator,
163-
VkDeviceSize DeviceLocalPageSize,
164-
VkDeviceSize HostVisiblePageSize,
165-
VkDeviceSize DeviceLocalReserveSize,
166-
VkDeviceSize HostVisibleReserveSize) :
160+
const LogicalDevice& Device,
161+
const PhysicalDevice& PhysDevice,
162+
Diligent::IMemoryAllocator& Allocator,
163+
VkDeviceSize DeviceLocalPageSize,
164+
VkDeviceSize HostVisiblePageSize,
165+
VkDeviceSize DeviceLocalReserveSize,
166+
VkDeviceSize HostVisibleReserveSize) :
167167
m_MgrName {std::move(MgrName) },
168168
m_LogicalDevice {Device },
169169
m_PhysicalDevice {PhysDevice },

Graphics/GraphicsEngineVulkan/include/VulkanUtilities/ObjectWrappers.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ class ObjectWrapper
4848
m_VkObject{VK_NULL_HANDLE}
4949
{}
5050

51-
ObjectWrapper(std::shared_ptr<const LogicalDevice> pLogicalDevice, VulkanObjectType&& vkObject) :
52-
m_Device{pLogicalDevice},
51+
ObjectWrapper(std::shared_ptr<const LogicalDevice> pDevice, VulkanObjectType&& vkObject) :
52+
m_Device{pDevice},
5353
m_VkObject{vkObject}
5454
{
5555
vkObject = VK_NULL_HANDLE;

Graphics/GraphicsEngineVulkan/include/VulkanUtilities/PhysicalDevice.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ class PhysicalDevice
119119

120120
uint32_t GetMemoryTypeIndex(uint32_t typeBits, VkMemoryPropertyFlags properties) const;
121121

122-
VkPhysicalDevice GetVkDeviceHandle() const { return m_VkDevice; }
123-
uint32_t GetVkVersion() const { return m_VkVersion; }
122+
VkPhysicalDevice GetVkDeviceHandle() const { return m_vkDevice; }
123+
uint32_t GetVkVersion() const { return m_vkVersion; }
124124
const VkPhysicalDeviceProperties& GetProperties() const { return m_Properties; }
125125
const VkPhysicalDeviceFeatures& GetFeatures() const { return m_Features; }
126126
const ExtensionFeatures& GetExtFeatures() const { return m_ExtFeatures; }
@@ -134,8 +134,8 @@ class PhysicalDevice
134134
private:
135135
PhysicalDevice(const CreateInfo& CI);
136136

137-
const VkPhysicalDevice m_VkDevice;
138-
uint32_t m_VkVersion = 0;
137+
const VkPhysicalDevice m_vkDevice;
138+
uint32_t m_vkVersion = 0;
139139
VkPhysicalDeviceProperties m_Properties = {};
140140
VkPhysicalDeviceFeatures m_Features = {};
141141
VkPhysicalDeviceMemoryProperties m_MemoryProperties = {};

Graphics/GraphicsEngineVulkan/include/VulkanUtilities/SyncObjectManager.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class SyncObjectManager : public std::enable_shared_from_this<SyncObjectManager>
5656
class RecycledSyncObject;
5757

5858
public:
59-
explicit SyncObjectManager(LogicalDevice& LogicalDevice);
59+
explicit SyncObjectManager(LogicalDevice& Device);
6060
~SyncObjectManager();
6161

6262
void CreateSemaphores(RecycledSyncObject<VkSemaphoreType>* pSemaphores, uint32_t Count);

Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ RenderDeviceVkImpl::RenderDeviceVkImpl(IReferenceCounters*
8484
},
8585
m_Instance {Instance },
8686
m_PhysicalDevice {std::move(PhysicalDevice)},
87-
m_LogicalVkDevice {std::move(LogicalDevice) },
87+
m_LogicalDevice {std::move(LogicalDevice) },
8888
m_DescriptorSetAllocator
8989
{
9090
*this,
@@ -132,7 +132,7 @@ RenderDeviceVkImpl::RenderDeviceVkImpl(IReferenceCounters*
132132
m_MemoryMgr
133133
{
134134
"Global resource memory manager",
135-
*m_LogicalVkDevice,
135+
*m_LogicalDevice,
136136
*m_PhysicalDevice,
137137
GetRawAllocator(),
138138
EngineCI.DeviceLocalMemoryPageSize,
@@ -150,7 +150,7 @@ RenderDeviceVkImpl::RenderDeviceVkImpl(IReferenceCounters*
150150
m_pDxCompiler{CreateDXCompiler(DXCompilerTarget::Vulkan, m_PhysicalDevice->GetVkVersion(), EngineCI.pDxCompilerPath)}
151151
// clang-format on
152152
{
153-
if (!m_LogicalVkDevice->GetEnabledExtFeatures().DynamicRendering.dynamicRendering)
153+
if (!m_LogicalDevice->GetEnabledExtFeatures().DynamicRendering.dynamicRendering)
154154
{
155155
m_FramebufferCache = std::make_unique<FramebufferCache>(*this);
156156
m_ImplicitRenderPassCache = std::make_unique<RenderPassCache>(*this);
@@ -163,9 +163,9 @@ RenderDeviceVkImpl::RenderDeviceVkImpl(IReferenceCounters*
163163
m_DeviceInfo.APIVersion = Version{VK_API_VERSION_MAJOR(vkVersion), VK_API_VERSION_MINOR(vkVersion)};
164164

165165
m_DeviceInfo.Features = VkFeaturesToDeviceFeatures(vkVersion,
166-
m_LogicalVkDevice->GetEnabledFeatures(),
166+
m_LogicalDevice->GetEnabledFeatures(),
167167
m_PhysicalDevice->GetProperties(),
168-
m_LogicalVkDevice->GetEnabledExtFeatures(),
168+
m_LogicalDevice->GetEnabledExtFeatures(),
169169
m_PhysicalDevice->GetExtProperties());
170170

171171
m_DeviceInfo.MaxShaderVersion.HLSL = {5, 1};
@@ -267,7 +267,7 @@ void RenderDeviceVkImpl::AllocateTransientCmdPool(SoftwareQueueIndex
267267
BuffAllocInfo.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
268268
BuffAllocInfo.commandBufferCount = 1;
269269

270-
VkCommandBuffer vkCmdBuff = m_LogicalVkDevice->AllocateVkCommandBuffer(BuffAllocInfo);
270+
VkCommandBuffer vkCmdBuff = m_LogicalDevice->AllocateVkCommandBuffer(BuffAllocInfo);
271271
DEV_CHECK_ERR(vkCmdBuff != VK_NULL_HANDLE, "Failed to allocate Vulkan command buffer");
272272

273273

@@ -284,8 +284,8 @@ void RenderDeviceVkImpl::AllocateTransientCmdPool(SoftwareQueueIndex
284284
(void)err;
285285

286286
CmdBuffer.SetVkCmdBuffer(vkCmdBuff,
287-
m_LogicalVkDevice->GetSupportedStagesMask(QueueFamilyIndex),
288-
m_LogicalVkDevice->GetSupportedAccessMask(QueueFamilyIndex));
287+
m_LogicalDevice->GetSupportedStagesMask(QueueFamilyIndex),
288+
m_LogicalDevice->GetSupportedAccessMask(QueueFamilyIndex));
289289
}
290290

291291

@@ -445,7 +445,7 @@ Uint64 RenderDeviceVkImpl::ExecuteCommandBuffer(SoftwareQueueIndex CommandQueueI
445445
void RenderDeviceVkImpl::IdleGPU()
446446
{
447447
IdleAllCommandQueues(true);
448-
m_LogicalVkDevice->WaitIdle();
448+
m_LogicalDevice->WaitIdle();
449449
ReleaseStaleResources();
450450
}
451451

@@ -834,7 +834,7 @@ SparseTextureFormatInfo RenderDeviceVkImpl::GetSparseTextureFormatInfo(TEXTURE_F
834834

835835
void RenderDeviceVkImpl::GetDeviceFeaturesVk(DeviceFeaturesVk& FeaturesVk) const
836836
{
837-
FeaturesVk = PhysicalDeviceFeaturesToDeviceFeaturesVk(m_LogicalVkDevice->GetEnabledExtFeatures());
837+
FeaturesVk = PhysicalDeviceFeaturesToDeviceFeaturesVk(m_LogicalDevice->GetEnabledExtFeatures());
838838
}
839839

840840
} // namespace Diligent

Graphics/GraphicsEngineVulkan/src/VulkanUtilities/Instance.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ std::shared_ptr<Instance> Instance::Create(const CreateInfo& CI)
252252
}
253253

254254
Instance::Instance(const CreateInfo& CI) :
255-
m_pVkAllocator{CI.pVkAllocator}
255+
m_pvkAllocator{CI.pVkAllocator}
256256
{
257257
#if DILIGENT_USE_VOLK
258258
if (volkInitialize() != VK_SUCCESS)
@@ -536,21 +536,21 @@ Instance::Instance(const CreateInfo& CI) :
536536
#if DILIGENT_USE_OPENXR
537537
if (xrInstance != XR_NULL_HANDLE)
538538
{
539-
res = CreateVkInstanceForOpenXR(xrInstance, xrSystemId, xrGetInstanceProcAddr, &InstanceCreateInfo, m_pVkAllocator, &m_VkInstance);
539+
res = CreateVkInstanceForOpenXR(xrInstance, xrSystemId, xrGetInstanceProcAddr, &InstanceCreateInfo, m_pvkAllocator, &m_vkInstance);
540540
}
541541
else
542542
#endif
543543
{
544-
res = vkCreateInstance(&InstanceCreateInfo, m_pVkAllocator, &m_VkInstance);
544+
res = vkCreateInstance(&InstanceCreateInfo, m_pvkAllocator, &m_vkInstance);
545545
}
546546
CHECK_VK_ERROR_AND_THROW(res, "Failed to create Vulkan instance");
547547

548548
#if DILIGENT_USE_VOLK
549-
volkLoadInstance(m_VkInstance);
549+
volkLoadInstance(m_vkInstance);
550550
#endif
551551

552552
m_EnabledExtensions = std::move(InstanceExtensions);
553-
m_VkVersion = ApiVersion;
553+
m_vkVersion = ApiVersion;
554554

555555
// If requested, we enable the default validation layers for debugging
556556
if (m_DebugMode == DebugMode::Utils)
@@ -562,7 +562,7 @@ Instance::Instance(const CreateInfo& CI) :
562562
VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT |
563563
VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT |
564564
VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT;
565-
if (!VulkanUtilities::SetupDebugUtils(m_VkInstance, messageSeverity, messageType, CI.IgnoreDebugMessageCount, CI.ppIgnoreDebugMessageNames, nullptr))
565+
if (!VulkanUtilities::SetupDebugUtils(m_vkInstance, messageSeverity, messageType, CI.IgnoreDebugMessageCount, CI.ppIgnoreDebugMessageNames, nullptr))
566566
LOG_ERROR_MESSAGE("Failed to initialize debug utils. Validation layer message logging, performance markers, etc. will be disabled.");
567567
}
568568
else if (m_DebugMode == DebugMode::Report)
@@ -571,7 +571,7 @@ Instance::Instance(const CreateInfo& CI) :
571571
VK_DEBUG_REPORT_WARNING_BIT_EXT |
572572
VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT |
573573
VK_DEBUG_REPORT_ERROR_BIT_EXT);
574-
if (!VulkanUtilities::SetupDebugReport(m_VkInstance, flags, nullptr))
574+
if (!VulkanUtilities::SetupDebugReport(m_vkInstance, flags, nullptr))
575575
LOG_ERROR_MESSAGE("Failed to initialize debug report. Validation layer message logging will be disabled.");
576576
}
577577

@@ -580,14 +580,14 @@ Instance::Instance(const CreateInfo& CI) :
580580
// Physical device
581581
uint32_t PhysicalDeviceCount = 0;
582582
// Get the number of available physical devices
583-
VkResult err = vkEnumeratePhysicalDevices(m_VkInstance, &PhysicalDeviceCount, nullptr);
583+
VkResult err = vkEnumeratePhysicalDevices(m_vkInstance, &PhysicalDeviceCount, nullptr);
584584
CHECK_VK_ERROR(err, "Failed to get physical device count");
585585
if (PhysicalDeviceCount == 0)
586586
LOG_ERROR_AND_THROW("No physical devices found on the system");
587587

588588
// Enumerate devices
589589
m_PhysicalDevices.resize(PhysicalDeviceCount);
590-
err = vkEnumeratePhysicalDevices(m_VkInstance, &PhysicalDeviceCount, m_PhysicalDevices.data());
590+
err = vkEnumeratePhysicalDevices(m_vkInstance, &PhysicalDeviceCount, m_PhysicalDevices.data());
591591
CHECK_VK_ERROR(err, "Failed to enumerate physical devices");
592592
VERIFY_EXPR(m_PhysicalDevices.size() == PhysicalDeviceCount);
593593
}
@@ -600,9 +600,9 @@ Instance::~Instance()
600600
{
601601
if (m_DebugMode != DebugMode::Disabled)
602602
{
603-
VulkanUtilities::FreeDebug(m_VkInstance);
603+
VulkanUtilities::FreeDebug(m_vkInstance);
604604
}
605-
vkDestroyInstance(m_VkInstance, m_pVkAllocator);
605+
vkDestroyInstance(m_vkInstance, m_pvkAllocator);
606606

607607
#if !DILIGENT_NO_GLSLANG
608608
Diligent::GLSLangUtils::FinalizeGlslang();
@@ -696,7 +696,7 @@ VkPhysicalDevice Instance::SelectPhysicalDeviceForOpenXR(const CreateInfo::OpenX
696696
XrVulkanGraphicsDeviceGetInfoKHR vkGraphicsDeviceGetInfo{XR_TYPE_VULKAN_GRAPHICS_DEVICE_GET_INFO_KHR};
697697
static_assert(sizeof(vkGraphicsDeviceGetInfo.systemId) == sizeof(XRInfo.SystemId), "SystemId Size mismatch");
698698
memcpy(&vkGraphicsDeviceGetInfo.systemId, &XRInfo.SystemId, sizeof(vkGraphicsDeviceGetInfo.systemId));
699-
vkGraphicsDeviceGetInfo.vulkanInstance = m_VkInstance;
699+
vkGraphicsDeviceGetInfo.vulkanInstance = m_vkInstance;
700700

701701
PFN_xrGetInstanceProcAddr xrGetInstanceProcAddr = reinterpret_cast<PFN_xrGetInstanceProcAddr>(XRInfo.GetInstanceProcAddr);
702702
PFN_xrGetVulkanGraphicsDevice2KHR xrGetVulkanGraphicsDevice2KHR = nullptr;

0 commit comments

Comments
 (0)