Skip to content

Commit

Permalink
Reduce Vulkan backend log spam
Browse files Browse the repository at this point in the history
  • Loading branch information
mholtkamp committed May 28, 2024
1 parent 1e48783 commit 54648ef
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Engine/Source/Graphics/Vulkan/DescriptorLayoutCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ VkDescriptorSetLayout DescriptorLayoutCache::CreateLayout(VkDescriptorSetLayoutC
else
{
// Pre-existing layout not found, need to create it.

#if VULKAN_VERBOSE_LOGGING
LogDebug("Creating new descriptor set layout");
#endif
VkDescriptorSetLayout layout;
vkCreateDescriptorSetLayout(device, info, nullptr, &layout);

Expand Down
2 changes: 2 additions & 0 deletions Engine/Source/Graphics/Vulkan/DescriptorPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ VkDescriptorSet DescriptorPool::Allocate(VkDescriptorSetLayout layout, const cha

VkDescriptorPool DescriptorPool::CreatePool()
{
#if VULKAN_VERBOSE_LOGGING
LogDebug("CreatePool()");
#endif

VkDevice device = GetVulkanDevice();

Expand Down
2 changes: 2 additions & 0 deletions Engine/Source/Graphics/Vulkan/Pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ void Pipeline::CreateComputePipeline(VkPipelineCache cache, VkSpecializationInfo

void Pipeline::Create(const PipelineState& state, VkPipelineCache cache, VkSpecializationInfo* specInfo)
{
#if VULKAN_VERBOSE_LOGGING
LogDebug("Creating new pipeline");
#endif

// We probably don't need to store the state internally, but it might help for debugging.
// If we have tons of pipelines and its consuming a lot of memory, then we can pass a ref of the state
Expand Down
4 changes: 4 additions & 0 deletions Engine/Source/Graphics/Vulkan/RenderPassCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ VkRenderPass RenderPassCache::ResolveRenderPass(const RenderPassConfig& config)
ciRenderPass.dependencyCount = 1;
ciRenderPass.pDependencies = &extDependency;

#if VULKAN_VERBOSE_LOGGING
LogDebug("Creating new RenderPass");
#endif

if (vkCreateRenderPass(device, &ciRenderPass, nullptr, &renderPass) != VK_SUCCESS)
{
Expand Down Expand Up @@ -198,7 +200,9 @@ VkFramebuffer RenderPassCache::ResolveFramebuffer(const FramebufferConfig& confi
ciFramebuffer.height = config.mDepthImage ? config.mDepthImage->GetHeight() : config.mColorImages[0]->GetHeight();
ciFramebuffer.layers = 1;

#if VULKAN_VERBOSE_LOGGING
LogDebug("Creating new Framebuffer");
#endif

if (vkCreateFramebuffer(device, &ciFramebuffer, nullptr, &framebuffer) != VK_SUCCESS)
{
Expand Down
2 changes: 2 additions & 0 deletions Engine/Source/Graphics/Vulkan/VulkanConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@

#define NUM_MATERIAL_VERTEX_CONFIGS 4
#define MAX_MATERIAL_UBO_SIZE (4 * 1024)

#define VULKAN_VERBOSE_LOGGING 0
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,10 @@ A 3D Game Engine for GameCube, Wii, 3DS, Windows, Linux, and Android
10. Run `make -f Makefile_Linux_Editor`
11. Go back to the root directory `cd ..`
12. Run `Standalone/Build/Linux/OctaveEditor.out` It's important that the working directory is the root directory where the Engine and Standalone folders are located.


## Packaging
1. For packing Windows, add your devenv.exe folder to your PATH. For instance:
`C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE`
2. For packaging GameCube, Wii, or 3DS, add your devkitPro tools folder to your PATH. For instance:
`C:\devkitPro\tools\bin`

0 comments on commit 54648ef

Please sign in to comment.