Skip to content

Commit af6af51

Browse files
committed
Clean-up
1 parent 103da15 commit af6af51

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

src/engine/renderer-vulkan/GraphicsCore/Instance.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5555

5656
#include "Instance.h"
5757

58-
Instance coreInstance;
5958

6059
void Instance::Init( const char* engineName, const char* appName ) {
61-
VkApplicationInfo appInfo{
62-
.pApplicationName = appName,
60+
VkApplicationInfo appInfo {
61+
.pApplicationName = appName,
6362
.applicationVersion = 0,
64-
.pEngineName = engineName,
65-
.engineVersion = 0,
66-
.apiVersion = VK_MAKE_API_VERSION( 0, 1, 3, 0 )
63+
.pEngineName = engineName,
64+
.engineVersion = 0,
65+
.apiVersion = VK_MAKE_API_VERSION( 0, 1, 3, 0 )
6766
};
6867

6968
uint32 count;
@@ -90,10 +89,10 @@ void Instance::Init( const char* engineName, const char* appName ) {
9089
capabilityPackMinimal.requiredInstanceExtensions.size * sizeof( const char* ) );
9190

9291
VkInstanceCreateInfo createInfo {
93-
.pApplicationInfo = &appInfo,
94-
.enabledLayerCount = 0,
95-
.ppEnabledLayerNames = nullptr,
96-
.enabledExtensionCount = count, // ( uint32 ) extensions.elements,
92+
.pApplicationInfo = &appInfo,
93+
.enabledLayerCount = 0,
94+
.ppEnabledLayerNames = nullptr,
95+
.enabledExtensionCount = count, // ( uint32 ) extensions.elements,
9796
.ppEnabledExtensionNames = sdlext // extensions.memory
9897
};
9998

@@ -124,7 +123,7 @@ void Instance::Init( const char* engineName, const char* appName ) {
124123
mainSwapChain.Init( instance );
125124

126125
std::string foundQueues = "Found queues: graphics (present: true)";
127-
graphicsQueue.Init( device, queuesConfig.graphicsQueue.id, queuesConfig.graphicsQueue.queues );
126+
graphicsQueue.Init( device, queuesConfig.graphicsQueue.id, queuesConfig.graphicsQueue.queues );
128127

129128
uint32 presentSupported;
130129
vkGetPhysicalDeviceSurfaceSupportKHR( physicalDevice, graphicsQueue.id, mainSwapChain.surface, &presentSupported );

src/engine/renderer-vulkan/GraphicsCore/QueuesConfig.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,20 @@ QueuesConfig GetQueuesConfigForDevice( const VkPhysicalDevice& device ) {
6969
if ( cfg->type & GRAPHICS ) {
7070
config.graphicsQueue = *cfg;
7171
config.graphicsQueue.unique = true;
72-
} else if ( ( cfg->type & COMPUTE ) && cfg->queues > config.computeQueue.queues ) {
72+
} else if ( ( cfg->type & COMPUTE ) && cfg->queues > config.computeQueue.queues ) {
7373
config.computeQueue = *cfg;
7474
config.computeQueue.unique = true;
7575
} else if ( ( cfg->type & TRANSFER ) && cfg->queues > config.transferQueue.queues ) {
7676
config.transferQueue = *cfg;
7777
config.transferQueue.unique = true;
78-
} else if ( ( cfg->type & SPARSE ) && cfg->queues > config.sparseQueue.queues ) {
78+
} else if ( ( cfg->type & SPARSE ) && cfg->queues > config.sparseQueue.queues ) {
7979
config.sparseQueue = *cfg;
8080
config.sparseQueue.unique = true;
8181
}
8282
}
8383

8484
if ( !config.computeQueue.queues ) {
85-
config.computeQueue = *GetQueueConfigForType( config, COMPUTE );
85+
config.computeQueue = *GetQueueConfigForType( config, COMPUTE );
8686
config.computeQueue.unique = false;
8787
}
8888

@@ -92,7 +92,7 @@ QueuesConfig GetQueuesConfigForDevice( const VkPhysicalDevice& device ) {
9292
}
9393

9494
if ( !config.sparseQueue.queues ) {
95-
config.sparseQueue = *GetQueueConfigForType( config, SPARSE );
95+
config.sparseQueue = *GetQueueConfigForType( config, SPARSE );
9696
config.sparseQueue.unique = false;
9797
}
9898

src/engine/renderer-vulkan/GraphicsCore/SwapChain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ struct VkFormatHasher {
5555
};
5656

5757
static std::unordered_map<VkFormat, int, VkFormatHasher> surfaceFormatPriorities {
58-
{ VK_FORMAT_UNDEFINED, -1 },
58+
{ VK_FORMAT_UNDEFINED, -1 },
5959

6060
{ VK_FORMAT_B8G8R8A8_SRGB, 2 },
6161
{ VK_FORMAT_B8G8R8A8_UNORM, 1 },

0 commit comments

Comments
 (0)