Skip to content

Commit

Permalink
Fix clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenegff committed Dec 5, 2024
1 parent b56819a commit 04cf183
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ namespace Ogre

void notifyDeviceLost() override;
void notifyDeviceRestored( unsigned pass ) override;

public:
VulkanDiscardBufferManager( VulkanDevice *device, VaoManager *vaoManager );
~VulkanDiscardBufferManager();
Expand Down
2 changes: 1 addition & 1 deletion RenderSystems/Vulkan/include/OgreVulkanGpuProgramManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ THE SOFTWARE.

#include "OgreVulkanPrerequisites.h"

#include "OgreVulkanDeviceResource.h"
#include "OgreGpuProgramManager.h"
#include "OgreVulkanDeviceResource.h"

#include "vulkan/vulkan_core.h"

Expand Down
14 changes: 3 additions & 11 deletions RenderSystems/Vulkan/src/OgreVulkanCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,19 +183,11 @@ namespace Ogre
//-------------------------------------------------------------------------
VulkanCache::VulkanCache( VulkanDevice *device ) : mDevice( device ) {}
//-------------------------------------------------------------------------
VulkanCache::~VulkanCache()
{
destroy();
}
VulkanCache::~VulkanCache() { destroy(); }
//-------------------------------------------------------------------------
void VulkanCache::notifyDeviceLost()
{
destroy();
}
void VulkanCache::notifyDeviceLost() { destroy(); }
//-------------------------------------------------------------------------
void VulkanCache::notifyDeviceRestored( unsigned pass )
{
}
void VulkanCache::notifyDeviceRestored( unsigned pass ) {}
//-------------------------------------------------------------------------
void VulkanCache::destroy()
{
Expand Down
10 changes: 2 additions & 8 deletions RenderSystems/Vulkan/src/OgreVulkanDiscardBufferManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,9 @@ namespace Ogre
createVkResources();
}

VulkanDiscardBufferManager::~VulkanDiscardBufferManager()
{
destroyVkResources();
}
VulkanDiscardBufferManager::~VulkanDiscardBufferManager() { destroyVkResources(); }

void VulkanDiscardBufferManager::notifyDeviceLost()
{
destroyVkResources();
}
void VulkanDiscardBufferManager::notifyDeviceLost() { destroyVkResources(); }

void VulkanDiscardBufferManager::notifyDeviceRestored( unsigned pass )
{
Expand Down
9 changes: 2 additions & 7 deletions RenderSystems/Vulkan/src/OgreVulkanGpuProgramManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,9 @@ namespace Ogre
mDescriptorSetMap.clear();
}
//-------------------------------------------------------------------------
void VulkanGpuProgramManager::notifyDeviceLost()
{
destroyDescriptorSetLayouts();
}
void VulkanGpuProgramManager::notifyDeviceLost() { destroyDescriptorSetLayouts(); }
//-------------------------------------------------------------------------
void VulkanGpuProgramManager::notifyDeviceRestored( unsigned pass )
{
}
void VulkanGpuProgramManager::notifyDeviceRestored( unsigned pass ) {}
//-------------------------------------------------------------------------
bool VulkanGpuProgramManager::registerProgramFactory( const String &syntaxCode,
CreateGpuProgramCallback createFn )
Expand Down
5 changes: 1 addition & 4 deletions RenderSystems/Vulkan/src/OgreVulkanRenderPassDescriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ namespace Ogre
//-----------------------------------------------------------------------------------
VulkanRenderPassDescriptor::~VulkanRenderPassDescriptor() { releaseFbo(); }
//-----------------------------------------------------------------------------------
void VulkanRenderPassDescriptor::notifyDeviceLost()
{
releaseFbo();
}
void VulkanRenderPassDescriptor::notifyDeviceLost() { releaseFbo(); }
//-----------------------------------------------------------------------------------
void VulkanRenderPassDescriptor::notifyDeviceRestored( unsigned pass )
{
Expand Down
1 change: 0 additions & 1 deletion RenderSystems/Vulkan/src/OgreVulkanRenderSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,6 @@ namespace Ogre
}

return true;

}
//-------------------------------------------------------------------------
void VulkanRenderSystem::handleDeviceLost()
Expand Down
4 changes: 1 addition & 3 deletions RenderSystems/Vulkan/src/OgreVulkanRootLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ namespace Ogre
mPools.resize( 0 );
}
//-------------------------------------------------------------------------
void VulkanRootLayout::notifyDeviceRestored( unsigned pass )
{
}
void VulkanRootLayout::notifyDeviceRestored( unsigned pass ) {}
//-------------------------------------------------------------------------
void VulkanRootLayout::copyFrom( const RootLayout &rootLayout, bool bIncludeArrayBindings )
{
Expand Down
10 changes: 3 additions & 7 deletions RenderSystems/Vulkan/src/OgreVulkanTextureGpuManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ namespace Ogre
createVkResources();
}
//-----------------------------------------------------------------------------------
VulkanTextureGpuManager::~VulkanTextureGpuManager()
{
destroyVkResources( true );
}
VulkanTextureGpuManager::~VulkanTextureGpuManager() { destroyVkResources( true ); }
//-----------------------------------------------------------------------------------
void VulkanTextureGpuManager::createVkResources()
{
Expand Down Expand Up @@ -104,7 +101,7 @@ namespace Ogre

// Use a VulkanStagingTexture but we will manually handle the upload.
// The barriers are easy because there is no work using any of this data
VulkanVaoManager *vaoManager = static_cast<VulkanVaoManager *>( mVaoManager );
VulkanVaoManager *vaoManager = static_cast<VulkanVaoManager *>( mVaoManager );
VulkanStagingTexture *stagingTex =
vaoManager->createStagingTexture( PFG_RGBA8_UNORM, sizeof( c_whiteData ) * 2u );

Expand Down Expand Up @@ -173,8 +170,7 @@ namespace Ogre
memRequirements, mBlankTexture[i].vboPoolIdx, mBlankTexture[i].internalBufferStart );

VkResult result = vkBindImageMemory( mDevice->mDevice, mBlankTexture[i].vkImage,
deviceMemory,
mBlankTexture[i].internalBufferStart );
deviceMemory, mBlankTexture[i].internalBufferStart );
checkVkResult( result, "vkBindImageMemory" );
}

Expand Down
7 changes: 2 additions & 5 deletions RenderSystems/Vulkan/src/Vao/OgreVulkanVaoManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,7 @@ namespace Ogre
}
}
//-----------------------------------------------------------------------------------
VulkanVaoManager::~VulkanVaoManager()
{
destroyVkResources( true );
}
VulkanVaoManager::~VulkanVaoManager() { destroyVkResources( true ); }
//-----------------------------------------------------------------------------------
void VulkanVaoManager::createVkResources()
{
Expand Down Expand Up @@ -218,7 +215,7 @@ namespace Ogre

deleteStagingBuffers();

for( VulkanDelayedFuncBaseArray& fnFrame : mDelayedFuncs )
for( VulkanDelayedFuncBaseArray &fnFrame : mDelayedFuncs )
{
for( VulkanDelayedFuncBase *fn : fnFrame )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,7 @@ namespace Ogre
{
}
//-------------------------------------------------------------------------
VulkanAndroidWindow::~VulkanAndroidWindow()
{
destroy();
}
VulkanAndroidWindow::~VulkanAndroidWindow() { destroy(); }
//-----------------------------------------------------------------------------------
const char *VulkanAndroidWindow::getRequiredExtensionName()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,7 @@ namespace Ogre
#endif
}
//-------------------------------------------------------------------------
VulkanWin32Window::~VulkanWin32Window()
{
destroy();
}
VulkanWin32Window::~VulkanWin32Window() { destroy(); }
//-------------------------------------------------------------------------
const char *VulkanWin32Window::getRequiredExtensionName()
{
Expand Down

0 comments on commit 04cf183

Please sign in to comment.